@moontra/moonui-pro 2.33.24 → 2.33.26

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.
@@ -124,7 +124,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
124
124
  - less than the value passed to \`max\` (or ${Noe} if no \`max\` prop is set)
125
125
  - \`null\` or \`undefined\` if the progress is indeterminate.
126
126
 
127
- Defaulting to \`null\`.`}var Toe=$Oe,KOe=qOe;var Moe=A(de(),1),_o=XOe.forwardRef(({className:e,value:t,...r},n)=>(0,Moe.jsx)(Toe,{ref:n,className:F("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,Moe.jsx)(KOe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));_o.displayName=Toe.displayName;var km=A(ue(),1);var cp=A(de(),1),Y6=xt("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),v_=km.createContext({}),sP=km.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,cp.jsx)(v_.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,cp.jsx)("div",{ref:i,role:"radiogroup",className:F("grid gap-2",e),...a})}));sP.displayName="RadioGroupPro";var $x=km.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=km.useContext(v_),u=km.useId(),d=o||u,f=c.value===a,p=h=>{c.onValueChange&&c.onValueChange(h.target.value),s.onChange&&s.onChange(h)};return(0,cp.jsxs)("div",{className:"relative flex items-center",children:[(0,cp.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||c.disabled,name:c.name,onChange:p,className:"sr-only",...s}),(0,cp.jsx)("label",{htmlFor:d,className:F(Y6({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,cp.jsx)("span",{className:F("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,cp.jsx)(Vd,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});$x.displayName="RadioGroupItemPro";var y_=km.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,cp.jsx)("label",{ref:a,htmlFor:t,className:F("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));y_.displayName="RadioLabelPro";var Q6=km.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=km.useId(),i=e||a;return(0,cp.jsxs)("div",{className:"flex items-center",children:[(0,cp.jsx)($x,{ref:o,id:i,...n}),(0,cp.jsx)(y_,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});Q6.displayName="RadioItemWithLabelPro";var _oe=A(ue(),1);var pr=A(ue(),1);var QOe=A(ue(),1),Po=A(de(),1);function ZLt(e,t){return QOe.useReducer((r,n)=>t[r][n]??r,e)}var Eoe="ScrollArea",[ZOe,$in]=Zn(Eoe),[JLt,Rm]=ZOe(Eoe),JOe=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=pr.useState(null),[c,u]=pr.useState(null),[d,f]=pr.useState(null),[p,h]=pr.useState(null),[m,v]=pr.useState(null),[g,y]=pr.useState(0),[x,w]=pr.useState(0),[b,C]=pr.useState(!1),[S,P]=pr.useState(!1),T=rr(t,M=>l(M)),L=nm(o);return(0,Po.jsx)(JLt,{scope:r,type:n,dir:L,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:b,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,Po.jsx)(at.div,{dir:L,...i,ref:T,style:{position:"relative",["--radix-scroll-area-corner-width"]:g+"px",["--radix-scroll-area-corner-height"]:x+"px",...e.style}})})});JOe.displayName=Eoe;var e2e="ScrollAreaViewport",t2e=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=Rm(e2e,r),s=pr.useRef(null),l=rr(t,s,i.onViewportChange);return(0,Po.jsxs)(Po.Fragment,{children:[(0,Po.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Po.jsx)(at.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Po.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});t2e.displayName=e2e;var Uv="ScrollAreaScrollbar",e$=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return pr.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,Po.jsx)(eDt,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Po.jsx)(tDt,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Po.jsx)(r2e,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Po.jsx)(Aoe,{...n,ref:t}):null});e$.displayName=Uv;var eDt=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),[a,i]=pr.useState(!1);return pr.useEffect(()=>{let s=o.scrollArea,l=0;if(s){let c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),(0,Po.jsx)($o,{present:r||a,children:(0,Po.jsx)(r2e,{"data-state":a?"visible":"hidden",...n,ref:t})})}),tDt=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),a=e.orientation==="horizontal",i=r$(()=>l("SCROLL_END"),100),[s,l]=ZLt("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return pr.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),pr.useEffect(()=>{let c=o.viewport,u=a?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),(0,Po.jsx)($o,{present:r||s!=="hidden",children:(0,Po.jsx)(Aoe,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:et(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:et(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),r2e=pr.forwardRef((e,t)=>{let r=Rm(Uv,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=pr.useState(!1),s=e.orientation==="horizontal",l=r$(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return fT(r.viewport,l),fT(r.content,l),(0,Po.jsx)($o,{present:n||a,children:(0,Po.jsx)(Aoe,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Aoe=pr.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=Rm(Uv,e.__scopeScrollArea),a=pr.useRef(null),i=pr.useRef(0),[s,l]=pr.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=i2e(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return sDt(f,i.current,s,p)}return r==="horizontal"?(0,Po.jsx)(rDt,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=YOe(f,s,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):r==="vertical"?(0,Po.jsx)(nDt,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=YOe(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),rDt=pr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=Rm(Uv,e.__scopeScrollArea),[i,s]=pr.useState(),l=pr.useRef(null),c=rr(t,l,a.onScrollbarXChange);return pr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Po.jsx)(o2e,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:t$(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),l2e(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:J6(i.paddingLeft),paddingEnd:J6(i.paddingRight)}})}})}),nDt=pr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=Rm(Uv,e.__scopeScrollArea),[i,s]=pr.useState(),l=pr.useRef(null),c=rr(t,l,a.onScrollbarYChange);return pr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Po.jsx)(o2e,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:t$(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),l2e(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:J6(i.paddingTop),paddingEnd:J6(i.paddingBottom)}})}})}),[oDt,n2e]=ZOe(Uv),o2e=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=Rm(Uv,r),[h,m]=pr.useState(null),v=rr(t,T=>m(T)),g=pr.useRef(null),y=pr.useRef(""),x=p.viewport,w=n.content-n.viewport,b=io(u),C=io(l),S=r$(d,10);function P(T){if(g.current){let L=T.clientX-g.current.left,M=T.clientY-g.current.top;c({x:L,y:M})}}return pr.useEffect(()=>{let T=L=>{let M=L.target;h?.contains(M)&&b(L,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,h,w,b]),pr.useEffect(C,[n,C]),fT(h,S),fT(p.content,S),(0,Po.jsx)(oDt,{scope:r,scrollbar:h,hasThumb:o,onThumbChange:io(a),onThumbPointerUp:io(i),onThumbPositionChange:C,onThumbPointerDown:io(s),children:(0,Po.jsx)(at.div,{...f,ref:v,style:{position:"absolute",...f.style},onPointerDown:et(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),g.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(T))}),onPointerMove:et(e.onPointerMove,P),onPointerUp:et(e.onPointerUp,T=>{let L=T.target;L.hasPointerCapture(T.pointerId)&&L.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),Z6="ScrollAreaThumb",Loe=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=n2e(Z6,e.__scopeScrollArea);return(0,Po.jsx)($o,{present:r||o.hasThumb,children:(0,Po.jsx)(aDt,{ref:t,...n})})}),aDt=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=Rm(Z6,r),i=n2e(Z6,r),{onThumbPositionChange:s}=i,l=rr(t,d=>i.onThumbChange(d)),c=pr.useRef(void 0),u=r$(()=>{c.current&&(c.current(),c.current=void 0)},100);return pr.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=lDt(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,Po.jsx)(at.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:et(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:h,y:m})}),onPointerUp:et(e.onPointerUp,i.onThumbPointerUp)})});Loe.displayName=Z6;var Doe="ScrollAreaCorner",a2e=pr.forwardRef((e,t)=>{let r=Rm(Doe,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,Po.jsx)(iDt,{...e,ref:t}):null});a2e.displayName=Doe;var iDt=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=Rm(Doe,r),[a,i]=pr.useState(0),[s,l]=pr.useState(0),c=!!(a&&s);return fT(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),fT(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,Po.jsx)(at.div,{...n,ref:t,style:{width:a,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function J6(e){return e?parseInt(e,10):0}function i2e(e,t){let r=e/t;return isNaN(r)?0:r}function t$(e){let t=i2e(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function sDt(e,t,r,n="ltr"){let o=t$(r),a=o/2,i=t||a,s=o-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return s2e([l,c],d)(e)}function YOe(e,t,r="ltr"){let n=t$(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-n,l=r==="ltr"?[0,i]:[i*-1,0],c=t_(e,l);return s2e([0,i],[0,s])(c)}function s2e(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function l2e(e,t){return e>0&&e<t}var lDt=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function r$(e,t){let r=io(e),n=pr.useRef(0);return pr.useEffect(()=>()=>window.clearTimeout(n.current),[]),pr.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function fT(e,t){let r=io(t);no(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Ooe=JOe,c2e=t2e;var u2e=a2e;var jw=A(de(),1),Jd=_oe.forwardRef(({className:e,children:t,...r},n)=>(0,jw.jsxs)(Ooe,{ref:n,className:F("relative overflow-hidden",e),...r,children:[(0,jw.jsx)(c2e,{className:"h-full w-full rounded-[inherit]",children:t}),(0,jw.jsx)(n$,{}),(0,jw.jsx)(u2e,{})]}));Jd.displayName=Ooe.displayName;var n$=_oe.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,jw.jsx)(e$,{ref:n,orientation:t,className:F("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,jw.jsx)(Loe,{className:"relative flex-1 rounded-full bg-border"})}));n$.displayName=e$.displayName;var h2e=A(ue(),1);var f2e=A(ue(),1);var p2e=A(de(),1),uDt="Separator",d2e="horizontal",dDt=["horizontal","vertical"],m2e=f2e.forwardRef((e,t)=>{let{decorative:r,orientation:n=d2e,...o}=e,a=fDt(n)?n:d2e,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p2e.jsx)(at.div,{"data-orientation":a,...s,...o,ref:t})});m2e.displayName=uDt;function fDt(e){return dDt.includes(e)}var Foe=m2e;var g2e=A(de(),1),o$=xt("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Ys=h2e.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,g2e.jsx)(Foe,{ref:i,decorative:o,orientation:t,className:F(o$({orientation:t,variant:r,size:n}),e),...a}));Ys.displayName=Foe.displayName;var x_=A(ue(),1);var up=A(de(),1),$w=Iw,a$=Zj,v2e=QN,Boe=kw,i$=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(Mv,{className:F("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));i$.displayName=Mv.displayName;var mDt=xt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Wx=x_.forwardRef(({side:e="right",className:t,children:r,...n},o)=>(0,up.jsxs)(Boe,{children:[(0,up.jsx)(i$,{}),(0,up.jsxs)(Rw,{ref:o,className:F(mDt({side:e}),t),...n,children:[r,(0,up.jsxs)(QN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,up.jsx)(lr,{className:"h-4 w-4"}),(0,up.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Wx.displayName=Rw.displayName;var b_=({className:e,...t})=>(0,up.jsx)("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});b_.displayName="SheetHeader";var Voe=({className:e,...t})=>(0,up.jsx)("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Voe.displayName="SheetFooter";var w_=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(XN,{ref:r,className:F("text-lg font-semibold text-foreground",e),...t}));w_.displayName=XN.displayName;var C_=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(YN,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));C_.displayName=YN.displayName;var y2e=A(de(),1);function Ea({className:e,...t}){return(0,y2e.jsx)("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}var Ww=A(ue(),1);var zv=A(de(),1),hDt=xt("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),gDt=xt("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),vDt=xt("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),yDt=xt("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),qw=Ww.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:n,thumbVariant:o,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:c,defaultValue:u=[0],onValueChange:d,disabled:f,...p},h)=>{let[m,v]=Ww.useState(c||u||[0]);Ww.useEffect(()=>{c!==void 0&&v(c)},[c]);let g=L=>s?s(L):`${Math.round(L*100)/100}`,y=(L,M,N)=>(L-M)/(N-M)*100,x=Ww.useRef(null),w=p.min||0,b=p.max||100,C=p.step||1,S=L=>{let M=L.map(N=>{if(C<1){let V=C.toString().split(".")[1]?.length||0;return Math.round(N*Math.pow(10,V))/Math.pow(10,V)}return Math.round(N)});v(M),d&&d(M)},P=L=>{if(f)return;let M=x.current;if(!M)return;let N=M.getBoundingClientRect(),V=(L.clientX-N.left)/N.width,_=w+V*(b-w),I=Math.round(_/C)*C,k=Math.max(w,Math.min(b,I)),R=[...m];R[0]=k,S(R)},T=L=>M=>{if(f)return;M.preventDefault();let N=_=>{let I=x.current;if(!I)return;let k=I.getBoundingClientRect(),R=(_.clientX-k.left)/k.width,E=w+R*(b-w),O=Math.round(E/C)*C,B=Math.max(w,Math.min(b,O)),U=[...m];U[L]=B,S(U)},V=()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",V)};return(0,zv.jsxs)("div",{className:"w-full",ref:h,...p,children:[i&&(0,zv.jsx)("div",{className:F("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,zv.jsx)("span",{children:g(m[0])}):(0,zv.jsxs)("span",{children:[g(m[0])," - ",g(m[m.length-1])]})}),(0,zv.jsxs)("div",{className:F(hDt({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,zv.jsx)("div",{ref:x,className:F(gDt({variant:r||o||"default"})),onClick:P,children:(0,zv.jsx)("div",{className:F(vDt({variant:n||o||"primary"})),style:{left:"0%",width:`${y(m[0],w,b)}%`}})}),m.map((L,M)=>(0,zv.jsx)("div",{className:F(yDt({variant:o||"primary",size:a})),style:{left:`${y(L,w,b)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:T(M),"aria-label":`Thumb ${M+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":b,"aria-valuenow":L,"aria-disabled":f},M))]})]})});qw.displayName="MoonUISliderPro";var I2e=A(ue(),1);var rg=A(ue(),1);var lP=A(de(),1),s$="Switch",[xDt,psn]=Zn(s$),[bDt,wDt]=xDt(s$),x2e=rg.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=rg.useState(null),h=rr(t,x=>p(x)),m=rg.useRef(!1),v=f?u||!!f.closest("form"):!0,[g,y]=la({prop:o,defaultProp:a??!1,onChange:c,caller:s$});return(0,lP.jsxs)(bDt,{scope:r,checked:g,disabled:s,children:[(0,lP.jsx)(at.button,{type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":S2e(g),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:et(e.onClick,x=>{y(w=>!w),v&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),v&&(0,lP.jsx)(C2e,{control:f,bubbles:!m.current,name:n,value:l,checked:g,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});x2e.displayName=s$;var b2e="SwitchThumb",w2e=rg.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=wDt(b2e,r);return(0,lP.jsx)(at.span,{"data-state":S2e(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});w2e.displayName=b2e;var CDt="SwitchBubbleInput",C2e=rg.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=rg.useRef(null),s=rr(i,a),l=HN(r),c=jN(t);return rg.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let h=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(h)}},[l,r,n]),(0,lP.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});C2e.displayName=CDt;function S2e(e){return e?"checked":"unchecked"}var Uoe=x2e,P2e=w2e;var Hv=A(de(),1),jv=I2e.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,Hv.jsxs)("div",{className:"inline-flex items-center gap-2",children:[o&&(0,Hv.jsx)("span",{className:"text-muted-foreground",children:o}),(0,Hv.jsxs)(Uoe,{className:F("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",n&&"opacity-80 cursor-wait",e),disabled:n||s.disabled,...s,ref:l,children:[n?(0,Hv.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Hv.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Hv.jsx)(P2e,{className:F("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,Hv.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Hv.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));jv.displayName=Uoe.displayName;var cu=A(ue(),1);var Ci=A(de(),1),l$=xt("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),c$=cu.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=cu.Children.map(a.children,c=>{if(cu.isValidElement(c)&&c.type==="tbody"){let u=c.props;return cu.cloneElement(c,{className:F(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,Ci.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,Ci.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Ci.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Ci.jsx)("table",{ref:i,className:F(l$({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});c$.displayName="TablePro";var u$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("thead",{ref:r,className:F("[&_tr]:border-b",e),...t}));u$.displayName="TableHeaderPro";var d$=cu.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=cu.Children.count(n)>0;return(0,Ci.jsx)("tbody",{ref:a,className:F("[&_tr:last-child]:border-0",e),...o,children:i?n:(0,Ci.jsx)("tr",{children:(0,Ci.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Ci.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Ci.jsx)("div",{className:"text-sm",children:r})})})})})});d$.displayName="TableBodyPro";var f$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("tfoot",{ref:r,className:F("bg-primary text-primary-foreground font-medium",e),...t}));f$.displayName="TableFooterPro";var p$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("tr",{ref:r,className:F("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));p$.displayName="TableRowPro";var m$=cu.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):r==="desc"?(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null;return(0,Ci.jsx)("th",{ref:i,className:F("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?n:void 0,...a,children:(0,Ci.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});m$.displayName="TableHeadPro";var h$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("td",{ref:r,className:F("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));h$.displayName="TableCellPro";var g$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("caption",{ref:r,className:F("mt-4 text-sm text-muted-foreground",e),...t}));g$.displayName="TableCaptionPro";var x$=A(ue(),1);var Gx=A(ue(),1);var qx=A(de(),1),v$="Tabs",[PDt,Rsn]=Zn(v$,[iT]),k2e=iT(),[IDt,zoe]=PDt(v$),R2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=nm(s),[d,f]=la({prop:n,onChange:o,defaultProp:a??"",caller:v$});return(0,qx.jsx)(IDt,{scope:r,baseId:ao(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,qx.jsx)(at.div,{dir:u,"data-orientation":i,...c,ref:t})})});R2e.displayName=v$;var N2e="TabsList",T2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=zoe(N2e,r),i=k2e(r);return(0,qx.jsx)(T6,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,qx.jsx)(at.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});T2e.displayName=N2e;var M2e="TabsTrigger",E2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=zoe(M2e,r),s=k2e(r),l=D2e(i.baseId,n),c=O2e(i.baseId,n),u=n===i.value;return(0,qx.jsx)(M6,{asChild:!0,...s,focusable:!o,active:u,children:(0,qx.jsx)(at.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:et(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:et(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:et(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});E2e.displayName=M2e;var A2e="TabsContent",L2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=zoe(A2e,r),l=D2e(s.baseId,n),c=O2e(s.baseId,n),u=n===s.value,d=Gx.useRef(u);return Gx.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,qx.jsx)($o,{present:o||u,children:({present:f})=>(0,qx.jsx)(at.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});L2e.displayName=A2e;function D2e(e,t){return`${e}-trigger-${t}`}function O2e(e,t){return`${e}-content-${t}`}var y$=R2e,pT=T2e,mT=E2e,cP=L2e;var b$=A(de(),1),ec=y$,Tl=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(pT,{ref:r,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Tl.displayName=pT.displayName;var zn=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(mT,{ref:r,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));zn.displayName=mT.displayName;var eo=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(cP,{ref:r,className:F("mt-6 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));eo.displayName=cP.displayName;var tc=A(ue(),1);Ur();var yn=A(de(),1),kDt={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},slide:{initial:{x:20,opacity:0},animate:{x:0,opacity:1},exit:{x:-20,opacity:0}},scale:{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.05,opacity:0}},flip:{initial:{rotateY:90,opacity:0},animate:{rotateY:0,opacity:1},exit:{rotateY:-90,opacity:0}},morph:{initial:{scale:.8,opacity:0,filter:"blur(10px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},exit:{scale:1.2,opacity:0,filter:"blur(10px)"}}},w$=tc.forwardRef(({variant:e="default",animationMode:t="fade",orientation:r="horizontal",closeable:n=!1,addable:o=!1,draggable:a=!1,persistKey:i,urlSync:s=!1,lazy:l=!1,items:c=[],onTabsChange:u,onTabClose:d,onTabAdd:f,loading:p=!1,swipeable:h=!1,scrollable:m=!1,onAnalytics:v,onBeforeChange:g,shortcuts:y=!1,maxTabs:x,groups:w,className:b,children:C,value:S,defaultValue:P,onValueChange:T,...L},M)=>{let{hasProAccess:N,isLoading:V}=st(),[_,I]=tc.useState(c),[k,R]=tc.useState(()=>{if(i&&typeof window<"u"){let G=localStorage.getItem(`tabs-${i}`);if(G)return JSON.parse(G).activeTab||P||_[0]?.value}if(s&&typeof window<"u"){let J=new URLSearchParams(window.location.search).get("tab");if(J)return J}return P||_[0]?.value}),[E,O]=tc.useState(new Set),[B,U]=tc.useState(!1),D=tc.useRef(null),j=S!==void 0?S:k,$=tc.useCallback(async G=>{if(!(p||B)){if(g){U(!0);let J=await g(j||"",G);if(U(!1),!J)return}if(R(G),T?.(G),l&&!E.has(G)&&O(J=>new Set([...J,G])),v?.("tab_switch",{from:j,to:G}),i&&typeof window<"u"&&localStorage.setItem(`tabs-${i}`,JSON.stringify({activeTab:G,tabs:_})),s&&typeof window<"u"){let J=new URLSearchParams(window.location.search);J.set("tab",G),window.history.replaceState({},"",`${window.location.pathname}?${J}`)}}},[j,p,B,g,T,l,E,v,i,_,s]),z=tc.useCallback((G,J)=>{J.stopPropagation();let ae=_.filter(Z=>Z.value!==G);I(ae),u?.(ae),d?.(G),v?.("tab_close",{value:G}),j===G&&ae.length>0&&$(ae[0].value)},[_,j,u,d,v,$]),q=tc.useCallback(()=>{if(x&&_.length>=x){v?.("tab_add_blocked",{reason:"max_tabs"});return}f?.(),v?.("tab_add",{count:_.length+1})},[_.length,x,f,v]);tc.useEffect(()=>{if(!y)return;let G=J=>{if((J.metaKey||J.ctrlKey)&&J.key>="1"&&J.key<="9"){J.preventDefault();let ae=parseInt(J.key)-1;_[ae]&&$(_[ae].value)}(J.metaKey||J.ctrlKey)&&J.key==="w"&&n&&(J.preventDefault(),_.find(Z=>Z.value===j)?.closeable!==!1&&z(j||"",new MouseEvent("click"))),(J.metaKey||J.ctrlKey)&&J.key==="t"&&o&&(J.preventDefault(),q())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[y,_,j,n,o,$,z,q]);let H=()=>{D.current&&D.current.scrollBy({left:-200,behavior:"smooth"})},K=()=>{D.current&&D.current.scrollBy({left:200,behavior:"smooth"})};return!V&&!N?(0,yn.jsx)(Rn,{componentName:"Tabs Pro",compact:!0}):(0,yn.jsxs)("div",{className:F("relative w-full",e==="gradient"&&"bg-gradient-to-r from-primary/10 to-secondary/10 rounded-lg p-1",e==="glassmorphism"&&"backdrop-blur-xl bg-white/10 dark:bg-black/10 border border-white/20 dark:border-white/10 rounded-lg p-1",e==="neon"&&"bg-black rounded-lg p-1 shadow-[0_0_20px_rgba(139,92,246,0.3)]",b),children:[p&&(0,yn.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm rounded-lg",children:(0,yn.jsx)(Mr,{className:"h-6 w-6 animate-spin text-primary"})}),(0,yn.jsx)(y$,{ref:M,value:j,onValueChange:$,orientation:r,...L,children:_.length>0?(0,yn.jsxs)(yn.Fragment,{children:[(0,yn.jsxs)("div",{className:F("relative flex items-center",r==="vertical"&&"flex-col items-start"),children:[m&&r==="horizontal"&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute left-0 z-10",onClick:H,children:(0,yn.jsx)(gi,{className:"h-4 w-4"})}),(0,yn.jsx)("div",{ref:D,className:F("flex-1 overflow-x-auto scrollbar-hide",m&&r==="horizontal"&&"mx-10"),children:(0,yn.jsxs)(pT,{className:F("flex items-center gap-1",r==="vertical"&&"flex-col items-start w-full",e==="underline"&&"border-b border-border"),children:[_.map((G,J)=>(0,yn.jsxs)(ne.div,{layout:!0,drag:a?r==="horizontal"?"x":"y":!1,dragConstraints:{left:0,right:0,top:0,bottom:0},dragElastic:.2,whileDrag:{scale:1.05,zIndex:50},className:"relative",children:[(0,yn.jsxs)(mT,{value:G.value,disabled:G.disabled,className:F("relative inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e==="default"&&"data-[state=active]:bg-background data-[state=active]:shadow-sm",e==="pills"&&"rounded-full data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",e==="underline"&&"rounded-none border-b-2 border-transparent data-[state=active]:border-primary",e==="cards"&&"bg-muted/50 data-[state=active]:bg-background data-[state=active]:shadow-md",e==="minimal"&&"hover:bg-muted/50 data-[state=active]:bg-transparent data-[state=active]:underline",e==="gradient"&&"data-[state=active]:bg-gradient-to-r data-[state=active]:from-primary data-[state=active]:to-secondary data-[state=active]:text-white",e==="glassmorphism"&&"backdrop-blur-md data-[state=active]:bg-white/20 dark:data-[state=active]:bg-white/10",e==="neon"&&"text-purple-400 data-[state=active]:text-white data-[state=active]:shadow-[0_0_10px_rgba(139,92,246,0.8)]",r==="vertical"&&"w-full justify-start"),children:[G.icon&&(0,yn.jsx)("span",{className:"mr-2",children:G.icon}),G.label,G.badge&&(0,yn.jsx)("span",{className:"ml-2",children:G.badge}),n&&G.closeable!==!1&&(0,yn.jsx)("button",{onClick:ae=>z(G.value,ae),className:"ml-2 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,yn.jsx)(lr,{className:"h-3 w-3"})})]}),j===G.value&&t!=="none"&&(0,yn.jsx)(ne.div,{layoutId:"active-tab",className:F("absolute inset-0 -z-10",e==="default"&&"bg-background shadow-sm rounded-md",e==="pills"&&"bg-primary rounded-full",e==="underline"&&"bottom-0 h-0.5 bg-primary"),transition:{type:"spring",stiffness:500,damping:30}})]},G.value)),o&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",onClick:q,className:"h-8 w-8 p-0 ml-2",disabled:x?_.length>=x:!1,children:(0,yn.jsx)(Vi,{className:"h-4 w-4"})})]})}),m&&r==="horizontal"&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute right-0 z-10",onClick:K,children:(0,yn.jsx)(Jn,{className:"h-4 w-4"})}),_.length>5&&(0,yn.jsxs)(Er,{children:[(0,yn.jsx)(Ar,{asChild:!0,children:(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 ml-2",children:(0,yn.jsx)(vi,{className:"h-4 w-4"})})}),(0,yn.jsx)(kr,{align:"end",children:_.slice(5).map(G=>(0,yn.jsxs)(Ve,{onClick:()=>$(G.value),children:[G.icon&&(0,yn.jsx)("span",{className:"mr-2",children:G.icon}),G.label]},G.value))})]})]}),t!=="none"?(0,yn.jsx)(Ft,{mode:"wait",children:_.map(G=>j!==G.value?null:(0,yn.jsx)(cP,{value:G.value,forceMount:!0,className:"mt-4 focus-visible:outline-none",children:(0,yn.jsx)(ne.div,{initial:"initial",animate:"animate",exit:"exit",variants:kDt[t],transition:{duration:.3},children:G.content||C})},G.value))}):_.map(G=>(0,yn.jsx)(cP,{value:G.value,className:"mt-4 focus-visible:outline-none",children:G.content||C},G.value))]}):C})]})});w$.displayName="MoonUITabsPro";var Hoe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(pT,{ref:r,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Hoe.displayName="MoonUITabsListPro";var joe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(mT,{ref:r,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));joe.displayName="MoonUITabsTriggerPro";var $oe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(cP,{ref:r,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));$oe.displayName="MoonUITabsContentPro";var F2e=A(ue(),1);var B2e=A(de(),1),nd=F2e.default.forwardRef(({className:e,...t},r)=>(0,B2e.jsx)("textarea",{className:F("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));nd.displayName="MoonUITextareaPro";var Xx=A(ue(),1);var Jr=A(ue(),1),U2e=A(uv(),1);var Io=A(de(),1),Xoe="ToastProvider",[Yoe,RDt,NDt]=nv("Toast"),[z2e,Qsn]=Zn("Toast",[NDt]),[TDt,S$]=z2e(Xoe),MDt=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Jr.useState(null),[c,u]=Jr.useState(0),d=Jr.useRef(!1),f=Jr.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xoe}\`. Expected non-empty \`string\`.`),(0,Io.jsx)(Yoe.Provider,{scope:t,children:(0,Io.jsx)(TDt,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Jr.useCallback(()=>u(p=>p+1),[]),onToastRemove:Jr.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};MDt.displayName=Xoe;var H2e="ToastViewport",EDt=["F8"],qoe="toast.viewportPause",Goe="toast.viewportResume",j2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=EDt,label:o="Notifications ({hotkey})",...a}=e,i=S$(H2e,r),s=RDt(r),l=Jr.useRef(null),c=Jr.useRef(null),u=Jr.useRef(null),d=Jr.useRef(null),f=rr(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=i.toastCount>0;Jr.useEffect(()=>{let v=g=>{n.length!==0&&n.every(x=>g[x]||g.code===x)&&d.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),Jr.useEffect(()=>{let v=l.current,g=d.current;if(h&&v&&g){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(qoe);g.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(Goe);g.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!v.contains(C.relatedTarget)&&x()},b=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",y),v.addEventListener("focusout",w),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",b),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",b),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[h,i.isClosePausedRef]);let m=Jr.useCallback(({tabbingDirection:v})=>{let y=s().map(x=>{let w=x.ref.current,b=[w,...$Dt(w)];return v==="forwards"?b:b.reverse()});return(v==="forwards"?y.reverse():y).flat()},[s]);return Jr.useEffect(()=>{let v=d.current;if(v){let g=y=>{let x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){let b=document.activeElement,C=y.shiftKey;if(y.target===v&&C){c.current?.focus();return}let T=m({tabbingDirection:C?"backwards":"forwards"}),L=T.findIndex(M=>M===b);Woe(T.slice(L+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return v.addEventListener("keydown",g),()=>v.removeEventListener("keydown",g)}},[s,m]),(0,Io.jsxs)(pMe,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,Io.jsx)(Koe,{ref:c,onFocusFromOutsideViewport:()=>{let v=m({tabbingDirection:"forwards"});Woe(v)}}),(0,Io.jsx)(Yoe.Slot,{scope:r,children:(0,Io.jsx)(at.ol,{tabIndex:-1,...a,ref:f})}),h&&(0,Io.jsx)(Koe,{ref:u,onFocusFromOutsideViewport:()=>{let v=m({tabbingDirection:"backwards"});Woe(v)}})]})});j2e.displayName=H2e;var $2e="ToastFocusProxy",Koe=Jr.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=S$($2e,r);return(0,Io.jsx)(Z2,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});Koe.displayName=$2e;var S_="Toast",ADt="toast.swipeStart",LDt="toast.swipeMove",DDt="toast.swipeCancel",ODt="toast.swipeEnd",W2e=Jr.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=la({prop:n,defaultProp:o??!0,onChange:a,caller:S_});return(0,Io.jsx)($o,{present:r||s,children:(0,Io.jsx)(BDt,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:io(e.onPause),onResume:io(e.onResume),onSwipeStart:et(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:et(e.onSwipeMove,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:et(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:et(e.onSwipeEnd,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});W2e.displayName=S_;var[_Dt,FDt]=z2e(S_,{onClose(){}}),BDt=Jr.forwardRef((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=S$(S_,r),[v,g]=Jr.useState(null),y=rr(t,_=>g(_)),x=Jr.useRef(null),w=Jr.useRef(null),b=o||m.duration,C=Jr.useRef(0),S=Jr.useRef(b),P=Jr.useRef(0),{onToastAdd:T,onToastRemove:L}=m,M=io(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),N=Jr.useCallback(_=>{!_||_===1/0||(window.clearTimeout(P.current),C.current=new Date().getTime(),P.current=window.setTimeout(M,_))},[M]);Jr.useEffect(()=>{let _=m.viewport;if(_){let I=()=>{N(S.current),c?.()},k=()=>{let R=new Date().getTime()-C.current;S.current=S.current-R,window.clearTimeout(P.current),l?.()};return _.addEventListener(qoe,k),_.addEventListener(Goe,I),()=>{_.removeEventListener(qoe,k),_.removeEventListener(Goe,I)}}},[m.viewport,b,l,c,N]),Jr.useEffect(()=>{a&&!m.isClosePausedRef.current&&N(b)},[a,b,m.isClosePausedRef,N]),Jr.useEffect(()=>(T(),()=>L()),[T,L]);let V=Jr.useMemo(()=>v?Z2e(v):null,[v]);return m.viewport?(0,Io.jsxs)(Io.Fragment,{children:[V&&(0,Io.jsx)(VDt,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),(0,Io.jsx)(_Dt,{scope:r,onClose:M,children:U2e.createPortal((0,Io.jsx)(Yoe.ItemSlot,{scope:r,children:(0,Io.jsx)(fMe,{asChild:!0,onEscapeKeyDown:et(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Io.jsx)(at.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:et(e.onKeyDown,_=>{_.key==="Escape"&&(s?.(_.nativeEvent),_.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:et(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:et(e.onPointerMove,_=>{if(!x.current)return;let I=_.clientX-x.current.x,k=_.clientY-x.current.y,R=!!w.current,E=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=E?O(0,I):0,U=E?0:O(0,k),D=_.pointerType==="touch"?10:2,j={x:B,y:U},$={originalEvent:_,delta:j};R?(w.current=j,C$(LDt,d,$,{discrete:!1})):V2e(j,m.swipeDirection,D)?(w.current=j,C$(ADt,u,$,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(I)>D||Math.abs(k)>D)&&(x.current=null)}),onPointerUp:et(e.onPointerUp,_=>{let I=w.current,k=_.target;if(k.hasPointerCapture(_.pointerId)&&k.releasePointerCapture(_.pointerId),w.current=null,x.current=null,I){let R=_.currentTarget,E={originalEvent:_,delta:I};V2e(I,m.swipeDirection,m.swipeThreshold)?C$(ODt,p,E,{discrete:!0}):C$(DDt,f,E,{discrete:!0}),R.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),VDt=e=>{let{__scopeToast:t,children:r,...n}=e,o=S$(S_,t),[a,i]=Jr.useState(!1),[s,l]=Jr.useState(!1);return HDt(()=>i(!0)),Jr.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Io.jsx)(ip,{asChild:!0,children:(0,Io.jsx)(Z2,{...n,children:a&&(0,Io.jsxs)(Io.Fragment,{children:[o.label," ",r]})})})},UDt="ToastTitle",q2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Io.jsx)(at.div,{...n,ref:t})});q2e.displayName=UDt;var zDt="ToastDescription",G2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Io.jsx)(at.div,{...n,ref:t})});G2e.displayName=zDt;var K2e="ToastAction",X2e=Jr.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Io.jsx)(Q2e,{altText:r,asChild:!0,children:(0,Io.jsx)(Qoe,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${K2e}\`. Expected non-empty \`string\`.`),null)});X2e.displayName=K2e;var Y2e="ToastClose",Qoe=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=FDt(Y2e,r);return(0,Io.jsx)(Q2e,{asChild:!0,children:(0,Io.jsx)(at.button,{type:"button",...n,ref:t,onClick:et(e.onClick,o.onClose)})})});Qoe.displayName=Y2e;var Q2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Io.jsx)(at.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Z2e(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),jDt(n)){let o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){let i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Z2e(n))}}),t}function C$(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?VR(o,a):o.dispatchEvent(a)}var V2e=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function HDt(e=()=>{}){let t=io(e);no(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function jDt(e){return e.nodeType===e.ELEMENT_NODE}function $Dt(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Woe(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Zoe=j2e,Joe=W2e,eae=q2e,tae=G2e,rae=X2e,nae=Qoe;var Kx=A(de(),1);var qDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(Zoe,{ref:r,className:F("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));qDt.displayName=Zoe.displayName;var GDt=xt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),I$=Xx.forwardRef(({className:e,variant:t,...r},n)=>(0,Kx.jsx)(Joe,{ref:n,className:F(GDt({variant:t}),e),...r}));I$.displayName=Joe.displayName;var KDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(rae,{ref:r,className:F("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));KDt.displayName=rae.displayName;var XDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(nae,{ref:r,className:F("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Kx.jsx)(lr,{className:"h-4 w-4"})}));XDt.displayName=nae.displayName;var YDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(eae,{ref:r,className:F("text-sm font-semibold [&+div]:text-xs",e),...t}));YDt.displayName=eae.displayName;var QDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(tae,{ref:r,className:F("text-sm opacity-90",e),...t}));QDt.displayName=tae.displayName;var ZDt=5,JDt=1e6,oae=new Map,J2e=e=>{if(oae.has(e))return;let t=setTimeout(()=>{oae.delete(e),P$({type:"REMOVE_TOAST",toastId:e})},JDt);oae.set(e,t)},eOt=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ZDt)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?J2e(r):e.toasts.forEach(n=>{J2e(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},tOt=[],aae={toasts:[]},rOt=0;function P$(e){aae=eOt(aae,e),tOt.forEach(t=>{t(aae)})}function dp({...e}){let t=`toast-${Date.now()}-${++rOt}`,r=o=>P$({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>P$({type:"DISMISS_TOAST",toastId:t});return P$({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}var a_e=A(ue(),1);var t_e=A(xr(),1);var nln=!!(typeof window<"u"&&window.document&&window.document.createElement);function xn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var Nm=A(xr(),1);var e_e=A(xr(),1),rc=globalThis?.document?e_e.useLayoutEffect:()=>{};var k$=A(xr(),1);var nOt=Nm[" useInsertionEffect ".trim().toString()]||rc;function Yx({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=oOt({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=Nm.useRef(e!==void 0);Nm.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=Nm.useCallback(u=>{if(s){let d=aOt(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function oOt({defaultProp:e,onChange:t}){let[r,n]=Nm.useState(e),o=Nm.useRef(r),a=Nm.useRef(t);return nOt(()=>{a.current=t},[t]),Nm.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function aOt(e){return typeof e=="function"}var sln=Symbol("RADIX:SYNC_STATE");var r_e=A(Ma(),1),n_e="Toggle",o_e=t_e.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=Yx({prop:r,onChange:o,defaultProp:n??!1,caller:n_e});return(0,r_e.jsx)(Tn.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:xn(e.onClick,()=>{e.disabled||s(!i)})})});o_e.displayName=n_e;var iae=o_e;var ng=A(de(),1),R$=xt("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"moonui-toggle-default bg-transparent hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:border-input dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-transparent data-[state=on]:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:text-accent-foreground",primary:"bg-transparent hover:bg-primary/10 hover:text-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground dark:hover:bg-primary/20 dark:hover:text-primary dark:data-[state=on]:bg-primary dark:data-[state=on]:text-primary-foreground",secondary:"moonui-toggle-secondary bg-transparent hover:bg-secondary/10 hover:text-secondary data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground",success:"bg-transparent hover:bg-success/10 hover:text-success data-[state=on]:bg-success data-[state=on]:text-success-foreground dark:hover:bg-success/20 dark:hover:text-success dark:data-[state=on]:bg-success dark:data-[state=on]:text-success-foreground",warning:"bg-transparent hover:bg-warning/10 hover:text-warning data-[state=on]:bg-warning data-[state=on]:text-warning-foreground dark:hover:bg-warning/20 dark:hover:text-warning dark:data-[state=on]:bg-warning dark:data-[state=on]:text-warning-foreground",danger:"bg-transparent hover:bg-destructive/10 hover:text-destructive data-[state=on]:bg-destructive data-[state=on]:text-destructive-foreground dark:hover:bg-destructive/20 dark:hover:text-destructive dark:data-[state=on]:bg-destructive dark:data-[state=on]:text-destructive-foreground",gradient:"bg-transparent hover:bg-gradient-to-r hover:from-purple-500/10 hover:to-pink-500/10 hover:text-purple-600 data-[state=on]:bg-gradient-to-r data-[state=on]:from-purple-600 data-[state=on]:to-pink-600 data-[state=on]:text-white dark:hover:from-purple-500/20 dark:hover:to-pink-500/20 dark:hover:text-purple-400 dark:data-[state=on]:from-purple-600 dark:data-[state=on]:to-pink-600 dark:data-[state=on]:text-white"},size:{xs:"min-h-7 px-2 py-1 text-xs",sm:"min-h-8 px-2.5 py-1.5 text-xs",default:"min-h-9 px-3 py-2",md:"min-h-10 px-4 py-2.5",lg:"min-h-11 px-6 py-3",xl:"min-h-12 px-8 py-3.5 text-base"},shape:{default:"rounded-md",square:"rounded-none",rounded:"rounded-lg",pill:"rounded-full"}},defaultVariants:{variant:"default",size:"default",shape:"default"}}),N$=a_e.forwardRef(({className:e,variant:t,size:r,shape:n,loading:o,badge:a,badgeVariant:i="default",iconOn:s,iconOff:l,iconPosition:c="left",children:u,pressed:d,onPressedChange:f,defaultPressed:p,...h},m)=>{let v=d?s:l;return(0,ng.jsx)(iae,{ref:m,className:F(R$({variant:t,size:r,shape:n}),e),pressed:d,onPressedChange:f,defaultPressed:p,disabled:o||h.disabled,...h,children:o?(0,ng.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,ng.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}),u&&(0,ng.jsx)("span",{className:"text-center",children:u})]}):(0,ng.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[v&&c==="left"&&(0,ng.jsx)("span",{className:"flex-shrink-0",children:v}),u&&(0,ng.jsx)("span",{className:"text-center",children:u}),v&&c==="right"&&(0,ng.jsx)("span",{className:"flex-shrink-0",children:v}),a!==void 0&&(0,ng.jsx)("span",{className:F("ml-1 inline-flex items-center justify-center rounded-full px-1.5 text-xs font-semibold",i==="default"&&"bg-muted text-muted-foreground",i==="primary"&&"bg-primary text-primary-foreground",i==="secondary"&&"bg-secondary text-secondary-foreground dark:bg-accent dark:text-accent-foreground",i==="success"&&"bg-success text-success-foreground",i==="warning"&&"bg-warning text-warning-foreground",i==="danger"&&"bg-destructive text-destructive-foreground"),children:a})]})})});N$.displayName=iae.displayName;var FFe=A(ue(),1);var us=A(xr(),1);var tf=A(xr(),1);var l_e=["top","right","bottom","left"];var $v=Math.min,od=Math.max,I_=Math.round,k_=Math.floor,og=e=>({x:e,y:e}),sOt={left:"right",right:"left",bottom:"top",top:"bottom"},lOt={start:"end",end:"start"};function M$(e,t,r){return od(e,$v(t,r))}function Wv(e,t){return typeof e=="function"?e(t):e}function qv(e){return e.split("-")[0]}function uP(e){return e.split("-")[1]}function E$(e){return e==="x"?"y":"x"}function A$(e){return e==="y"?"height":"width"}var cOt=new Set(["top","bottom"]);function ag(e){return cOt.has(qv(e))?"y":"x"}function L$(e){return E$(ag(e))}function c_e(e,t,r){r===void 0&&(r=!1);let n=uP(e),o=L$(e),a=A$(o),i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=P_(i)),[i,P_(i)]}function u_e(e){let t=P_(e);return[T$(e),t,T$(t)]}function T$(e){return e.replace(/start|end/g,t=>lOt[t])}var i_e=["left","right"],s_e=["right","left"],uOt=["top","bottom"],dOt=["bottom","top"];function fOt(e,t,r){switch(e){case"top":case"bottom":return r?t?s_e:i_e:t?i_e:s_e;case"left":case"right":return t?uOt:dOt;default:return[]}}function d_e(e,t,r,n){let o=uP(e),a=fOt(qv(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(T$)))),a}function P_(e){return e.replace(/left|right|bottom|top/g,t=>sOt[t])}function pOt(e){return{top:0,right:0,bottom:0,left:0,...e}}function sae(e){return typeof e!="number"?pOt(e):{top:e,right:e,bottom:e,left:e}}function dP(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function f_e(e,t,r){let{reference:n,floating:o}=e,a=ag(t),i=L$(t),s=A$(i),l=qv(t),c=a==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(uP(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}var h_e=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=f_e(c,n,l),f=n,p={},h=0;for(let m=0;m<s.length;m++){let{name:v,fn:g}=s[m],{x:y,y:x,data:w,reset:b}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=x??d,p={...p,[v]:{...p[v],...w}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(c=b.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:u,y:d}=f_e(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function hT(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Wv(t,e),h=sae(p),v=s[f?d==="floating"?"reference":"floating":d],g=dP(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},b=dP(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(g.top-b.top+h.top)/w.y,bottom:(b.bottom-g.bottom+h.bottom)/w.y,left:(g.left-b.left+h.left)/w.x,right:(b.right-g.right+h.right)/w.x}}var g_e=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Wv(e,t)||{};if(c==null)return{};let d=sae(u),f={x:r,y:n},p=L$(o),h=A$(p),m=await i.getDimensions(c),v=p==="y",g=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],b=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),S=C?C[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[x]||a.floating[h]);let P=w/2-b/2,T=S/2-m[h]/2-1,L=$v(d[g],T),M=$v(d[y],T),N=L,V=S-m[h]-M,_=S/2-m[h]/2+P,I=M$(N,_,V),k=!l.arrow&&uP(o)!=null&&_!==I&&a.reference[h]/2-(_<N?L:M)-m[h]/2<0,R=k?_<N?_-N:_-V:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:_-I-R,...k&&{alignmentOffset:R}},reset:k}}});var v_e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Wv(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let g=qv(o),y=ag(s),x=qv(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=f||(x||!m?[P_(s)]:u_e(s)),C=h!=="none";!f&&C&&b.push(...d_e(s,m,h,w));let S=[s,...b],P=await hT(t,v),T=[],L=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&T.push(P[g]),d){let _=c_e(o,i,w);T.push(P[_[0]],P[_[1]])}if(L=[...L,{placement:o,overflows:T}],!T.every(_=>_<=0)){var M,N;let _=(((M=a.flip)==null?void 0:M.index)||0)+1,I=S[_];if(I&&(!(d==="alignment"?y!==ag(I):!1)||L.every(E=>ag(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:_,overflows:L},reset:{placement:I}};let k=(N=L.filter(R=>R.overflows[0]<=0).sort((R,E)=>R.overflows[1]-E.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(p){case"bestFit":{var V;let R=(V=L.filter(E=>{if(C){let O=ag(E.placement);return O===y||O==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(O=>O>0).reduce((O,B)=>O+B,0)]).sort((E,O)=>E[1]-O[1])[0])==null?void 0:V[0];R&&(k=R);break}case"initialPlacement":k=s;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function p_e(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function m_e(e){return l_e.some(t=>e[t]>=0)}var y_e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=Wv(e,t);switch(n){case"referenceHidden":{let a=await hT(t,{...o,elementContext:"reference"}),i=p_e(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:m_e(i)}}}case"escaped":{let a=await hT(t,{...o,altBoundary:!0}),i=p_e(a,r.floating);return{data:{escapedOffsets:i,escaped:m_e(i)}}}default:return{}}}}};var x_e=new Set(["left","top"]);async function mOt(e,t){let{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=qv(r),s=uP(r),l=ag(r)==="y",c=x_e.has(i)?-1:1,u=a&&l?-1:1,d=Wv(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var b_e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await mOt(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},w_e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=Wv(e,t),c={x:r,y:n},u=await hT(t,l),d=ag(qv(o)),f=E$(d),p=c[f],h=c[d];if(a){let v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+u[v],x=p-u[g];p=M$(y,p,x)}if(i){let v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+u[v],x=h-u[g];h=M$(y,h,x)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:a,[d]:i}}}}}},C_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Wv(e,t),u={x:r,y:n},d=ag(o),f=E$(d),p=u[f],h=u[d],m=Wv(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let x=f==="y"?"height":"width",w=a.reference[f]-a.floating[x]+v.mainAxis,b=a.reference[f]+a.reference[x]-v.mainAxis;p<w?p=w:p>b&&(p=b)}if(c){var g,y;let x=f==="y"?"width":"height",w=x_e.has(qv(o)),b=a.reference[d]-a.floating[x]+(w&&((g=i.offset)==null?void 0:g[d])||0)+(w?0:v.crossAxis),C=a.reference[d]+a.reference[x]+(w?0:((y=i.offset)==null?void 0:y[d])||0)-(w?v.crossAxis:0);h<b?h=b:h>C&&(h=C)}return{[f]:p,[d]:h}}}},S_e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Wv(e,t),u=await hT(t,c),d=qv(o),f=uP(o),p=ag(o)==="y",{width:h,height:m}=a.floating,v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");let y=m-u.top-u.bottom,x=h-u.left-u.right,w=$v(m-u[v],y),b=$v(h-u[g],x),C=!t.middlewareData.shift,S=w,P=b;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=y),C&&!f){let L=od(u.left,0),M=od(u.right,0),N=od(u.top,0),V=od(u.bottom,0);p?P=h-2*(L!==0||M!==0?L+M:od(u.left,u.right)):S=m-2*(N!==0||V!==0?N+V:od(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:S});let T=await i.getDimensions(s.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function D$(){return typeof window<"u"}function pP(e){return I_e(e)?(e.nodeName||"").toLowerCase():"#document"}function ef(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ig(e){var t;return(t=(I_e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function I_e(e){return D$()?e instanceof Node||e instanceof ef(e).Node:!1}function Tm(e){return D$()?e instanceof Element||e instanceof ef(e).Element:!1}function sg(e){return D$()?e instanceof HTMLElement||e instanceof ef(e).HTMLElement:!1}function P_e(e){return!D$()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ef(e).ShadowRoot}var hOt=new Set(["inline","contents"]);function gT(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Mm(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!hOt.has(o)}var gOt=new Set(["table","td","th"]);function k_e(e){return gOt.has(pP(e))}var vOt=[":popover-open",":modal"];function R_(e){return vOt.some(t=>{try{return e.matches(t)}catch{return!1}})}var yOt=["transform","translate","scale","rotate","perspective"],xOt=["transform","translate","scale","rotate","perspective","filter"],bOt=["paint","layout","strict","content"];function O$(e){let t=_$(),r=Tm(e)?Mm(e):e;return yOt.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||xOt.some(n=>(r.willChange||"").includes(n))||bOt.some(n=>(r.contain||"").includes(n))}function R_e(e){let t=Qx(e);for(;sg(t)&&!mP(t);){if(O$(t))return t;if(R_(t))return null;t=Qx(t)}return null}function _$(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var wOt=new Set(["html","body","#document"]);function mP(e){return wOt.has(pP(e))}function Mm(e){return ef(e).getComputedStyle(e)}function N_(e){return Tm(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qx(e){if(pP(e)==="html")return e;let t=e.assignedSlot||e.parentNode||P_e(e)&&e.host||ig(e);return P_e(t)?t.host:t}function N_e(e){let t=Qx(e);return mP(t)?e.ownerDocument?e.ownerDocument.body:e.body:sg(t)&&gT(t)?t:N_e(t)}function fP(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=N_e(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ef(o);if(a){let s=F$(i);return t.concat(i,i.visualViewport||[],gT(o)?o:[],s&&r?fP(s):[])}return t.concat(o,fP(o,[],r))}function F$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A_e(e){let t=Mm(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=sg(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=I_(r)!==a||I_(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function cae(e){return Tm(e)?e:e.contextElement}function vT(e){let t=cae(e);if(!sg(t))return og(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=A_e(t),i=(a?I_(r.width):r.width)/n,s=(a?I_(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var COt=og(0);function L_e(e){let t=ef(e);return!_$()||!t.visualViewport?COt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SOt(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ef(e)?!1:t}function hP(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),a=cae(e),i=og(1);t&&(n?Tm(n)&&(i=vT(n)):i=vT(e));let s=SOt(a,r,n)?L_e(a):og(0),l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){let f=ef(a),p=n&&Tm(n)?ef(n):n,h=f,m=F$(h);for(;m&&n&&p!==h;){let v=vT(m),g=m.getBoundingClientRect(),y=Mm(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,w=g.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=x,c+=w,h=ef(m),m=F$(h)}}return dP({width:u,height:d,x:l,y:c})}function B$(e,t){let r=N_(e).scrollLeft;return t?t.left+r:hP(ig(e)).left+r}function D_e(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-B$(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function POt(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a=o==="fixed",i=ig(n),s=t?R_(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=og(1),u=og(0),d=sg(n);if((d||!d&&!a)&&((pP(n)!=="body"||gT(i))&&(l=N_(n)),sg(n))){let p=hP(n);c=vT(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=i&&!d&&!a?D_e(i,l):og(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function IOt(e){return Array.from(e.getClientRects())}function kOt(e){let t=ig(e),r=N_(e),n=e.ownerDocument.body,o=od(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=od(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+B$(e),s=-r.scrollTop;return Mm(n).direction==="rtl"&&(i+=od(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var T_e=25;function ROt(e,t){let r=ef(e),n=ig(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let u=_$();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let c=B$(n);if(c<=0){let u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(n.clientWidth-d.clientWidth-p);h<=T_e&&(a-=h)}else c<=T_e&&(a+=c);return{width:a,height:i,x:s,y:l}}var NOt=new Set(["absolute","fixed"]);function TOt(e,t){let r=hP(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=sg(e)?vT(e):og(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function M_e(e,t,r){let n;if(t==="viewport")n=ROt(e,r);else if(t==="document")n=kOt(ig(e));else if(Tm(t))n=TOt(t,r);else{let o=L_e(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dP(n)}function O_e(e,t){let r=Qx(e);return r===t||!Tm(r)||mP(r)?!1:Mm(r).position==="fixed"||O_e(r,t)}function MOt(e,t){let r=t.get(e);if(r)return r;let n=fP(e,[],!1).filter(s=>Tm(s)&&pP(s)!=="body"),o=null,a=Mm(e).position==="fixed",i=a?Qx(e):e;for(;Tm(i)&&!mP(i);){let s=Mm(i),l=O$(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&NOt.has(o.position)||gT(i)&&!l&&O_e(e,i))?n=n.filter(u=>u!==i):o=s,i=Qx(i)}return t.set(e,n),n}function EOt(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[...r==="clippingAncestors"?R_(t)?[]:MOt(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{let d=M_e(t,u,o);return c.top=od(d.top,c.top),c.right=$v(d.right,c.right),c.bottom=$v(d.bottom,c.bottom),c.left=od(d.left,c.left),c},M_e(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function AOt(e){let{width:t,height:r}=A_e(e);return{width:t,height:r}}function LOt(e,t,r){let n=sg(t),o=ig(t),a=r==="fixed",i=hP(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=og(0);function c(){l.x=B$(o)}if(n||!n&&!a)if((pP(t)!=="body"||gT(o))&&(s=N_(t)),n){let p=hP(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();a&&!n&&o&&c();let u=o&&!n&&!a?D_e(o,s):og(0),d=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function lae(e){return Mm(e).position==="static"}function E_e(e,t){if(!sg(e)||Mm(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ig(e)===r&&(r=r.ownerDocument.body),r}function __e(e,t){let r=ef(e);if(R_(e))return r;if(!sg(e)){let o=Qx(e);for(;o&&!mP(o);){if(Tm(o)&&!lae(o))return o;o=Qx(o)}return r}let n=E_e(e,t);for(;n&&k_e(n)&&lae(n);)n=E_e(n,t);return n&&mP(n)&&lae(n)&&!O$(n)?r:n||R_e(e)||r}var DOt=async function(e){let t=this.getOffsetParent||__e,r=this.getDimensions,n=await r(e.floating);return{reference:LOt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function OOt(e){return Mm(e).direction==="rtl"}var F_e={convertOffsetParentRelativeRectToViewportRelativeRect:POt,getDocumentElement:ig,getClippingRect:EOt,getOffsetParent:__e,getElementRects:DOt,getClientRects:IOt,getDimensions:AOt,getScale:vT,isElement:Tm,isRTL:OOt};function B_e(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _Ot(e,t){let r=null,n,o=ig(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let h=k_(d),m=k_(o.clientWidth-(u+f)),v=k_(o.clientHeight-(d+p)),g=k_(u),x={rootMargin:-h+"px "+-m+"px "+-v+"px "+-g+"px",threshold:od(0,$v(1,l))||1},w=!0;function b(C){let S=C[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):n=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!B_e(c,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(b,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(b,x)}r.observe(e)}return i(!0),a}function uae(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=cae(e),u=o||a?[...c?fP(c):[],...fP(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),a&&g.addEventListener("resize",r)});let d=c&&s?_Ot(c,r):null,f=-1,p=null;i&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?hP(e):null;l&&v();function v(){let g=hP(e);m&&!B_e(m,g)&&r(),m=g,h=requestAnimationFrame(v)}return r(),()=>{var g;u.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var V_e=b_e;var U_e=w_e,z_e=v_e,H_e=S_e,j_e=y_e,dae=g_e;var $_e=C_e,fae=(e,t,r)=>{let n=new Map,o={platform:F_e,...r},a={...o.platform,_c:n};return h_e(e,t,{...o,platform:a})};var Qs=A(xr(),1),q_e=A(xr(),1),G_e=A(aP(),1),FOt=typeof document<"u",BOt=function(){},V$=FOt?q_e.useLayoutEffect:BOt;function U$(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!U$(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!U$(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function K_e(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W_e(e,t){let r=K_e(e);return Math.round(t*r)/r}function pae(e){let t=Qs.useRef(e);return V$(()=>{t.current=e}),t}function X_e(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Qs.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Qs.useState(n);U$(f,n)||p(n);let[h,m]=Qs.useState(null),[v,g]=Qs.useState(null),y=Qs.useCallback(E=>{E!==C.current&&(C.current=E,m(E))},[]),x=Qs.useCallback(E=>{E!==S.current&&(S.current=E,g(E))},[]),w=a||h,b=i||v,C=Qs.useRef(null),S=Qs.useRef(null),P=Qs.useRef(u),T=l!=null,L=pae(l),M=pae(o),N=pae(c),V=Qs.useCallback(()=>{if(!C.current||!S.current)return;let E={placement:t,strategy:r,middleware:f};M.current&&(E.platform=M.current),fae(C.current,S.current,E).then(O=>{let B={...O,isPositioned:N.current!==!1};_.current&&!U$(P.current,B)&&(P.current=B,G_e.flushSync(()=>{d(B)}))})},[f,t,r,M,N]);V$(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[c]);let _=Qs.useRef(!1);V$(()=>(_.current=!0,()=>{_.current=!1}),[]),V$(()=>{if(w&&(C.current=w),b&&(S.current=b),w&&b){if(L.current)return L.current(w,b,V);V()}},[w,b,V,L,T]);let I=Qs.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:x}),[y,x]),k=Qs.useMemo(()=>({reference:w,floating:b}),[w,b]),R=Qs.useMemo(()=>{let E={position:r,left:0,top:0};if(!k.floating)return E;let O=W_e(k.floating,u.x),B=W_e(k.floating,u.y);return s?{...E,transform:"translate("+O+"px, "+B+"px)",...K_e(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:B}},[r,s,k.floating,u.x,u.y]);return Qs.useMemo(()=>({...u,update:V,refs:I,elements:k,floatingStyles:R}),[u,V,I,k,R])}var VOt=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?dae({element:n.current,padding:o}).fn(r):{}:n?dae({element:n,padding:o}).fn(r):{}}}},Y_e=(e,t)=>({...V_e(e),options:[e,t]}),Q_e=(e,t)=>({...U_e(e),options:[e,t]}),Z_e=(e,t)=>({...$_e(e),options:[e,t]}),J_e=(e,t)=>({...z_e(e),options:[e,t]}),eFe=(e,t)=>({...H_e(e),options:[e,t]});var tFe=(e,t)=>({...j_e(e),options:[e,t]});var rFe=(e,t)=>({...VOt(e),options:[e,t]});var nFe=A(xr(),1);var mae=A(Ma(),1),UOt="Arrow",oFe=nFe.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,mae.jsx)(Tn.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,mae.jsx)("polygon",{points:"0,0 30,0 15,10"})})});oFe.displayName=UOt;var aFe=oFe;var yT=A(xr(),1);function nc(e){let t=yT.useRef(e);return yT.useEffect(()=>{t.current=e}),yT.useMemo(()=>(...r)=>t.current?.(...r),[])}var iFe=A(xr(),1);function sFe(e){let[t,r]=iFe.useState(void 0);return rc(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Gw=A(Ma(),1);var hae="Popper",[lFe,gae]=Zd(hae),[HOt,cFe]=lFe(hae),uFe=e=>{let{__scopePopper:t,children:r}=e,[n,o]=tf.useState(null);return(0,Gw.jsx)(HOt,{scope:t,anchor:n,onAnchorChange:o,children:r})};uFe.displayName=hae;var dFe="PopperAnchor",fFe=tf.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=cFe(dFe,r),i=tf.useRef(null),s=ea(t,i),l=tf.useRef(null);return tf.useEffect(()=>{let c=l.current;l.current=n?.current||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,Gw.jsx)(Tn.div,{...o,ref:s})});fFe.displayName=dFe;var vae="PopperContent",[jOt,$Ot]=lFe(vae),pFe=tf.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,v=cFe(vae,r),[g,y]=tf.useState(null),x=ea(t,H=>y(H)),[w,b]=tf.useState(null),C=sFe(w),S=C?.width??0,P=C?.height??0,T=n+(a!=="center"?"-"+a:""),L=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(c)?c:[c],N=M.length>0,V={padding:L,boundary:M.filter(qOt),altBoundary:N},{refs:_,floatingStyles:I,placement:k,isPositioned:R,middlewareData:E}=X_e({strategy:"fixed",placement:T,whileElementsMounted:(...H)=>uae(...H,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Y_e({mainAxis:o+P,alignmentAxis:i}),l&&Q_e({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Z_e():void 0,...V}),l&&J_e({...V}),eFe({...V,apply:({elements:H,rects:K,availableWidth:G,availableHeight:J})=>{let{width:ae,height:Z}=K.reference,Pe=H.floating.style;Pe.setProperty("--radix-popper-available-width",`${G}px`),Pe.setProperty("--radix-popper-available-height",`${J}px`),Pe.setProperty("--radix-popper-anchor-width",`${ae}px`),Pe.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),w&&rFe({element:w,padding:s}),GOt({arrowWidth:S,arrowHeight:P}),f&&tFe({strategy:"referenceHidden",...V})]}),[O,B]=gFe(k),U=nc(h);rc(()=>{R&&U?.()},[R,U]);let D=E.arrow?.x,j=E.arrow?.y,$=E.arrow?.centerOffset!==0,[z,q]=tf.useState();return rc(()=>{g&&q(window.getComputedStyle(g).zIndex)},[g]),(0,Gw.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:R?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,["--radix-popper-transform-origin"]:[E.transformOrigin?.x,E.transformOrigin?.y].join(" "),...E.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Gw.jsx)(jOt,{scope:r,placedSide:O,onArrowChange:b,arrowX:D,arrowY:j,shouldHideArrow:$,children:(0,Gw.jsx)(Tn.div,{"data-side":O,"data-align":B,...m,ref:x,style:{...m.style,animation:R?void 0:"none"}})})})});pFe.displayName=vae;var mFe="PopperArrow",WOt={top:"bottom",right:"left",bottom:"top",left:"right"},hFe=tf.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,a=$Ot(mFe,n),i=WOt[a.placedSide];return(0,Gw.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Gw.jsx)(aFe,{...o,ref:r,style:{...o.style,display:"block"}})})});hFe.displayName=mFe;function qOt(e){return e!==null}var GOt=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=gFe(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2,h="",m="";return c==="bottom"?(h=i?d:`${f}px`,m=`${-l}px`):c==="top"?(h=i?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(h=`${-l}px`,m=i?d:`${p}px`):c==="left"&&(h=`${n.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:h,y:m}}}});function gFe(e){let[t,r="center"]=e.split("-");return[t,r]}var vFe=uFe,yFe=fFe,xFe=pFe,bFe=hFe;var z$=A(xr(),1),wFe=A(aP(),1);var CFe=A(Ma(),1),XOt="Portal",T_=z$.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=z$.useState(!1);rc(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?wFe.default.createPortal((0,CFe.jsx)(Tn.div,{...n,ref:t}),i):null});T_.displayName=XOt;var rf=A(xr(),1);var SFe=A(xr(),1);function YOt(e,t){return SFe.useReducer((r,n)=>t[r][n]??r,e)}var fp=e=>{let{present:t,children:r}=e,n=QOt(t),o=typeof r=="function"?r({present:n.isPresent}):rf.Children.only(r),a=ea(n.ref,ZOt(o));return typeof r=="function"||n.isPresent?rf.cloneElement(o,{ref:a}):null};fp.displayName="Presence";function QOt(e){let[t,r]=rf.useState(),n=rf.useRef(null),o=rf.useRef(e),a=rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=YOt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return rf.useEffect(()=>{let c=H$(n.current);a.current=s==="mounted"?c:"none"},[s]),rc(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=H$(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rc(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=H$(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=H$(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function H$(e){return e?.animationName||"none"}function ZOt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qi=A(xr(),1);var PFe=A(xr(),1);function IFe(e,t=globalThis?.document){let r=nc(e);PFe.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xae=A(Ma(),1),JOt="DismissableLayer",yae="dismissableLayer.update",e2t="dismissableLayer.pointerDownOutside",t2t="dismissableLayer.focusOutside",kFe,NFe=qi.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gP=qi.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=qi.useContext(NFe),[u,d]=qi.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=qi.useState({}),h=ea(t,S=>d(S)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,b=o2t(S=>{let P=S.target,T=[...c.branches].some(L=>L.contains(P));!w||T||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=a2t(S=>{let P=S.target;[...c.branches].some(L=>L.contains(P))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return IFe(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),qi.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kFe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),RFe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kFe)}},[u,f,r,c]),qi.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),RFe())},[u,c]),qi.useEffect(()=>{let S=()=>p({});return document.addEventListener(yae,S),()=>document.removeEventListener(yae,S)},[]),(0,xae.jsx)(Tn.div,{...l,ref:h,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:xn(e.onFocusCapture,C.onFocusCapture),onBlurCapture:xn(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:xn(e.onPointerDownCapture,b.onPointerDownCapture)})});gP.displayName=JOt;var r2t="DismissableLayerBranch",n2t=qi.forwardRef((e,t)=>{let r=qi.useContext(NFe),n=qi.useRef(null),o=ea(t,n);return qi.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,xae.jsx)(Tn.div,{...e,ref:o})});n2t.displayName=r2t;function o2t(e,t=globalThis?.document){let r=nc(e),n=qi.useRef(!1),o=qi.useRef(()=>{});return qi.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){TFe(e2t,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function a2t(e,t=globalThis?.document){let r=nc(e),n=qi.useRef(!1);return qi.useEffect(()=>{let o=a=>{a.target&&!n.current&&TFe(t2t,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function RFe(){let e=new CustomEvent(yae);document.dispatchEvent(e)}function TFe(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?g_(o,a):o.dispatchEvent(a)}var pp=A(Ma(),1),bae,W$="HoverCard",[MFe,pcn]=Zd(W$,[gae]),q$=gae(),[i2t,G$]=MFe(W$),EFe=e=>{let{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=q$(t),c=us.useRef(0),u=us.useRef(0),d=us.useRef(!1),f=us.useRef(!1),[p,h]=Yx({prop:n,defaultProp:o??!1,onChange:a,caller:W$}),m=us.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>h(!0),i)},[i,h]),v=us.useCallback(()=>{clearTimeout(c.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>h(!1),s))},[s,h]),g=us.useCallback(()=>h(!1),[h]);return us.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,pp.jsx)(i2t,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,pp.jsx)(vFe,{...l,children:r})})};EFe.displayName=W$;var AFe="HoverCardTrigger",LFe=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=G$(AFe,r),a=q$(r);return(0,pp.jsx)(yFe,{asChild:!0,...a,children:(0,pp.jsx)(Tn.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:xn(e.onPointerEnter,$$(o.onOpen)),onPointerLeave:xn(e.onPointerLeave,$$(o.onClose)),onFocus:xn(e.onFocus,o.onOpen),onBlur:xn(e.onBlur,o.onClose),onTouchStart:xn(e.onTouchStart,i=>i.preventDefault())})})});LFe.displayName=AFe;var wae="HoverCardPortal",[s2t,l2t]=MFe(wae,{forceMount:void 0}),c2t=e=>{let{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,a=G$(wae,t);return(0,pp.jsx)(s2t,{scope:t,forceMount:r,children:(0,pp.jsx)(fp,{present:r||a.open,children:(0,pp.jsx)(T_,{asChild:!0,container:o,children:n})})})};c2t.displayName=wae;var j$="HoverCardContent",DFe=us.forwardRef((e,t)=>{let r=l2t(j$,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,a=G$(j$,e.__scopeHoverCard);return(0,pp.jsx)(fp,{present:n||a.open,children:(0,pp.jsx)(u2t,{"data-state":a.open?"open":"closed",...o,onPointerEnter:xn(e.onPointerEnter,$$(a.onOpen)),onPointerLeave:xn(e.onPointerLeave,$$(a.onClose)),ref:t})})});DFe.displayName=j$;var u2t=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=G$(j$,r),c=q$(r),u=us.useRef(null),d=ea(t,u),[f,p]=us.useState(!1);return us.useEffect(()=>{if(f){let h=document.body;return bae=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=bae,h.style.webkitUserSelect=bae}}},[f]),us.useEffect(()=>{if(u.current){let h=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),us.useEffect(()=>{u.current&&p2t(u.current).forEach(m=>m.setAttribute("tabindex","-1"))}),(0,pp.jsx)(gP,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:xn(a,h=>{h.preventDefault()}),onDismiss:l.onDismiss,children:(0,pp.jsx)(xFe,{...c,...s,onPointerDown:xn(s.onPointerDown,h=>{h.currentTarget.contains(h.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),d2t="HoverCardArrow",f2t=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=q$(r);return(0,pp.jsx)(bFe,{...o,...n,ref:t})});f2t.displayName=d2t;function $$(e){return t=>t.pointerType==="touch"?void 0:e()}function p2t(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var OFe=EFe,_Fe=LFe;var Cae=DFe;var BFe=A(de(),1),M_=OFe,E_=_Fe,xT=FFe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,BFe.jsx)(Cae,{ref:o,align:t,sideOffset:r,className:F("z-[100] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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}));xT.displayName=Cae.displayName;var xP=A(ue(),1);var vr=A(xr(),1),XFe=A(aP(),1);var K$=A(xr(),1),h2t=A(Ma(),1),g2t=K$.createContext(void 0);function VFe(e){let t=K$.useContext(g2t);return e||t||"ltr"}var Sae=A(xr(),1);var v2t=Sae[" useId ".trim().toString()]||(()=>{}),y2t=0;function vP(e){let[t,r]=Sae.useState(v2t());return rc(()=>{e||r(n=>n??String(y2t++))},[e]),e||(t?`radix-${t}`:"")}var Kw=A(xr(),1);var X$=A(Ma(),1),x2t=A(xr(),1);var w2t=A(Ma(),1);function Iae(e){let t=e+"CollectionProvider",[r,n]=Zd(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=Kw.default.useRef(null),x=Kw.default.useRef(new Map).current;return(0,X$.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=iP(s),c=Kw.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=ea(v,x.collectionRef);return(0,X$.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=iP(u),p=Kw.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=Kw.default.useRef(null),b=ea(v,w),C=a(u,g);return Kw.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,X$.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return Kw.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var UFe=new WeakMap,Zs,lg,Ccn=(lg=class extends Map{constructor(r){super(r);rR(this,Zs,void 0);tx(this,Zs,[...super.keys()]),UFe.set(this,!0)}set(r,n){return UFe.get(this)&&(this.has(r)?Or(this,Zs)[Or(this,Zs).indexOf(r)]=r:Or(this,Zs).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,Zs).length,s=zFe(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,Zs)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new lg(this);return a.insert(r,n,o),a}before(r){let n=Or(this,Zs).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,Zs).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,Zs).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,Zs).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,Zs,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,Zs).splice(Or(this,Zs).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Pae(Or(this,Zs),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Pae(Or(this,Zs),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,Zs).indexOf(r)}keyAt(r){return Pae(Or(this,Zs),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new lg(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new lg(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new lg(n)}toReversed(){let r=new lg;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new lg(n)}slice(r,n){let o=new lg,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},Zs=new WeakMap,lg);function Pae(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=b2t(e,t);return r===-1?void 0:e[r]}function b2t(e,t){let r=e.length,n=zFe(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function zFe(e){return e!==e||e===0?0:Math.trunc(e)}var Y$=A(xr(),1);function HFe(e){let t=Y$.useRef({value:e,previous:e});return Y$.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var jFe=A(xr(),1);var $Fe=A(Ma(),1),C2t=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),S2t="VisuallyHidden",WFe=jFe.forwardRef((e,t)=>(0,$Fe.jsx)(Tn.span,{...e,ref:t,style:{...C2t,...e.style}}));WFe.displayName=S2t;var qFe=WFe;var Kr=A(Ma(),1),yP="NavigationMenu",[Eae,YFe,I2t]=Iae(yP),[kae,k2t,R2t]=Iae(yP),[Aae,Ucn]=Zd(yP,[I2t,R2t]),[N2t,Em]=Aae(yP),[T2t,M2t]=Aae(yP),QFe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:l="horizontal",dir:c,...u}=e,[d,f]=vr.useState(null),p=ea(t,T=>f(T)),h=VFe(c),m=vr.useRef(0),v=vr.useRef(0),g=vr.useRef(0),[y,x]=vr.useState(!0),[w,b]=Yx({prop:n,onChange:T=>{let L=T!=="",M=s>0;L?(window.clearTimeout(g.current),M&&x(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(!0),s)),o?.(T)},defaultProp:a??"",caller:yP}),C=vr.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(""),150)},[b]),S=vr.useCallback(T=>{window.clearTimeout(v.current),b(T)},[b]),P=vr.useCallback(T=>{w===T?window.clearTimeout(v.current):m.current=window.setTimeout(()=>{window.clearTimeout(v.current),b(T)},i)},[w,b,i]);return vr.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(v.current),window.clearTimeout(g.current)},[]),(0,Kr.jsx)(ZFe,{scope:r,isRootMenu:!0,value:w,dir:h,orientation:l,rootNavigationMenu:d,onTriggerEnter:T=>{window.clearTimeout(m.current),y?P(T):S(T)},onTriggerLeave:()=>{window.clearTimeout(m.current),C()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:C,onItemSelect:T=>{b(L=>L===T?"":T)},onItemDismiss:()=>b(""),children:(0,Kr.jsx)(Tn.nav,{"aria-label":"Main","data-orientation":l,dir:h,...u,ref:p})})});QFe.displayName=yP;var Rae="NavigationMenuSub",E2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",...s}=e,l=Em(Rae,r),[c,u]=Yx({prop:n,onChange:o,defaultProp:a??"",caller:Rae});return(0,Kr.jsx)(ZFe,{scope:r,isRootMenu:!1,value:c,dir:l.dir,orientation:i,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:(0,Kr.jsx)(Tn.div,{"data-orientation":i,...s,ref:t})})});E2t.displayName=Rae;var ZFe=e=>{let{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:o,orientation:a,children:i,value:s,onItemSelect:l,onItemDismiss:c,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[h,m]=vr.useState(null),[v,g]=vr.useState(new Map),[y,x]=vr.useState(null);return(0,Kr.jsx)(N2t,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:HFe(s),baseId:vP(),dir:o,orientation:a,viewport:h,onViewportChange:m,indicatorTrack:y,onIndicatorTrackChange:x,onTriggerEnter:nc(u),onTriggerLeave:nc(d),onContentEnter:nc(f),onContentLeave:nc(p),onItemSelect:nc(l),onItemDismiss:nc(c),onViewportContentChange:vr.useCallback((w,b)=>{g(C=>(C.set(w,b),new Map(C)))},[]),onViewportContentRemove:vr.useCallback(w=>{g(b=>b.has(w)?(b.delete(w),new Map(b)):b)},[]),children:(0,Kr.jsx)(Eae.Provider,{scope:t,children:(0,Kr.jsx)(T2t,{scope:t,items:v,children:i})})})},JFe="NavigationMenuList",eBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(JFe,r),a=(0,Kr.jsx)(Tn.ul,{"data-orientation":o.orientation,...n,ref:t});return(0,Kr.jsx)(Tn.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,Kr.jsx)(Eae.Slot,{scope:r,children:o.isRootMenu?(0,Kr.jsx)(uBe,{asChild:!0,children:a}):a})})});eBe.displayName=JFe;var tBe="NavigationMenuItem",[A2t,rBe]=Aae(tBe),nBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,...o}=e,a=vP(),i=n||a||"LEGACY_REACT_AUTO_VALUE",s=vr.useRef(null),l=vr.useRef(null),c=vr.useRef(null),u=vr.useRef(()=>{}),d=vr.useRef(!1),f=vr.useCallback((h="start")=>{if(s.current){u.current();let m=Tae(s.current);m.length&&Oae(h==="start"?m:m.reverse())}},[]),p=vr.useCallback(()=>{if(s.current){let h=Tae(s.current);h.length&&(u.current=V2t(h))}},[]);return(0,Kr.jsx)(A2t,{scope:r,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,Kr.jsx)(Tn.li,{...o,ref:t})})});nBe.displayName=tBe;var Nae="NavigationMenuTrigger",oBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,disabled:n,...o}=e,a=Em(Nae,e.__scopeNavigationMenu),i=rBe(Nae,e.__scopeNavigationMenu),s=vr.useRef(null),l=ea(s,i.triggerRef,t),c=fBe(a.baseId,i.value),u=pBe(a.baseId,i.value),d=vr.useRef(!1),f=vr.useRef(!1),p=i.value===a.value;return(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)(Eae.ItemSlot,{scope:r,value:i.value,children:(0,Kr.jsx)(dBe,{asChild:!0,children:(0,Kr.jsx)(Tn.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":_ae(p),"aria-expanded":p,"aria-controls":u,...o,ref:l,onPointerEnter:xn(e.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:xn(e.onPointerMove,Z$(()=>{n||f.current||i.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:xn(e.onPointerLeave,Z$(()=>{n||(a.onTriggerLeave(),d.current=!1)})),onClick:xn(e.onClick,()=>{a.onItemSelect(i.value),f.current=p}),onKeyDown:xn(e.onKeyDown,h=>{let v={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&h.key===v&&(i.onEntryKeyDown(),h.preventDefault())})})})}),p&&(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)(qFe,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:h=>{let m=i.contentRef.current,v=h.relatedTarget,g=v===s.current,y=m?.contains(v);(g||!y)&&i.onFocusProxyEnter(g?"start":"end")}}),a.viewport&&(0,Kr.jsx)("span",{"aria-owns":u})]})]})});oBe.displayName=Nae;var L2t="NavigationMenuLink",GFe="navigationMenu.linkSelect",aBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,active:n,onSelect:o,...a}=e;return(0,Kr.jsx)(dBe,{asChild:!0,children:(0,Kr.jsx)(Tn.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...a,ref:t,onClick:xn(e.onClick,i=>{let s=i.target,l=new CustomEvent(GFe,{bubbles:!0,cancelable:!0});if(s.addEventListener(GFe,c=>o?.(c),{once:!0}),g_(s,l),!l.defaultPrevented&&!i.metaKey){let c=new CustomEvent(Q$,{bubbles:!0,cancelable:!0});g_(s,c)}},{checkForDefaultPrevented:!1})})})});aBe.displayName=L2t;var Lae="NavigationMenuIndicator",iBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Em(Lae,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?XFe.default.createPortal((0,Kr.jsx)(fp,{present:r||a,children:(0,Kr.jsx)(D2t,{...n,ref:t})}),o.indicatorTrack):null});iBe.displayName=Lae;var D2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(Lae,r),a=YFe(r),[i,s]=vr.useState(null),[l,c]=vr.useState(null),u=o.orientation==="horizontal",d=!!o.value;vr.useEffect(()=>{let h=a().find(m=>m.value===o.value)?.ref.current;h&&s(h)},[a,o.value]);let f=()=>{i&&c({size:u?i.offsetWidth:i.offsetHeight,offset:u?i.offsetLeft:i.offsetTop})};return Mae(i,f),Mae(o.indicatorTrack,f),l?(0,Kr.jsx)(Tn.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":o.orientation,...n,ref:t,style:{position:"absolute",...u?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...n.style}}):null}),bT="NavigationMenuContent",sBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Em(bT,e.__scopeNavigationMenu),a=rBe(bT,e.__scopeNavigationMenu),i=ea(a.contentRef,t),s=a.value===o.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...n};return o.viewport?(0,Kr.jsx)(O2t,{forceMount:r,...l,ref:i}):(0,Kr.jsx)(fp,{present:r||s,children:(0,Kr.jsx)(lBe,{"data-state":_ae(s),...l,ref:i,onPointerEnter:xn(e.onPointerEnter,o.onContentEnter),onPointerLeave:xn(e.onPointerLeave,Z$(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})})});sBe.displayName=bT;var O2t=vr.forwardRef((e,t)=>{let r=Em(bT,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return rc(()=>{n(e.value,{ref:t,...e})},[e,t,n]),rc(()=>()=>o(e.value),[e.value,o]),null}),Q$="navigationMenu.rootContentDismiss",lBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,u=Em(bT,r),d=vr.useRef(null),f=ea(d,t),p=fBe(u.baseId,n),h=pBe(u.baseId,n),m=YFe(r),v=vr.useRef(null),{onItemDismiss:g}=u;vr.useEffect(()=>{let x=d.current;if(u.isRootMenu&&x){let w=()=>{g(),s(),x.contains(document.activeElement)&&o.current?.focus()};return x.addEventListener(Q$,w),()=>x.removeEventListener(Q$,w)}},[u.isRootMenu,e.value,o,g,s]);let y=vr.useMemo(()=>{let w=m().map(L=>L.value);u.dir==="rtl"&&w.reverse();let b=w.indexOf(u.value),C=w.indexOf(u.previousValue),S=n===u.value,P=C===w.indexOf(n);if(!S&&!P)return v.current;let T=(()=>{if(b!==C){if(S&&C!==-1)return b>C?"from-end":"from-start";if(P&&b!==-1)return b>C?"to-start":"to-end"}return null})();return v.current=T,T},[u.previousValue,u.value,u.dir,m,n]);return(0,Kr.jsx)(uBe,{asChild:!0,children:(0,Kr.jsx)(gP,{id:h,"aria-labelledby":p,"data-motion":y,"data-orientation":u.orientation,...c,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let x=new Event(Q$,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(x)},onFocusOutside:xn(e.onFocusOutside,x=>{l();let w=x.target;u.rootNavigationMenu?.contains(w)&&x.preventDefault()}),onPointerDownOutside:xn(e.onPointerDownOutside,x=>{let w=x.target,b=m().some(S=>S.ref.current?.contains(w)),C=u.isRootMenu&&u.viewport?.contains(w);(b||C||!u.isRootMenu)&&x.preventDefault()}),onKeyDown:xn(e.onKeyDown,x=>{let w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){let C=Tae(x.currentTarget),S=document.activeElement,P=C.findIndex(M=>M===S),L=x.shiftKey?C.slice(0,P).reverse():C.slice(P+1,C.length);Oae(L)?x.preventDefault():a.current?.focus()}}),onEscapeKeyDown:xn(e.onEscapeKeyDown,x=>{i.current=!0})})})}),Dae="NavigationMenuViewport",cBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=!!Em(Dae,e.__scopeNavigationMenu).value;return(0,Kr.jsx)(fp,{present:r||a,children:(0,Kr.jsx)(_2t,{...n,ref:t})})});cBe.displayName=Dae;var _2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,children:n,...o}=e,a=Em(Dae,r),i=ea(t,a.onViewportChange),s=M2t(bT,e.__scopeNavigationMenu),[l,c]=vr.useState(null),[u,d]=vr.useState(null),f=l?l?.width+"px":void 0,p=l?l?.height+"px":void 0,h=!!a.value,m=h?a.value:a.previousValue;return Mae(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,Kr.jsx)(Tn.div,{"data-state":_ae(h),"data-orientation":a.orientation,...o,ref:i,style:{pointerEvents:!h&&a.isRootMenu?"none":void 0,["--radix-navigation-menu-viewport-width"]:f,["--radix-navigation-menu-viewport-height"]:p,...o.style},onPointerEnter:xn(e.onPointerEnter,a.onContentEnter),onPointerLeave:xn(e.onPointerLeave,Z$(a.onContentLeave)),children:Array.from(s.items).map(([g,{ref:y,forceMount:x,...w}])=>{let b=m===g;return(0,Kr.jsx)(fp,{present:x||b,children:(0,Kr.jsx)(lBe,{...w,ref:h_(y,C=>{b&&C&&d(C)})})},g)})})}),F2t="FocusGroup",uBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(F2t,r);return(0,Kr.jsx)(kae.Provider,{scope:r,children:(0,Kr.jsx)(kae.Slot,{scope:r,children:(0,Kr.jsx)(Tn.div,{dir:o.dir,...n,ref:t})})})}),KFe=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],B2t="FocusGroupItem",dBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=k2t(r),a=Em(B2t,r);return(0,Kr.jsx)(kae.ItemSlot,{scope:r,children:(0,Kr.jsx)(Tn.button,{...n,ref:t,onKeyDown:xn(e.onKeyDown,i=>{if(["Home","End",...KFe].includes(i.key)){let l=o().map(d=>d.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),KFe.includes(i.key)){let d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>Oae(l)),i.preventDefault()}})})})});function Tae(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Oae(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function V2t(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{let r=t.dataset.tabindex;t.setAttribute("tabindex",r)})}}function Mae(e,t){let r=nc(t);rc(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}function _ae(e){return e?"open":"closed"}function fBe(e,t){return`${e}-trigger-${t}`}function pBe(e,t){return`${e}-content-${t}`}function Z$(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fae=QFe;var Bae=eBe,mBe=nBe,Vae=oBe,hBe=aBe,Uae=iBe,zae=sBe,Hae=cBe;var Am=A(de(),1),A_=xP.forwardRef(({className:e,children:t,...r},n)=>(0,Am.jsxs)(Fae,{ref:n,className:F("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,(0,Am.jsx)(J$,{})]}));A_.displayName=Fae.displayName;var L_=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(Bae,{ref:r,className:F("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));L_.displayName=Bae.displayName;var D_=mBe,O_=xt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),__=xP.forwardRef(({className:e,children:t,...r},n)=>(0,Am.jsxs)(Vae,{ref:n,className:F(O_(),"group",e),...r,children:[t," ",(0,Am.jsx)(ca,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));__.displayName=Vae.displayName;var F_=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(zae,{ref:r,className:F("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));F_.displayName=zae.displayName;var B_=hBe,J$=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)("div",{className:F("absolute left-0 top-full flex justify-center"),children:(0,Am.jsx)(Hae,{className:F("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));J$.displayName=Hae.displayName;var jae=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(Uae,{ref:r,className:F("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:(0,Am.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));jae.displayName=Uae.displayName;var Js=A(ue(),1);Ur();var Ns=A(de(),1),$ae=xt("fixed bg-background shadow-2xl overflow-hidden",{variants:{position:{bottom:"bottom-0 left-0 right-0 rounded-t-[20px] max-h-[95vh]",top:"top-0 left-0 right-0 rounded-b-[20px] max-h-[95vh]",left:"left-0 top-0 bottom-0 rounded-r-[20px] max-w-[90vw]",right:"right-0 top-0 bottom-0 rounded-l-[20px] max-w-[90vw]"},size:{default:"",sm:"",md:"",lg:"",full:""}},compoundVariants:[{position:["bottom","top"],size:"sm",class:"h-[30vh]"},{position:["bottom","top"],size:"md",class:"h-[50vh]"},{position:["bottom","top"],size:"lg",class:"h-[70vh]"},{position:["bottom","top"],size:"full",class:"h-[95vh]"},{position:["left","right"],size:"sm",class:"w-[280px]"},{position:["left","right"],size:"md",class:"w-[380px]"},{position:["left","right"],size:"lg",class:"w-[480px]"},{position:["left","right"],size:"full",class:"w-[90vw]"}],defaultVariants:{position:"bottom",size:"default"}}),z2t=xt("absolute bg-muted-foreground/20 transition-all duration-200",{variants:{position:{bottom:"top-2 left-1/2 -translate-x-1/2 w-12 h-1 rounded-full",top:"bottom-2 left-1/2 -translate-x-1/2 w-12 h-1 rounded-full",left:"right-2 top-1/2 -translate-y-1/2 w-1 h-12 rounded-full",right:"left-2 top-1/2 -translate-y-1/2 w-1 h-12 rounded-full"}},defaultVariants:{position:"bottom"}}),H2t=e=>{(0,Js.useEffect)(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},j2t=(e,t,r,n,o)=>{let a=Math.abs(e)/o*100;if(Math.abs(t)>500){if((n==="up"||n==="left")&&t<0){let i=r.filter(s=>s>a);return i.length>0?i[0]:r[r.length-1]}else if((n==="down"||n==="right")&&t>0){let i=r.filter(s=>s<a);return i.length>0?i[i.length-1]:0}}return r.reduce((i,s)=>Math.abs(s-a)<Math.abs(i-a)?s:i)},gBe=Js.default.forwardRef(({isOpen:e,onOpenChange:t,children:r,position:n="bottom",size:o="default",snapPoints:a=o==="default"?[25,50,75,100]:[],defaultSnapPoint:i,enableSwipeToClose:s=!0,closeThreshold:l=20,closeVelocity:c=500,dragElastic:u=.2,showHandle:d=!0,handleClassName:f,showCloseButton:p=!1,closeButtonClassName:h,showBackdrop:m=!0,backdropClassName:v,backdropBlur:g=!0,closeOnBackdropClick:y=!0,animationDuration:x=.5,springConfig:w={stiffness:300,damping:30,mass:1},preventBodyScroll:b=!0,autoHeight:C=!1,nestedScrolling:S=!0,onSnapPointChange:P,className:T,asChild:L=!1,isProComponent:M=!0,...N},V)=>{let _=n==="bottom"||n==="top",I=Nj(),k=Nj(),R=Xa(0),E=Xa(0),O=_?E:R,[B,U]=(0,Js.useState)(i||(a.length>0?a[0]:50)),[D,j]=(0,Js.useState)(!1),$=(0,Js.useRef)(null),[z,q]=(0,Js.useState)(null);H2t(e&&b);let H=(0,Js.useMemo)(()=>typeof window>"u"?1e3:_?window.innerHeight:window.innerWidth,[_]),K=(0,Js.useCallback)(_e=>0,[n,H]),G=e?.5:0,J=(0,Js.useCallback)((_e,he)=>{j(!1);let Ne=_?he.offset.y:he.offset.x,ve=_?he.velocity.y:he.velocity.x;if(s&&(n==="bottom"&&Ne>l&&ve>-c||n==="top"&&Ne<-l&&ve<c||n==="right"&&Ne>l&&ve>-c||n==="left"&&Ne<-l&&ve<c)){t(!1);return}if(a.length>0){let Y=n==="bottom"?"down":n==="top"?"up":n==="left"?"left":"right",Q=j2t(Math.abs(O.get()),ve,a,Y,H);U(Q),P?.(Q),fa(O,K(Q),{type:"spring",...w})}else fa(O,K(B),{type:"spring",...w})},[_,n,s,l,c,a,O,H,K,B,w,t,P]),ae=(0,Js.useCallback)((_e,he)=>{j(!0)},[]);(0,Js.useEffect)(()=>{if(!C||!$.current||!e)return;let _e=new ResizeObserver(he=>{for(let Ne of he)q(Ne.contentRect.height)});return _e.observe($.current),()=>{_e.disconnect()}},[C,e]),(0,Js.useEffect)(()=>{e?fa(O,0,{type:"spring",...w}):fa(O,0,{type:"spring",...w})},[e,O,w]),(0,Js.useEffect)(()=>{if(!e)return;let _e=he=>{he.key==="Escape"&&s&&t(!1)};return document.addEventListener("keydown",_e),()=>document.removeEventListener("keydown",_e)},[e,s,t]);let Z=()=>({x:0,y:0}),Pe=()=>{switch(n){case"bottom":return{top:-200,bottom:100};case"top":return{top:-100,bottom:200};case"right":return{left:-200,right:100};case"left":return{left:-100,right:200};default:return{}}};return e?(0,Ns.jsxs)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x},className:"fixed inset-0 z-50",style:{pointerEvents:D?"none":"auto"},children:[m&&(0,Ns.jsx)(ne.div,{className:F("absolute inset-0 bg-black/50",g&&"backdrop-blur-sm",v),style:{opacity:G},onClick:y?()=>t(!1):void 0}),(0,Ns.jsxs)(ne.div,{ref:V,drag:s?_?"y":"x":!1,dragConstraints:Pe(),dragElastic:u,onDragStart:ae,onDragEnd:J,initial:Z(),style:{...D?{[_?"y":"x"]:O}:{},...C&&z&&_?{height:`${Math.min(z+60,H*.95)}px`}:{}},className:F($ae({position:n,size:o}),"will-change-transform",T),...N,children:[d&&(0,Ns.jsx)("div",{className:F(z2t({position:n}),"cursor-grab active:cursor-grabbing",D&&"bg-muted-foreground/40 scale-x-150",f)}),p&&(0,Ns.jsx)("button",{onClick:()=>t(!1),className:F("absolute z-50 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm","hover:bg-background transition-colors",n==="bottom"&&"top-3 right-3",n==="top"&&"bottom-3 right-3",n==="left"&&"top-3 right-3",n==="right"&&"top-3 left-3",h),"aria-label":"Close drawer",children:(0,Ns.jsx)(lr,{className:"h-4 w-4"})}),(0,Ns.jsx)("div",{ref:$,className:F("h-full overflow-auto overscroll-contain",S&&"touch-pan-y",d&&n==="bottom"&&"pt-2",d&&n==="top"&&"pb-2"),style:{touchAction:S?"pan-y":"none"},children:r})]})]}):null});gBe.displayName="MoonUIGestureDrawerProComponent";var eW=Js.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Ns.jsx)($e,{className:"w-fit mx-auto",children:(0,Ns.jsx)(We,{className:"py-6 text-center",children:(0,Ns.jsxs)("div",{className:"space-y-4",children:[(0,Ns.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ns.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ns.jsxs)("div",{children:[(0,Ns.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ns.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Gesture Drawer is available exclusively to MoonUI Pro subscribers."}),(0,Ns.jsx)("a",{href:"/pricing",children:(0,Ns.jsxs)(oe,{size:"sm",children:[(0,Ns.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ns.jsx)(gBe,{...e,ref:t})});eW.displayName="MoonUIGestureDrawerPro";var vBe=eW;var ta=A(ue(),1);Ur();var ur=A(de(),1),$2t=xt("fixed inset-0 z-50 flex items-center justify-center",{variants:{backdrop:{dark:"bg-black/95",blur:"bg-black/90 backdrop-blur-md",light:"bg-white/90",gradient:"bg-gradient-to-b from-black/95 to-black/80"}},defaultVariants:{backdrop:"blur"}}),yBe=ta.createContext(void 0);function xBe(){let e=ta.useContext(yBe);if(!e)throw new Error("useLightbox must be used within a LightboxProvider");return e}function wT({children:e,items:t=[],defaultIndex:r=0}){let{hasProAccess:n,isLoading:o}=st(),[a,i]=ta.useState(r),[s,l]=ta.useState(!1),[c,u]=ta.useState(1),d=ta.useMemo(()=>({items:t,currentIndex:a,setCurrentIndex:i,isOpen:s,setIsOpen:l,zoom:c,setZoom:u}),[t,a,s,c]);return!o&&!n?(0,ur.jsx)(Rn,{componentName:"Lightbox",compact:!0}):(0,ur.jsx)(yBe.Provider,{value:d,children:e})}var bP=ta.forwardRef(({index:e=0,asChild:t,children:r,onClick:n,...o},a)=>{let{setCurrentIndex:i,setIsOpen:s,setZoom:l}=xBe(),c=v=>{i(e),s(!0),l(1),n?.(v)};if(t){let v=r,{onDrag:g,onDragStart:y,onDragEnd:x,onDragOver:w,onDrop:b,...C}=o;return ta.cloneElement(v,{...v.props,...C,onClick:c})}let{onDrag:u,onDragStart:d,onDragEnd:f,onDragOver:p,onDrop:h,...m}=o;return(0,ur.jsx)("div",{ref:a,onClick:c,className:"cursor-pointer",...m,children:r})});bP.displayName="LightboxTrigger";var wP=ta.forwardRef(({className:e,backdrop:t,showNavigation:r=!0,showZoomControls:n=!0,showDownload:o=!0,showFullscreen:a=!0,showThumbnails:i=!1,enableKeyboardNavigation:s=!0,enableSwipeGestures:l=!0,animationDuration:c=300,autoPlayVideo:u=!1,onClose:d,...f},p)=>{let{onDrag:h,onDragStart:m,onDragEnd:v,onDragOver:g,onDrop:y,onAnimationStart:x,onAnimationEnd:w,onAnimationIteration:b,...C}=f,{items:S,currentIndex:P,setCurrentIndex:T,isOpen:L,setIsOpen:M,zoom:N,setZoom:V}=xBe(),[_,I]=ta.useState(!0),[k,R]=ta.useState(!1),[E,O]=ta.useState(!0),[B,U]=ta.useState(!1),[D,j]=ta.useState({x:0,y:0}),[$,z]=ta.useState(!1),q=ta.useRef(null),H=ta.useRef(null),K=S[P];ta.useEffect(()=>{K?.type==="video"&&u?(R(!0),O(!0)):R(!1)},[P,K,u]),ta.useEffect(()=>{if(!s||!L)return;let Oe=Y=>{switch(Y.key){case"ArrowLeft":J();break;case"ArrowRight":ae();break;case"Escape":G();break;case"+":case"=":Z();break;case"-":Pe();break;case" ":K?.type==="video"&&(Y.preventDefault(),R(!k));break}};return window.addEventListener("keydown",Oe),()=>window.removeEventListener("keydown",Oe)},[L,P,k,s]),ta.useEffect(()=>{H.current&&K?.type==="video"&&(k?H.current.play().catch(Oe=>{console.error("Video play error:",Oe),R(!1)}):H.current.pause())},[k,K]);let G=()=>{M(!1),V(1),j({x:0,y:0}),d?.()},J=()=>{T(P>0?P-1:S.length-1),V(1),j({x:0,y:0}),I(!0)},ae=()=>{T(P<S.length-1?P+1:0),V(1),j({x:0,y:0}),I(!0)},Z=()=>{V(Math.min(N+.5,3))},Pe=()=>{V(Math.max(N-.5,.5)),N-.5<=1&&j({x:0,y:0})},be=()=>{if(K){let Oe=document.createElement("a");Oe.href=K.src,Oe.download=K.alt||"download",Oe.click()}},_e=()=>{B?document.exitFullscreen():q.current?.requestFullscreen(),U(!B)},he=Oe=>{N>1&&z(!0)},Ne=Oe=>{$&&N>1&&j({x:D.x+Oe.movementX,y:D.y+Oe.movementY})},ve=()=>{z(!1)};return K?(0,ur.jsx)(Iw,{open:L,onOpenChange:M,children:(0,ur.jsx)(Ft,{children:L&&(0,ur.jsx)(kw,{forceMount:!0,children:(0,ur.jsx)(Mv,{asChild:!0,children:(0,ur.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c/1e3},className:F($2t({backdrop:t}),e),ref:p,onClick:Oe=>{Oe.target===Oe.currentTarget&&G()},...C,children:(0,ur.jsxs)("div",{ref:q,className:"relative w-full h-full flex items-center justify-center pointer-events-none",onMouseMove:Ne,onMouseUp:ve,onMouseLeave:ve,children:[(0,ur.jsx)("div",{className:"absolute inset-0 pointer-events-auto",onClick:G}),(0,ur.jsx)("button",{onClick:G,className:"absolute top-4 right-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(lr,{className:"h-5 w-5"})}),r&&S.length>1&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:J,className:"absolute left-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(gi,{className:"h-5 w-5"})}),(0,ur.jsx)("button",{onClick:ae,className:"absolute right-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(Jn,{className:"h-5 w-5"})})]}),(0,ur.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 pointer-events-auto",children:[n&&K.type==="image"&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:Pe,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(rp,{className:"h-4 w-4"})}),(0,ur.jsxs)("span",{className:"px-3 py-1 rounded-full bg-black/50 text-white text-sm",children:[Math.round(N*100),"%"]}),(0,ur.jsx)("button",{onClick:Z,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(tp,{className:"h-4 w-4"})})]}),K.type==="video"&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:()=>{R(!k),!k&&H.current&&H.current.play().catch(Oe=>{console.error("Play failed:",Oe)})},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:k?(0,ur.jsx)(Yb,{className:"h-4 w-4"}):(0,ur.jsx)(Hh,{className:"h-4 w-4"})}),(0,ur.jsx)("button",{onClick:()=>{O(!E),H.current&&(H.current.muted=!E)},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:E?(0,ur.jsx)(o2,{className:"h-4 w-4"}):(0,ur.jsx)(n2,{className:"h-4 w-4"})})]}),o&&(0,ur.jsx)("button",{onClick:be,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(Pn,{className:"h-4 w-4"})}),a&&(0,ur.jsx)("button",{onClick:_e,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(Ic,{className:"h-4 w-4"})})]}),(0,ur.jsxs)(ne.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{duration:c/1e3},className:"relative flex items-center justify-center pointer-events-auto",style:{transform:`scale(${N}) translate(${D.x/N}px, ${D.y/N}px)`,cursor:N>1?$?"grabbing":"grab":"auto"},onMouseDown:he,children:[_&&(0,ur.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ur.jsx)(Mr,{className:"h-8 w-8 animate-spin text-white"})}),K.type==="image"?(0,ur.jsx)("img",{src:K.src,alt:K.alt,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto object-contain select-none",onLoad:()=>I(!1),draggable:!1}):(0,ur.jsx)("video",{ref:H,src:K.src,poster:K.poster,muted:E,controls:!0,autoPlay:u&&k,playsInline:!0,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto",onLoadedData:()=>{I(!1),u&&k&&H.current&&H.current.play().catch(Oe=>{console.error("Autoplay failed:",Oe)})},onError:Oe=>{console.error("Video error:",Oe),I(!1)}})]}),(K.title||K.description)&&(0,ur.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute top-4 left-4 max-w-md pointer-events-auto",children:[K.title&&(0,ur.jsx)("h3",{className:"text-white text-xl font-semibold mb-1",children:K.title}),K.description&&(0,ur.jsx)("p",{className:"text-white/80 text-sm",children:K.description})]}),i&&S.length>1&&(0,ur.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute bottom-20 left-0 right-0 flex justify-center z-50 pointer-events-auto",children:(0,ur.jsx)("div",{className:"flex gap-2 p-2 bg-black/70 backdrop-blur-sm rounded-lg max-w-[80vw] overflow-x-auto",children:S.map((Oe,Y)=>(0,ur.jsx)("button",{onClick:()=>{T(Y),V(1),j({x:0,y:0})},className:F("w-16 h-16 rounded overflow-hidden transition-all",Y===P?"ring-2 ring-white scale-110":"opacity-60 hover:opacity-100"),children:Oe.type==="image"?(0,ur.jsx)("img",{src:Oe.thumbnail||Oe.src,alt:Oe.alt,className:"w-full h-full object-cover"}):(0,ur.jsx)("div",{className:"w-full h-full bg-black/50 flex items-center justify-center",children:(0,ur.jsx)(Hh,{className:"h-4 w-4 text-white"})})},Y))})})]})})})})})}):null});wP.displayName="LightboxContent";function W2t({src:e,type:t="image",alt:r,poster:n,title:o,description:a,children:i,...s}){return(0,ur.jsxs)(wT,{items:[{type:t,src:e,alt:r,poster:n,title:o,description:a}],children:[(0,ur.jsx)(bP,{children:i}),(0,ur.jsx)(wP,{...s})]})}var el=A(ue(),1);Ur();var Wt=A(de(),1),bBe=xt("w-full",{variants:{layout:{grid:"grid gap-4",masonry:"",horizontal:"flex overflow-x-auto gap-4 pb-4 snap-x snap-mandatory scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border",justified:"flex flex-wrap gap-2"},columns:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"}},defaultVariants:{layout:"grid",columns:3}}),tW=xt("relative overflow-hidden cursor-pointer group",{variants:{variant:{default:"rounded-lg",card:"rounded-lg shadow-sm border border-border bg-card",ghost:"rounded-lg hover:bg-accent/50",outline:"rounded-lg border-2 border-transparent hover:border-primary",glass:"rounded-lg backdrop-blur-md bg-white/10 border border-white/20"},aspectRatio:{square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",auto:""},hover:{none:"",zoom:"transition-transform duration-300 hover:scale-105",lift:"transition-all duration-300 hover:-translate-y-1 hover:shadow-lg",glow:"transition-all duration-300 hover:shadow-lg hover:shadow-primary/20"}},defaultVariants:{variant:"default",aspectRatio:"square",hover:"zoom"}}),wBe=el.forwardRef(({className:e,items:t,layout:r,columns:n,variant:o,aspectRatio:a,hover:i,enableLightbox:s=!0,enableFiltering:l=!1,enableSorting:c=!1,categories:u=[],sortOptions:d=[],defaultCategory:f="all",defaultSort:p="default",showItemType:h=!0,showOverlay:m=!0,overlayContent:v,loadingState:g=!1,skeletonCount:y=6,emptyState:x,onItemClick:w,lazyLoad:b=!0,infiniteScroll:C=!1,onLoadMore:S,hasMore:P=!1,lightboxProps:T,...L},M)=>{let{hasProAccess:N,isLoading:V}=st(),[_,I]=el.useState(f),[k,R]=el.useState(p),[E,O]=el.useState(!1),[B,U]=el.useState(new Set),D=el.useRef(null),j=el.useRef(null),$=el.useMemo(()=>!l||_==="all"?t:t.filter(Z=>"category"in Z&&typeof Z.category=="string"?Z.category===_:_==="image"?Z.type==="image":_==="video"?Z.type==="video":!0),[t,_,l]),z=el.useMemo(()=>{if(!c||k==="default")return $;let Z=d.find(Pe=>Pe.id===k);return Z?[...$].sort(Z.compareFn):$},[$,k,c,d]),q=[{id:"all",label:"All"},{id:"image",label:"Images",icon:(0,Wt.jsx)(Gl,{className:"h-4 w-4"})},{id:"video",label:"Videos",icon:(0,Wt.jsx)(jh,{className:"h-4 w-4"})}],H=u.length>0?u:q;el.useEffect(()=>{if(b)return D.current=new IntersectionObserver(Z=>{Z.forEach(Pe=>{if(Pe.isIntersecting){let be=parseInt(Pe.target.getAttribute("data-index")||"0");U(_e=>new Set(_e).add(be))}})},{rootMargin:"50px"}),()=>{D.current?.disconnect()}},[b]),el.useEffect(()=>{if(!C||!S||!P)return;let Z=new IntersectionObserver(Pe=>{Pe[0].isIntersecting&&S()},{rootMargin:"100px"});return j.current&&Z.observe(j.current),()=>Z.disconnect()},[C,S,P]);let K=(Z,Pe)=>{w&&w(Z,Pe)},G=(Z,Pe)=>{let be=!b||B.has(Pe)||Z.thumbnail&&Z.thumbnail.endsWith(".svg"),_e=(0,Wt.jsxs)(ne.div,{className:F(tW({variant:o,aspectRatio:r==="masonry"||r==="justified"?"auto":a,hover:i}),r==="masonry"&&"break-inside-avoid mb-4 inline-block w-full",r==="justified"&&"flex-grow",r==="horizontal"&&"flex-shrink-0 w-80"),style:r==="justified"?{flexBasis:"200px",maxWidth:"400px"}:void 0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3,delay:Pe*.05},"data-index":Pe,ref:he=>{he&&D.current&&!B.has(Pe)&&D.current.observe(he)},onClick:()=>K(Z,Pe),children:[Z.type==="image"?(0,Wt.jsxs)("div",{className:F("relative w-full",r==="masonry"||r==="justified"?"":"h-full"),children:[(0,Wt.jsx)("img",{src:Z.thumbnail||Z.src,alt:Z.alt||`Gallery item ${Pe+1}`,className:F("w-full object-cover",r==="masonry"?"h-auto":"h-full",be?"opacity-100":"opacity-0","transition-opacity duration-300"),loading:b?"lazy":void 0,onLoad:()=>U(he=>new Set(he).add(Pe))}),!be&&(0,Wt.jsx)("div",{className:F("absolute inset-0 w-full bg-muted animate-pulse",r==="masonry"?"h-64":"h-full",r==="masonry"&&"aspect-[3/4]")})]}):(0,Wt.jsxs)("div",{className:F("relative w-full bg-black",r==="masonry"?"":"h-full"),children:[be&&(Z.thumbnail||Z.poster)&&(0,Wt.jsx)("img",{src:Z.thumbnail||Z.poster,alt:Z.alt||`Video thumbnail ${Pe+1}`,className:F("w-full object-cover",r==="masonry"?"h-auto":"h-full"),loading:b?"lazy":void 0}),(0,Wt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Wt.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,Wt.jsx)(jh,{className:"h-6 w-6 text-white"})})})]}),m&&(0,Wt.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:[v?v(Z,Pe):(0,Wt.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[Z.title&&(0,Wt.jsx)("h3",{className:"text-sm font-semibold mb-1",children:Z.title}),Z.description&&(0,Wt.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:Z.description})]}),h&&(0,Wt.jsx)("div",{className:"absolute top-2 right-2",children:(0,Wt.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:Z.type==="image"?(0,Wt.jsx)(Gl,{className:"h-4 w-4 text-white"}):(0,Wt.jsx)(jh,{className:"h-4 w-4 text-white"})})})]})]},Pe);return s?(0,Wt.jsx)(bP,{index:Pe,children:_e},Pe):_e},J=()=>(0,Wt.jsx)("div",{className:F(tW({variant:o,aspectRatio:a})),children:(0,Wt.jsx)("div",{className:"w-full h-full bg-muted animate-pulse"})});if(!V&&!N)return(0,Wt.jsx)(Rn,{componentName:"Media Gallery",compact:!0});let ae=(0,Wt.jsxs)(Wt.Fragment,{children:[(l||c)&&(0,Wt.jsxs)("div",{className:"mb-6",children:[(0,Wt.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Wt.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,Wt.jsxs)("button",{onClick:()=>O(!E),className:F("flex items-center gap-2 px-4 py-2 rounded-lg border transition-colors",E?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-accent"),children:[(0,Wt.jsx)(ns,{className:"h-4 w-4"}),"Filters"]}),c&&d.length>0&&(0,Wt.jsxs)("select",{value:k,onChange:Z=>R(Z.target.value),className:"px-4 py-2 rounded-lg border bg-background",children:[(0,Wt.jsx)("option",{value:"default",children:"Default order"}),d.map(Z=>(0,Wt.jsx)("option",{value:Z.id,children:Z.label},Z.id))]})]}),(0,Wt.jsxs)("div",{className:"text-sm text-muted-foreground",children:[z.length," items"]})]}),(0,Wt.jsx)(Ft,{children:E&&l&&(0,Wt.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,Wt.jsx)("div",{className:"flex flex-wrap gap-2 pb-4",children:H.map(Z=>(0,Wt.jsxs)("button",{onClick:()=>I(Z.id),className:F("flex items-center gap-2 px-3 py-1.5 rounded-full text-sm transition-colors",_===Z.id?"bg-primary text-primary-foreground":"bg-muted hover:bg-accent"),children:[Z.icon,Z.label]},Z.id))})})})]}),(0,Wt.jsx)("div",{ref:M,className:F(r==="masonry"?"columns-1 sm:columns-2 md:columns-3 lg:columns-4 gap-4":bBe({layout:r,columns:n}),e),style:r==="masonry"?{columnGap:"1rem"}:void 0,children:g?(0,Wt.jsx)(Wt.Fragment,{children:Array.from({length:y}).map((Z,Pe)=>(0,Wt.jsx)(el.Fragment,{children:J()},Pe))}):z.length>0?z.map((Z,Pe)=>G(Z,Pe)):x||(0,Wt.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,Wt.jsx)(Gl,{className:"h-12 w-12 text-muted-foreground mb-4"}),(0,Wt.jsx)("p",{className:"text-muted-foreground",children:"No media items found"})]})}),C&&P&&(0,Wt.jsx)("div",{ref:j,className:"flex justify-center py-8",children:(0,Wt.jsx)(Mr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});return s?(0,Wt.jsxs)(wT,{items:z,children:[ae,(0,Wt.jsx)(wP,{showThumbnails:!0,showNavigation:!0,backdrop:"blur",...T})]}):ae});wBe.displayName="MoonUIMediaGalleryPro";var CBe=el.forwardRef(({className:e,item:t,index:r=0,variant:n,aspectRatio:o,hover:a,showType:i=!0,showOverlay:s=!0,overlayContent:l,onLoad:c,...u},d)=>{let[f,p]=el.useState(!1),h=()=>{p(!0),c?.()};return(0,Wt.jsxs)("div",{ref:d,className:F(tW({variant:n,aspectRatio:o,hover:a}),e),...u,children:[t.type==="image"?(0,Wt.jsx)("img",{src:t.src,alt:t.alt||`Gallery item ${r+1}`,className:F("w-full h-full object-cover transition-opacity duration-300",f?"opacity-100":"opacity-0"),onLoad:h}):(0,Wt.jsxs)("div",{className:"relative w-full h-full bg-black",children:[t.poster&&(0,Wt.jsx)("img",{src:t.poster,alt:t.alt||`Video thumbnail ${r+1}`,className:"w-full h-full object-cover",onLoad:h}),(0,Wt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Wt.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,Wt.jsx)(jh,{className:"h-6 w-6 text-white"})})})]}),!f&&(0,Wt.jsx)("div",{className:"absolute inset-0 bg-muted animate-pulse"}),s&&f&&(0,Wt.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:[l||(0,Wt.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[t.title&&(0,Wt.jsx)("h3",{className:"text-sm font-semibold mb-1",children:t.title}),t.description&&(0,Wt.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:t.description})]}),i&&(0,Wt.jsx)("div",{className:"absolute top-2 right-2",children:(0,Wt.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:t.type==="image"?(0,Wt.jsx)(Gl,{className:"h-4 w-4 text-white"}):(0,Wt.jsx)(jh,{className:"h-4 w-4 text-white"})})})]})]})});CBe.displayName="MoonUIGalleryItemPro";var Gv=A(ue(),1);Ur();var Si=A(de(),1);function CT({items:e,onReorder:t,keyExtractor:r,renderItem:n,className:o,itemClassName:a,dragHandleClassName:i,showDragHandle:s=!1,dragHandleSize:l=16,disabled:c=!1,onDragStart:u,onDragEnd:d,gap:f=8,animationDuration:p=200,showDropIndicator:h=!0,dropIndicatorColor:m="primary",dropIndicatorStyle:v="glow",dragPreviewStyle:g="clone",hapticFeedback:y=!0}){let{hasProAccess:x,isLoading:w}=st(),[b,C]=(0,Gv.useState)(null),[S,P]=(0,Gv.useState)(null),[T,L]=(0,Gv.useState)(!1),[M,N]=(0,Gv.useState)({x:0,y:0}),[V,_]=(0,Gv.useState)(!1),I=(0,Gv.useRef)(null),k=(0,Gv.useRef)(0),R=(0,Gv.useRef)(new Map),E=(z,q)=>{if(c)return;let H=e[q];I.current=H,C(q),L(!0);let K=z.currentTarget.getBoundingClientRect();if(N({x:z.clientX-K.left,y:z.clientY-K.top}),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/html",""),z.currentTarget instanceof HTMLElement){let G=z.currentTarget.cloneNode(!0);G.style.position="absolute",G.style.top="-1000px",G.style.width=`${K.width}px`,g==="ghost"?(G.style.opacity="0.5",G.style.filter="grayscale(100%)"):g==="clone"?(G.style.opacity="0.9",G.style.transform="scale(1.02) rotate(1deg)",G.style.boxShadow="0 10px 30px rgba(0,0,0,0.3)"):g==="compact"&&(G.style.transform="scale(0.95)",G.style.opacity="0.85"),G.style.pointerEvents="none",document.body.appendChild(G),z.dataTransfer.setDragImage(G,M.x,M.y),setTimeout(()=>document.body.removeChild(G),0)}y&&"vibrate"in navigator&&navigator.vibrate(10),u?.(H,q)},O=z=>{z.preventDefault(),k.current++},B=z=>{k.current--,k.current===0&&P(null)},U=(z,q)=>{if(z.preventDefault(),z.dataTransfer.dropEffect="move",c||b===null)return;if(q===b){P(null),_(!1);return}let H=z.currentTarget.getBoundingClientRect(),K=z.clientY-H.top,G=H.height,J=K<G/2?"before":"after";P({index:q,position:J}),_(!0),y&&"vibrate"in navigator&&navigator.vibrate(5)},D=z=>{if(z.preventDefault(),c||b===null||!S||I.current===null){j();return}let q=[...e],H=q[b],K=S.index;S.position==="after"&&(K=K+1),q.splice(b,1),b<K&&(K=K-1),q.splice(K,0,H),t(q),j()},j=()=>{I.current&&b!==null&&d?.(I.current,b),setTimeout(()=>{C(null),P(null),L(!1),_(!1),I.current=null,k.current=0},50),y&&"vibrate"in navigator&&navigator.vibrate([10,50,10])},$=z=>{if(!h||!T)return null;let q=z==="before"?"-top-1":"-bottom-1";return v==="line"?(0,Si.jsx)(ne.div,{initial:{opacity:0,scaleX:0},animate:{opacity:1,scaleX:1},exit:{opacity:0,scaleX:0},className:F("absolute left-0 right-0 h-1 z-50 pointer-events-none",q),children:(0,Si.jsxs)("div",{className:"h-full bg-primary rounded-full relative",children:[(0,Si.jsx)(ne.div,{animate:{x:[0,10,0]},transition:{repeat:1/0,duration:1},className:"absolute -left-2 top-1/2 -translate-y-1/2 w-4 h-4 bg-primary rounded-full"}),(0,Si.jsx)(ne.div,{animate:{x:[0,-10,0]},transition:{repeat:1/0,duration:1},className:"absolute -right-2 top-1/2 -translate-y-1/2 w-4 h-4 bg-primary rounded-full"})]})}):v==="area"?(0,Si.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:24},exit:{opacity:0,height:0},className:F("absolute left-0 right-0 z-40 pointer-events-none",z==="before"?"-top-3":"-bottom-3"),children:(0,Si.jsx)("div",{className:"h-full bg-primary/10 rounded-lg border-2 border-dashed border-primary/50"})}):v==="glow"?(0,Si.jsx)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:F("absolute left-0 right-0 h-2 z-50 pointer-events-none",q),children:(0,Si.jsxs)("div",{className:"h-full relative",children:[(0,Si.jsx)("div",{className:"absolute inset-0 bg-primary/30 blur-xl animate-pulse"}),(0,Si.jsx)("div",{className:"absolute inset-0 bg-primary rounded-full animate-pulse"}),(0,Si.jsx)(ne.div,{animate:{opacity:[.5,1,.5],scale:[.95,1.05,.95]},transition:{repeat:1/0,duration:2},className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/50 to-primary rounded-full"})]})}):null};return!w&&!x?(0,Si.jsx)(Rn,{componentName:"Draggable List",compact:!0}):(0,Si.jsxs)("div",{className:F("relative",T&&"select-none",o),onDragEnter:O,onDragLeave:B,onDrop:D,onDragOver:z=>z.preventDefault(),children:[(0,Si.jsx)(Ft,{children:e.map((z,q)=>{let H=r(z),K=b===q,G=S?.index===q&&S?.position==="before",J=S?.index===q&&S?.position==="after";return(0,Si.jsxs)(ne.div,{ref:ae=>{ae&&R.current.set(H,ae)},layout:!0,layoutId:H,initial:{opacity:0,y:20},animate:{opacity:K?.3:1,y:0,scale:K?.95:1,rotate:K?2:0},exit:{opacity:0,scale:.95},transition:{type:"spring",stiffness:500,damping:30,duration:p/1e3},className:"relative",style:{marginBottom:f},children:[G&&$("before"),(0,Si.jsx)("div",{draggable:!c,onDragStart:ae=>E(ae,q),onDragOver:ae=>U(ae,q),onDragEnd:j,className:F("relative bg-card rounded-lg border transition-all",K&&"cursor-grabbing shadow-2xl",!K&&T&&"hover:shadow-lg hover:border-primary/30",!K&&!T&&!c&&"hover:shadow-md hover:border-border/80",!c&&"cursor-grab active:cursor-grabbing",G&&"translate-y-3",J&&"-translate-y-3",a),children:(0,Si.jsxs)("div",{className:"flex items-center gap-3 p-2",children:[s&&(0,Si.jsx)(ne.div,{className:"pl-2",whileHover:{scale:1.1},whileTap:{scale:.95},children:(0,Si.jsx)(yO,{className:F("flex-shrink-0 text-muted-foreground/50",!c&&"hover:text-muted-foreground","transition-colors",i),size:l})}),(0,Si.jsx)("div",{className:"flex-1",children:n(z,q)})]})}),J&&$("after")]},H)})}),T&&(0,Si.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 pointer-events-none z-[100]",children:(0,Si.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"})})]})}var cg=A(ue(),1);Ur();var ko=A(de(),1),Wae=xt("relative inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 overflow-hidden min-w-fit",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-700 hover:to-pink-700",glow:"bg-primary text-primary-foreground shadow-lg hover:shadow-xl hover:shadow-primary/25"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",xl:"h-11 rounded-md px-6 text-base font-medium",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),SBe=cg.default.forwardRef(({className:e,variant:t,size:r,animation:n="none",state:o="idle",onStateChange:a,children:i,onClick:s,loadingText:l="Loading...",successText:c="Success!",errorText:u="Error!",ripple:d=!1,iconRotate:f=!1,shimmerSpeed:p="normal",glowIntensity:h="medium",showProgressBar:m=!1,autoResetDelay:v=2e3,onDrag:g,onDragEnd:y,onDragStart:x,onAnimationStart:w,onAnimationEnd:b,...C},S)=>{let[P,T]=(0,cg.useState)("idle"),[L,M]=(0,cg.useState)([]),[N,V]=(0,cg.useState)(0),[_,I]=(0,cg.useState)(!1),k=o!=="idle"?o:P,R=async $=>{if(k!=="loading"){if(d){let z=$.currentTarget.getBoundingClientRect(),q=$.clientX-z.left,H=$.clientY-z.top,K=Date.now();M([...L,{x:q,y:H,id:K}]),setTimeout(()=>{M(G=>G.filter(J=>J.id!==K))},600)}if(T("loading"),a?.("loading"),V(0),m){let z=setInterval(()=>{V(q=>q>=90?(clearInterval(z),90):q+10)},200)}if(s)try{await s($),V(100),T("success"),a?.("success"),setTimeout(()=>{T("idle"),a?.("idle"),V(0)},v)}catch{V(0),T("error"),a?.("error"),setTimeout(()=>{T("idle"),a?.("idle")},v)}}},E=()=>{let $=F("h-4 w-4",{"animate-spin":k==="loading"||f&&k!=="idle"});switch(k){case"loading":return(0,ko.jsx)(Mr,{className:$});case"success":return(0,ko.jsx)(on,{className:F($,"animate-scale-in")});case"error":return(0,ko.jsx)(lr,{className:F($,"animate-shake")});default:return null}},O=()=>{switch(k){case"success":return"bg-green-600";case"error":return"bg-red-600";default:return""}},B=()=>{switch(p){case"slow":return"duration-1500";case"fast":return"duration-500";default:return"duration-1000"}},U=()=>{switch(h){case"low":return"shadow-lg";case"high":return"shadow-2xl";default:return"shadow-xl"}},D,j;return n==="bounce"?D={y:[0,-10,0],transition:{duration:.6,repeat:1/0,repeatType:"loop"}}:n==="pulse"?D={scale:[1,1.1,1],transition:{duration:1,repeat:1/0,repeatType:"loop"}}:n==="shake"?D=void 0:n==="rotate"?D={rotate:10,transition:{type:"spring",stiffness:300}}:n==="scale"?(D={scale:1.05},j={scale:.95}):n==="slide"&&(D={y:-4}),(0,ko.jsxs)(ne.button,{...C,className:F(Wae({variant:t,size:r}),t==="glow"&&U(),n==="shake"&&_&&"animate-shake",e),ref:S,onClick:R,disabled:k==="loading"||C.disabled,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),whileHover:D,whileTap:j,children:[m&&k==="loading"&&(0,ko.jsx)(ne.div,{className:"absolute bottom-0 left-0 h-1 bg-primary-foreground/20 rounded-full",initial:{width:0},animate:{width:`${N}%`},transition:{duration:.3}}),n==="shimmer"&&(0,ko.jsx)(ne.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent",initial:{x:"-100%"},animate:{x:"100%"},transition:{duration:p==="slow"?1.5:p==="fast"?.5:1,repeat:1/0,repeatDelay:1}}),(0,ko.jsx)("div",{className:"relative flex items-center justify-center gap-2 z-10",children:r==="icon"?k==="idle"?i:E():(0,ko.jsx)(ko.Fragment,{children:k==="idle"?(0,ko.jsxs)(ko.Fragment,{children:[cg.default.isValidElement(i)&&cg.default.cloneElement(i),typeof i=="string"&&i,cg.default.isValidElement(i)||typeof i=="string"?null:i]}):(0,ko.jsxs)(ko.Fragment,{children:[E(),(0,ko.jsxs)("span",{className:"ml-2",children:[k==="loading"&&l,k==="success"&&c,k==="error"&&u]})]})})}),(0,ko.jsx)(ne.div,{className:F("absolute inset-0 rounded-md",O()),initial:{scale:0,opacity:0},animate:{scale:k==="success"||k==="error"?1:0,opacity:k==="success"||k==="error"?.2:0},transition:{duration:.3},style:{zIndex:0}}),L.map($=>(0,ko.jsx)("span",{className:"absolute bg-primary/20 rounded-full animate-ripple pointer-events-none",style:{left:$.x-10,top:$.y-10,width:20,height:20}},$.id))]})});SBe.displayName="MoonUIAnimatedButtonProInternal";var qae=cg.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,ko.jsx)($e,{className:F("w-fit",e.className),children:(0,ko.jsx)(We,{className:"py-6 text-center",children:(0,ko.jsxs)("div",{className:"space-y-4",children:[(0,ko.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ko.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ko.jsxs)("div",{children:[(0,ko.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ko.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated Button is available exclusively to MoonUI Pro subscribers."}),(0,ko.jsx)("a",{href:"/pricing",children:(0,ko.jsxs)(oe,{size:"sm",children:[(0,ko.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ko.jsx)(SBe,{...e,ref:t})});qae.displayName="MoonUIAnimatedButtonPro";var ST=A(ue(),1);Ur();var Aa=A(de(),1),Gae=class extends ST.Component{constructor(r){super(r);this.resetTimeoutId=null;this.previousResetKeys=[];this.resetErrorBoundary=()=>{let{onReset:r}=this.props;r?.(),this.setState({hasError:!1,error:void 0,errorInfo:void 0})};this.state={hasError:!1},this.previousResetKeys=r.resetKeys||[]}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){let{onError:o,isolate:a}=this.props;this.setState({errorInfo:n}),o?.(r,n),console.error(a?"[Isolated ErrorBoundary] caught an error:":"ErrorBoundary caught an error:",r,n)}componentDidUpdate(r){let{resetKeys:n,resetOnPropsChange:o}=this.props,{hasError:a}=this.state;if(a&&n&&n.some((s,l)=>s!==this.previousResetKeys[l])&&(this.previousResetKeys=n,this.resetErrorBoundary()),a&&o&&r!==this.props){let i={...this.props,children:null},s={...r,children:null};JSON.stringify(i)!==JSON.stringify(s)&&this.resetErrorBoundary()}}renderFallback(){let{fallback:r,className:n,showErrorDetails:o}=this.props,{error:a,errorInfo:i}=this.state;return a?r?typeof r=="function"?(0,Aa.jsx)(r,{error:a,resetErrorBoundary:this.resetErrorBoundary,errorInfo:i}):r:(0,Aa.jsx)("div",{className:F("flex items-center justify-center min-h-[200px] p-4",n),children:(0,Aa.jsxs)($e,{className:"w-full max-w-md",children:[(0,Aa.jsxs)(br,{className:"text-center",children:[(0,Aa.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/20",children:(0,Aa.jsx)(ka,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),(0,Aa.jsx)(zr,{children:"Something went wrong"}),(0,Aa.jsx)(Is,{children:"An error occurred while rendering this component"})]}),(0,Aa.jsxs)(We,{className:"text-center",children:[o&&!1,(0,Aa.jsxs)(oe,{onClick:this.resetErrorBoundary,className:"mt-4",children:[(0,Aa.jsx)(Oo,{className:"mr-2 h-4 w-4"}),"Try again"]})]})]})}):null}render(){let{hasError:r}=this.state,{children:n,isolate:o}=this.props;if(r){if(o)try{return this.renderFallback()}catch(a){return console.error("Error boundary fallback failed:",a),(0,Aa.jsx)("div",{className:"p-4 text-center text-red-600",children:"Critical error: Unable to recover"})}return this.renderFallback()}return n}componentWillUnmount(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId)}};function q2t(e){let{hasProAccess:t,isLoading:r}=st(),n=(0,ST.useRef)(e.resetKeys);return(0,ST.useEffect)(()=>{n.current=e.resetKeys},[e.resetKeys]),!r&&!t?(0,Aa.jsx)($e,{className:F("w-fit",e.className),children:(0,Aa.jsx)(We,{className:"py-6 text-center",children:(0,Aa.jsxs)("div",{className:"space-y-4",children:[(0,Aa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Aa.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Aa.jsxs)("div",{children:[(0,Aa.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Aa.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Error Boundary is available exclusively to MoonUI Pro subscribers."}),(0,Aa.jsx)("a",{href:"/pricing",children:(0,Aa.jsxs)(oe,{size:"sm",children:[(0,Aa.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Aa.jsx)(Gae,{...e})}var G2t=q2t;var V_=A(ue(),1);Ur();var Za=A(de(),1),PBe=V_.default.forwardRef(({actions:e=[],position:t="bottom-right",size:r="default",className:n,children:o,onClick:a,...i},s)=>{let[l,c]=(0,V_.useState)(!1),u={sm:"h-10 w-10",default:"h-12 w-12",lg:"h-14 w-14"},d={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},f={"bottom-right":{x:-60,y:0},"bottom-left":{x:60,y:0},"top-right":{x:-60,y:0},"top-left":{x:60,y:0}},p=h=>{e.length>0?c(!l):a&&a(h)};return(0,Za.jsxs)("div",{className:F("fixed z-50",d[t]),children:[(0,Za.jsx)(Ft,{children:l&&e.length>0&&(0,Za.jsx)("div",{className:"absolute",children:e.map((h,m)=>(0,Za.jsxs)(ne.div,{initial:{scale:0,opacity:0,x:0,y:0},animate:{scale:1,opacity:1,x:f[t].x,y:f[t].y*(m+1)-10},exit:{scale:0,opacity:0,x:0,y:0},transition:{delay:m*.05,type:"spring",stiffness:200,damping:15},className:"absolute flex items-center gap-2",style:{transform:`translate(${t.includes("right"),"0"}, ${t.includes("bottom"),"0"})`},children:[(0,Za.jsx)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{delay:(m+1)*.05},className:F("px-2 py-1 bg-background/90 backdrop-blur-sm text-sm font-medium rounded-md shadow-sm border whitespace-nowrap",t.includes("right")?"mr-2":"ml-2"),children:h.label}),(0,Za.jsx)("button",{onClick:()=>{h.onClick(),c(!1)},className:F("inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",u[r]),children:h.icon})]},m))})}),(0,Za.jsx)(ne.button,{ref:s,className:F("inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",u[r],n),onClick:p,whileHover:{scale:1.1},whileTap:{scale:.9},animate:{rotate:l?45:0},transition:{duration:.2},children:o||(e.length>0?(0,Za.jsx)(Vi,{className:"h-5 w-5"}):(0,Za.jsx)(Vi,{className:"h-5 w-5"}))}),(0,Za.jsx)(Ft,{children:l&&(0,Za.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[-1]",onClick:()=>c(!1)})})]})});PBe.displayName="FloatingActionButtonInternal";var IBe=V_.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Za.jsx)($e,{className:F("w-fit",e),children:(0,Za.jsx)(We,{className:"py-6 text-center",children:(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Za.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Za.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Floating Action Button is available exclusively to MoonUI Pro subscribers."}),(0,Za.jsx)("a",{href:"/pricing",children:(0,Za.jsxs)(oe,{size:"sm",children:[(0,Za.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Za.jsx)(PBe,{className:e,ref:r,...t})});IBe.displayName="FloatingActionButton";var oc=A(ue(),1);Ur();var tl=A(de(),1),kBe=xt("relative rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200 isolate",{variants:{variant:{subtle:"hover:bg-card/95",dramatic:"hover:bg-gradient-to-br hover:from-card hover:to-card/80",gaming:"hover:border-primary/50 hover:shadow-lg hover:shadow-primary/25",elegant:"hover:border-border/50 hover:bg-gradient-to-br hover:from-card hover:via-card/95 hover:to-card/90",neon:"hover:border-primary hover:shadow-[0_0_30px_rgba(var(--primary),0.3)]"},shadowIntensity:{none:"",light:"hover:shadow-md",medium:"hover:shadow-lg",heavy:"hover:shadow-xl",extreme:"hover:shadow-2xl"},glowEffect:{none:"",subtle:"",vibrant:"",neon:""}},defaultVariants:{variant:"subtle",shadowIntensity:"medium",glowEffect:"none"}}),RBe=oc.default.forwardRef(({children:e,className:t,variant:r,shadowIntensity:n,glowEffect:o,perspective:a=1e3,maxRotation:i=15,rotationIntensity:s,scale:l=1.05,springConfig:c={stiffness:200,damping:15,mass:1,velocity:0},animationSpeed:u=1,overlay:d,overlayAlwaysVisible:f=!1,glowColor:p="rgb(var(--primary))",glowBlur:h=20,glowSpread:m=1.2,enableTouch:v=!0,enableKeyboard:g=!0,onHoverStart:y,onHoverEnd:x,onRotationChange:w,animationDelay:b=0,ariaLabel:C,autoFocus:S=!1,rotateAxes:P={x:!0,y:!0},...T},L)=>{let{onDrag:M,onDragStart:N,onDragEnd:V,onDragOver:_,onDrop:I,onAnimationStart:k,onAnimationEnd:R,onAnimationIteration:E,...O}=T,B=(0,oc.useRef)(null),[U,D]=(0,oc.useState)(!1),[j,$]=(0,oc.useState)(!1),z=i||s||15,q=Xa(0),H=Xa(0),K=Rv(q,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),G=Rv(H,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),J=iu(G,[-1,1],P.x?[z,-z]:[0,0]),ae=iu(K,[-1,1],P.y?[-z,z]:[0,0]),Z=(0,oc.useCallback)(ve=>{if(!B.current)return;let Oe=B.current.getBoundingClientRect(),Y=Oe.left+Oe.width/2,Q=Oe.top+Oe.height/2,pe,Re;if("touches"in ve&&v)pe=ve.touches[0].clientX,Re=ve.touches[0].clientY;else if("clientX"in ve)pe=ve.clientX,Re=ve.clientY;else return;let fe=(Re-Q)/(Oe.height/2),Ce=(pe-Y)/(Oe.width/2);q.set(Ce),H.set(fe),w&&w(J.get(),ae.get())},[v,q,H,J,ae,w]),Pe=(0,oc.useCallback)(()=>{D(!0),y?.()},[y]),be=(0,oc.useCallback)(()=>{D(!1),q.set(0),H.set(0),x?.()},[q,H,x]),_e=(0,oc.useCallback)(ve=>{if(!g||!j)return;let Oe=.1,Y=q.get(),Q=H.get();switch(ve.key){case"ArrowUp":Q=Math.max(-.5,Q-Oe),H.set(Q),ve.preventDefault();break;case"ArrowDown":Q=Math.min(.5,Q+Oe),H.set(Q),ve.preventDefault();break;case"ArrowLeft":Y=Math.max(-.5,Y-Oe),q.set(Y),ve.preventDefault();break;case"ArrowRight":Y=Math.min(.5,Y+Oe),q.set(Y),ve.preventDefault();break;case"Enter":case" ":D(!U),U?x?.():y?.(),ve.preventDefault();break;case"Escape":q.set(0),H.set(0),D(!1),x?.(),ve.preventDefault();break}w&&w(J.get(),ae.get())},[g,j,q,H,U,y,x,J,ae,w]);(0,oc.useEffect)(()=>{S&&B.current&&B.current.focus()},[S]);let he=(0,oc.useMemo)(()=>d?typeof d=="function"?d({isHovered:U,rotateX:J.get(),rotateY:ae.get()}):d:null,[d,U,J,ae]),Ne=(0,oc.useMemo)(()=>{if(o==="none")return{};let ve=0,Oe=h,Y=m;switch(o){case"subtle":ve=U?.3:0;break;case"vibrant":ve=U?.6:0,Oe=h*1.5;break;case"neon":ve=U?.8:0,Oe=h*2,Y=m*1.3;break}return{opacity:ve,filter:`blur(${Oe}px)`,scale:Y,backgroundColor:p}},[o,U,h,m,p]);return(0,tl.jsx)("div",{style:{perspective:`${a}px`},children:(0,tl.jsxs)(ne.div,{ref:ve=>{B.current=ve,typeof L=="function"?L(ve):L&&(L.current=ve)},className:F(kBe({variant:r,shadowIntensity:n,glowEffect:o}),"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),onMouseMove:Z,onMouseEnter:Pe,onMouseLeave:be,onTouchMove:v?Z:void 0,onTouchStart:v?Pe:void 0,onTouchEnd:v?be:void 0,onKeyDown:_e,onFocus:()=>$(!0),onBlur:()=>$(!1),style:{transformStyle:"preserve-3d",transformOrigin:"center center",rotateX:U||j?J:0,rotateY:U||j?ae:0,scale:U||j?l:1},transition:{type:"spring",stiffness:c.stiffness,damping:c.damping,duration:.15*(1/u),delay:b/1e3},tabIndex:g?0:void 0,role:g?"button":void 0,"aria-label":C,...O,children:[(0,tl.jsx)(ne.div,{className:"relative z-10",animate:{z:U||j?20:0},transition:{duration:.2*(1/u)},children:e}),he&&(0,tl.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none z-20",animate:{opacity:f||U||j?1:0},transition:{duration:.3*(1/u)},children:he}),r!=="subtle"&&(0,tl.jsx)(ne.div,{className:F("absolute inset-0 rounded-lg pointer-events-none",r==="dramatic"&&"bg-gradient-to-br from-white/10 via-transparent to-black/10",r==="gaming"&&"bg-gradient-to-br from-primary/10 via-transparent to-primary/5",r==="elegant"&&"bg-gradient-to-br from-white/5 via-transparent to-black/5",r==="neon"&&"bg-gradient-to-br from-primary/20 via-transparent to-primary/10"),animate:{opacity:U||j?1:0},transition:{duration:.3*(1/u)}}),o!=="none"&&(0,tl.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none -z-10",animate:Ne,transition:{duration:.3*(1/u)}})]})})});RBe.displayName="HoverCard3DInternal";var NBe=oc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tl.jsx)($e,{className:F("w-fit",e.className),children:(0,tl.jsx)(We,{className:"py-6 text-center",children:(0,tl.jsxs)("div",{className:"space-y-4",children:[(0,tl.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tl.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tl.jsxs)("div",{children:[(0,tl.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,tl.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"3D Hover Card is available exclusively to MoonUI Pro subscribers."}),(0,tl.jsx)("a",{href:"/pricing",children:(0,tl.jsxs)(oe,{size:"sm",children:[(0,tl.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tl.jsx)(RBe,{...e,ref:t})});NBe.displayName="HoverCard3D";var CP=A(ue(),1);Ur();var Mc=A(de(),1),K2t=xt("relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-r from-purple-600 to-pink-600 text-white shadow-lg hover:from-purple-700 hover:to-pink-700"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",radius:"md"}}),TBe=CP.default.forwardRef(({children:e,className:t,variant:r,size:n,radius:o,strength:a=.3,range:i=100,springConfig:s={stiffness:200,damping:15},...l},c)=>{let u=(0,CP.useRef)(null),[d,f]=(0,CP.useState)(!1),p=Xa(0),h=Xa(0),m=Rv(p,s),v=Rv(h,s),g=iu(v,[-i,i],[5,-5]),y=iu(m,[-i,i],[-5,5]),x=C=>{if(!u.current)return;let S=u.current.getBoundingClientRect(),P=S.left+S.width/2,T=S.top+S.height/2,L=C.clientX-P,M=C.clientY-T;Math.sqrt(L*L+M*M)<i&&(p.set(L*a),h.set(M*a))},w=()=>{f(!1),p.set(0),h.set(0)},b=()=>{f(!0)};return(0,Mc.jsxs)(ne.button,{ref:C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},className:F(K2t({variant:r,size:n,radius:o}),t),onMouseMove:x,onMouseLeave:w,onMouseEnter:b,style:{x:m,y:v,rotateX:g,rotateY:y,transformPerspective:1e3},whileHover:{scale:1.05},whileTap:{scale:.95},animate:{rotateX:d?g.get():0,rotateY:d?y.get():0},transition:{duration:.3},children:[(0,Mc.jsx)(ne.div,{className:"relative z-10 flex items-center justify-center",animate:{scale:d?1.02:1},transition:{duration:.2},children:e}),(0,Mc.jsx)(ne.div,{className:F("absolute inset-0 bg-primary/20 blur-md",o==="none"&&"rounded-none",o==="sm"&&"rounded-sm",o==="md"&&"rounded-md",o==="lg"&&"rounded-lg",o==="xl"&&"rounded-xl",o==="full"&&"rounded-full",!o&&"rounded-md"),animate:{opacity:d?.8:0,scale:d?1.1:1},transition:{duration:.3}})]})});TBe.displayName="MagneticButtonInternal";var MBe=CP.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Mc.jsx)($e,{className:F("w-fit",e),children:(0,Mc.jsx)(We,{className:"py-6 text-center",children:(0,Mc.jsxs)("div",{className:"space-y-4",children:[(0,Mc.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mc.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mc.jsxs)("div",{children:[(0,Mc.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Mc.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Magnetic Button is available exclusively to MoonUI Pro subscribers."}),(0,Mc.jsx)("a",{href:"/pricing",children:(0,Mc.jsxs)(oe,{size:"sm",children:[(0,Mc.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mc.jsx)(TBe,{className:e,ref:r,...t})});MBe.displayName="MagneticButton";var ha=A(ue(),1);Ur();var so=A(de(),1),EBe=ha.default.forwardRef(({children:e,minZoom:t=.5,maxZoom:r=3,initialZoom:n=1,className:o,contentClassName:a,onZoomChange:i,showControls:s=!0,showIndicator:l=!0,doubleTapBehavior:c="zoom",wheelScaling:u=!0,dragEnabled:d=!0,zoomStep:f=.5,smoothZoom:p=!0,boundaryConstraints:h=!0,...m},v)=>{let g=(0,ha.useRef)(null),y=(0,ha.useRef)(null),[x,w]=(0,ha.useState)(!1),[b,C]=(0,ha.useState)(!1),[S,P]=(0,ha.useState)(0),[T,L]=(0,ha.useState)(!1),[M,N]=(0,ha.useState)(!1),V=Xa(n),_=Xa(0),I=Xa(0),k=iu(V,H=>Math.min(Math.max(H,t),r)),R=iu(V,H=>Math.round(H*100)),E=(0,ha.useCallback)(()=>{if(!g.current||!y.current||!h)return{left:0,right:0,top:0,bottom:0};let H=g.current.getBoundingClientRect(),K=V.get(),G=H.width*K,J=H.height*K,ae=Math.max(0,(G-H.width)/2),Z=Math.max(0,(J-H.height)/2);return{left:-ae,right:ae,top:-Z,bottom:Z}},[V,h]);(0,ha.useEffect)(()=>{if(!g.current||!u)return;let H=g.current,K=G=>{T&&u&&(G.ctrlKey||G.metaKey)&&G.preventDefault()};return H.addEventListener("wheel",K,{passive:!1}),()=>{H.removeEventListener("wheel",K)}},[T,u]);let O=(0,ha.useCallback)(H=>{if(!u||!H.ctrlKey&&!H.metaKey)return;H.preventDefault();let K=-H.deltaY/1e3,G=V.get(),J=Math.min(Math.max(G+K,t),r);if(g.current){let ae=g.current.getBoundingClientRect(),Z=(H.clientX-ae.left)/ae.width-.5,Pe=(H.clientY-ae.top)/ae.height-.5,be=J-G,_e=_.get(),he=I.get(),Ne=_e-Z*ae.width*be,ve=he-Pe*ae.height*be;p?(fa(_,Ne,{duration:.2}),fa(I,ve,{duration:.2})):(_.set(Ne),I.set(ve))}p?fa(V,J,{duration:.2}):V.set(J),i?.(J),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,_,I,t,r,i,u,p,l]),B=(0,ha.useCallback)(H=>{H.preventDefault();let K=V.get(),G;if(c==="reset")G=n;else if(G=K>1?1:2,G>1&&g.current){let J=g.current.getBoundingClientRect(),ae=(H.clientX-J.left)/J.width-.5,Z=(H.clientY-J.top)/J.height-.5,Pe=-ae*J.width*(G-1),be=-Z*J.height*(G-1);fa(_,Pe,{duration:.3,type:"spring",stiffness:300}),fa(I,be,{duration:.3,type:"spring",stiffness:300})}fa(V,Math.min(Math.max(G,t),r),{duration:.3,type:"spring",stiffness:300}),(G===1||c==="reset")&&(fa(_,0,{duration:.3}),fa(I,0,{duration:.3})),i?.(G),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,_,I,t,r,n,i,c,l]),U=(0,ha.useCallback)(H=>{let K=Date.now(),G=K-S;if(G<300&&G>0){let J=H.changedTouches[0],ae={clientX:J.clientX,clientY:J.clientY,preventDefault:()=>{}};B(ae)}P(K)},[S,B]),D=(0,ha.useCallback)(()=>{fa(V,n,{duration:.3,type:"spring",stiffness:300}),fa(_,0,{duration:.3,type:"spring",stiffness:300}),fa(I,0,{duration:.3,type:"spring",stiffness:300}),i?.(n)},[V,_,I,n,i]),j=(0,ha.useCallback)(()=>{let H=V.get(),K=Math.min(H+f,r);fa(V,K,{duration:.3,type:"spring",stiffness:300}),i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,r,f,i,l]),$=(0,ha.useCallback)(()=>{let H=V.get(),K=Math.max(H-f,t);if(fa(V,K,{duration:.3,type:"spring",stiffness:300}),K<V.get()){let G=E(),J=_.get(),ae=I.get();(J<G.left||J>G.right)&&fa(_,0,{duration:.3}),(ae<G.top||ae>G.bottom)&&fa(I,0,{duration:.3})}i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,t,f,_,I,E,i,l]),z=(0,ha.useCallback)(()=>{D()},[D]),q=(0,ha.useCallback)(()=>{g.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{N(!1)}).catch(H=>{console.error("Exit fullscreen error:",H)}):(g.current.parentElement||g.current).requestFullscreen().then(()=>{N(!0)}).catch(K=>{console.error("Fullscreen error:",K)}))},[]);return(0,ha.useEffect)(()=>{let H=()=>{N(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",H),document.addEventListener("webkitfullscreenchange",H),document.addEventListener("mozfullscreenchange",H),document.addEventListener("MSFullscreenChange",H),()=>{document.removeEventListener("fullscreenchange",H),document.removeEventListener("webkitfullscreenchange",H),document.removeEventListener("mozfullscreenchange",H),document.removeEventListener("MSFullscreenChange",H)}},[]),(0,ha.useEffect)(()=>{if(!T||!u)return;let H=K=>{!K.ctrlKey&&!K.metaKey||(K.key==="+"||K.key==="="?(K.preventDefault(),j()):K.key==="-"||K.key==="_"?(K.preventDefault(),$()):K.key==="0"&&(K.preventDefault(),D()))};return document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)}},[T,u,j,$,D]),(0,ha.useEffect)(()=>V.onChange(()=>{let K=E(),G=_.get(),J=I.get();h&&((G<K.left||G>K.right)&&fa(_,Math.max(K.left,Math.min(K.right,G)),{duration:.2}),(J<K.top||J>K.bottom)&&fa(I,Math.max(K.top,Math.min(K.bottom,J)),{duration:.2}))}),[V,_,I,E,h]),(0,so.jsxs)("div",{ref:v,className:F("relative overflow-hidden touch-none select-none",d&&"cursor-grab active:cursor-grabbing",M&&"fixed inset-0 z-50 bg-background",o),onWheel:O,onDoubleClick:B,onTouchEnd:U,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),...m,children:[(0,so.jsx)("div",{ref:g,className:"w-full h-full",children:(0,so.jsx)(ne.div,{ref:y,drag:d,dragElastic:.1,dragMomentum:!1,dragConstraints:h?E():!1,onDragStart:()=>w(!0),onDragEnd:()=>w(!1),style:{scale:k,x:_,y:I},className:F("w-full h-full flex items-center justify-center",x&&"cursor-grabbing",a),children:e})}),(0,so.jsx)(Ft,{children:l&&b&&(0,so.jsxs)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"absolute top-4 left-1/2 -translate-x-1/2 px-3 py-1.5 bg-black/80 dark:bg-white/80 text-white dark:text-black rounded-full text-sm font-medium pointer-events-none",children:[R.get(),"%"]})}),s&&(0,so.jsxs)("div",{className:"absolute bottom-4 right-4 flex gap-2",children:[(0,so.jsx)("button",{onClick:$,disabled:V.get()<=t,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","shadow-sm hover:shadow-md"),"aria-label":"Zoom out",children:(0,so.jsx)(rp,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:j,disabled:V.get()>=r,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","shadow-sm hover:shadow-md"),"aria-label":"Zoom in",children:(0,so.jsx)(tp,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:D,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","shadow-sm hover:shadow-md"),"aria-label":"Reset zoom",children:(0,so.jsx)(v1,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:q,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","shadow-sm hover:shadow-md"),"aria-label":M?"Exit fullscreen":"Enter fullscreen",children:M?(0,so.jsx)(h1,{className:"w-4 h-4"}):(0,so.jsx)(Ic,{className:"w-4 h-4"})})]}),s&&(0,so.jsx)("div",{className:"absolute bottom-4 left-4 px-3 py-1.5 bg-background/80 backdrop-blur-sm border rounded-md text-sm",children:(0,so.jsxs)("div",{className:"flex items-center gap-2",children:[(0,so.jsxs)("span",{children:[Math.round(V.get()*100),"%"]}),u&&!b&&(0,so.jsx)("span",{className:"text-xs text-muted-foreground",children:"(Ctrl+Scroll to zoom)"})]})})]})});EBe.displayName="PinchZoomInternal";var ABe=ha.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,so.jsx)($e,{className:F("w-fit",e),children:(0,so.jsx)(We,{className:"py-6 text-center",children:(0,so.jsxs)("div",{className:"space-y-4",children:[(0,so.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,so.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,so.jsxs)("div",{children:[(0,so.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,so.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Pinch Zoom is available exclusively to MoonUI Pro subscribers."}),(0,so.jsx)("a",{href:"/pricing",children:(0,so.jsxs)(oe,{size:"sm",children:[(0,so.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,so.jsx)(EBe,{className:e,ref:r,...t})});ABe.displayName="PinchZoom";var Xw=A(ue(),1);Ur();var Ts=A(de(),1),LBe=Xw.default.forwardRef(({children:e,className:t,spotlightColor:r="rgba(255, 255, 255, 0.25)",spotlightSize:n=300,intensity:o=.8,borderGlow:a=!0,...i},s)=>{let l=(0,Xw.useRef)(null),[c,u]=(0,Xw.useState)({x:0,y:0}),[d,f]=(0,Xw.useState)(!1),p=v=>{if(!l.current)return;let g=l.current.getBoundingClientRect(),y=v.clientX-g.left,x=v.clientY-g.top;u({x:y,y:x})},h=()=>{f(!0)},m=()=>{f(!1)};return(0,Ts.jsxs)(ne.div,{ref:v=>{l.current=v,typeof s=="function"?s(v):s&&(s.current=v)},className:F("relative overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm",t),onMouseMove:p,onMouseEnter:h,onMouseLeave:m,whileHover:{scale:1.02},transition:{duration:.2},children:[(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?o:0},transition:{duration:.3},style:{background:`radial-gradient(${n}px circle at ${c.x}px ${c.y}px, ${r}, transparent 70%)`}}),(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?o*.5:0},transition:{duration:.4,delay:.1},style:{background:`radial-gradient(${n*1.5}px circle at ${c.x}px ${c.y}px, ${r.replace("0.25","0.1")}, transparent 80%)`}}),a&&(0,Ts.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none",animate:{opacity:d?.6:0},transition:{duration:.3},style:{background:`linear-gradient(135deg, transparent 30%, ${r.replace("0.25","0.4")} 50%, transparent 70%)`,backgroundSize:"200% 200%",backgroundPosition:`${c.x/l.current?.offsetWidth*100}% ${c.y/l.current?.offsetHeight*100}%`}}),(0,Ts.jsx)("div",{className:"relative z-10",children:e}),(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?.3:0},transition:{duration:.5},children:[...Array(3)].map((v,g)=>(0,Ts.jsx)(ne.div,{className:"absolute w-1 h-1 bg-white rounded-full",animate:d?{x:[c.x,c.x+Math.random()*100-50],y:[c.y,c.y+Math.random()*100-50],opacity:[0,1,0],scale:[0,1,0]}:{},transition:{duration:2,delay:g*.2,repeat:d?1/0:0,ease:"easeOut"},style:{left:c.x,top:c.y}},g))})]})});LBe.displayName="SpotlightCardInternal";var DBe=Xw.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Ts.jsx)($e,{className:F("w-fit",e),children:(0,Ts.jsx)(We,{className:"py-6 text-center",children:(0,Ts.jsxs)("div",{className:"space-y-4",children:[(0,Ts.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ts.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ts.jsxs)("div",{children:[(0,Ts.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ts.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Spotlight Card is available exclusively to MoonUI Pro subscribers."}),(0,Ts.jsx)("a",{href:"/pricing",children:(0,Ts.jsxs)(oe,{size:"sm",children:[(0,Ts.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ts.jsx)(LBe,{className:e,ref:r,...t})});DBe.displayName="SpotlightCard";var Ml=A(ue(),1);Ur();var PT=A(ue(),1);var sr=A(de(),1),OBe=[{value:"meeting",label:"Meeting",color:"#3b82f6"},{value:"task",label:"Task",color:"#10b981"},{value:"reminder",label:"Reminder",color:"#f59e0b"},{value:"event",label:"Event",color:"#8b5cf6"}],X2t=["#3b82f6","#10b981","#f59e0b","#8b5cf6","#ef4444","#06b6d4","#84cc16","#f97316","#ec4899","#6366f1","#14b8a6","#eab308","#f43f5e","#a855f7","#22c55e","#64748b"];function _Be({open:e,onOpenChange:t,event:r,selectedDate:n,onSave:o,onDelete:a,mode:i="create"}){let[s,l]=(0,PT.useState)({title:"",description:"",date:"",startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""}),[c,u]=(0,PT.useState)({}),[d,f]=(0,PT.useState)(!1);(0,PT.useEffect)(()=>{if(i==="edit"&&r)l({title:r.title||"",description:r.description||"",date:r.date.toISOString().split("T")[0],startTime:r.startTime||"",endTime:r.endTime||"",location:r.location||"",type:r.type||"meeting",color:r.color||"#3b82f6",attendees:r.attendees?.join(", ")||""});else if(i==="create"){let g=n?n.toISOString().split("T")[0]:new Date().toISOString().split("T")[0];l({title:"",description:"",date:g,startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""})}u({})},[r,n,i,e]);let p=()=>{let g={};return s.title.trim()||(g.title="Title is required"),s.date||(g.date="Date is required"),s.startTime&&s.endTime&&s.startTime>=s.endTime&&(g.endTime="End time must be after start time"),u(g),Object.keys(g).length===0},h=async g=>{if(g.preventDefault(),!!p()){f(!0);try{let y={...i==="edit"&&r?{id:r.id}:{},title:s.title.trim(),description:s.description.trim(),date:new Date(s.date+"T00:00:00"),startTime:s.startTime||void 0,endTime:s.endTime||void 0,location:s.location.trim()||void 0,type:s.type,color:s.color,attendees:s.attendees?s.attendees.split(",").map(x=>x.trim()).filter(Boolean):void 0};await o(y),t(!1)}catch(y){console.error("Error saving event:",y)}finally{f(!1)}}},m=()=>{r&&a&&(a(r.id),t(!1))},v=g=>{let y=OBe.find(x=>x.value===g);l(x=>({...x,type:g,color:y?.color||x.color}))};return(0,sr.jsx)(Na,{open:e,onOpenChange:t,children:(0,sr.jsxs)(pa,{className:"sm:max-w-[500px]",children:[(0,sr.jsxs)(Qa,{children:[(0,sr.jsxs)(Ta,{className:"flex items-center gap-2",children:[(0,sr.jsx)(hi,{className:"w-5 h-5"}),i==="create"?"Create Event":"Edit Event"]}),(0,sr.jsx)(Zl,{children:i==="create"?"Add a new event to your calendar.":"Edit the event details."})]}),(0,sr.jsxs)("form",{onSubmit:h,className:"space-y-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"title",children:"Title *"}),(0,sr.jsx)(Jt,{id:"title",value:s.title,onChange:g=>l(y=>({...y,title:g.target.value})),placeholder:"Event title",className:F(c.title&&"border-red-500")}),c.title&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.title})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"description",children:"Description"}),(0,sr.jsx)(nd,{id:"description",value:s.description,onChange:g=>l(y=>({...y,description:g.target.value})),placeholder:"Event description (optional)",rows:3})]}),(0,sr.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"date",children:"Date *"}),(0,sr.jsx)(Jt,{id:"date",type:"date",value:s.date,onChange:g=>l(y=>({...y,date:g.target.value})),className:F(c.date&&"border-red-500")}),c.date&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.date})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"startTime",children:"Start Time"}),(0,sr.jsx)(Jt,{id:"startTime",type:"time",value:s.startTime,onChange:g=>l(y=>({...y,startTime:g.target.value})),placeholder:"09:00"})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"endTime",children:"End Time"}),(0,sr.jsx)(Jt,{id:"endTime",type:"time",value:s.endTime,onChange:g=>l(y=>({...y,endTime:g.target.value})),placeholder:"10:00",className:F(c.endTime&&"border-red-500")}),c.endTime&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.endTime})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{htmlFor:"location",className:"flex items-center gap-2",children:[(0,sr.jsx)(im,{className:"w-4 h-4"}),"Location"]}),(0,sr.jsx)(Jt,{id:"location",value:s.location,onChange:g=>l(y=>({...y,location:g.target.value})),placeholder:"Meeting room, address, or link"})]}),(0,sr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{className:"flex items-center gap-2",children:[(0,sr.jsx)(w1,{className:"w-4 h-4"}),"Type"]}),(0,sr.jsxs)(Qo,{value:s.type,onValueChange:v,children:[(0,sr.jsx)(Zo,{children:(0,sr.jsx)(ma,{})}),(0,sr.jsx)(Jo,{children:OBe.map(g=>(0,sr.jsx)(Bt,{value:g.value,children:(0,sr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,sr.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:g.color}}),g.label]})},g.value))})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{className:"flex items-center gap-2",children:[(0,sr.jsx)($u,{className:"w-4 h-4"}),"Color"]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,sr.jsx)("input",{type:"color",value:s.color,onChange:g=>l(y=>({...y,color:g.target.value})),className:"w-8 h-8 rounded border cursor-pointer flex-shrink-0"}),(0,sr.jsx)("span",{className:"text-sm text-muted-foreground",children:"Custom color"})]}),(0,sr.jsx)("div",{className:"grid grid-cols-8 gap-1",children:X2t.map(g=>(0,sr.jsx)("button",{type:"button",onClick:()=>l(y=>({...y,color:g})),className:F("w-full aspect-square rounded border-2 hover:scale-110 transition-transform",s.color===g?"border-foreground shadow-sm":"border-transparent"),style:{backgroundColor:g},"aria-label":`Select color ${g}`},g))})]})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"attendees",children:"Attendees"}),(0,sr.jsx)(Jt,{id:"attendees",value:s.attendees,onChange:g=>l(y=>({...y,attendees:g.target.value})),placeholder:"John Doe, Jane Smith (comma-separated)"})]}),(0,sr.jsxs)(Yh,{className:"gap-2",children:[i==="edit"&&a&&(0,sr.jsx)(oe,{type:"button",variant:"destructive",onClick:m,className:"mr-auto",children:"Delete Event"}),(0,sr.jsx)(oe,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:d,children:"Cancel"}),(0,sr.jsx)(oe,{type:"submit",disabled:d,children:d?i==="create"?"Creating...":"Saving...":i==="create"?"Create Event":"Save Changes"})]})]})]})})}var Ie=A(de(),1),Kae=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],FBe=["January","February","March","April","May","June","July","August","September","October","November","December"],IT={meeting:"bg-blue-500",task:"bg-green-500",reminder:"bg-yellow-500",event:"bg-purple-500",birthday:"bg-pink-500",holiday:"bg-orange-500",conference:"bg-indigo-500"},Y2t={low:"border-l-4 border-l-muted-foreground",medium:"border-l-4 border-l-yellow-500",high:"border-l-4 border-l-red-500"},Q2t={confirmed:"",tentative:"opacity-70 border-dashed",cancelled:"opacity-50 line-through"};function Z2t({events:e=[],onEventClick:t,onEventAdd:r,onEventEdit:n,onEventDelete:o,onDateChange:a,onViewChange:i,onEventDrop:s,className:l,showWeekends:c=!0,showEventDetails:u=!0,disabled:d=!1,minDate:f,maxDate:p,highlightToday:h=!0,height:m,defaultView:v="month",enableDragDrop:g=!0,enableSearch:y=!0,enableFilters:x=!0,enableExport:w=!0,enableImport:b=!1,enableRecurringEvents:C=!0,enableReminders:S=!0,eventCategories:P,workingHours:T={start:"09:00",end:"18:00"},holidays:L=[],locale:M="en-US",timeFormat:N="12h",firstDayOfWeek:V=0,theme:_="auto",customTheme:I,compactMode:k=!1,showProUpgrade:R=!1}){if(R)return(0,Ie.jsx)($e,{className:F("w-full",l),children:(0,Ie.jsx)(We,{className:"py-12 text-center",children:(0,Ie.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Ie.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ie.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ie.jsxs)("div",{children:[(0,Ie.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Ie.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Calendar is available exclusively to MoonUI Pro subscribers."}),(0,Ie.jsx)("div",{className:"flex gap-3 justify-center",children:(0,Ie.jsx)("a",{href:"/pricing",children:(0,Ie.jsxs)(oe,{size:"sm",children:[(0,Ie.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[E,O]=Ml.default.useState(new Date),[B,U]=Ml.default.useState(null),[D,j]=Ml.default.useState(v),[$,z]=Ml.default.useState(!1),[q,H]=Ml.default.useState("create"),[K,G]=Ml.default.useState(null),[J,ae]=Ml.default.useState(null),[Z,Pe]=Ml.default.useState(null),[be,_e]=Ml.default.useState(""),[he,Ne]=Ml.default.useState("all"),[ve,Oe]=Ml.default.useState("all"),[Y,Q]=Ml.default.useState(!1),[pe,Re]=Ml.default.useState([]),[fe,Ce]=Ml.default.useState(new Date),[re,ye]=Ml.default.useState(!1),[se,ie]=Ml.default.useState(!1),Fe=new Date,At=E.getMonth(),to=E.getFullYear(),Ke=new Date(to,At,1),Je=new Date(to,At+1,0),Se=new Date(Ke),ht=(Se.getDay()-V+7)%7;Se.setDate(Se.getDate()-ht);let Tt=new Date(Je),De=(6-Tt.getDay()+V)%7;Tt.setDate(Tt.getDate()+De);let gt=[],Ge=new Date(Se);for(;Ge<=Tt;)gt.push(new Date(Ge)),Ge.setDate(Ge.getDate()+1);let Ut=Ml.default.useMemo(()=>{let Be=new Set;return e.forEach(rt=>{rt.tags?.forEach(St=>Be.add(St))}),Array.from(Be)},[e]),qt=Ml.default.useMemo(()=>e.filter(Be=>!(be&&!Be.title.toLowerCase().includes(be.toLowerCase())&&!Be.description?.toLowerCase().includes(be.toLowerCase())||he!=="all"&&Be.type!==he||ve!=="all"&&Be.priority!==ve||pe.length>0&&(!Be.tags||!Be.tags.some(rt=>pe.includes(rt))))),[e,be,he,ve,pe]),jr=Be=>qt.filter(rt=>{let St=new Date(rt.date);return rt.recurring?gn(Be,rt):St.toDateString()===Be.toDateString()}),gn=(Be,rt)=>{if(!rt.recurring)return!1;let St=new Date(rt.date),Dr=Math.floor((Be.getTime()-St.getTime())/(1e3*60*60*24));if(Dr<0||rt.recurring.endDate&&Be>rt.recurring.endDate)return!1;switch(rt.recurring.pattern){case"daily":return Dr%rt.recurring.interval===0;case"weekly":return Dr%(rt.recurring.interval*7)!==0?!1:rt.recurring.daysOfWeek?rt.recurring.daysOfWeek.includes(Be.getDay()):Be.getDay()===St.getDay();case"monthly":return((Be.getFullYear()-St.getFullYear())*12+(Be.getMonth()-St.getMonth()))%rt.recurring.interval!==0?!1:rt.recurring.dayOfMonth?Be.getDate()===rt.recurring.dayOfMonth:Be.getDate()===St.getDate();case"yearly":return(Be.getFullYear()-St.getFullYear())%rt.recurring.interval!==0?!1:Be.getMonth()===St.getMonth()&&Be.getDate()===St.getDate();default:return!1}},Oi=Be=>Be.toDateString()===Fe.toDateString(),Do=Be=>Be.getMonth()===At,ja=Be=>B&&Be.toDateString()===B.toDateString(),Vr=Be=>!!(d||f&&Be<f||p&&Be>p),Cn=Be=>{let rt=new Date(E);Be==="prev"?rt.setMonth(At-1):rt.setMonth(At+1),O(rt),a?.(rt)},vl=Be=>{j(Be),i?.(Be)},Td=()=>{let Be=bc(qt),rt=new Blob([Be],{type:"text/calendar"}),St=URL.createObjectURL(rt),Dr=document.createElement("a");Dr.href=St,Dr.download="calendar.ics",Dr.click(),URL.revokeObjectURL(St)},bc=Be=>{let rt=`BEGIN:VCALENDAR\r
127
+ Defaulting to \`null\`.`}var Toe=$Oe,KOe=qOe;var Moe=A(de(),1),_o=XOe.forwardRef(({className:e,value:t,...r},n)=>(0,Moe.jsx)(Toe,{ref:n,className:F("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,Moe.jsx)(KOe,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));_o.displayName=Toe.displayName;var km=A(ue(),1);var cp=A(de(),1),Y6=xt("aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border-border bg-background text-primary",outline:"border-border bg-transparent text-primary",filled:"border-primary bg-primary/10 text-primary"},size:{sm:"h-3.5 w-3.5",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"default",size:"default"}}),v_=km.createContext({}),sP=km.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,cp.jsx)(v_.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,cp.jsx)("div",{ref:i,role:"radiogroup",className:F("grid gap-2",e),...a})}));sP.displayName="RadioGroupPro";var $x=km.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=km.useContext(v_),u=km.useId(),d=o||u,f=c.value===a,p=h=>{c.onValueChange&&c.onValueChange(h.target.value),s.onChange&&s.onChange(h)};return(0,cp.jsxs)("div",{className:"relative flex items-center",children:[(0,cp.jsx)("input",{type:"radio",id:d,ref:l,value:a,checked:f,disabled:i||c.disabled,name:c.name,onChange:p,className:"sr-only",...s}),(0,cp.jsx)("label",{htmlFor:d,className:F(Y6({variant:t,size:r}),"rounded-full","focus-visible:ring-primary/50","relative inline-flex shrink-0 cursor-pointer items-center justify-center overflow-hidden",i&&"cursor-not-allowed opacity-50",e),children:(0,cp.jsx)("span",{className:F("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,cp.jsx)(Vd,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});$x.displayName="RadioGroupItemPro";var y_=km.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,cp.jsx)("label",{ref:a,htmlFor:t,className:F("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));y_.displayName="RadioLabelPro";var Q6=km.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=km.useId(),i=e||a;return(0,cp.jsxs)("div",{className:"flex items-center",children:[(0,cp.jsx)($x,{ref:o,id:i,...n}),(0,cp.jsx)(y_,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});Q6.displayName="RadioItemWithLabelPro";var _oe=A(ue(),1);var pr=A(ue(),1);var QOe=A(ue(),1),Po=A(de(),1);function ZLt(e,t){return QOe.useReducer((r,n)=>t[r][n]??r,e)}var Eoe="ScrollArea",[ZOe,$in]=Zn(Eoe),[JLt,Rm]=ZOe(Eoe),JOe=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=pr.useState(null),[c,u]=pr.useState(null),[d,f]=pr.useState(null),[p,h]=pr.useState(null),[m,v]=pr.useState(null),[g,y]=pr.useState(0),[x,w]=pr.useState(0),[b,C]=pr.useState(!1),[S,P]=pr.useState(!1),T=rr(t,M=>l(M)),L=nm(o);return(0,Po.jsx)(JLt,{scope:r,type:n,dir:L,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:h,scrollbarXEnabled:b,onScrollbarXEnabledChange:C,scrollbarY:m,onScrollbarYChange:v,scrollbarYEnabled:S,onScrollbarYEnabledChange:P,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,Po.jsx)(at.div,{dir:L,...i,ref:T,style:{position:"relative",["--radix-scroll-area-corner-width"]:g+"px",["--radix-scroll-area-corner-height"]:x+"px",...e.style}})})});JOe.displayName=Eoe;var e2e="ScrollAreaViewport",t2e=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=Rm(e2e,r),s=pr.useRef(null),l=rr(t,s,i.onViewportChange);return(0,Po.jsxs)(Po.Fragment,{children:[(0,Po.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),(0,Po.jsx)(at.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Po.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});t2e.displayName=e2e;var Uv="ScrollAreaScrollbar",e$=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return pr.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,Po.jsx)(eDt,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Po.jsx)(tDt,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Po.jsx)(r2e,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Po.jsx)(Aoe,{...n,ref:t}):null});e$.displayName=Uv;var eDt=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),[a,i]=pr.useState(!1);return pr.useEffect(()=>{let s=o.scrollArea,l=0;if(s){let c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",c),s.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",c),s.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),(0,Po.jsx)($o,{present:r||a,children:(0,Po.jsx)(r2e,{"data-state":a?"visible":"hidden",...n,ref:t})})}),tDt=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Rm(Uv,e.__scopeScrollArea),a=e.orientation==="horizontal",i=r$(()=>l("SCROLL_END"),100),[s,l]=ZLt("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return pr.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),pr.useEffect(()=>{let c=o.viewport,u=a?"scrollLeft":"scrollTop";if(c){let d=c[u],f=()=>{let p=c[u];d!==p&&(l("SCROLL"),i()),d=p};return c.addEventListener("scroll",f),()=>c.removeEventListener("scroll",f)}},[o.viewport,a,l,i]),(0,Po.jsx)($o,{present:r||s!=="hidden",children:(0,Po.jsx)(Aoe,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:et(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:et(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),r2e=pr.forwardRef((e,t)=>{let r=Rm(Uv,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=pr.useState(!1),s=e.orientation==="horizontal",l=r$(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return fT(r.viewport,l),fT(r.content,l),(0,Po.jsx)($o,{present:n||a,children:(0,Po.jsx)(Aoe,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Aoe=pr.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=Rm(Uv,e.__scopeScrollArea),a=pr.useRef(null),i=pr.useRef(0),[s,l]=pr.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=i2e(s.viewport,s.content),u={...n,sizes:s,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:f=>a.current=f,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:f=>i.current=f};function d(f,p){return sDt(f,i.current,s,p)}return r==="horizontal"?(0,Po.jsx)(rDt,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=YOe(f,s,o.dir);a.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollLeft=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollLeft=d(f,o.dir))}}):r==="vertical"?(0,Po.jsx)(nDt,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=YOe(f,s);a.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:f=>{o.viewport&&(o.viewport.scrollTop=f)},onDragScroll:f=>{o.viewport&&(o.viewport.scrollTop=d(f))}}):null}),rDt=pr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=Rm(Uv,e.__scopeScrollArea),[i,s]=pr.useState(),l=pr.useRef(null),c=rr(t,l,a.onScrollbarXChange);return pr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Po.jsx)(o2e,{"data-orientation":"horizontal",...o,ref:c,sizes:r,style:{bottom:0,left:a.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:a.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:t$(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollLeft+u.deltaX;e.onWheelScroll(f),l2e(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:J6(i.paddingLeft),paddingEnd:J6(i.paddingRight)}})}})}),nDt=pr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=Rm(Uv,e.__scopeScrollArea),[i,s]=pr.useState(),l=pr.useRef(null),c=rr(t,l,a.onScrollbarYChange);return pr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Po.jsx)(o2e,{"data-orientation":"vertical",...o,ref:c,sizes:r,style:{top:0,right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:t$(r)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,d)=>{if(a.viewport){let f=a.viewport.scrollTop+u.deltaY;e.onWheelScroll(f),l2e(f,d)&&u.preventDefault()}},onResize:()=>{l.current&&a.viewport&&i&&n({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:J6(i.paddingTop),paddingEnd:J6(i.paddingBottom)}})}})}),[oDt,n2e]=ZOe(Uv),o2e=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:a,onThumbPointerUp:i,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:d,...f}=e,p=Rm(Uv,r),[h,m]=pr.useState(null),v=rr(t,T=>m(T)),g=pr.useRef(null),y=pr.useRef(""),x=p.viewport,w=n.content-n.viewport,b=io(u),C=io(l),S=r$(d,10);function P(T){if(g.current){let L=T.clientX-g.current.left,M=T.clientY-g.current.top;c({x:L,y:M})}}return pr.useEffect(()=>{let T=L=>{let M=L.target;h?.contains(M)&&b(L,w)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[x,h,w,b]),pr.useEffect(C,[n,C]),fT(h,S),fT(p.content,S),(0,Po.jsx)(oDt,{scope:r,scrollbar:h,hasThumb:o,onThumbChange:io(a),onThumbPointerUp:io(i),onThumbPositionChange:C,onThumbPointerDown:io(s),children:(0,Po.jsx)(at.div,{...f,ref:v,style:{position:"absolute",...f.style},onPointerDown:et(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),g.current=h.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),P(T))}),onPointerMove:et(e.onPointerMove,P),onPointerUp:et(e.onPointerUp,T=>{let L=T.target;L.hasPointerCapture(T.pointerId)&&L.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),g.current=null})})})}),Z6="ScrollAreaThumb",Loe=pr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=n2e(Z6,e.__scopeScrollArea);return(0,Po.jsx)($o,{present:r||o.hasThumb,children:(0,Po.jsx)(aDt,{ref:t,...n})})}),aDt=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=Rm(Z6,r),i=n2e(Z6,r),{onThumbPositionChange:s}=i,l=rr(t,d=>i.onThumbChange(d)),c=pr.useRef(void 0),u=r$(()=>{c.current&&(c.current(),c.current=void 0)},100);return pr.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=lDt(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,Po.jsx)(at.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:et(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),h=d.clientX-p.left,m=d.clientY-p.top;i.onThumbPointerDown({x:h,y:m})}),onPointerUp:et(e.onPointerUp,i.onThumbPointerUp)})});Loe.displayName=Z6;var Doe="ScrollAreaCorner",a2e=pr.forwardRef((e,t)=>{let r=Rm(Doe,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,Po.jsx)(iDt,{...e,ref:t}):null});a2e.displayName=Doe;var iDt=pr.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=Rm(Doe,r),[a,i]=pr.useState(0),[s,l]=pr.useState(0),c=!!(a&&s);return fT(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),fT(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,Po.jsx)(at.div,{...n,ref:t,style:{width:a,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function J6(e){return e?parseInt(e,10):0}function i2e(e,t){let r=e/t;return isNaN(r)?0:r}function t$(e){let t=i2e(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function sDt(e,t,r,n="ltr"){let o=t$(r),a=o/2,i=t||a,s=o-i,l=r.scrollbar.paddingStart+i,c=r.scrollbar.size-r.scrollbar.paddingEnd-s,u=r.content-r.viewport,d=n==="ltr"?[0,u]:[u*-1,0];return s2e([l,c],d)(e)}function YOe(e,t,r="ltr"){let n=t$(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-o,i=t.content-t.viewport,s=a-n,l=r==="ltr"?[0,i]:[i*-1,0],c=t_(e,l);return s2e([0,i],[0,s])(c)}function s2e(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function l2e(e,t){return e>0&&e<t}var lDt=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){let a={left:e.scrollLeft,top:e.scrollTop},i=r.left!==a.left,s=r.top!==a.top;(i||s)&&t(),r=a,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function r$(e,t){let r=io(e),n=pr.useRef(0);return pr.useEffect(()=>()=>window.clearTimeout(n.current),[]),pr.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function fT(e,t){let r=io(t);no(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}var Ooe=JOe,c2e=t2e;var u2e=a2e;var jw=A(de(),1),Jd=_oe.forwardRef(({className:e,children:t,...r},n)=>(0,jw.jsxs)(Ooe,{ref:n,className:F("relative overflow-hidden",e),...r,children:[(0,jw.jsx)(c2e,{className:"h-full w-full rounded-[inherit]",children:t}),(0,jw.jsx)(n$,{}),(0,jw.jsx)(u2e,{})]}));Jd.displayName=Ooe.displayName;var n$=_oe.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,jw.jsx)(e$,{ref:n,orientation:t,className:F("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...r,children:(0,jw.jsx)(Loe,{className:"relative flex-1 rounded-full bg-border"})}));n$.displayName=e$.displayName;var h2e=A(ue(),1);var f2e=A(ue(),1);var p2e=A(de(),1),uDt="Separator",d2e="horizontal",dDt=["horizontal","vertical"],m2e=f2e.forwardRef((e,t)=>{let{decorative:r,orientation:n=d2e,...o}=e,a=fDt(n)?n:d2e,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,p2e.jsx)(at.div,{"data-orientation":a,...s,...o,ref:t})});m2e.displayName=uDt;function fDt(e){return dDt.includes(e)}var Foe=m2e;var g2e=A(de(),1),o$=xt("shrink-0 bg-border",{variants:{orientation:{horizontal:"h-[1px] w-full",vertical:"h-full w-[1px]"},variant:{default:"bg-border",dashed:"border-dashed border-border bg-transparent",dotted:"border-dotted border-border bg-transparent",gradient:"bg-gradient-to-r from-transparent via-border to-transparent"},size:{sm:"",md:"",lg:""}},compoundVariants:[{orientation:"horizontal",variant:"dashed",className:"border-t h-0"},{orientation:"vertical",variant:"dashed",className:"border-l w-0"},{orientation:"horizontal",variant:"dotted",className:"border-t h-0"},{orientation:"vertical",variant:"dotted",className:"border-l w-0"},{orientation:"horizontal",size:"sm",variant:["dashed","dotted"],className:"border-t-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["dashed","dotted"],className:"border-t-2"},{orientation:"vertical",size:"sm",variant:["dashed","dotted"],className:"border-l-[0.5px]"},{orientation:"vertical",size:"lg",variant:["dashed","dotted"],className:"border-l-2"},{orientation:"horizontal",size:"sm",variant:["default","gradient"],className:"h-[0.5px]"},{orientation:"horizontal",size:"lg",variant:["default","gradient"],className:"h-[2px]"},{orientation:"vertical",size:"sm",variant:["default","gradient"],className:"w-[0.5px]"},{orientation:"vertical",size:"lg",variant:["default","gradient"],className:"w-[2px]"}],defaultVariants:{orientation:"horizontal",variant:"default",size:"md"}}),Ys=h2e.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,g2e.jsx)(Foe,{ref:i,decorative:o,orientation:t,className:F(o$({orientation:t,variant:r,size:n}),e),...a}));Ys.displayName=Foe.displayName;var x_=A(ue(),1);var up=A(de(),1),$w=Iw,a$=Zj,v2e=QN,Boe=kw,i$=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(Mv,{className:F("fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));i$.displayName=Mv.displayName;var mDt=xt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Wx=x_.forwardRef(({side:e="right",className:t,children:r,...n},o)=>(0,up.jsxs)(Boe,{children:[(0,up.jsx)(i$,{}),(0,up.jsxs)(Rw,{ref:o,className:F(mDt({side:e}),t),...n,children:[r,(0,up.jsxs)(QN,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,up.jsx)(lr,{className:"h-4 w-4"}),(0,up.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Wx.displayName=Rw.displayName;var b_=({className:e,...t})=>(0,up.jsx)("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});b_.displayName="SheetHeader";var Voe=({className:e,...t})=>(0,up.jsx)("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Voe.displayName="SheetFooter";var w_=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(XN,{ref:r,className:F("text-lg font-semibold text-foreground",e),...t}));w_.displayName=XN.displayName;var C_=x_.forwardRef(({className:e,...t},r)=>(0,up.jsx)(YN,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));C_.displayName=YN.displayName;var y2e=A(de(),1);function Ea({className:e,...t}){return(0,y2e.jsx)("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}var Ww=A(ue(),1);var zv=A(de(),1),hDt=xt("relative flex w-full touch-none select-none items-center",{variants:{size:{sm:"h-5",default:"h-6",md:"h-8",lg:"h-10"}},defaultVariants:{size:"default"}}),gDt=xt("relative h-1.5 w-full grow overflow-hidden rounded-full",{variants:{variant:{default:"bg-muted",primary:"bg-primary/20",secondary:"bg-secondary/20",accent:"bg-accent/20",success:"bg-success/20",warning:"bg-warning/20",error:"bg-error/20"}},defaultVariants:{variant:"default"}}),vDt=xt("absolute h-full",{variants:{variant:{default:"bg-foreground",primary:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",error:"bg-error"}},defaultVariants:{variant:"primary"}}),yDt=xt("block rounded-full border-2 ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"border-foreground bg-background",primary:"border-primary bg-background",secondary:"border-secondary bg-background",accent:"border-accent bg-background",success:"border-success bg-background",warning:"border-warning bg-background",error:"border-error bg-background"},size:{sm:"h-3 w-3",default:"h-4 w-4",md:"h-5 w-5",lg:"h-6 w-6"}},defaultVariants:{variant:"primary",size:"default"}}),qw=Ww.forwardRef(({className:e,size:t,trackVariant:r,rangeVariant:n,thumbVariant:o,thumbSize:a,showValueLabel:i=!1,valueLabelFormat:s,valueLabelClassName:l,value:c,defaultValue:u=[0],onValueChange:d,disabled:f,...p},h)=>{let[m,v]=Ww.useState(c||u||[0]);Ww.useEffect(()=>{c!==void 0&&v(c)},[c]);let g=L=>s?s(L):`${Math.round(L*100)/100}`,y=(L,M,N)=>(L-M)/(N-M)*100,x=Ww.useRef(null),w=p.min||0,b=p.max||100,C=p.step||1,S=L=>{let M=L.map(N=>{if(C<1){let V=C.toString().split(".")[1]?.length||0;return Math.round(N*Math.pow(10,V))/Math.pow(10,V)}return Math.round(N)});v(M),d&&d(M)},P=L=>{if(f)return;let M=x.current;if(!M)return;let N=M.getBoundingClientRect(),V=(L.clientX-N.left)/N.width,_=w+V*(b-w),I=Math.round(_/C)*C,k=Math.max(w,Math.min(b,I)),R=[...m];R[0]=k,S(R)},T=L=>M=>{if(f)return;M.preventDefault();let N=_=>{let I=x.current;if(!I)return;let k=I.getBoundingClientRect(),R=(_.clientX-k.left)/k.width,E=w+R*(b-w),O=Math.round(E/C)*C,B=Math.max(w,Math.min(b,O)),U=[...m];U[L]=B,S(U)},V=()=>{document.removeEventListener("mousemove",N),document.removeEventListener("mouseup",V)};document.addEventListener("mousemove",N),document.addEventListener("mouseup",V)};return(0,zv.jsxs)("div",{className:"w-full",ref:h,...p,children:[i&&(0,zv.jsx)("div",{className:F("flex justify-end mb-1 text-sm text-muted-foreground",l),children:m.length===1?(0,zv.jsx)("span",{children:g(m[0])}):(0,zv.jsxs)("span",{children:[g(m[0])," - ",g(m[m.length-1])]})}),(0,zv.jsxs)("div",{className:F(hDt({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,zv.jsx)("div",{ref:x,className:F(gDt({variant:r||o||"default"})),onClick:P,children:(0,zv.jsx)("div",{className:F(vDt({variant:n||o||"primary"})),style:{left:"0%",width:`${y(m[0],w,b)}%`}})}),m.map((L,M)=>(0,zv.jsx)("div",{className:F(yDt({variant:o||"primary",size:a})),style:{left:`${y(L,w,b)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:T(M),"aria-label":`Thumb ${M+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":b,"aria-valuenow":L,"aria-disabled":f},M))]})]})});qw.displayName="MoonUISliderPro";var I2e=A(ue(),1);var rg=A(ue(),1);var lP=A(de(),1),s$="Switch",[xDt,psn]=Zn(s$),[bDt,wDt]=xDt(s$),x2e=rg.forwardRef((e,t)=>{let{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:s,value:l="on",onCheckedChange:c,form:u,...d}=e,[f,p]=rg.useState(null),h=rr(t,x=>p(x)),m=rg.useRef(!1),v=f?u||!!f.closest("form"):!0,[g,y]=la({prop:o,defaultProp:a??!1,onChange:c,caller:s$});return(0,lP.jsxs)(bDt,{scope:r,checked:g,disabled:s,children:[(0,lP.jsx)(at.button,{type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":S2e(g),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:h,onClick:et(e.onClick,x=>{y(w=>!w),v&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),v&&(0,lP.jsx)(C2e,{control:f,bubbles:!m.current,name:n,value:l,checked:g,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});x2e.displayName=s$;var b2e="SwitchThumb",w2e=rg.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=wDt(b2e,r);return(0,lP.jsx)(at.span,{"data-state":S2e(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});w2e.displayName=b2e;var CDt="SwitchBubbleInput",C2e=rg.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=rg.useRef(null),s=rr(i,a),l=HN(r),c=jN(t);return rg.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let h=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(h)}},[l,r,n]),(0,lP.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:s,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});C2e.displayName=CDt;function S2e(e){return e?"checked":"unchecked"}var Uoe=x2e,P2e=w2e;var Hv=A(de(),1),jv=I2e.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,Hv.jsxs)("div",{className:"inline-flex items-center gap-2",children:[o&&(0,Hv.jsx)("span",{className:"text-muted-foreground",children:o}),(0,Hv.jsxs)(Uoe,{className:F("peer relative inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=unchecked]:bg-gray-700/70 dark:focus-visible:ring-primary/40 dark:focus-visible:ring-offset-gray-950",t==="sm"&&"h-4 w-8",t==="md"&&"h-6 w-11",t==="lg"&&"h-7 w-14",r==="primary"&&"data-[state=checked]:bg-primary",r==="success"&&"data-[state=checked]:bg-success",r==="warning"&&"data-[state=checked]:bg-warning",r==="danger"&&"data-[state=checked]:bg-error",r==="secondary"&&"data-[state=checked]:bg-accent","data-[state=unchecked]:bg-input",n&&"opacity-80 cursor-wait",e),disabled:n||s.disabled,...s,ref:l,children:[n?(0,Hv.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Hv.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Hv.jsx)(P2e,{className:F("pointer-events-none block rounded-full bg-background shadow-lg ring-0 transition-transform",t==="sm"&&"h-3 w-3 data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",t==="md"&&"h-5 w-5 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",t==="lg"&&"h-6 w-6 data-[state=checked]:translate-x-7 data-[state=unchecked]:translate-x-0")})]}),a&&(0,Hv.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Hv.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));jv.displayName=Uoe.displayName;var cu=A(ue(),1);var Ci=A(de(),1),l$=xt("w-full caption-bottom text-sm",{variants:{variant:{default:"dark:text-gray-200",bordered:"border border-border dark:border-gray-700",striped:"dark:text-gray-200",card:"border border-border dark:border-gray-700 rounded-md shadow-sm dark:shadow-gray-900/20",minimal:"border-none dark:text-gray-200"},size:{sm:"text-xs",default:"text-sm",lg:"text-base"}},defaultVariants:{variant:"default",size:"default"}}),c$=cu.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=cu.Children.map(a.children,c=>{if(cu.isValidElement(c)&&c.type==="tbody"){let u=c.props;return cu.cloneElement(c,{className:F(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,Ci.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,Ci.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Ci.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Ci.jsx)("table",{ref:i,className:F(l$({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});c$.displayName="TablePro";var u$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("thead",{ref:r,className:F("[&_tr]:border-b",e),...t}));u$.displayName="TableHeaderPro";var d$=cu.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=cu.Children.count(n)>0;return(0,Ci.jsx)("tbody",{ref:a,className:F("[&_tr:last-child]:border-0",e),...o,children:i?n:(0,Ci.jsx)("tr",{children:(0,Ci.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Ci.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Ci.jsx)("div",{className:"text-sm",children:r})})})})})});d$.displayName="TableBodyPro";var f$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("tfoot",{ref:r,className:F("bg-primary text-primary-foreground font-medium",e),...t}));f$.displayName="TableFooterPro";var p$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("tr",{ref:r,className:F("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));p$.displayName="TableRowPro";var m$=cu.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M14.707 10.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 12.586V5a1 1 0 012 0v7.586l2.293-2.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):r==="desc"?(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z",clipRule:"evenodd"})}):(0,Ci.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"ml-1 h-4 w-4 inline-block opacity-30",viewBox:"0 0 20 20",fill:"currentColor",children:(0,Ci.jsx)("path",{fillRule:"evenodd",d:"M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z",clipRule:"evenodd"})}):null;return(0,Ci.jsx)("th",{ref:i,className:F("h-10 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t&&"cursor-pointer hover:text-foreground select-none",e),onClick:t?n:void 0,...a,children:(0,Ci.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});m$.displayName="TableHeadPro";var h$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("td",{ref:r,className:F("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));h$.displayName="TableCellPro";var g$=cu.forwardRef(({className:e,...t},r)=>(0,Ci.jsx)("caption",{ref:r,className:F("mt-4 text-sm text-muted-foreground",e),...t}));g$.displayName="TableCaptionPro";var x$=A(ue(),1);var Gx=A(ue(),1);var qx=A(de(),1),v$="Tabs",[PDt,Rsn]=Zn(v$,[iT]),k2e=iT(),[IDt,zoe]=PDt(v$),R2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=nm(s),[d,f]=la({prop:n,onChange:o,defaultProp:a??"",caller:v$});return(0,qx.jsx)(IDt,{scope:r,baseId:ao(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,qx.jsx)(at.div,{dir:u,"data-orientation":i,...c,ref:t})})});R2e.displayName=v$;var N2e="TabsList",T2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=zoe(N2e,r),i=k2e(r);return(0,qx.jsx)(T6,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,qx.jsx)(at.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});T2e.displayName=N2e;var M2e="TabsTrigger",E2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=zoe(M2e,r),s=k2e(r),l=D2e(i.baseId,n),c=O2e(i.baseId,n),u=n===i.value;return(0,qx.jsx)(M6,{asChild:!0,...s,focusable:!o,active:u,children:(0,qx.jsx)(at.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:et(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:et(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:et(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});E2e.displayName=M2e;var A2e="TabsContent",L2e=Gx.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=zoe(A2e,r),l=D2e(s.baseId,n),c=O2e(s.baseId,n),u=n===s.value,d=Gx.useRef(u);return Gx.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,qx.jsx)($o,{present:o||u,children:({present:f})=>(0,qx.jsx)(at.div,{"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:d.current?"0s":void 0},children:f&&a})})});L2e.displayName=A2e;function D2e(e,t){return`${e}-trigger-${t}`}function O2e(e,t){return`${e}-content-${t}`}var y$=R2e,pT=T2e,mT=E2e,cP=L2e;var b$=A(de(),1),ec=y$,Tl=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(pT,{ref:r,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Tl.displayName=pT.displayName;var zn=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(mT,{ref:r,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));zn.displayName=mT.displayName;var eo=x$.forwardRef(({className:e,...t},r)=>(0,b$.jsx)(cP,{ref:r,className:F("mt-6 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));eo.displayName=cP.displayName;var tc=A(ue(),1);Ur();var yn=A(de(),1),kDt={fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},slide:{initial:{x:20,opacity:0},animate:{x:0,opacity:1},exit:{x:-20,opacity:0}},scale:{initial:{scale:.95,opacity:0},animate:{scale:1,opacity:1},exit:{scale:1.05,opacity:0}},flip:{initial:{rotateY:90,opacity:0},animate:{rotateY:0,opacity:1},exit:{rotateY:-90,opacity:0}},morph:{initial:{scale:.8,opacity:0,filter:"blur(10px)"},animate:{scale:1,opacity:1,filter:"blur(0px)"},exit:{scale:1.2,opacity:0,filter:"blur(10px)"}}},w$=tc.forwardRef(({variant:e="default",animationMode:t="fade",orientation:r="horizontal",closeable:n=!1,addable:o=!1,draggable:a=!1,persistKey:i,urlSync:s=!1,lazy:l=!1,items:c=[],onTabsChange:u,onTabClose:d,onTabAdd:f,loading:p=!1,swipeable:h=!1,scrollable:m=!1,onAnalytics:v,onBeforeChange:g,shortcuts:y=!1,maxTabs:x,groups:w,className:b,children:C,value:S,defaultValue:P,onValueChange:T,...L},M)=>{let{hasProAccess:N,isLoading:V}=st(),[_,I]=tc.useState(c),[k,R]=tc.useState(()=>{if(i&&typeof window<"u"){let G=localStorage.getItem(`tabs-${i}`);if(G)return JSON.parse(G).activeTab||P||_[0]?.value}if(s&&typeof window<"u"){let J=new URLSearchParams(window.location.search).get("tab");if(J)return J}return P||_[0]?.value}),[E,O]=tc.useState(new Set),[B,U]=tc.useState(!1),D=tc.useRef(null),j=S!==void 0?S:k,$=tc.useCallback(async G=>{if(!(p||B)){if(g){U(!0);let J=await g(j||"",G);if(U(!1),!J)return}if(R(G),T?.(G),l&&!E.has(G)&&O(J=>new Set([...J,G])),v?.("tab_switch",{from:j,to:G}),i&&typeof window<"u"&&localStorage.setItem(`tabs-${i}`,JSON.stringify({activeTab:G,tabs:_})),s&&typeof window<"u"){let J=new URLSearchParams(window.location.search);J.set("tab",G),window.history.replaceState({},"",`${window.location.pathname}?${J}`)}}},[j,p,B,g,T,l,E,v,i,_,s]),z=tc.useCallback((G,J)=>{J.stopPropagation();let ae=_.filter(Z=>Z.value!==G);I(ae),u?.(ae),d?.(G),v?.("tab_close",{value:G}),j===G&&ae.length>0&&$(ae[0].value)},[_,j,u,d,v,$]),q=tc.useCallback(()=>{if(x&&_.length>=x){v?.("tab_add_blocked",{reason:"max_tabs"});return}f?.(),v?.("tab_add",{count:_.length+1})},[_.length,x,f,v]);tc.useEffect(()=>{if(!y)return;let G=J=>{if((J.metaKey||J.ctrlKey)&&J.key>="1"&&J.key<="9"){J.preventDefault();let ae=parseInt(J.key)-1;_[ae]&&$(_[ae].value)}(J.metaKey||J.ctrlKey)&&J.key==="w"&&n&&(J.preventDefault(),_.find(Z=>Z.value===j)?.closeable!==!1&&z(j||"",new MouseEvent("click"))),(J.metaKey||J.ctrlKey)&&J.key==="t"&&o&&(J.preventDefault(),q())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[y,_,j,n,o,$,z,q]);let H=()=>{D.current&&D.current.scrollBy({left:-200,behavior:"smooth"})},K=()=>{D.current&&D.current.scrollBy({left:200,behavior:"smooth"})};return!V&&!N?(0,yn.jsx)(Rn,{componentName:"Tabs Pro",compact:!0}):(0,yn.jsxs)("div",{className:F("relative w-full",e==="gradient"&&"bg-gradient-to-r from-primary/10 to-secondary/10 rounded-lg p-1",e==="glassmorphism"&&"backdrop-blur-xl bg-white/10 dark:bg-black/10 border border-white/20 dark:border-white/10 rounded-lg p-1",e==="neon"&&"bg-black rounded-lg p-1 shadow-[0_0_20px_rgba(139,92,246,0.3)]",b),children:[p&&(0,yn.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm rounded-lg",children:(0,yn.jsx)(Mr,{className:"h-6 w-6 animate-spin text-primary"})}),(0,yn.jsx)(y$,{ref:M,value:j,onValueChange:$,orientation:r,...L,children:_.length>0?(0,yn.jsxs)(yn.Fragment,{children:[(0,yn.jsxs)("div",{className:F("relative flex items-center",r==="vertical"&&"flex-col items-start"),children:[m&&r==="horizontal"&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute left-0 z-10",onClick:H,children:(0,yn.jsx)(gi,{className:"h-4 w-4"})}),(0,yn.jsx)("div",{ref:D,className:F("flex-1 overflow-x-auto scrollbar-hide",m&&r==="horizontal"&&"mx-10"),children:(0,yn.jsxs)(pT,{className:F("flex items-center gap-1",r==="vertical"&&"flex-col items-start w-full",e==="underline"&&"border-b border-border"),children:[_.map((G,J)=>(0,yn.jsxs)(ne.div,{layout:!0,drag:a?r==="horizontal"?"x":"y":!1,dragConstraints:{left:0,right:0,top:0,bottom:0},dragElastic:.2,whileDrag:{scale:1.05,zIndex:50},className:"relative",children:[(0,yn.jsxs)(mT,{value:G.value,disabled:G.disabled,className:F("relative inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",e==="default"&&"data-[state=active]:bg-background data-[state=active]:shadow-sm",e==="pills"&&"rounded-full data-[state=active]:bg-primary data-[state=active]:text-primary-foreground",e==="underline"&&"rounded-none border-b-2 border-transparent data-[state=active]:border-primary",e==="cards"&&"bg-muted/50 data-[state=active]:bg-background data-[state=active]:shadow-md",e==="minimal"&&"hover:bg-muted/50 data-[state=active]:bg-transparent data-[state=active]:underline",e==="gradient"&&"data-[state=active]:bg-gradient-to-r data-[state=active]:from-primary data-[state=active]:to-secondary data-[state=active]:text-white",e==="glassmorphism"&&"backdrop-blur-md data-[state=active]:bg-white/20 dark:data-[state=active]:bg-white/10",e==="neon"&&"text-purple-400 data-[state=active]:text-white data-[state=active]:shadow-[0_0_10px_rgba(139,92,246,0.8)]",r==="vertical"&&"w-full justify-start"),children:[G.icon&&(0,yn.jsx)("span",{className:"mr-2",children:G.icon}),G.label,G.badge&&(0,yn.jsx)("span",{className:"ml-2",children:G.badge}),n&&G.closeable!==!1&&(0,yn.jsx)("button",{onClick:ae=>z(G.value,ae),className:"ml-2 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:(0,yn.jsx)(lr,{className:"h-3 w-3"})})]}),j===G.value&&t!=="none"&&(0,yn.jsx)(ne.div,{layoutId:"active-tab",className:F("absolute inset-0 -z-10",e==="default"&&"bg-background shadow-sm rounded-md",e==="pills"&&"bg-primary rounded-full",e==="underline"&&"bottom-0 h-0.5 bg-primary"),transition:{type:"spring",stiffness:500,damping:30}})]},G.value)),o&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",onClick:q,className:"h-8 w-8 p-0 ml-2",disabled:x?_.length>=x:!1,children:(0,yn.jsx)(Vi,{className:"h-4 w-4"})})]})}),m&&r==="horizontal"&&(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute right-0 z-10",onClick:K,children:(0,yn.jsx)(Jn,{className:"h-4 w-4"})}),_.length>5&&(0,yn.jsxs)(Er,{children:[(0,yn.jsx)(Ar,{asChild:!0,children:(0,yn.jsx)(oe,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 ml-2",children:(0,yn.jsx)(vi,{className:"h-4 w-4"})})}),(0,yn.jsx)(kr,{align:"end",children:_.slice(5).map(G=>(0,yn.jsxs)(Ve,{onClick:()=>$(G.value),children:[G.icon&&(0,yn.jsx)("span",{className:"mr-2",children:G.icon}),G.label]},G.value))})]})]}),t!=="none"?(0,yn.jsx)(Ft,{mode:"wait",children:_.map(G=>j!==G.value?null:(0,yn.jsx)(cP,{value:G.value,forceMount:!0,className:"mt-4 focus-visible:outline-none",children:(0,yn.jsx)(ne.div,{initial:"initial",animate:"animate",exit:"exit",variants:kDt[t],transition:{duration:.3},children:G.content||C})},G.value))}):_.map(G=>(0,yn.jsx)(cP,{value:G.value,className:"mt-4 focus-visible:outline-none",children:G.content||C},G.value))]}):C})]})});w$.displayName="MoonUITabsPro";var Hoe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(pT,{ref:r,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Hoe.displayName="MoonUITabsListPro";var joe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(mT,{ref:r,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));joe.displayName="MoonUITabsTriggerPro";var $oe=tc.forwardRef(({className:e,...t},r)=>(0,yn.jsx)(cP,{ref:r,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));$oe.displayName="MoonUITabsContentPro";var F2e=A(ue(),1);var B2e=A(de(),1),nd=F2e.default.forwardRef(({className:e,...t},r)=>(0,B2e.jsx)("textarea",{className:F("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));nd.displayName="MoonUITextareaPro";var Xx=A(ue(),1);var Jr=A(ue(),1),U2e=A(uv(),1);var Io=A(de(),1),Xoe="ToastProvider",[Yoe,RDt,NDt]=nv("Toast"),[z2e,Qsn]=Zn("Toast",[NDt]),[TDt,S$]=z2e(Xoe),MDt=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Jr.useState(null),[c,u]=Jr.useState(0),d=Jr.useRef(!1),f=Jr.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${Xoe}\`. Expected non-empty \`string\`.`),(0,Io.jsx)(Yoe.Provider,{scope:t,children:(0,Io.jsx)(TDt,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Jr.useCallback(()=>u(p=>p+1),[]),onToastRemove:Jr.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};MDt.displayName=Xoe;var H2e="ToastViewport",EDt=["F8"],qoe="toast.viewportPause",Goe="toast.viewportResume",j2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=EDt,label:o="Notifications ({hotkey})",...a}=e,i=S$(H2e,r),s=RDt(r),l=Jr.useRef(null),c=Jr.useRef(null),u=Jr.useRef(null),d=Jr.useRef(null),f=rr(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),h=i.toastCount>0;Jr.useEffect(()=>{let v=g=>{n.length!==0&&n.every(x=>g[x]||g.code===x)&&d.current?.focus()};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[n]),Jr.useEffect(()=>{let v=l.current,g=d.current;if(h&&v&&g){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(qoe);g.dispatchEvent(C),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(Goe);g.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!v.contains(C.relatedTarget)&&x()},b=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",y),v.addEventListener("focusout",w),v.addEventListener("pointermove",y),v.addEventListener("pointerleave",b),window.addEventListener("blur",y),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",y),v.removeEventListener("focusout",w),v.removeEventListener("pointermove",y),v.removeEventListener("pointerleave",b),window.removeEventListener("blur",y),window.removeEventListener("focus",x)}}},[h,i.isClosePausedRef]);let m=Jr.useCallback(({tabbingDirection:v})=>{let y=s().map(x=>{let w=x.ref.current,b=[w,...$Dt(w)];return v==="forwards"?b:b.reverse()});return(v==="forwards"?y.reverse():y).flat()},[s]);return Jr.useEffect(()=>{let v=d.current;if(v){let g=y=>{let x=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!x){let b=document.activeElement,C=y.shiftKey;if(y.target===v&&C){c.current?.focus();return}let T=m({tabbingDirection:C?"backwards":"forwards"}),L=T.findIndex(M=>M===b);Woe(T.slice(L+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return v.addEventListener("keydown",g),()=>v.removeEventListener("keydown",g)}},[s,m]),(0,Io.jsxs)(pMe,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:h?void 0:"none"},children:[h&&(0,Io.jsx)(Koe,{ref:c,onFocusFromOutsideViewport:()=>{let v=m({tabbingDirection:"forwards"});Woe(v)}}),(0,Io.jsx)(Yoe.Slot,{scope:r,children:(0,Io.jsx)(at.ol,{tabIndex:-1,...a,ref:f})}),h&&(0,Io.jsx)(Koe,{ref:u,onFocusFromOutsideViewport:()=>{let v=m({tabbingDirection:"backwards"});Woe(v)}})]})});j2e.displayName=H2e;var $2e="ToastFocusProxy",Koe=Jr.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=S$($2e,r);return(0,Io.jsx)(Z2,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});Koe.displayName=$2e;var S_="Toast",ADt="toast.swipeStart",LDt="toast.swipeMove",DDt="toast.swipeCancel",ODt="toast.swipeEnd",W2e=Jr.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=la({prop:n,defaultProp:o??!0,onChange:a,caller:S_});return(0,Io.jsx)($o,{present:r||s,children:(0,Io.jsx)(BDt,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:io(e.onPause),onResume:io(e.onResume),onSwipeStart:et(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:et(e.onSwipeMove,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:et(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:et(e.onSwipeEnd,c=>{let{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});W2e.displayName=S_;var[_Dt,FDt]=z2e(S_,{onClose(){}}),BDt=Jr.forwardRef((e,t)=>{let{__scopeToast:r,type:n="foreground",duration:o,open:a,onClose:i,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...h}=e,m=S$(S_,r),[v,g]=Jr.useState(null),y=rr(t,_=>g(_)),x=Jr.useRef(null),w=Jr.useRef(null),b=o||m.duration,C=Jr.useRef(0),S=Jr.useRef(b),P=Jr.useRef(0),{onToastAdd:T,onToastRemove:L}=m,M=io(()=>{v?.contains(document.activeElement)&&m.viewport?.focus(),i()}),N=Jr.useCallback(_=>{!_||_===1/0||(window.clearTimeout(P.current),C.current=new Date().getTime(),P.current=window.setTimeout(M,_))},[M]);Jr.useEffect(()=>{let _=m.viewport;if(_){let I=()=>{N(S.current),c?.()},k=()=>{let R=new Date().getTime()-C.current;S.current=S.current-R,window.clearTimeout(P.current),l?.()};return _.addEventListener(qoe,k),_.addEventListener(Goe,I),()=>{_.removeEventListener(qoe,k),_.removeEventListener(Goe,I)}}},[m.viewport,b,l,c,N]),Jr.useEffect(()=>{a&&!m.isClosePausedRef.current&&N(b)},[a,b,m.isClosePausedRef,N]),Jr.useEffect(()=>(T(),()=>L()),[T,L]);let V=Jr.useMemo(()=>v?Z2e(v):null,[v]);return m.viewport?(0,Io.jsxs)(Io.Fragment,{children:[V&&(0,Io.jsx)(VDt,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),(0,Io.jsx)(_Dt,{scope:r,onClose:M,children:U2e.createPortal((0,Io.jsx)(Yoe.ItemSlot,{scope:r,children:(0,Io.jsx)(fMe,{asChild:!0,onEscapeKeyDown:et(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||M(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Io.jsx)(at.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...h,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:et(e.onKeyDown,_=>{_.key==="Escape"&&(s?.(_.nativeEvent),_.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:et(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:et(e.onPointerMove,_=>{if(!x.current)return;let I=_.clientX-x.current.x,k=_.clientY-x.current.y,R=!!w.current,E=["left","right"].includes(m.swipeDirection),O=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,B=E?O(0,I):0,U=E?0:O(0,k),D=_.pointerType==="touch"?10:2,j={x:B,y:U},$={originalEvent:_,delta:j};R?(w.current=j,C$(LDt,d,$,{discrete:!1})):V2e(j,m.swipeDirection,D)?(w.current=j,C$(ADt,u,$,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(I)>D||Math.abs(k)>D)&&(x.current=null)}),onPointerUp:et(e.onPointerUp,_=>{let I=w.current,k=_.target;if(k.hasPointerCapture(_.pointerId)&&k.releasePointerCapture(_.pointerId),w.current=null,x.current=null,I){let R=_.currentTarget,E={originalEvent:_,delta:I};V2e(I,m.swipeDirection,m.swipeThreshold)?C$(ODt,p,E,{discrete:!0}):C$(DDt,f,E,{discrete:!0}),R.addEventListener("click",O=>O.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),VDt=e=>{let{__scopeToast:t,children:r,...n}=e,o=S$(S_,t),[a,i]=Jr.useState(!1),[s,l]=Jr.useState(!1);return HDt(()=>i(!0)),Jr.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Io.jsx)(ip,{asChild:!0,children:(0,Io.jsx)(Z2,{...n,children:a&&(0,Io.jsxs)(Io.Fragment,{children:[o.label," ",r]})})})},UDt="ToastTitle",q2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Io.jsx)(at.div,{...n,ref:t})});q2e.displayName=UDt;var zDt="ToastDescription",G2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Io.jsx)(at.div,{...n,ref:t})});G2e.displayName=zDt;var K2e="ToastAction",X2e=Jr.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Io.jsx)(Q2e,{altText:r,asChild:!0,children:(0,Io.jsx)(Qoe,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${K2e}\`. Expected non-empty \`string\`.`),null)});X2e.displayName=K2e;var Y2e="ToastClose",Qoe=Jr.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=FDt(Y2e,r);return(0,Io.jsx)(Q2e,{asChild:!0,children:(0,Io.jsx)(at.button,{type:"button",...n,ref:t,onClick:et(e.onClick,o.onClose)})})});Qoe.displayName=Y2e;var Q2e=Jr.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Io.jsx)(at.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function Z2e(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),jDt(n)){let o=n.ariaHidden||n.hidden||n.style.display==="none",a=n.dataset.radixToastAnnounceExclude==="";if(!o)if(a){let i=n.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Z2e(n))}}),t}function C$(e,t,r,{discrete:n}){let o=r.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?VR(o,a):o.dispatchEvent(a)}var V2e=(e,t,r=0)=>{let n=Math.abs(e.x),o=Math.abs(e.y),a=n>o;return t==="left"||t==="right"?a&&n>r:!a&&o>r};function HDt(e=()=>{}){let t=io(e);no(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function jDt(e){return e.nodeType===e.ELEMENT_NODE}function $Dt(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Woe(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var Zoe=j2e,Joe=W2e,eae=q2e,tae=G2e,rae=X2e,nae=Qoe;var Kx=A(de(),1);var qDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(Zoe,{ref:r,className:F("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));qDt.displayName=Zoe.displayName;var GDt=xt("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"border-green-200 bg-green-50 text-green-900 dark:border-green-800 dark:bg-green-900/20 dark:text-green-100",warning:"border-orange-200 bg-orange-50 text-orange-900 dark:border-orange-800 dark:bg-orange-900/20 dark:text-orange-100",info:"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-800 dark:bg-blue-900/20 dark:text-blue-100"}},defaultVariants:{variant:"default"}}),I$=Xx.forwardRef(({className:e,variant:t,...r},n)=>(0,Kx.jsx)(Joe,{ref:n,className:F(GDt({variant:t}),e),...r}));I$.displayName=Joe.displayName;var KDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(rae,{ref:r,className:F("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));KDt.displayName=rae.displayName;var XDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(nae,{ref:r,className:F("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Kx.jsx)(lr,{className:"h-4 w-4"})}));XDt.displayName=nae.displayName;var YDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(eae,{ref:r,className:F("text-sm font-semibold [&+div]:text-xs",e),...t}));YDt.displayName=eae.displayName;var QDt=Xx.forwardRef(({className:e,...t},r)=>(0,Kx.jsx)(tae,{ref:r,className:F("text-sm opacity-90",e),...t}));QDt.displayName=tae.displayName;var ZDt=5,JDt=1e6,oae=new Map,J2e=e=>{if(oae.has(e))return;let t=setTimeout(()=>{oae.delete(e),P$({type:"REMOVE_TOAST",toastId:e})},JDt);oae.set(e,t)},eOt=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ZDt)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?J2e(r):e.toasts.forEach(n=>{J2e(n.id)}),{...e,toasts:e.toasts.map(n=>n.id===r||r===void 0?{...n,open:!1}:n)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};default:return e}},tOt=[],aae={toasts:[]},rOt=0;function P$(e){aae=eOt(aae,e),tOt.forEach(t=>{t(aae)})}function dp({...e}){let t=`toast-${Date.now()}-${++rOt}`,r=o=>P$({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>P$({type:"DISMISS_TOAST",toastId:t});return P$({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}var a_e=A(ue(),1);var t_e=A(xr(),1);var nln=!!(typeof window<"u"&&window.document&&window.document.createElement);function xn(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var Nm=A(xr(),1);var e_e=A(xr(),1),rc=globalThis?.document?e_e.useLayoutEffect:()=>{};var k$=A(xr(),1);var nOt=Nm[" useInsertionEffect ".trim().toString()]||rc;function Yx({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=oOt({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=Nm.useRef(e!==void 0);Nm.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=Nm.useCallback(u=>{if(s){let d=aOt(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function oOt({defaultProp:e,onChange:t}){let[r,n]=Nm.useState(e),o=Nm.useRef(r),a=Nm.useRef(t);return nOt(()=>{a.current=t},[t]),Nm.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function aOt(e){return typeof e=="function"}var sln=Symbol("RADIX:SYNC_STATE");var r_e=A(Ma(),1),n_e="Toggle",o_e=t_e.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=Yx({prop:r,onChange:o,defaultProp:n??!1,caller:n_e});return(0,r_e.jsx)(Tn.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:xn(e.onClick,()=>{e.disabled||s(!i)})})});o_e.displayName=n_e;var iae=o_e;var ng=A(de(),1),R$=xt("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"moonui-toggle-default bg-transparent hover:bg-muted hover:text-muted-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:border-input dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground data-[state=on]:bg-transparent data-[state=on]:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground dark:data-[state=on]:text-accent-foreground",primary:"bg-transparent hover:bg-primary/10 hover:text-primary data-[state=on]:bg-primary data-[state=on]:text-primary-foreground dark:hover:bg-primary/20 dark:hover:text-primary dark:data-[state=on]:bg-primary dark:data-[state=on]:text-primary-foreground",secondary:"moonui-toggle-secondary bg-transparent hover:bg-secondary/10 hover:text-secondary data-[state=on]:bg-secondary data-[state=on]:text-secondary-foreground",success:"bg-transparent hover:bg-success/10 hover:text-success data-[state=on]:bg-success data-[state=on]:text-success-foreground dark:hover:bg-success/20 dark:hover:text-success dark:data-[state=on]:bg-success dark:data-[state=on]:text-success-foreground",warning:"bg-transparent hover:bg-warning/10 hover:text-warning data-[state=on]:bg-warning data-[state=on]:text-warning-foreground dark:hover:bg-warning/20 dark:hover:text-warning dark:data-[state=on]:bg-warning dark:data-[state=on]:text-warning-foreground",danger:"bg-transparent hover:bg-destructive/10 hover:text-destructive data-[state=on]:bg-destructive data-[state=on]:text-destructive-foreground dark:hover:bg-destructive/20 dark:hover:text-destructive dark:data-[state=on]:bg-destructive dark:data-[state=on]:text-destructive-foreground",gradient:"bg-transparent hover:bg-gradient-to-r hover:from-purple-500/10 hover:to-pink-500/10 hover:text-purple-600 data-[state=on]:bg-gradient-to-r data-[state=on]:from-purple-600 data-[state=on]:to-pink-600 data-[state=on]:text-white dark:hover:from-purple-500/20 dark:hover:to-pink-500/20 dark:hover:text-purple-400 dark:data-[state=on]:from-purple-600 dark:data-[state=on]:to-pink-600 dark:data-[state=on]:text-white"},size:{xs:"min-h-7 px-2 py-1 text-xs",sm:"min-h-8 px-2.5 py-1.5 text-xs",default:"min-h-9 px-3 py-2",md:"min-h-10 px-4 py-2.5",lg:"min-h-11 px-6 py-3",xl:"min-h-12 px-8 py-3.5 text-base"},shape:{default:"rounded-md",square:"rounded-none",rounded:"rounded-lg",pill:"rounded-full"}},defaultVariants:{variant:"default",size:"default",shape:"default"}}),N$=a_e.forwardRef(({className:e,variant:t,size:r,shape:n,loading:o,badge:a,badgeVariant:i="default",iconOn:s,iconOff:l,iconPosition:c="left",children:u,pressed:d,onPressedChange:f,defaultPressed:p,...h},m)=>{let v=d?s:l;return(0,ng.jsx)(iae,{ref:m,className:F(R$({variant:t,size:r,shape:n}),e),pressed:d,onPressedChange:f,defaultPressed:p,disabled:o||h.disabled,...h,children:o?(0,ng.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,ng.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}),u&&(0,ng.jsx)("span",{className:"text-center",children:u})]}):(0,ng.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[v&&c==="left"&&(0,ng.jsx)("span",{className:"flex-shrink-0",children:v}),u&&(0,ng.jsx)("span",{className:"text-center",children:u}),v&&c==="right"&&(0,ng.jsx)("span",{className:"flex-shrink-0",children:v}),a!==void 0&&(0,ng.jsx)("span",{className:F("ml-1 inline-flex items-center justify-center rounded-full px-1.5 text-xs font-semibold",i==="default"&&"bg-muted text-muted-foreground",i==="primary"&&"bg-primary text-primary-foreground",i==="secondary"&&"bg-secondary text-secondary-foreground dark:bg-accent dark:text-accent-foreground",i==="success"&&"bg-success text-success-foreground",i==="warning"&&"bg-warning text-warning-foreground",i==="danger"&&"bg-destructive text-destructive-foreground"),children:a})]})})});N$.displayName=iae.displayName;var FFe=A(ue(),1);var us=A(xr(),1);var tf=A(xr(),1);var l_e=["top","right","bottom","left"];var $v=Math.min,od=Math.max,I_=Math.round,k_=Math.floor,og=e=>({x:e,y:e}),sOt={left:"right",right:"left",bottom:"top",top:"bottom"},lOt={start:"end",end:"start"};function M$(e,t,r){return od(e,$v(t,r))}function Wv(e,t){return typeof e=="function"?e(t):e}function qv(e){return e.split("-")[0]}function uP(e){return e.split("-")[1]}function E$(e){return e==="x"?"y":"x"}function A$(e){return e==="y"?"height":"width"}var cOt=new Set(["top","bottom"]);function ag(e){return cOt.has(qv(e))?"y":"x"}function L$(e){return E$(ag(e))}function c_e(e,t,r){r===void 0&&(r=!1);let n=uP(e),o=L$(e),a=A$(o),i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=P_(i)),[i,P_(i)]}function u_e(e){let t=P_(e);return[T$(e),t,T$(t)]}function T$(e){return e.replace(/start|end/g,t=>lOt[t])}var i_e=["left","right"],s_e=["right","left"],uOt=["top","bottom"],dOt=["bottom","top"];function fOt(e,t,r){switch(e){case"top":case"bottom":return r?t?s_e:i_e:t?i_e:s_e;case"left":case"right":return t?uOt:dOt;default:return[]}}function d_e(e,t,r,n){let o=uP(e),a=fOt(qv(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(T$)))),a}function P_(e){return e.replace(/left|right|bottom|top/g,t=>sOt[t])}function pOt(e){return{top:0,right:0,bottom:0,left:0,...e}}function sae(e){return typeof e!="number"?pOt(e):{top:e,right:e,bottom:e,left:e}}function dP(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function f_e(e,t,r){let{reference:n,floating:o}=e,a=ag(t),i=L$(t),s=A$(i),l=qv(t),c=a==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2,p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(uP(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}var h_e=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=f_e(c,n,l),f=n,p={},h=0;for(let m=0;m<s.length;m++){let{name:v,fn:g}=s[m],{x:y,y:x,data:w,reset:b}=await g({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});u=y??u,d=x??d,p={...p,[v]:{...p[v],...w}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(f=b.placement),b.rects&&(c=b.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:u,y:d}=f_e(c,f,l)),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function hT(e,t){var r;t===void 0&&(t={});let{x:n,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Wv(t,e),h=sae(p),v=s[f?d==="floating"?"reference":"floating":d],g=dP(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(v)))==null||r?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(x))?await(a.getScale==null?void 0:a.getScale(x))||{x:1,y:1}:{x:1,y:1},b=dP(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:x,strategy:l}):y);return{top:(g.top-b.top+h.top)/w.y,bottom:(b.bottom-g.bottom+h.bottom)/w.y,left:(g.left-b.left+h.left)/w.x,right:(b.right-g.right+h.right)/w.x}}var g_e=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=Wv(e,t)||{};if(c==null)return{};let d=sae(u),f={x:r,y:n},p=L$(o),h=A$(p),m=await i.getDimensions(c),v=p==="y",g=v?"top":"left",y=v?"bottom":"right",x=v?"clientHeight":"clientWidth",w=a.reference[h]+a.reference[p]-f[p]-a.floating[h],b=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),S=C?C[x]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[x]||a.floating[h]);let P=w/2-b/2,T=S/2-m[h]/2-1,L=$v(d[g],T),M=$v(d[y],T),N=L,V=S-m[h]-M,_=S/2-m[h]/2+P,I=M$(N,_,V),k=!l.arrow&&uP(o)!=null&&_!==I&&a.reference[h]/2-(_<N?L:M)-m[h]/2<0,R=k?_<N?_-N:_-V:0;return{[p]:f[p]+R,data:{[p]:I,centerOffset:_-I-R,...k&&{alignmentOffset:R}},reset:k}}});var v_e=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;let{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=Wv(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let g=qv(o),y=ag(s),x=qv(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),b=f||(x||!m?[P_(s)]:u_e(s)),C=h!=="none";!f&&C&&b.push(...d_e(s,m,h,w));let S=[s,...b],P=await hT(t,v),T=[],L=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&T.push(P[g]),d){let _=c_e(o,i,w);T.push(P[_[0]],P[_[1]])}if(L=[...L,{placement:o,overflows:T}],!T.every(_=>_<=0)){var M,N;let _=(((M=a.flip)==null?void 0:M.index)||0)+1,I=S[_];if(I&&(!(d==="alignment"?y!==ag(I):!1)||L.every(E=>ag(E.placement)===y?E.overflows[0]>0:!0)))return{data:{index:_,overflows:L},reset:{placement:I}};let k=(N=L.filter(R=>R.overflows[0]<=0).sort((R,E)=>R.overflows[1]-E.overflows[1])[0])==null?void 0:N.placement;if(!k)switch(p){case"bestFit":{var V;let R=(V=L.filter(E=>{if(C){let O=ag(E.placement);return O===y||O==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(O=>O>0).reduce((O,B)=>O+B,0)]).sort((E,O)=>E[1]-O[1])[0])==null?void 0:V[0];R&&(k=R);break}case"initialPlacement":k=s;break}if(o!==k)return{reset:{placement:k}}}return{}}}};function p_e(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function m_e(e){return l_e.some(t=>e[t]>=0)}var y_e=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=Wv(e,t);switch(n){case"referenceHidden":{let a=await hT(t,{...o,elementContext:"reference"}),i=p_e(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:m_e(i)}}}case"escaped":{let a=await hT(t,{...o,altBoundary:!0}),i=p_e(a,r.floating);return{data:{escapedOffsets:i,escaped:m_e(i)}}}default:return{}}}}};var x_e=new Set(["left","top"]);async function mOt(e,t){let{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=qv(r),s=uP(r),l=ag(r)==="y",c=x_e.has(i)?-1:1,u=a&&l?-1:1,d=Wv(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof h=="number"&&(p=s==="end"?h*-1:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var b_e=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;let{x:o,y:a,placement:i,middlewareData:s}=t,l=await mOt(t,e);return i===((r=s.offset)==null?void 0:r.placement)&&(n=s.arrow)!=null&&n.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},w_e=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){let{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:g,y}=v;return{x:g,y}}},...l}=Wv(e,t),c={x:r,y:n},u=await hT(t,l),d=ag(qv(o)),f=E$(d),p=c[f],h=c[d];if(a){let v=f==="y"?"top":"left",g=f==="y"?"bottom":"right",y=p+u[v],x=p-u[g];p=M$(y,p,x)}if(i){let v=d==="y"?"top":"left",g=d==="y"?"bottom":"right",y=h+u[v],x=h-u[g];h=M$(y,h,x)}let m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-r,y:m.y-n,enabled:{[f]:a,[d]:i}}}}}},C_e=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Wv(e,t),u={x:r,y:n},d=ag(o),f=E$(d),p=u[f],h=u[d],m=Wv(s,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){let x=f==="y"?"height":"width",w=a.reference[f]-a.floating[x]+v.mainAxis,b=a.reference[f]+a.reference[x]-v.mainAxis;p<w?p=w:p>b&&(p=b)}if(c){var g,y;let x=f==="y"?"width":"height",w=x_e.has(qv(o)),b=a.reference[d]-a.floating[x]+(w&&((g=i.offset)==null?void 0:g[d])||0)+(w?0:v.crossAxis),C=a.reference[d]+a.reference[x]+(w?0:((y=i.offset)==null?void 0:y[d])||0)-(w?v.crossAxis:0);h<b?h=b:h>C&&(h=C)}return{[f]:p,[d]:h}}}},S_e=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;let{placement:o,rects:a,platform:i,elements:s}=t,{apply:l=()=>{},...c}=Wv(e,t),u=await hT(t,c),d=qv(o),f=uP(o),p=ag(o)==="y",{width:h,height:m}=a.floating,v,g;d==="top"||d==="bottom"?(v=d,g=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v=f==="end"?"top":"bottom");let y=m-u.top-u.bottom,x=h-u.left-u.right,w=$v(m-u[v],y),b=$v(h-u[g],x),C=!t.middlewareData.shift,S=w,P=b;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=x),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=y),C&&!f){let L=od(u.left,0),M=od(u.right,0),N=od(u.top,0),V=od(u.bottom,0);p?P=h-2*(L!==0||M!==0?L+M:od(u.left,u.right)):S=m-2*(N!==0||V!==0?N+V:od(u.top,u.bottom))}await l({...t,availableWidth:P,availableHeight:S});let T=await i.getDimensions(s.floating);return h!==T.width||m!==T.height?{reset:{rects:!0}}:{}}}};function D$(){return typeof window<"u"}function pP(e){return I_e(e)?(e.nodeName||"").toLowerCase():"#document"}function ef(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ig(e){var t;return(t=(I_e(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function I_e(e){return D$()?e instanceof Node||e instanceof ef(e).Node:!1}function Tm(e){return D$()?e instanceof Element||e instanceof ef(e).Element:!1}function sg(e){return D$()?e instanceof HTMLElement||e instanceof ef(e).HTMLElement:!1}function P_e(e){return!D$()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ef(e).ShadowRoot}var hOt=new Set(["inline","contents"]);function gT(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=Mm(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!hOt.has(o)}var gOt=new Set(["table","td","th"]);function k_e(e){return gOt.has(pP(e))}var vOt=[":popover-open",":modal"];function R_(e){return vOt.some(t=>{try{return e.matches(t)}catch{return!1}})}var yOt=["transform","translate","scale","rotate","perspective"],xOt=["transform","translate","scale","rotate","perspective","filter"],bOt=["paint","layout","strict","content"];function O$(e){let t=_$(),r=Tm(e)?Mm(e):e;return yOt.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||xOt.some(n=>(r.willChange||"").includes(n))||bOt.some(n=>(r.contain||"").includes(n))}function R_e(e){let t=Qx(e);for(;sg(t)&&!mP(t);){if(O$(t))return t;if(R_(t))return null;t=Qx(t)}return null}function _$(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var wOt=new Set(["html","body","#document"]);function mP(e){return wOt.has(pP(e))}function Mm(e){return ef(e).getComputedStyle(e)}function N_(e){return Tm(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qx(e){if(pP(e)==="html")return e;let t=e.assignedSlot||e.parentNode||P_e(e)&&e.host||ig(e);return P_e(t)?t.host:t}function N_e(e){let t=Qx(e);return mP(t)?e.ownerDocument?e.ownerDocument.body:e.body:sg(t)&&gT(t)?t:N_e(t)}function fP(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=N_e(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ef(o);if(a){let s=F$(i);return t.concat(i,i.visualViewport||[],gT(o)?o:[],s&&r?fP(s):[])}return t.concat(o,fP(o,[],r))}function F$(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function A_e(e){let t=Mm(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=sg(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=I_(r)!==a||I_(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function cae(e){return Tm(e)?e:e.contextElement}function vT(e){let t=cae(e);if(!sg(t))return og(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=A_e(t),i=(a?I_(r.width):r.width)/n,s=(a?I_(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var COt=og(0);function L_e(e){let t=ef(e);return!_$()||!t.visualViewport?COt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function SOt(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ef(e)?!1:t}function hP(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),a=cae(e),i=og(1);t&&(n?Tm(n)&&(i=vT(n)):i=vT(e));let s=SOt(a,r,n)?L_e(a):og(0),l=(o.left+s.x)/i.x,c=(o.top+s.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(a){let f=ef(a),p=n&&Tm(n)?ef(n):n,h=f,m=F$(h);for(;m&&n&&p!==h;){let v=vT(m),g=m.getBoundingClientRect(),y=Mm(m),x=g.left+(m.clientLeft+parseFloat(y.paddingLeft))*v.x,w=g.top+(m.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=x,c+=w,h=ef(m),m=F$(h)}}return dP({width:u,height:d,x:l,y:c})}function B$(e,t){let r=N_(e).scrollLeft;return t?t.left+r:hP(ig(e)).left+r}function D_e(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-B$(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function POt(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a=o==="fixed",i=ig(n),s=t?R_(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=og(1),u=og(0),d=sg(n);if((d||!d&&!a)&&((pP(n)!=="body"||gT(i))&&(l=N_(n)),sg(n))){let p=hP(n);c=vT(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=i&&!d&&!a?D_e(i,l):og(0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}}function IOt(e){return Array.from(e.getClientRects())}function kOt(e){let t=ig(e),r=N_(e),n=e.ownerDocument.body,o=od(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=od(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+B$(e),s=-r.scrollTop;return Mm(n).direction==="rtl"&&(i+=od(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var T_e=25;function ROt(e,t){let r=ef(e),n=ig(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let u=_$();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let c=B$(n);if(c<=0){let u=n.ownerDocument,d=u.body,f=getComputedStyle(d),p=u.compatMode==="CSS1Compat"&&parseFloat(f.marginLeft)+parseFloat(f.marginRight)||0,h=Math.abs(n.clientWidth-d.clientWidth-p);h<=T_e&&(a-=h)}else c<=T_e&&(a+=c);return{width:a,height:i,x:s,y:l}}var NOt=new Set(["absolute","fixed"]);function TOt(e,t){let r=hP(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=sg(e)?vT(e):og(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,c=n*a.y;return{width:i,height:s,x:l,y:c}}function M_e(e,t,r){let n;if(t==="viewport")n=ROt(e,r);else if(t==="document")n=kOt(ig(e));else if(Tm(t))n=TOt(t,r);else{let o=L_e(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return dP(n)}function O_e(e,t){let r=Qx(e);return r===t||!Tm(r)||mP(r)?!1:Mm(r).position==="fixed"||O_e(r,t)}function MOt(e,t){let r=t.get(e);if(r)return r;let n=fP(e,[],!1).filter(s=>Tm(s)&&pP(s)!=="body"),o=null,a=Mm(e).position==="fixed",i=a?Qx(e):e;for(;Tm(i)&&!mP(i);){let s=Mm(i),l=O$(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&NOt.has(o.position)||gT(i)&&!l&&O_e(e,i))?n=n.filter(u=>u!==i):o=s,i=Qx(i)}return t.set(e,n),n}function EOt(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[...r==="clippingAncestors"?R_(t)?[]:MOt(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{let d=M_e(t,u,o);return c.top=od(d.top,c.top),c.right=$v(d.right,c.right),c.bottom=$v(d.bottom,c.bottom),c.left=od(d.left,c.left),c},M_e(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function AOt(e){let{width:t,height:r}=A_e(e);return{width:t,height:r}}function LOt(e,t,r){let n=sg(t),o=ig(t),a=r==="fixed",i=hP(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=og(0);function c(){l.x=B$(o)}if(n||!n&&!a)if((pP(t)!=="body"||gT(o))&&(s=N_(t)),n){let p=hP(t,!0,a,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else o&&c();a&&!n&&o&&c();let u=o&&!n&&!a?D_e(o,s):og(0),d=i.left+s.scrollLeft-l.x-u.x,f=i.top+s.scrollTop-l.y-u.y;return{x:d,y:f,width:i.width,height:i.height}}function lae(e){return Mm(e).position==="static"}function E_e(e,t){if(!sg(e)||Mm(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return ig(e)===r&&(r=r.ownerDocument.body),r}function __e(e,t){let r=ef(e);if(R_(e))return r;if(!sg(e)){let o=Qx(e);for(;o&&!mP(o);){if(Tm(o)&&!lae(o))return o;o=Qx(o)}return r}let n=E_e(e,t);for(;n&&k_e(n)&&lae(n);)n=E_e(n,t);return n&&mP(n)&&lae(n)&&!O$(n)?r:n||R_e(e)||r}var DOt=async function(e){let t=this.getOffsetParent||__e,r=this.getDimensions,n=await r(e.floating);return{reference:LOt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function OOt(e){return Mm(e).direction==="rtl"}var F_e={convertOffsetParentRelativeRectToViewportRelativeRect:POt,getDocumentElement:ig,getClippingRect:EOt,getOffsetParent:__e,getElementRects:DOt,getClientRects:IOt,getDimensions:AOt,getScale:vT,isElement:Tm,isRTL:OOt};function B_e(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function _Ot(e,t){let r=null,n,o=ig(e);function a(){var s;clearTimeout(n),(s=r)==null||s.disconnect(),r=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();let c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;let h=k_(d),m=k_(o.clientWidth-(u+f)),v=k_(o.clientHeight-(d+p)),g=k_(u),x={rootMargin:-h+"px "+-m+"px "+-v+"px "+-g+"px",threshold:od(0,$v(1,l))||1},w=!0;function b(C){let S=C[0].intersectionRatio;if(S!==l){if(!w)return i();S?i(!1,S):n=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!B_e(c,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(b,{...x,root:o.ownerDocument})}catch{r=new IntersectionObserver(b,x)}r.observe(e)}return i(!0),a}function uae(e,t,r,n){n===void 0&&(n={});let{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,c=cae(e),u=o||a?[...c?fP(c):[],...fP(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),a&&g.addEventListener("resize",r)});let d=c&&s?_Ot(c,r):null,f=-1,p=null;i&&(p=new ResizeObserver(g=>{let[y]=g;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var x;(x=p)==null||x.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let h,m=l?hP(e):null;l&&v();function v(){let g=hP(e);m&&!B_e(m,g)&&r(),m=g,h=requestAnimationFrame(v)}return r(),()=>{var g;u.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),d?.(),(g=p)==null||g.disconnect(),p=null,l&&cancelAnimationFrame(h)}}var V_e=b_e;var U_e=w_e,z_e=v_e,H_e=S_e,j_e=y_e,dae=g_e;var $_e=C_e,fae=(e,t,r)=>{let n=new Map,o={platform:F_e,...r},a={...o.platform,_c:n};return h_e(e,t,{...o,platform:a})};var Qs=A(xr(),1),q_e=A(xr(),1),G_e=A(aP(),1),FOt=typeof document<"u",BOt=function(){},V$=FOt?q_e.useLayoutEffect:BOt;function U$(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!U$(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){let a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!U$(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function K_e(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function W_e(e,t){let r=K_e(e);return Math.round(t*r)/r}function pae(e){let t=Qs.useRef(e);return V$(()=>{t.current=e}),t}function X_e(e){e===void 0&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=Qs.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=Qs.useState(n);U$(f,n)||p(n);let[h,m]=Qs.useState(null),[v,g]=Qs.useState(null),y=Qs.useCallback(E=>{E!==C.current&&(C.current=E,m(E))},[]),x=Qs.useCallback(E=>{E!==S.current&&(S.current=E,g(E))},[]),w=a||h,b=i||v,C=Qs.useRef(null),S=Qs.useRef(null),P=Qs.useRef(u),T=l!=null,L=pae(l),M=pae(o),N=pae(c),V=Qs.useCallback(()=>{if(!C.current||!S.current)return;let E={placement:t,strategy:r,middleware:f};M.current&&(E.platform=M.current),fae(C.current,S.current,E).then(O=>{let B={...O,isPositioned:N.current!==!1};_.current&&!U$(P.current,B)&&(P.current=B,G_e.flushSync(()=>{d(B)}))})},[f,t,r,M,N]);V$(()=>{c===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,d(E=>({...E,isPositioned:!1})))},[c]);let _=Qs.useRef(!1);V$(()=>(_.current=!0,()=>{_.current=!1}),[]),V$(()=>{if(w&&(C.current=w),b&&(S.current=b),w&&b){if(L.current)return L.current(w,b,V);V()}},[w,b,V,L,T]);let I=Qs.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:x}),[y,x]),k=Qs.useMemo(()=>({reference:w,floating:b}),[w,b]),R=Qs.useMemo(()=>{let E={position:r,left:0,top:0};if(!k.floating)return E;let O=W_e(k.floating,u.x),B=W_e(k.floating,u.y);return s?{...E,transform:"translate("+O+"px, "+B+"px)",...K_e(k.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:B}},[r,s,k.floating,u.x,u.y]);return Qs.useMemo(()=>({...u,update:V,refs:I,elements:k,floatingStyles:R}),[u,V,I,k,R])}var VOt=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){let{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?dae({element:n.current,padding:o}).fn(r):{}:n?dae({element:n,padding:o}).fn(r):{}}}},Y_e=(e,t)=>({...V_e(e),options:[e,t]}),Q_e=(e,t)=>({...U_e(e),options:[e,t]}),Z_e=(e,t)=>({...$_e(e),options:[e,t]}),J_e=(e,t)=>({...z_e(e),options:[e,t]}),eFe=(e,t)=>({...H_e(e),options:[e,t]});var tFe=(e,t)=>({...j_e(e),options:[e,t]});var rFe=(e,t)=>({...VOt(e),options:[e,t]});var nFe=A(xr(),1);var mae=A(Ma(),1),UOt="Arrow",oFe=nFe.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,mae.jsx)(Tn.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,mae.jsx)("polygon",{points:"0,0 30,0 15,10"})})});oFe.displayName=UOt;var aFe=oFe;var yT=A(xr(),1);function nc(e){let t=yT.useRef(e);return yT.useEffect(()=>{t.current=e}),yT.useMemo(()=>(...r)=>t.current?.(...r),[])}var iFe=A(xr(),1);function sFe(e){let[t,r]=iFe.useState(void 0);return rc(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});let n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;let a=o[0],i,s;if("borderBoxSize"in a){let l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,s=c.blockSize}else i=e.offsetWidth,s=e.offsetHeight;r({width:i,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Gw=A(Ma(),1);var hae="Popper",[lFe,gae]=Zd(hae),[HOt,cFe]=lFe(hae),uFe=e=>{let{__scopePopper:t,children:r}=e,[n,o]=tf.useState(null);return(0,Gw.jsx)(HOt,{scope:t,anchor:n,onAnchorChange:o,children:r})};uFe.displayName=hae;var dFe="PopperAnchor",fFe=tf.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=cFe(dFe,r),i=tf.useRef(null),s=ea(t,i),l=tf.useRef(null);return tf.useEffect(()=>{let c=l.current;l.current=n?.current||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,Gw.jsx)(Tn.div,{...o,ref:s})});fFe.displayName=dFe;var vae="PopperContent",[jOt,$Ot]=lFe(vae),pFe=tf.forwardRef((e,t)=>{let{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:p="optimized",onPlaced:h,...m}=e,v=cFe(vae,r),[g,y]=tf.useState(null),x=ea(t,H=>y(H)),[w,b]=tf.useState(null),C=sFe(w),S=C?.width??0,P=C?.height??0,T=n+(a!=="center"?"-"+a:""),L=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},M=Array.isArray(c)?c:[c],N=M.length>0,V={padding:L,boundary:M.filter(qOt),altBoundary:N},{refs:_,floatingStyles:I,placement:k,isPositioned:R,middlewareData:E}=X_e({strategy:"fixed",placement:T,whileElementsMounted:(...H)=>uae(...H,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[Y_e({mainAxis:o+P,alignmentAxis:i}),l&&Q_e({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Z_e():void 0,...V}),l&&J_e({...V}),eFe({...V,apply:({elements:H,rects:K,availableWidth:G,availableHeight:J})=>{let{width:ae,height:Z}=K.reference,Pe=H.floating.style;Pe.setProperty("--radix-popper-available-width",`${G}px`),Pe.setProperty("--radix-popper-available-height",`${J}px`),Pe.setProperty("--radix-popper-anchor-width",`${ae}px`),Pe.setProperty("--radix-popper-anchor-height",`${Z}px`)}}),w&&rFe({element:w,padding:s}),GOt({arrowWidth:S,arrowHeight:P}),f&&tFe({strategy:"referenceHidden",...V})]}),[O,B]=gFe(k),U=nc(h);rc(()=>{R&&U?.()},[R,U]);let D=E.arrow?.x,j=E.arrow?.y,$=E.arrow?.centerOffset!==0,[z,q]=tf.useState();return rc(()=>{g&&q(window.getComputedStyle(g).zIndex)},[g]),(0,Gw.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:R?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,["--radix-popper-transform-origin"]:[E.transformOrigin?.x,E.transformOrigin?.y].join(" "),...E.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Gw.jsx)(jOt,{scope:r,placedSide:O,onArrowChange:b,arrowX:D,arrowY:j,shouldHideArrow:$,children:(0,Gw.jsx)(Tn.div,{"data-side":O,"data-align":B,...m,ref:x,style:{...m.style,animation:R?void 0:"none"}})})})});pFe.displayName=vae;var mFe="PopperArrow",WOt={top:"bottom",right:"left",bottom:"top",left:"right"},hFe=tf.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,a=$Ot(mFe,n),i=WOt[a.placedSide];return(0,Gw.jsx)("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:(0,Gw.jsx)(aFe,{...o,ref:r,style:{...o.style,display:"block"}})})});hFe.displayName=mFe;function qOt(e){return e!==null}var GOt=e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,s=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=gFe(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2,h="",m="";return c==="bottom"?(h=i?d:`${f}px`,m=`${-l}px`):c==="top"?(h=i?d:`${f}px`,m=`${n.floating.height+l}px`):c==="right"?(h=`${-l}px`,m=i?d:`${p}px`):c==="left"&&(h=`${n.floating.width+l}px`,m=i?d:`${p}px`),{data:{x:h,y:m}}}});function gFe(e){let[t,r="center"]=e.split("-");return[t,r]}var vFe=uFe,yFe=fFe,xFe=pFe,bFe=hFe;var z$=A(xr(),1),wFe=A(aP(),1);var CFe=A(Ma(),1),XOt="Portal",T_=z$.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=z$.useState(!1);rc(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?wFe.default.createPortal((0,CFe.jsx)(Tn.div,{...n,ref:t}),i):null});T_.displayName=XOt;var rf=A(xr(),1);var SFe=A(xr(),1);function YOt(e,t){return SFe.useReducer((r,n)=>t[r][n]??r,e)}var fp=e=>{let{present:t,children:r}=e,n=QOt(t),o=typeof r=="function"?r({present:n.isPresent}):rf.Children.only(r),a=ea(n.ref,ZOt(o));return typeof r=="function"||n.isPresent?rf.cloneElement(o,{ref:a}):null};fp.displayName="Presence";function QOt(e){let[t,r]=rf.useState(),n=rf.useRef(null),o=rf.useRef(e),a=rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=YOt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return rf.useEffect(()=>{let c=H$(n.current);a.current=s==="mounted"?c:"none"},[s]),rc(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=H$(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),rc(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=H$(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=H$(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function H$(e){return e?.animationName||"none"}function ZOt(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var qi=A(xr(),1);var PFe=A(xr(),1);function IFe(e,t=globalThis?.document){let r=nc(e);PFe.useEffect(()=>{let n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xae=A(Ma(),1),JOt="DismissableLayer",yae="dismissableLayer.update",e2t="dismissableLayer.pointerDownOutside",t2t="dismissableLayer.focusOutside",kFe,NFe=qi.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gP=qi.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=qi.useContext(NFe),[u,d]=qi.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=qi.useState({}),h=ea(t,S=>d(S)),m=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(v),y=u?m.indexOf(u):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=g,b=o2t(S=>{let P=S.target,T=[...c.branches].some(L=>L.contains(P));!w||T||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=a2t(S=>{let P=S.target;[...c.branches].some(L=>L.contains(P))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return IFe(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),qi.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kFe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),RFe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=kFe)}},[u,f,r,c]),qi.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),RFe())},[u,c]),qi.useEffect(()=>{let S=()=>p({});return document.addEventListener(yae,S),()=>document.removeEventListener(yae,S)},[]),(0,xae.jsx)(Tn.div,{...l,ref:h,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:xn(e.onFocusCapture,C.onFocusCapture),onBlurCapture:xn(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:xn(e.onPointerDownCapture,b.onPointerDownCapture)})});gP.displayName=JOt;var r2t="DismissableLayerBranch",n2t=qi.forwardRef((e,t)=>{let r=qi.useContext(NFe),n=qi.useRef(null),o=ea(t,n);return qi.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,xae.jsx)(Tn.div,{...e,ref:o})});n2t.displayName=r2t;function o2t(e,t=globalThis?.document){let r=nc(e),n=qi.useRef(!1),o=qi.useRef(()=>{});return qi.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){TFe(e2t,r,u,{discrete:!0})};var l=c;let u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function a2t(e,t=globalThis?.document){let r=nc(e),n=qi.useRef(!1);return qi.useEffect(()=>{let o=a=>{a.target&&!n.current&&TFe(t2t,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function RFe(){let e=new CustomEvent(yae);document.dispatchEvent(e)}function TFe(e,t,r,{discrete:n}){let o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?g_(o,a):o.dispatchEvent(a)}var pp=A(Ma(),1),bae,W$="HoverCard",[MFe,pcn]=Zd(W$,[gae]),q$=gae(),[i2t,G$]=MFe(W$),EFe=e=>{let{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=q$(t),c=us.useRef(0),u=us.useRef(0),d=us.useRef(!1),f=us.useRef(!1),[p,h]=Yx({prop:n,defaultProp:o??!1,onChange:a,caller:W$}),m=us.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>h(!0),i)},[i,h]),v=us.useCallback(()=>{clearTimeout(c.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>h(!1),s))},[s,h]),g=us.useCallback(()=>h(!1),[h]);return us.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,pp.jsx)(i2t,{scope:t,open:p,onOpenChange:h,onOpen:m,onClose:v,onDismiss:g,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,pp.jsx)(vFe,{...l,children:r})})};EFe.displayName=W$;var AFe="HoverCardTrigger",LFe=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=G$(AFe,r),a=q$(r);return(0,pp.jsx)(yFe,{asChild:!0,...a,children:(0,pp.jsx)(Tn.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:xn(e.onPointerEnter,$$(o.onOpen)),onPointerLeave:xn(e.onPointerLeave,$$(o.onClose)),onFocus:xn(e.onFocus,o.onOpen),onBlur:xn(e.onBlur,o.onClose),onTouchStart:xn(e.onTouchStart,i=>i.preventDefault())})})});LFe.displayName=AFe;var wae="HoverCardPortal",[s2t,l2t]=MFe(wae,{forceMount:void 0}),c2t=e=>{let{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,a=G$(wae,t);return(0,pp.jsx)(s2t,{scope:t,forceMount:r,children:(0,pp.jsx)(fp,{present:r||a.open,children:(0,pp.jsx)(T_,{asChild:!0,container:o,children:n})})})};c2t.displayName=wae;var j$="HoverCardContent",DFe=us.forwardRef((e,t)=>{let r=l2t(j$,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,a=G$(j$,e.__scopeHoverCard);return(0,pp.jsx)(fp,{present:n||a.open,children:(0,pp.jsx)(u2t,{"data-state":a.open?"open":"closed",...o,onPointerEnter:xn(e.onPointerEnter,$$(a.onOpen)),onPointerLeave:xn(e.onPointerLeave,$$(a.onClose)),ref:t})})});DFe.displayName=j$;var u2t=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=G$(j$,r),c=q$(r),u=us.useRef(null),d=ea(t,u),[f,p]=us.useState(!1);return us.useEffect(()=>{if(f){let h=document.body;return bae=h.style.userSelect||h.style.webkitUserSelect,h.style.userSelect="none",h.style.webkitUserSelect="none",()=>{h.style.userSelect=bae,h.style.webkitUserSelect=bae}}},[f]),us.useEffect(()=>{if(u.current){let h=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",h),()=>{document.removeEventListener("pointerup",h),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),us.useEffect(()=>{u.current&&p2t(u.current).forEach(m=>m.setAttribute("tabindex","-1"))}),(0,pp.jsx)(gP,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:xn(a,h=>{h.preventDefault()}),onDismiss:l.onDismiss,children:(0,pp.jsx)(xFe,{...c,...s,onPointerDown:xn(s.onPointerDown,h=>{h.currentTarget.contains(h.target)&&p(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),d2t="HoverCardArrow",f2t=us.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=q$(r);return(0,pp.jsx)(bFe,{...o,...n,ref:t})});f2t.displayName=d2t;function $$(e){return t=>t.pointerType==="touch"?void 0:e()}function p2t(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}var OFe=EFe,_Fe=LFe;var Cae=DFe;var BFe=A(de(),1),M_=OFe,E_=_Fe,xT=FFe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,BFe.jsx)(Cae,{ref:o,align:t,sideOffset:r,className:F("z-[99999] w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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}));xT.displayName=Cae.displayName;var xP=A(ue(),1);var vr=A(xr(),1),XFe=A(aP(),1);var K$=A(xr(),1),h2t=A(Ma(),1),g2t=K$.createContext(void 0);function VFe(e){let t=K$.useContext(g2t);return e||t||"ltr"}var Sae=A(xr(),1);var v2t=Sae[" useId ".trim().toString()]||(()=>{}),y2t=0;function vP(e){let[t,r]=Sae.useState(v2t());return rc(()=>{e||r(n=>n??String(y2t++))},[e]),e||(t?`radix-${t}`:"")}var Kw=A(xr(),1);var X$=A(Ma(),1),x2t=A(xr(),1);var w2t=A(Ma(),1);function Iae(e){let t=e+"CollectionProvider",[r,n]=Zd(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=Kw.default.useRef(null),x=Kw.default.useRef(new Map).current;return(0,X$.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=iP(s),c=Kw.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=ea(v,x.collectionRef);return(0,X$.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=iP(u),p=Kw.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=Kw.default.useRef(null),b=ea(v,w),C=a(u,g);return Kw.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,X$.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return Kw.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var UFe=new WeakMap,Zs,lg,Ccn=(lg=class extends Map{constructor(r){super(r);rR(this,Zs,void 0);tx(this,Zs,[...super.keys()]),UFe.set(this,!0)}set(r,n){return UFe.get(this)&&(this.has(r)?Or(this,Zs)[Or(this,Zs).indexOf(r)]=r:Or(this,Zs).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,Zs).length,s=zFe(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,Zs)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new lg(this);return a.insert(r,n,o),a}before(r){let n=Or(this,Zs).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,Zs).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,Zs).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,Zs).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,Zs,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,Zs).splice(Or(this,Zs).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Pae(Or(this,Zs),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Pae(Or(this,Zs),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,Zs).indexOf(r)}keyAt(r){return Pae(Or(this,Zs),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new lg(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new lg(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new lg(n)}toReversed(){let r=new lg;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new lg(n)}slice(r,n){let o=new lg,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},Zs=new WeakMap,lg);function Pae(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=b2t(e,t);return r===-1?void 0:e[r]}function b2t(e,t){let r=e.length,n=zFe(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function zFe(e){return e!==e||e===0?0:Math.trunc(e)}var Y$=A(xr(),1);function HFe(e){let t=Y$.useRef({value:e,previous:e});return Y$.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var jFe=A(xr(),1);var $Fe=A(Ma(),1),C2t=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),S2t="VisuallyHidden",WFe=jFe.forwardRef((e,t)=>(0,$Fe.jsx)(Tn.span,{...e,ref:t,style:{...C2t,...e.style}}));WFe.displayName=S2t;var qFe=WFe;var Kr=A(Ma(),1),yP="NavigationMenu",[Eae,YFe,I2t]=Iae(yP),[kae,k2t,R2t]=Iae(yP),[Aae,Ucn]=Zd(yP,[I2t,R2t]),[N2t,Em]=Aae(yP),[T2t,M2t]=Aae(yP),QFe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,delayDuration:i=200,skipDelayDuration:s=300,orientation:l="horizontal",dir:c,...u}=e,[d,f]=vr.useState(null),p=ea(t,T=>f(T)),h=VFe(c),m=vr.useRef(0),v=vr.useRef(0),g=vr.useRef(0),[y,x]=vr.useState(!0),[w,b]=Yx({prop:n,onChange:T=>{let L=T!=="",M=s>0;L?(window.clearTimeout(g.current),M&&x(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(!0),s)),o?.(T)},defaultProp:a??"",caller:yP}),C=vr.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(""),150)},[b]),S=vr.useCallback(T=>{window.clearTimeout(v.current),b(T)},[b]),P=vr.useCallback(T=>{w===T?window.clearTimeout(v.current):m.current=window.setTimeout(()=>{window.clearTimeout(v.current),b(T)},i)},[w,b,i]);return vr.useEffect(()=>()=>{window.clearTimeout(m.current),window.clearTimeout(v.current),window.clearTimeout(g.current)},[]),(0,Kr.jsx)(ZFe,{scope:r,isRootMenu:!0,value:w,dir:h,orientation:l,rootNavigationMenu:d,onTriggerEnter:T=>{window.clearTimeout(m.current),y?P(T):S(T)},onTriggerLeave:()=>{window.clearTimeout(m.current),C()},onContentEnter:()=>window.clearTimeout(v.current),onContentLeave:C,onItemSelect:T=>{b(L=>L===T?"":T)},onItemDismiss:()=>b(""),children:(0,Kr.jsx)(Tn.nav,{"aria-label":"Main","data-orientation":l,dir:h,...u,ref:p})})});QFe.displayName=yP;var Rae="NavigationMenuSub",E2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",...s}=e,l=Em(Rae,r),[c,u]=Yx({prop:n,onChange:o,defaultProp:a??"",caller:Rae});return(0,Kr.jsx)(ZFe,{scope:r,isRootMenu:!1,value:c,dir:l.dir,orientation:i,rootNavigationMenu:l.rootNavigationMenu,onTriggerEnter:d=>u(d),onItemSelect:d=>u(d),onItemDismiss:()=>u(""),children:(0,Kr.jsx)(Tn.div,{"data-orientation":i,...s,ref:t})})});E2t.displayName=Rae;var ZFe=e=>{let{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:o,orientation:a,children:i,value:s,onItemSelect:l,onItemDismiss:c,onTriggerEnter:u,onTriggerLeave:d,onContentEnter:f,onContentLeave:p}=e,[h,m]=vr.useState(null),[v,g]=vr.useState(new Map),[y,x]=vr.useState(null);return(0,Kr.jsx)(N2t,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:HFe(s),baseId:vP(),dir:o,orientation:a,viewport:h,onViewportChange:m,indicatorTrack:y,onIndicatorTrackChange:x,onTriggerEnter:nc(u),onTriggerLeave:nc(d),onContentEnter:nc(f),onContentLeave:nc(p),onItemSelect:nc(l),onItemDismiss:nc(c),onViewportContentChange:vr.useCallback((w,b)=>{g(C=>(C.set(w,b),new Map(C)))},[]),onViewportContentRemove:vr.useCallback(w=>{g(b=>b.has(w)?(b.delete(w),new Map(b)):b)},[]),children:(0,Kr.jsx)(Eae.Provider,{scope:t,children:(0,Kr.jsx)(T2t,{scope:t,items:v,children:i})})})},JFe="NavigationMenuList",eBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(JFe,r),a=(0,Kr.jsx)(Tn.ul,{"data-orientation":o.orientation,...n,ref:t});return(0,Kr.jsx)(Tn.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,Kr.jsx)(Eae.Slot,{scope:r,children:o.isRootMenu?(0,Kr.jsx)(uBe,{asChild:!0,children:a}):a})})});eBe.displayName=JFe;var tBe="NavigationMenuItem",[A2t,rBe]=Aae(tBe),nBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,...o}=e,a=vP(),i=n||a||"LEGACY_REACT_AUTO_VALUE",s=vr.useRef(null),l=vr.useRef(null),c=vr.useRef(null),u=vr.useRef(()=>{}),d=vr.useRef(!1),f=vr.useCallback((h="start")=>{if(s.current){u.current();let m=Tae(s.current);m.length&&Oae(h==="start"?m:m.reverse())}},[]),p=vr.useCallback(()=>{if(s.current){let h=Tae(s.current);h.length&&(u.current=V2t(h))}},[]);return(0,Kr.jsx)(A2t,{scope:r,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,Kr.jsx)(Tn.li,{...o,ref:t})})});nBe.displayName=tBe;var Nae="NavigationMenuTrigger",oBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,disabled:n,...o}=e,a=Em(Nae,e.__scopeNavigationMenu),i=rBe(Nae,e.__scopeNavigationMenu),s=vr.useRef(null),l=ea(s,i.triggerRef,t),c=fBe(a.baseId,i.value),u=pBe(a.baseId,i.value),d=vr.useRef(!1),f=vr.useRef(!1),p=i.value===a.value;return(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)(Eae.ItemSlot,{scope:r,value:i.value,children:(0,Kr.jsx)(dBe,{asChild:!0,children:(0,Kr.jsx)(Tn.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":_ae(p),"aria-expanded":p,"aria-controls":u,...o,ref:l,onPointerEnter:xn(e.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:xn(e.onPointerMove,Z$(()=>{n||f.current||i.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:xn(e.onPointerLeave,Z$(()=>{n||(a.onTriggerLeave(),d.current=!1)})),onClick:xn(e.onClick,()=>{a.onItemSelect(i.value),f.current=p}),onKeyDown:xn(e.onKeyDown,h=>{let v={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&h.key===v&&(i.onEntryKeyDown(),h.preventDefault())})})})}),p&&(0,Kr.jsxs)(Kr.Fragment,{children:[(0,Kr.jsx)(qFe,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:h=>{let m=i.contentRef.current,v=h.relatedTarget,g=v===s.current,y=m?.contains(v);(g||!y)&&i.onFocusProxyEnter(g?"start":"end")}}),a.viewport&&(0,Kr.jsx)("span",{"aria-owns":u})]})]})});oBe.displayName=Nae;var L2t="NavigationMenuLink",GFe="navigationMenu.linkSelect",aBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,active:n,onSelect:o,...a}=e;return(0,Kr.jsx)(dBe,{asChild:!0,children:(0,Kr.jsx)(Tn.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...a,ref:t,onClick:xn(e.onClick,i=>{let s=i.target,l=new CustomEvent(GFe,{bubbles:!0,cancelable:!0});if(s.addEventListener(GFe,c=>o?.(c),{once:!0}),g_(s,l),!l.defaultPrevented&&!i.metaKey){let c=new CustomEvent(Q$,{bubbles:!0,cancelable:!0});g_(s,c)}},{checkForDefaultPrevented:!1})})})});aBe.displayName=L2t;var Lae="NavigationMenuIndicator",iBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Em(Lae,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?XFe.default.createPortal((0,Kr.jsx)(fp,{present:r||a,children:(0,Kr.jsx)(D2t,{...n,ref:t})}),o.indicatorTrack):null});iBe.displayName=Lae;var D2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(Lae,r),a=YFe(r),[i,s]=vr.useState(null),[l,c]=vr.useState(null),u=o.orientation==="horizontal",d=!!o.value;vr.useEffect(()=>{let h=a().find(m=>m.value===o.value)?.ref.current;h&&s(h)},[a,o.value]);let f=()=>{i&&c({size:u?i.offsetWidth:i.offsetHeight,offset:u?i.offsetLeft:i.offsetTop})};return Mae(i,f),Mae(o.indicatorTrack,f),l?(0,Kr.jsx)(Tn.div,{"aria-hidden":!0,"data-state":d?"visible":"hidden","data-orientation":o.orientation,...n,ref:t,style:{position:"absolute",...u?{left:0,width:l.size+"px",transform:`translateX(${l.offset}px)`}:{top:0,height:l.size+"px",transform:`translateY(${l.offset}px)`},...n.style}}):null}),bT="NavigationMenuContent",sBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=Em(bT,e.__scopeNavigationMenu),a=rBe(bT,e.__scopeNavigationMenu),i=ea(a.contentRef,t),s=a.value===o.value,l={value:a.value,triggerRef:a.triggerRef,focusProxyRef:a.focusProxyRef,wasEscapeCloseRef:a.wasEscapeCloseRef,onContentFocusOutside:a.onContentFocusOutside,onRootContentClose:a.onRootContentClose,...n};return o.viewport?(0,Kr.jsx)(O2t,{forceMount:r,...l,ref:i}):(0,Kr.jsx)(fp,{present:r||s,children:(0,Kr.jsx)(lBe,{"data-state":_ae(s),...l,ref:i,onPointerEnter:xn(e.onPointerEnter,o.onContentEnter),onPointerLeave:xn(e.onPointerLeave,Z$(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})})});sBe.displayName=bT;var O2t=vr.forwardRef((e,t)=>{let r=Em(bT,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return rc(()=>{n(e.value,{ref:t,...e})},[e,t,n]),rc(()=>()=>o(e.value),[e.value,o]),null}),Q$="navigationMenu.rootContentDismiss",lBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,u=Em(bT,r),d=vr.useRef(null),f=ea(d,t),p=fBe(u.baseId,n),h=pBe(u.baseId,n),m=YFe(r),v=vr.useRef(null),{onItemDismiss:g}=u;vr.useEffect(()=>{let x=d.current;if(u.isRootMenu&&x){let w=()=>{g(),s(),x.contains(document.activeElement)&&o.current?.focus()};return x.addEventListener(Q$,w),()=>x.removeEventListener(Q$,w)}},[u.isRootMenu,e.value,o,g,s]);let y=vr.useMemo(()=>{let w=m().map(L=>L.value);u.dir==="rtl"&&w.reverse();let b=w.indexOf(u.value),C=w.indexOf(u.previousValue),S=n===u.value,P=C===w.indexOf(n);if(!S&&!P)return v.current;let T=(()=>{if(b!==C){if(S&&C!==-1)return b>C?"from-end":"from-start";if(P&&b!==-1)return b>C?"to-start":"to-end"}return null})();return v.current=T,T},[u.previousValue,u.value,u.dir,m,n]);return(0,Kr.jsx)(uBe,{asChild:!0,children:(0,Kr.jsx)(gP,{id:h,"aria-labelledby":p,"data-motion":y,"data-orientation":u.orientation,...c,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let x=new Event(Q$,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(x)},onFocusOutside:xn(e.onFocusOutside,x=>{l();let w=x.target;u.rootNavigationMenu?.contains(w)&&x.preventDefault()}),onPointerDownOutside:xn(e.onPointerDownOutside,x=>{let w=x.target,b=m().some(S=>S.ref.current?.contains(w)),C=u.isRootMenu&&u.viewport?.contains(w);(b||C||!u.isRootMenu)&&x.preventDefault()}),onKeyDown:xn(e.onKeyDown,x=>{let w=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!w){let C=Tae(x.currentTarget),S=document.activeElement,P=C.findIndex(M=>M===S),L=x.shiftKey?C.slice(0,P).reverse():C.slice(P+1,C.length);Oae(L)?x.preventDefault():a.current?.focus()}}),onEscapeKeyDown:xn(e.onEscapeKeyDown,x=>{i.current=!0})})})}),Dae="NavigationMenuViewport",cBe=vr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=!!Em(Dae,e.__scopeNavigationMenu).value;return(0,Kr.jsx)(fp,{present:r||a,children:(0,Kr.jsx)(_2t,{...n,ref:t})})});cBe.displayName=Dae;var _2t=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,children:n,...o}=e,a=Em(Dae,r),i=ea(t,a.onViewportChange),s=M2t(bT,e.__scopeNavigationMenu),[l,c]=vr.useState(null),[u,d]=vr.useState(null),f=l?l?.width+"px":void 0,p=l?l?.height+"px":void 0,h=!!a.value,m=h?a.value:a.previousValue;return Mae(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,Kr.jsx)(Tn.div,{"data-state":_ae(h),"data-orientation":a.orientation,...o,ref:i,style:{pointerEvents:!h&&a.isRootMenu?"none":void 0,["--radix-navigation-menu-viewport-width"]:f,["--radix-navigation-menu-viewport-height"]:p,...o.style},onPointerEnter:xn(e.onPointerEnter,a.onContentEnter),onPointerLeave:xn(e.onPointerLeave,Z$(a.onContentLeave)),children:Array.from(s.items).map(([g,{ref:y,forceMount:x,...w}])=>{let b=m===g;return(0,Kr.jsx)(fp,{present:x||b,children:(0,Kr.jsx)(lBe,{...w,ref:h_(y,C=>{b&&C&&d(C)})})},g)})})}),F2t="FocusGroup",uBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Em(F2t,r);return(0,Kr.jsx)(kae.Provider,{scope:r,children:(0,Kr.jsx)(kae.Slot,{scope:r,children:(0,Kr.jsx)(Tn.div,{dir:o.dir,...n,ref:t})})})}),KFe=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],B2t="FocusGroupItem",dBe=vr.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=k2t(r),a=Em(B2t,r);return(0,Kr.jsx)(kae.ItemSlot,{scope:r,children:(0,Kr.jsx)(Tn.button,{...n,ref:t,onKeyDown:xn(e.onKeyDown,i=>{if(["Home","End",...KFe].includes(i.key)){let l=o().map(d=>d.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),KFe.includes(i.key)){let d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>Oae(l)),i.preventDefault()}})})})});function Tae(e){let t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{let o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Oae(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function V2t(e){return e.forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")}),()=>{e.forEach(t=>{let r=t.dataset.tabindex;t.setAttribute("tabindex",r)})}}function Mae(e,t){let r=nc(t);rc(()=>{let n=0;if(e){let o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}function _ae(e){return e?"open":"closed"}function fBe(e,t){return`${e}-trigger-${t}`}function pBe(e,t){return`${e}-content-${t}`}function Z$(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Fae=QFe;var Bae=eBe,mBe=nBe,Vae=oBe,hBe=aBe,Uae=iBe,zae=sBe,Hae=cBe;var Am=A(de(),1),A_=xP.forwardRef(({className:e,children:t,...r},n)=>(0,Am.jsxs)(Fae,{ref:n,className:F("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,(0,Am.jsx)(J$,{})]}));A_.displayName=Fae.displayName;var L_=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(Bae,{ref:r,className:F("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));L_.displayName=Bae.displayName;var D_=mBe,O_=xt("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),__=xP.forwardRef(({className:e,children:t,...r},n)=>(0,Am.jsxs)(Vae,{ref:n,className:F(O_(),"group",e),...r,children:[t," ",(0,Am.jsx)(ca,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));__.displayName=Vae.displayName;var F_=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(zae,{ref:r,className:F("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",e),...t}));F_.displayName=zae.displayName;var B_=hBe,J$=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)("div",{className:F("absolute left-0 top-full flex justify-center"),children:(0,Am.jsx)(Hae,{className:F("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",e),ref:r,...t})}));J$.displayName=Hae.displayName;var jae=xP.forwardRef(({className:e,...t},r)=>(0,Am.jsx)(Uae,{ref:r,className:F("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",e),...t,children:(0,Am.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));jae.displayName=Uae.displayName;var Js=A(ue(),1);Ur();var Ns=A(de(),1),$ae=xt("fixed bg-background shadow-2xl overflow-hidden",{variants:{position:{bottom:"bottom-0 left-0 right-0 rounded-t-[20px] max-h-[95vh]",top:"top-0 left-0 right-0 rounded-b-[20px] max-h-[95vh]",left:"left-0 top-0 bottom-0 rounded-r-[20px] max-w-[90vw]",right:"right-0 top-0 bottom-0 rounded-l-[20px] max-w-[90vw]"},size:{default:"",sm:"",md:"",lg:"",full:""}},compoundVariants:[{position:["bottom","top"],size:"sm",class:"h-[30vh]"},{position:["bottom","top"],size:"md",class:"h-[50vh]"},{position:["bottom","top"],size:"lg",class:"h-[70vh]"},{position:["bottom","top"],size:"full",class:"h-[95vh]"},{position:["left","right"],size:"sm",class:"w-[280px]"},{position:["left","right"],size:"md",class:"w-[380px]"},{position:["left","right"],size:"lg",class:"w-[480px]"},{position:["left","right"],size:"full",class:"w-[90vw]"}],defaultVariants:{position:"bottom",size:"default"}}),z2t=xt("absolute bg-muted-foreground/20 transition-all duration-200",{variants:{position:{bottom:"top-2 left-1/2 -translate-x-1/2 w-12 h-1 rounded-full",top:"bottom-2 left-1/2 -translate-x-1/2 w-12 h-1 rounded-full",left:"right-2 top-1/2 -translate-y-1/2 w-1 h-12 rounded-full",right:"left-2 top-1/2 -translate-y-1/2 w-1 h-12 rounded-full"}},defaultVariants:{position:"bottom"}}),H2t=e=>{(0,Js.useEffect)(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},j2t=(e,t,r,n,o)=>{let a=Math.abs(e)/o*100;if(Math.abs(t)>500){if((n==="up"||n==="left")&&t<0){let i=r.filter(s=>s>a);return i.length>0?i[0]:r[r.length-1]}else if((n==="down"||n==="right")&&t>0){let i=r.filter(s=>s<a);return i.length>0?i[i.length-1]:0}}return r.reduce((i,s)=>Math.abs(s-a)<Math.abs(i-a)?s:i)},gBe=Js.default.forwardRef(({isOpen:e,onOpenChange:t,children:r,position:n="bottom",size:o="default",snapPoints:a=o==="default"?[25,50,75,100]:[],defaultSnapPoint:i,enableSwipeToClose:s=!0,closeThreshold:l=20,closeVelocity:c=500,dragElastic:u=.2,showHandle:d=!0,handleClassName:f,showCloseButton:p=!1,closeButtonClassName:h,showBackdrop:m=!0,backdropClassName:v,backdropBlur:g=!0,closeOnBackdropClick:y=!0,animationDuration:x=.5,springConfig:w={stiffness:300,damping:30,mass:1},preventBodyScroll:b=!0,autoHeight:C=!1,nestedScrolling:S=!0,onSnapPointChange:P,className:T,asChild:L=!1,isProComponent:M=!0,...N},V)=>{let _=n==="bottom"||n==="top",I=Nj(),k=Nj(),R=Xa(0),E=Xa(0),O=_?E:R,[B,U]=(0,Js.useState)(i||(a.length>0?a[0]:50)),[D,j]=(0,Js.useState)(!1),$=(0,Js.useRef)(null),[z,q]=(0,Js.useState)(null);H2t(e&&b);let H=(0,Js.useMemo)(()=>typeof window>"u"?1e3:_?window.innerHeight:window.innerWidth,[_]),K=(0,Js.useCallback)(_e=>0,[n,H]),G=e?.5:0,J=(0,Js.useCallback)((_e,he)=>{j(!1);let Ne=_?he.offset.y:he.offset.x,ve=_?he.velocity.y:he.velocity.x;if(s&&(n==="bottom"&&Ne>l&&ve>-c||n==="top"&&Ne<-l&&ve<c||n==="right"&&Ne>l&&ve>-c||n==="left"&&Ne<-l&&ve<c)){t(!1);return}if(a.length>0){let Y=n==="bottom"?"down":n==="top"?"up":n==="left"?"left":"right",Q=j2t(Math.abs(O.get()),ve,a,Y,H);U(Q),P?.(Q),fa(O,K(Q),{type:"spring",...w})}else fa(O,K(B),{type:"spring",...w})},[_,n,s,l,c,a,O,H,K,B,w,t,P]),ae=(0,Js.useCallback)((_e,he)=>{j(!0)},[]);(0,Js.useEffect)(()=>{if(!C||!$.current||!e)return;let _e=new ResizeObserver(he=>{for(let Ne of he)q(Ne.contentRect.height)});return _e.observe($.current),()=>{_e.disconnect()}},[C,e]),(0,Js.useEffect)(()=>{e?fa(O,0,{type:"spring",...w}):fa(O,0,{type:"spring",...w})},[e,O,w]),(0,Js.useEffect)(()=>{if(!e)return;let _e=he=>{he.key==="Escape"&&s&&t(!1)};return document.addEventListener("keydown",_e),()=>document.removeEventListener("keydown",_e)},[e,s,t]);let Z=()=>({x:0,y:0}),Pe=()=>{switch(n){case"bottom":return{top:-200,bottom:100};case"top":return{top:-100,bottom:200};case"right":return{left:-200,right:100};case"left":return{left:-100,right:200};default:return{}}};return e?(0,Ns.jsxs)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:x},className:"fixed inset-0 z-50",style:{pointerEvents:D?"none":"auto"},children:[m&&(0,Ns.jsx)(ne.div,{className:F("absolute inset-0 bg-black/50",g&&"backdrop-blur-sm",v),style:{opacity:G},onClick:y?()=>t(!1):void 0}),(0,Ns.jsxs)(ne.div,{ref:V,drag:s?_?"y":"x":!1,dragConstraints:Pe(),dragElastic:u,onDragStart:ae,onDragEnd:J,initial:Z(),style:{...D?{[_?"y":"x"]:O}:{},...C&&z&&_?{height:`${Math.min(z+60,H*.95)}px`}:{}},className:F($ae({position:n,size:o}),"will-change-transform",T),...N,children:[d&&(0,Ns.jsx)("div",{className:F(z2t({position:n}),"cursor-grab active:cursor-grabbing",D&&"bg-muted-foreground/40 scale-x-150",f)}),p&&(0,Ns.jsx)("button",{onClick:()=>t(!1),className:F("absolute z-50 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm","hover:bg-background transition-colors",n==="bottom"&&"top-3 right-3",n==="top"&&"bottom-3 right-3",n==="left"&&"top-3 right-3",n==="right"&&"top-3 left-3",h),"aria-label":"Close drawer",children:(0,Ns.jsx)(lr,{className:"h-4 w-4"})}),(0,Ns.jsx)("div",{ref:$,className:F("h-full overflow-auto overscroll-contain",S&&"touch-pan-y",d&&n==="bottom"&&"pt-2",d&&n==="top"&&"pb-2"),style:{touchAction:S?"pan-y":"none"},children:r})]})]}):null});gBe.displayName="MoonUIGestureDrawerProComponent";var eW=Js.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Ns.jsx)($e,{className:"w-fit mx-auto",children:(0,Ns.jsx)(We,{className:"py-6 text-center",children:(0,Ns.jsxs)("div",{className:"space-y-4",children:[(0,Ns.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ns.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ns.jsxs)("div",{children:[(0,Ns.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ns.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Gesture Drawer is available exclusively to MoonUI Pro subscribers."}),(0,Ns.jsx)("a",{href:"/pricing",children:(0,Ns.jsxs)(oe,{size:"sm",children:[(0,Ns.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ns.jsx)(gBe,{...e,ref:t})});eW.displayName="MoonUIGestureDrawerPro";var vBe=eW;var ta=A(ue(),1);Ur();var ur=A(de(),1),$2t=xt("fixed inset-0 z-50 flex items-center justify-center",{variants:{backdrop:{dark:"bg-black/95",blur:"bg-black/90 backdrop-blur-md",light:"bg-white/90",gradient:"bg-gradient-to-b from-black/95 to-black/80"}},defaultVariants:{backdrop:"blur"}}),yBe=ta.createContext(void 0);function xBe(){let e=ta.useContext(yBe);if(!e)throw new Error("useLightbox must be used within a LightboxProvider");return e}function wT({children:e,items:t=[],defaultIndex:r=0}){let{hasProAccess:n,isLoading:o}=st(),[a,i]=ta.useState(r),[s,l]=ta.useState(!1),[c,u]=ta.useState(1),d=ta.useMemo(()=>({items:t,currentIndex:a,setCurrentIndex:i,isOpen:s,setIsOpen:l,zoom:c,setZoom:u}),[t,a,s,c]);return!o&&!n?(0,ur.jsx)(Rn,{componentName:"Lightbox",compact:!0}):(0,ur.jsx)(yBe.Provider,{value:d,children:e})}var bP=ta.forwardRef(({index:e=0,asChild:t,children:r,onClick:n,...o},a)=>{let{setCurrentIndex:i,setIsOpen:s,setZoom:l}=xBe(),c=v=>{i(e),s(!0),l(1),n?.(v)};if(t){let v=r,{onDrag:g,onDragStart:y,onDragEnd:x,onDragOver:w,onDrop:b,...C}=o;return ta.cloneElement(v,{...v.props,...C,onClick:c})}let{onDrag:u,onDragStart:d,onDragEnd:f,onDragOver:p,onDrop:h,...m}=o;return(0,ur.jsx)("div",{ref:a,onClick:c,className:"cursor-pointer",...m,children:r})});bP.displayName="LightboxTrigger";var wP=ta.forwardRef(({className:e,backdrop:t,showNavigation:r=!0,showZoomControls:n=!0,showDownload:o=!0,showFullscreen:a=!0,showThumbnails:i=!1,enableKeyboardNavigation:s=!0,enableSwipeGestures:l=!0,animationDuration:c=300,autoPlayVideo:u=!1,onClose:d,...f},p)=>{let{onDrag:h,onDragStart:m,onDragEnd:v,onDragOver:g,onDrop:y,onAnimationStart:x,onAnimationEnd:w,onAnimationIteration:b,...C}=f,{items:S,currentIndex:P,setCurrentIndex:T,isOpen:L,setIsOpen:M,zoom:N,setZoom:V}=xBe(),[_,I]=ta.useState(!0),[k,R]=ta.useState(!1),[E,O]=ta.useState(!0),[B,U]=ta.useState(!1),[D,j]=ta.useState({x:0,y:0}),[$,z]=ta.useState(!1),q=ta.useRef(null),H=ta.useRef(null),K=S[P];ta.useEffect(()=>{K?.type==="video"&&u?(R(!0),O(!0)):R(!1)},[P,K,u]),ta.useEffect(()=>{if(!s||!L)return;let Oe=Y=>{switch(Y.key){case"ArrowLeft":J();break;case"ArrowRight":ae();break;case"Escape":G();break;case"+":case"=":Z();break;case"-":Pe();break;case" ":K?.type==="video"&&(Y.preventDefault(),R(!k));break}};return window.addEventListener("keydown",Oe),()=>window.removeEventListener("keydown",Oe)},[L,P,k,s]),ta.useEffect(()=>{H.current&&K?.type==="video"&&(k?H.current.play().catch(Oe=>{console.error("Video play error:",Oe),R(!1)}):H.current.pause())},[k,K]);let G=()=>{M(!1),V(1),j({x:0,y:0}),d?.()},J=()=>{T(P>0?P-1:S.length-1),V(1),j({x:0,y:0}),I(!0)},ae=()=>{T(P<S.length-1?P+1:0),V(1),j({x:0,y:0}),I(!0)},Z=()=>{V(Math.min(N+.5,3))},Pe=()=>{V(Math.max(N-.5,.5)),N-.5<=1&&j({x:0,y:0})},be=()=>{if(K){let Oe=document.createElement("a");Oe.href=K.src,Oe.download=K.alt||"download",Oe.click()}},_e=()=>{B?document.exitFullscreen():q.current?.requestFullscreen(),U(!B)},he=Oe=>{N>1&&z(!0)},Ne=Oe=>{$&&N>1&&j({x:D.x+Oe.movementX,y:D.y+Oe.movementY})},ve=()=>{z(!1)};return K?(0,ur.jsx)(Iw,{open:L,onOpenChange:M,children:(0,ur.jsx)(Ft,{children:L&&(0,ur.jsx)(kw,{forceMount:!0,children:(0,ur.jsx)(Mv,{asChild:!0,children:(0,ur.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c/1e3},className:F($2t({backdrop:t}),e),ref:p,onClick:Oe=>{Oe.target===Oe.currentTarget&&G()},...C,children:(0,ur.jsxs)("div",{ref:q,className:"relative w-full h-full flex items-center justify-center pointer-events-none",onMouseMove:Ne,onMouseUp:ve,onMouseLeave:ve,children:[(0,ur.jsx)("div",{className:"absolute inset-0 pointer-events-auto",onClick:G}),(0,ur.jsx)("button",{onClick:G,className:"absolute top-4 right-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(lr,{className:"h-5 w-5"})}),r&&S.length>1&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:J,className:"absolute left-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(gi,{className:"h-5 w-5"})}),(0,ur.jsx)("button",{onClick:ae,className:"absolute right-4 z-50 p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors pointer-events-auto",children:(0,ur.jsx)(Jn,{className:"h-5 w-5"})})]}),(0,ur.jsxs)("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 pointer-events-auto",children:[n&&K.type==="image"&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:Pe,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(rp,{className:"h-4 w-4"})}),(0,ur.jsxs)("span",{className:"px-3 py-1 rounded-full bg-black/50 text-white text-sm",children:[Math.round(N*100),"%"]}),(0,ur.jsx)("button",{onClick:Z,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(tp,{className:"h-4 w-4"})})]}),K.type==="video"&&(0,ur.jsxs)(ur.Fragment,{children:[(0,ur.jsx)("button",{onClick:()=>{R(!k),!k&&H.current&&H.current.play().catch(Oe=>{console.error("Play failed:",Oe)})},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:k?(0,ur.jsx)(Yb,{className:"h-4 w-4"}):(0,ur.jsx)(Hh,{className:"h-4 w-4"})}),(0,ur.jsx)("button",{onClick:()=>{O(!E),H.current&&(H.current.muted=!E)},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:E?(0,ur.jsx)(o2,{className:"h-4 w-4"}):(0,ur.jsx)(n2,{className:"h-4 w-4"})})]}),o&&(0,ur.jsx)("button",{onClick:be,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(Pn,{className:"h-4 w-4"})}),a&&(0,ur.jsx)("button",{onClick:_e,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,ur.jsx)(Ic,{className:"h-4 w-4"})})]}),(0,ur.jsxs)(ne.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{duration:c/1e3},className:"relative flex items-center justify-center pointer-events-auto",style:{transform:`scale(${N}) translate(${D.x/N}px, ${D.y/N}px)`,cursor:N>1?$?"grabbing":"grab":"auto"},onMouseDown:he,children:[_&&(0,ur.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,ur.jsx)(Mr,{className:"h-8 w-8 animate-spin text-white"})}),K.type==="image"?(0,ur.jsx)("img",{src:K.src,alt:K.alt,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto object-contain select-none",onLoad:()=>I(!1),draggable:!1}):(0,ur.jsx)("video",{ref:H,src:K.src,poster:K.poster,muted:E,controls:!0,autoPlay:u&&k,playsInline:!0,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto",onLoadedData:()=>{I(!1),u&&k&&H.current&&H.current.play().catch(Oe=>{console.error("Autoplay failed:",Oe)})},onError:Oe=>{console.error("Video error:",Oe),I(!1)}})]}),(K.title||K.description)&&(0,ur.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute top-4 left-4 max-w-md pointer-events-auto",children:[K.title&&(0,ur.jsx)("h3",{className:"text-white text-xl font-semibold mb-1",children:K.title}),K.description&&(0,ur.jsx)("p",{className:"text-white/80 text-sm",children:K.description})]}),i&&S.length>1&&(0,ur.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"absolute bottom-20 left-0 right-0 flex justify-center z-50 pointer-events-auto",children:(0,ur.jsx)("div",{className:"flex gap-2 p-2 bg-black/70 backdrop-blur-sm rounded-lg max-w-[80vw] overflow-x-auto",children:S.map((Oe,Y)=>(0,ur.jsx)("button",{onClick:()=>{T(Y),V(1),j({x:0,y:0})},className:F("w-16 h-16 rounded overflow-hidden transition-all",Y===P?"ring-2 ring-white scale-110":"opacity-60 hover:opacity-100"),children:Oe.type==="image"?(0,ur.jsx)("img",{src:Oe.thumbnail||Oe.src,alt:Oe.alt,className:"w-full h-full object-cover"}):(0,ur.jsx)("div",{className:"w-full h-full bg-black/50 flex items-center justify-center",children:(0,ur.jsx)(Hh,{className:"h-4 w-4 text-white"})})},Y))})})]})})})})})}):null});wP.displayName="LightboxContent";function W2t({src:e,type:t="image",alt:r,poster:n,title:o,description:a,children:i,...s}){return(0,ur.jsxs)(wT,{items:[{type:t,src:e,alt:r,poster:n,title:o,description:a}],children:[(0,ur.jsx)(bP,{children:i}),(0,ur.jsx)(wP,{...s})]})}var el=A(ue(),1);Ur();var Wt=A(de(),1),bBe=xt("w-full",{variants:{layout:{grid:"grid gap-4",masonry:"",horizontal:"flex overflow-x-auto gap-4 pb-4 snap-x snap-mandatory scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border",justified:"flex flex-wrap gap-2"},columns:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",5:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",6:"grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"}},defaultVariants:{layout:"grid",columns:3}}),tW=xt("relative overflow-hidden cursor-pointer group",{variants:{variant:{default:"rounded-lg",card:"rounded-lg shadow-sm border border-border bg-card",ghost:"rounded-lg hover:bg-accent/50",outline:"rounded-lg border-2 border-transparent hover:border-primary",glass:"rounded-lg backdrop-blur-md bg-white/10 border border-white/20"},aspectRatio:{square:"aspect-square",video:"aspect-video",portrait:"aspect-[3/4]",auto:""},hover:{none:"",zoom:"transition-transform duration-300 hover:scale-105",lift:"transition-all duration-300 hover:-translate-y-1 hover:shadow-lg",glow:"transition-all duration-300 hover:shadow-lg hover:shadow-primary/20"}},defaultVariants:{variant:"default",aspectRatio:"square",hover:"zoom"}}),wBe=el.forwardRef(({className:e,items:t,layout:r,columns:n,variant:o,aspectRatio:a,hover:i,enableLightbox:s=!0,enableFiltering:l=!1,enableSorting:c=!1,categories:u=[],sortOptions:d=[],defaultCategory:f="all",defaultSort:p="default",showItemType:h=!0,showOverlay:m=!0,overlayContent:v,loadingState:g=!1,skeletonCount:y=6,emptyState:x,onItemClick:w,lazyLoad:b=!0,infiniteScroll:C=!1,onLoadMore:S,hasMore:P=!1,lightboxProps:T,...L},M)=>{let{hasProAccess:N,isLoading:V}=st(),[_,I]=el.useState(f),[k,R]=el.useState(p),[E,O]=el.useState(!1),[B,U]=el.useState(new Set),D=el.useRef(null),j=el.useRef(null),$=el.useMemo(()=>!l||_==="all"?t:t.filter(Z=>"category"in Z&&typeof Z.category=="string"?Z.category===_:_==="image"?Z.type==="image":_==="video"?Z.type==="video":!0),[t,_,l]),z=el.useMemo(()=>{if(!c||k==="default")return $;let Z=d.find(Pe=>Pe.id===k);return Z?[...$].sort(Z.compareFn):$},[$,k,c,d]),q=[{id:"all",label:"All"},{id:"image",label:"Images",icon:(0,Wt.jsx)(Gl,{className:"h-4 w-4"})},{id:"video",label:"Videos",icon:(0,Wt.jsx)(jh,{className:"h-4 w-4"})}],H=u.length>0?u:q;el.useEffect(()=>{if(b)return D.current=new IntersectionObserver(Z=>{Z.forEach(Pe=>{if(Pe.isIntersecting){let be=parseInt(Pe.target.getAttribute("data-index")||"0");U(_e=>new Set(_e).add(be))}})},{rootMargin:"50px"}),()=>{D.current?.disconnect()}},[b]),el.useEffect(()=>{if(!C||!S||!P)return;let Z=new IntersectionObserver(Pe=>{Pe[0].isIntersecting&&S()},{rootMargin:"100px"});return j.current&&Z.observe(j.current),()=>Z.disconnect()},[C,S,P]);let K=(Z,Pe)=>{w&&w(Z,Pe)},G=(Z,Pe)=>{let be=!b||B.has(Pe)||Z.thumbnail&&Z.thumbnail.endsWith(".svg"),_e=(0,Wt.jsxs)(ne.div,{className:F(tW({variant:o,aspectRatio:r==="masonry"||r==="justified"?"auto":a,hover:i}),r==="masonry"&&"break-inside-avoid mb-4 inline-block w-full",r==="justified"&&"flex-grow",r==="horizontal"&&"flex-shrink-0 w-80"),style:r==="justified"?{flexBasis:"200px",maxWidth:"400px"}:void 0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.3,delay:Pe*.05},"data-index":Pe,ref:he=>{he&&D.current&&!B.has(Pe)&&D.current.observe(he)},onClick:()=>K(Z,Pe),children:[Z.type==="image"?(0,Wt.jsxs)("div",{className:F("relative w-full",r==="masonry"||r==="justified"?"":"h-full"),children:[(0,Wt.jsx)("img",{src:Z.thumbnail||Z.src,alt:Z.alt||`Gallery item ${Pe+1}`,className:F("w-full object-cover",r==="masonry"?"h-auto":"h-full",be?"opacity-100":"opacity-0","transition-opacity duration-300"),loading:b?"lazy":void 0,onLoad:()=>U(he=>new Set(he).add(Pe))}),!be&&(0,Wt.jsx)("div",{className:F("absolute inset-0 w-full bg-muted animate-pulse",r==="masonry"?"h-64":"h-full",r==="masonry"&&"aspect-[3/4]")})]}):(0,Wt.jsxs)("div",{className:F("relative w-full bg-black",r==="masonry"?"":"h-full"),children:[be&&(Z.thumbnail||Z.poster)&&(0,Wt.jsx)("img",{src:Z.thumbnail||Z.poster,alt:Z.alt||`Video thumbnail ${Pe+1}`,className:F("w-full object-cover",r==="masonry"?"h-auto":"h-full"),loading:b?"lazy":void 0}),(0,Wt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Wt.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,Wt.jsx)(jh,{className:"h-6 w-6 text-white"})})})]}),m&&(0,Wt.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:[v?v(Z,Pe):(0,Wt.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[Z.title&&(0,Wt.jsx)("h3",{className:"text-sm font-semibold mb-1",children:Z.title}),Z.description&&(0,Wt.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:Z.description})]}),h&&(0,Wt.jsx)("div",{className:"absolute top-2 right-2",children:(0,Wt.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:Z.type==="image"?(0,Wt.jsx)(Gl,{className:"h-4 w-4 text-white"}):(0,Wt.jsx)(jh,{className:"h-4 w-4 text-white"})})})]})]},Pe);return s?(0,Wt.jsx)(bP,{index:Pe,children:_e},Pe):_e},J=()=>(0,Wt.jsx)("div",{className:F(tW({variant:o,aspectRatio:a})),children:(0,Wt.jsx)("div",{className:"w-full h-full bg-muted animate-pulse"})});if(!V&&!N)return(0,Wt.jsx)(Rn,{componentName:"Media Gallery",compact:!0});let ae=(0,Wt.jsxs)(Wt.Fragment,{children:[(l||c)&&(0,Wt.jsxs)("div",{className:"mb-6",children:[(0,Wt.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Wt.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,Wt.jsxs)("button",{onClick:()=>O(!E),className:F("flex items-center gap-2 px-4 py-2 rounded-lg border transition-colors",E?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-accent"),children:[(0,Wt.jsx)(ns,{className:"h-4 w-4"}),"Filters"]}),c&&d.length>0&&(0,Wt.jsxs)("select",{value:k,onChange:Z=>R(Z.target.value),className:"px-4 py-2 rounded-lg border bg-background",children:[(0,Wt.jsx)("option",{value:"default",children:"Default order"}),d.map(Z=>(0,Wt.jsx)("option",{value:Z.id,children:Z.label},Z.id))]})]}),(0,Wt.jsxs)("div",{className:"text-sm text-muted-foreground",children:[z.length," items"]})]}),(0,Wt.jsx)(Ft,{children:E&&l&&(0,Wt.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,Wt.jsx)("div",{className:"flex flex-wrap gap-2 pb-4",children:H.map(Z=>(0,Wt.jsxs)("button",{onClick:()=>I(Z.id),className:F("flex items-center gap-2 px-3 py-1.5 rounded-full text-sm transition-colors",_===Z.id?"bg-primary text-primary-foreground":"bg-muted hover:bg-accent"),children:[Z.icon,Z.label]},Z.id))})})})]}),(0,Wt.jsx)("div",{ref:M,className:F(r==="masonry"?"columns-1 sm:columns-2 md:columns-3 lg:columns-4 gap-4":bBe({layout:r,columns:n}),e),style:r==="masonry"?{columnGap:"1rem"}:void 0,children:g?(0,Wt.jsx)(Wt.Fragment,{children:Array.from({length:y}).map((Z,Pe)=>(0,Wt.jsx)(el.Fragment,{children:J()},Pe))}):z.length>0?z.map((Z,Pe)=>G(Z,Pe)):x||(0,Wt.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,Wt.jsx)(Gl,{className:"h-12 w-12 text-muted-foreground mb-4"}),(0,Wt.jsx)("p",{className:"text-muted-foreground",children:"No media items found"})]})}),C&&P&&(0,Wt.jsx)("div",{ref:j,className:"flex justify-center py-8",children:(0,Wt.jsx)(Mr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});return s?(0,Wt.jsxs)(wT,{items:z,children:[ae,(0,Wt.jsx)(wP,{showThumbnails:!0,showNavigation:!0,backdrop:"blur",...T})]}):ae});wBe.displayName="MoonUIMediaGalleryPro";var CBe=el.forwardRef(({className:e,item:t,index:r=0,variant:n,aspectRatio:o,hover:a,showType:i=!0,showOverlay:s=!0,overlayContent:l,onLoad:c,...u},d)=>{let[f,p]=el.useState(!1),h=()=>{p(!0),c?.()};return(0,Wt.jsxs)("div",{ref:d,className:F(tW({variant:n,aspectRatio:o,hover:a}),e),...u,children:[t.type==="image"?(0,Wt.jsx)("img",{src:t.src,alt:t.alt||`Gallery item ${r+1}`,className:F("w-full h-full object-cover transition-opacity duration-300",f?"opacity-100":"opacity-0"),onLoad:h}):(0,Wt.jsxs)("div",{className:"relative w-full h-full bg-black",children:[t.poster&&(0,Wt.jsx)("img",{src:t.poster,alt:t.alt||`Video thumbnail ${r+1}`,className:"w-full h-full object-cover",onLoad:h}),(0,Wt.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Wt.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,Wt.jsx)(jh,{className:"h-6 w-6 text-white"})})})]}),!f&&(0,Wt.jsx)("div",{className:"absolute inset-0 bg-muted animate-pulse"}),s&&f&&(0,Wt.jsxs)("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300",children:[l||(0,Wt.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[t.title&&(0,Wt.jsx)("h3",{className:"text-sm font-semibold mb-1",children:t.title}),t.description&&(0,Wt.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:t.description})]}),i&&(0,Wt.jsx)("div",{className:"absolute top-2 right-2",children:(0,Wt.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:t.type==="image"?(0,Wt.jsx)(Gl,{className:"h-4 w-4 text-white"}):(0,Wt.jsx)(jh,{className:"h-4 w-4 text-white"})})})]})]})});CBe.displayName="MoonUIGalleryItemPro";var Gv=A(ue(),1);Ur();var Si=A(de(),1);function CT({items:e,onReorder:t,keyExtractor:r,renderItem:n,className:o,itemClassName:a,dragHandleClassName:i,showDragHandle:s=!1,dragHandleSize:l=16,disabled:c=!1,onDragStart:u,onDragEnd:d,gap:f=8,animationDuration:p=200,showDropIndicator:h=!0,dropIndicatorColor:m="primary",dropIndicatorStyle:v="glow",dragPreviewStyle:g="clone",hapticFeedback:y=!0}){let{hasProAccess:x,isLoading:w}=st(),[b,C]=(0,Gv.useState)(null),[S,P]=(0,Gv.useState)(null),[T,L]=(0,Gv.useState)(!1),[M,N]=(0,Gv.useState)({x:0,y:0}),[V,_]=(0,Gv.useState)(!1),I=(0,Gv.useRef)(null),k=(0,Gv.useRef)(0),R=(0,Gv.useRef)(new Map),E=(z,q)=>{if(c)return;let H=e[q];I.current=H,C(q),L(!0);let K=z.currentTarget.getBoundingClientRect();if(N({x:z.clientX-K.left,y:z.clientY-K.top}),z.dataTransfer.effectAllowed="move",z.dataTransfer.setData("text/html",""),z.currentTarget instanceof HTMLElement){let G=z.currentTarget.cloneNode(!0);G.style.position="absolute",G.style.top="-1000px",G.style.width=`${K.width}px`,g==="ghost"?(G.style.opacity="0.5",G.style.filter="grayscale(100%)"):g==="clone"?(G.style.opacity="0.9",G.style.transform="scale(1.02) rotate(1deg)",G.style.boxShadow="0 10px 30px rgba(0,0,0,0.3)"):g==="compact"&&(G.style.transform="scale(0.95)",G.style.opacity="0.85"),G.style.pointerEvents="none",document.body.appendChild(G),z.dataTransfer.setDragImage(G,M.x,M.y),setTimeout(()=>document.body.removeChild(G),0)}y&&"vibrate"in navigator&&navigator.vibrate(10),u?.(H,q)},O=z=>{z.preventDefault(),k.current++},B=z=>{k.current--,k.current===0&&P(null)},U=(z,q)=>{if(z.preventDefault(),z.dataTransfer.dropEffect="move",c||b===null)return;if(q===b){P(null),_(!1);return}let H=z.currentTarget.getBoundingClientRect(),K=z.clientY-H.top,G=H.height,J=K<G/2?"before":"after";P({index:q,position:J}),_(!0),y&&"vibrate"in navigator&&navigator.vibrate(5)},D=z=>{if(z.preventDefault(),c||b===null||!S||I.current===null){j();return}let q=[...e],H=q[b],K=S.index;S.position==="after"&&(K=K+1),q.splice(b,1),b<K&&(K=K-1),q.splice(K,0,H),t(q),j()},j=()=>{I.current&&b!==null&&d?.(I.current,b),setTimeout(()=>{C(null),P(null),L(!1),_(!1),I.current=null,k.current=0},50),y&&"vibrate"in navigator&&navigator.vibrate([10,50,10])},$=z=>{if(!h||!T)return null;let q=z==="before"?"-top-1":"-bottom-1";return v==="line"?(0,Si.jsx)(ne.div,{initial:{opacity:0,scaleX:0},animate:{opacity:1,scaleX:1},exit:{opacity:0,scaleX:0},className:F("absolute left-0 right-0 h-1 z-50 pointer-events-none",q),children:(0,Si.jsxs)("div",{className:"h-full bg-primary rounded-full relative",children:[(0,Si.jsx)(ne.div,{animate:{x:[0,10,0]},transition:{repeat:1/0,duration:1},className:"absolute -left-2 top-1/2 -translate-y-1/2 w-4 h-4 bg-primary rounded-full"}),(0,Si.jsx)(ne.div,{animate:{x:[0,-10,0]},transition:{repeat:1/0,duration:1},className:"absolute -right-2 top-1/2 -translate-y-1/2 w-4 h-4 bg-primary rounded-full"})]})}):v==="area"?(0,Si.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:24},exit:{opacity:0,height:0},className:F("absolute left-0 right-0 z-40 pointer-events-none",z==="before"?"-top-3":"-bottom-3"),children:(0,Si.jsx)("div",{className:"h-full bg-primary/10 rounded-lg border-2 border-dashed border-primary/50"})}):v==="glow"?(0,Si.jsx)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:F("absolute left-0 right-0 h-2 z-50 pointer-events-none",q),children:(0,Si.jsxs)("div",{className:"h-full relative",children:[(0,Si.jsx)("div",{className:"absolute inset-0 bg-primary/30 blur-xl animate-pulse"}),(0,Si.jsx)("div",{className:"absolute inset-0 bg-primary rounded-full animate-pulse"}),(0,Si.jsx)(ne.div,{animate:{opacity:[.5,1,.5],scale:[.95,1.05,.95]},transition:{repeat:1/0,duration:2},className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/50 to-primary rounded-full"})]})}):null};return!w&&!x?(0,Si.jsx)(Rn,{componentName:"Draggable List",compact:!0}):(0,Si.jsxs)("div",{className:F("relative",T&&"select-none",o),onDragEnter:O,onDragLeave:B,onDrop:D,onDragOver:z=>z.preventDefault(),children:[(0,Si.jsx)(Ft,{children:e.map((z,q)=>{let H=r(z),K=b===q,G=S?.index===q&&S?.position==="before",J=S?.index===q&&S?.position==="after";return(0,Si.jsxs)(ne.div,{ref:ae=>{ae&&R.current.set(H,ae)},layout:!0,layoutId:H,initial:{opacity:0,y:20},animate:{opacity:K?.3:1,y:0,scale:K?.95:1,rotate:K?2:0},exit:{opacity:0,scale:.95},transition:{type:"spring",stiffness:500,damping:30,duration:p/1e3},className:"relative",style:{marginBottom:f},children:[G&&$("before"),(0,Si.jsx)("div",{draggable:!c,onDragStart:ae=>E(ae,q),onDragOver:ae=>U(ae,q),onDragEnd:j,className:F("relative bg-card rounded-lg border transition-all",K&&"cursor-grabbing shadow-2xl",!K&&T&&"hover:shadow-lg hover:border-primary/30",!K&&!T&&!c&&"hover:shadow-md hover:border-border/80",!c&&"cursor-grab active:cursor-grabbing",G&&"translate-y-3",J&&"-translate-y-3",a),children:(0,Si.jsxs)("div",{className:"flex items-center gap-3 p-2",children:[s&&(0,Si.jsx)(ne.div,{className:"pl-2",whileHover:{scale:1.1},whileTap:{scale:.95},children:(0,Si.jsx)(yO,{className:F("flex-shrink-0 text-muted-foreground/50",!c&&"hover:text-muted-foreground","transition-colors",i),size:l})}),(0,Si.jsx)("div",{className:"flex-1",children:n(z,q)})]})}),J&&$("after")]},H)})}),T&&(0,Si.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 pointer-events-none z-[100]",children:(0,Si.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"})})]})}var cg=A(ue(),1);Ur();var ko=A(de(),1),Wae=xt("relative inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 overflow-hidden min-w-fit",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-r from-purple-600 to-pink-600 text-white hover:from-purple-700 hover:to-pink-700",glow:"bg-primary text-primary-foreground shadow-lg hover:shadow-xl hover:shadow-primary/25"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",xl:"h-11 rounded-md px-6 text-base font-medium",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),SBe=cg.default.forwardRef(({className:e,variant:t,size:r,animation:n="none",state:o="idle",onStateChange:a,children:i,onClick:s,loadingText:l="Loading...",successText:c="Success!",errorText:u="Error!",ripple:d=!1,iconRotate:f=!1,shimmerSpeed:p="normal",glowIntensity:h="medium",showProgressBar:m=!1,autoResetDelay:v=2e3,onDrag:g,onDragEnd:y,onDragStart:x,onAnimationStart:w,onAnimationEnd:b,...C},S)=>{let[P,T]=(0,cg.useState)("idle"),[L,M]=(0,cg.useState)([]),[N,V]=(0,cg.useState)(0),[_,I]=(0,cg.useState)(!1),k=o!=="idle"?o:P,R=async $=>{if(k!=="loading"){if(d){let z=$.currentTarget.getBoundingClientRect(),q=$.clientX-z.left,H=$.clientY-z.top,K=Date.now();M([...L,{x:q,y:H,id:K}]),setTimeout(()=>{M(G=>G.filter(J=>J.id!==K))},600)}if(T("loading"),a?.("loading"),V(0),m){let z=setInterval(()=>{V(q=>q>=90?(clearInterval(z),90):q+10)},200)}if(s)try{await s($),V(100),T("success"),a?.("success"),setTimeout(()=>{T("idle"),a?.("idle"),V(0)},v)}catch{V(0),T("error"),a?.("error"),setTimeout(()=>{T("idle"),a?.("idle")},v)}}},E=()=>{let $=F("h-4 w-4",{"animate-spin":k==="loading"||f&&k!=="idle"});switch(k){case"loading":return(0,ko.jsx)(Mr,{className:$});case"success":return(0,ko.jsx)(on,{className:F($,"animate-scale-in")});case"error":return(0,ko.jsx)(lr,{className:F($,"animate-shake")});default:return null}},O=()=>{switch(k){case"success":return"bg-green-600";case"error":return"bg-red-600";default:return""}},B=()=>{switch(p){case"slow":return"duration-1500";case"fast":return"duration-500";default:return"duration-1000"}},U=()=>{switch(h){case"low":return"shadow-lg";case"high":return"shadow-2xl";default:return"shadow-xl"}},D,j;return n==="bounce"?D={y:[0,-10,0],transition:{duration:.6,repeat:1/0,repeatType:"loop"}}:n==="pulse"?D={scale:[1,1.1,1],transition:{duration:1,repeat:1/0,repeatType:"loop"}}:n==="shake"?D=void 0:n==="rotate"?D={rotate:10,transition:{type:"spring",stiffness:300}}:n==="scale"?(D={scale:1.05},j={scale:.95}):n==="slide"&&(D={y:-4}),(0,ko.jsxs)(ne.button,{...C,className:F(Wae({variant:t,size:r}),t==="glow"&&U(),n==="shake"&&_&&"animate-shake",e),ref:S,onClick:R,disabled:k==="loading"||C.disabled,onMouseEnter:()=>I(!0),onMouseLeave:()=>I(!1),whileHover:D,whileTap:j,children:[m&&k==="loading"&&(0,ko.jsx)(ne.div,{className:"absolute bottom-0 left-0 h-1 bg-primary-foreground/20 rounded-full",initial:{width:0},animate:{width:`${N}%`},transition:{duration:.3}}),n==="shimmer"&&(0,ko.jsx)(ne.div,{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/20 to-transparent",initial:{x:"-100%"},animate:{x:"100%"},transition:{duration:p==="slow"?1.5:p==="fast"?.5:1,repeat:1/0,repeatDelay:1}}),(0,ko.jsx)("div",{className:"relative flex items-center justify-center gap-2 z-10",children:r==="icon"?k==="idle"?i:E():(0,ko.jsx)(ko.Fragment,{children:k==="idle"?(0,ko.jsxs)(ko.Fragment,{children:[cg.default.isValidElement(i)&&cg.default.cloneElement(i),typeof i=="string"&&i,cg.default.isValidElement(i)||typeof i=="string"?null:i]}):(0,ko.jsxs)(ko.Fragment,{children:[E(),(0,ko.jsxs)("span",{className:"ml-2",children:[k==="loading"&&l,k==="success"&&c,k==="error"&&u]})]})})}),(0,ko.jsx)(ne.div,{className:F("absolute inset-0 rounded-md",O()),initial:{scale:0,opacity:0},animate:{scale:k==="success"||k==="error"?1:0,opacity:k==="success"||k==="error"?.2:0},transition:{duration:.3},style:{zIndex:0}}),L.map($=>(0,ko.jsx)("span",{className:"absolute bg-primary/20 rounded-full animate-ripple pointer-events-none",style:{left:$.x-10,top:$.y-10,width:20,height:20}},$.id))]})});SBe.displayName="MoonUIAnimatedButtonProInternal";var qae=cg.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,ko.jsx)($e,{className:F("w-fit",e.className),children:(0,ko.jsx)(We,{className:"py-6 text-center",children:(0,ko.jsxs)("div",{className:"space-y-4",children:[(0,ko.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ko.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ko.jsxs)("div",{children:[(0,ko.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ko.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated Button is available exclusively to MoonUI Pro subscribers."}),(0,ko.jsx)("a",{href:"/pricing",children:(0,ko.jsxs)(oe,{size:"sm",children:[(0,ko.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ko.jsx)(SBe,{...e,ref:t})});qae.displayName="MoonUIAnimatedButtonPro";var ST=A(ue(),1);Ur();var Aa=A(de(),1),Gae=class extends ST.Component{constructor(r){super(r);this.resetTimeoutId=null;this.previousResetKeys=[];this.resetErrorBoundary=()=>{let{onReset:r}=this.props;r?.(),this.setState({hasError:!1,error:void 0,errorInfo:void 0})};this.state={hasError:!1},this.previousResetKeys=r.resetKeys||[]}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){let{onError:o,isolate:a}=this.props;this.setState({errorInfo:n}),o?.(r,n),console.error(a?"[Isolated ErrorBoundary] caught an error:":"ErrorBoundary caught an error:",r,n)}componentDidUpdate(r){let{resetKeys:n,resetOnPropsChange:o}=this.props,{hasError:a}=this.state;if(a&&n&&n.some((s,l)=>s!==this.previousResetKeys[l])&&(this.previousResetKeys=n,this.resetErrorBoundary()),a&&o&&r!==this.props){let i={...this.props,children:null},s={...r,children:null};JSON.stringify(i)!==JSON.stringify(s)&&this.resetErrorBoundary()}}renderFallback(){let{fallback:r,className:n,showErrorDetails:o}=this.props,{error:a,errorInfo:i}=this.state;return a?r?typeof r=="function"?(0,Aa.jsx)(r,{error:a,resetErrorBoundary:this.resetErrorBoundary,errorInfo:i}):r:(0,Aa.jsx)("div",{className:F("flex items-center justify-center min-h-[200px] p-4",n),children:(0,Aa.jsxs)($e,{className:"w-full max-w-md",children:[(0,Aa.jsxs)(br,{className:"text-center",children:[(0,Aa.jsx)("div",{className:"mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-red-100 dark:bg-red-900/20",children:(0,Aa.jsx)(ka,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),(0,Aa.jsx)(zr,{children:"Something went wrong"}),(0,Aa.jsx)(Is,{children:"An error occurred while rendering this component"})]}),(0,Aa.jsxs)(We,{className:"text-center",children:[o&&!1,(0,Aa.jsxs)(oe,{onClick:this.resetErrorBoundary,className:"mt-4",children:[(0,Aa.jsx)(Oo,{className:"mr-2 h-4 w-4"}),"Try again"]})]})]})}):null}render(){let{hasError:r}=this.state,{children:n,isolate:o}=this.props;if(r){if(o)try{return this.renderFallback()}catch(a){return console.error("Error boundary fallback failed:",a),(0,Aa.jsx)("div",{className:"p-4 text-center text-red-600",children:"Critical error: Unable to recover"})}return this.renderFallback()}return n}componentWillUnmount(){this.resetTimeoutId&&clearTimeout(this.resetTimeoutId)}};function q2t(e){let{hasProAccess:t,isLoading:r}=st(),n=(0,ST.useRef)(e.resetKeys);return(0,ST.useEffect)(()=>{n.current=e.resetKeys},[e.resetKeys]),!r&&!t?(0,Aa.jsx)($e,{className:F("w-fit",e.className),children:(0,Aa.jsx)(We,{className:"py-6 text-center",children:(0,Aa.jsxs)("div",{className:"space-y-4",children:[(0,Aa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Aa.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Aa.jsxs)("div",{children:[(0,Aa.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Aa.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Error Boundary is available exclusively to MoonUI Pro subscribers."}),(0,Aa.jsx)("a",{href:"/pricing",children:(0,Aa.jsxs)(oe,{size:"sm",children:[(0,Aa.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Aa.jsx)(Gae,{...e})}var G2t=q2t;var V_=A(ue(),1);Ur();var Za=A(de(),1),PBe=V_.default.forwardRef(({actions:e=[],position:t="bottom-right",size:r="default",className:n,children:o,onClick:a,...i},s)=>{let[l,c]=(0,V_.useState)(!1),u={sm:"h-10 w-10",default:"h-12 w-12",lg:"h-14 w-14"},d={"bottom-right":"bottom-4 right-4","bottom-left":"bottom-4 left-4","top-right":"top-4 right-4","top-left":"top-4 left-4"},f={"bottom-right":{x:-60,y:0},"bottom-left":{x:60,y:0},"top-right":{x:-60,y:0},"top-left":{x:60,y:0}},p=h=>{e.length>0?c(!l):a&&a(h)};return(0,Za.jsxs)("div",{className:F("fixed z-50",d[t]),children:[(0,Za.jsx)(Ft,{children:l&&e.length>0&&(0,Za.jsx)("div",{className:"absolute",children:e.map((h,m)=>(0,Za.jsxs)(ne.div,{initial:{scale:0,opacity:0,x:0,y:0},animate:{scale:1,opacity:1,x:f[t].x,y:f[t].y*(m+1)-10},exit:{scale:0,opacity:0,x:0,y:0},transition:{delay:m*.05,type:"spring",stiffness:200,damping:15},className:"absolute flex items-center gap-2",style:{transform:`translate(${t.includes("right"),"0"}, ${t.includes("bottom"),"0"})`},children:[(0,Za.jsx)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{delay:(m+1)*.05},className:F("px-2 py-1 bg-background/90 backdrop-blur-sm text-sm font-medium rounded-md shadow-sm border whitespace-nowrap",t.includes("right")?"mr-2":"ml-2"),children:h.label}),(0,Za.jsx)("button",{onClick:()=>{h.onClick(),c(!1)},className:F("inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",u[r]),children:h.icon})]},m))})}),(0,Za.jsx)(ne.button,{ref:s,className:F("inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg hover:bg-primary/90 transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",u[r],n),onClick:p,whileHover:{scale:1.1},whileTap:{scale:.9},animate:{rotate:l?45:0},transition:{duration:.2},children:o||(e.length>0?(0,Za.jsx)(Vi,{className:"h-5 w-5"}):(0,Za.jsx)(Vi,{className:"h-5 w-5"}))}),(0,Za.jsx)(Ft,{children:l&&(0,Za.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[-1]",onClick:()=>c(!1)})})]})});PBe.displayName="FloatingActionButtonInternal";var IBe=V_.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Za.jsx)($e,{className:F("w-fit",e),children:(0,Za.jsx)(We,{className:"py-6 text-center",children:(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Za.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Za.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Floating Action Button is available exclusively to MoonUI Pro subscribers."}),(0,Za.jsx)("a",{href:"/pricing",children:(0,Za.jsxs)(oe,{size:"sm",children:[(0,Za.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Za.jsx)(PBe,{className:e,ref:r,...t})});IBe.displayName="FloatingActionButton";var oc=A(ue(),1);Ur();var tl=A(de(),1),kBe=xt("relative rounded-lg border bg-card text-card-foreground shadow-sm transition-all duration-200 isolate",{variants:{variant:{subtle:"hover:bg-card/95",dramatic:"hover:bg-gradient-to-br hover:from-card hover:to-card/80",gaming:"hover:border-primary/50 hover:shadow-lg hover:shadow-primary/25",elegant:"hover:border-border/50 hover:bg-gradient-to-br hover:from-card hover:via-card/95 hover:to-card/90",neon:"hover:border-primary hover:shadow-[0_0_30px_rgba(var(--primary),0.3)]"},shadowIntensity:{none:"",light:"hover:shadow-md",medium:"hover:shadow-lg",heavy:"hover:shadow-xl",extreme:"hover:shadow-2xl"},glowEffect:{none:"",subtle:"",vibrant:"",neon:""}},defaultVariants:{variant:"subtle",shadowIntensity:"medium",glowEffect:"none"}}),RBe=oc.default.forwardRef(({children:e,className:t,variant:r,shadowIntensity:n,glowEffect:o,perspective:a=1e3,maxRotation:i=15,rotationIntensity:s,scale:l=1.05,springConfig:c={stiffness:200,damping:15,mass:1,velocity:0},animationSpeed:u=1,overlay:d,overlayAlwaysVisible:f=!1,glowColor:p="rgb(var(--primary))",glowBlur:h=20,glowSpread:m=1.2,enableTouch:v=!0,enableKeyboard:g=!0,onHoverStart:y,onHoverEnd:x,onRotationChange:w,animationDelay:b=0,ariaLabel:C,autoFocus:S=!1,rotateAxes:P={x:!0,y:!0},...T},L)=>{let{onDrag:M,onDragStart:N,onDragEnd:V,onDragOver:_,onDrop:I,onAnimationStart:k,onAnimationEnd:R,onAnimationIteration:E,...O}=T,B=(0,oc.useRef)(null),[U,D]=(0,oc.useState)(!1),[j,$]=(0,oc.useState)(!1),z=i||s||15,q=Xa(0),H=Xa(0),K=Rv(q,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),G=Rv(H,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),J=iu(G,[-1,1],P.x?[z,-z]:[0,0]),ae=iu(K,[-1,1],P.y?[-z,z]:[0,0]),Z=(0,oc.useCallback)(ve=>{if(!B.current)return;let Oe=B.current.getBoundingClientRect(),Y=Oe.left+Oe.width/2,Q=Oe.top+Oe.height/2,pe,Re;if("touches"in ve&&v)pe=ve.touches[0].clientX,Re=ve.touches[0].clientY;else if("clientX"in ve)pe=ve.clientX,Re=ve.clientY;else return;let fe=(Re-Q)/(Oe.height/2),Ce=(pe-Y)/(Oe.width/2);q.set(Ce),H.set(fe),w&&w(J.get(),ae.get())},[v,q,H,J,ae,w]),Pe=(0,oc.useCallback)(()=>{D(!0),y?.()},[y]),be=(0,oc.useCallback)(()=>{D(!1),q.set(0),H.set(0),x?.()},[q,H,x]),_e=(0,oc.useCallback)(ve=>{if(!g||!j)return;let Oe=.1,Y=q.get(),Q=H.get();switch(ve.key){case"ArrowUp":Q=Math.max(-.5,Q-Oe),H.set(Q),ve.preventDefault();break;case"ArrowDown":Q=Math.min(.5,Q+Oe),H.set(Q),ve.preventDefault();break;case"ArrowLeft":Y=Math.max(-.5,Y-Oe),q.set(Y),ve.preventDefault();break;case"ArrowRight":Y=Math.min(.5,Y+Oe),q.set(Y),ve.preventDefault();break;case"Enter":case" ":D(!U),U?x?.():y?.(),ve.preventDefault();break;case"Escape":q.set(0),H.set(0),D(!1),x?.(),ve.preventDefault();break}w&&w(J.get(),ae.get())},[g,j,q,H,U,y,x,J,ae,w]);(0,oc.useEffect)(()=>{S&&B.current&&B.current.focus()},[S]);let he=(0,oc.useMemo)(()=>d?typeof d=="function"?d({isHovered:U,rotateX:J.get(),rotateY:ae.get()}):d:null,[d,U,J,ae]),Ne=(0,oc.useMemo)(()=>{if(o==="none")return{};let ve=0,Oe=h,Y=m;switch(o){case"subtle":ve=U?.3:0;break;case"vibrant":ve=U?.6:0,Oe=h*1.5;break;case"neon":ve=U?.8:0,Oe=h*2,Y=m*1.3;break}return{opacity:ve,filter:`blur(${Oe}px)`,scale:Y,backgroundColor:p}},[o,U,h,m,p]);return(0,tl.jsx)("div",{style:{perspective:`${a}px`},children:(0,tl.jsxs)(ne.div,{ref:ve=>{B.current=ve,typeof L=="function"?L(ve):L&&(L.current=ve)},className:F(kBe({variant:r,shadowIntensity:n,glowEffect:o}),"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),onMouseMove:Z,onMouseEnter:Pe,onMouseLeave:be,onTouchMove:v?Z:void 0,onTouchStart:v?Pe:void 0,onTouchEnd:v?be:void 0,onKeyDown:_e,onFocus:()=>$(!0),onBlur:()=>$(!1),style:{transformStyle:"preserve-3d",transformOrigin:"center center",rotateX:U||j?J:0,rotateY:U||j?ae:0,scale:U||j?l:1},transition:{type:"spring",stiffness:c.stiffness,damping:c.damping,duration:.15*(1/u),delay:b/1e3},tabIndex:g?0:void 0,role:g?"button":void 0,"aria-label":C,...O,children:[(0,tl.jsx)(ne.div,{className:"relative z-10",animate:{z:U||j?20:0},transition:{duration:.2*(1/u)},children:e}),he&&(0,tl.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none z-20",animate:{opacity:f||U||j?1:0},transition:{duration:.3*(1/u)},children:he}),r!=="subtle"&&(0,tl.jsx)(ne.div,{className:F("absolute inset-0 rounded-lg pointer-events-none",r==="dramatic"&&"bg-gradient-to-br from-white/10 via-transparent to-black/10",r==="gaming"&&"bg-gradient-to-br from-primary/10 via-transparent to-primary/5",r==="elegant"&&"bg-gradient-to-br from-white/5 via-transparent to-black/5",r==="neon"&&"bg-gradient-to-br from-primary/20 via-transparent to-primary/10"),animate:{opacity:U||j?1:0},transition:{duration:.3*(1/u)}}),o!=="none"&&(0,tl.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none -z-10",animate:Ne,transition:{duration:.3*(1/u)}})]})})});RBe.displayName="HoverCard3DInternal";var NBe=oc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tl.jsx)($e,{className:F("w-fit",e.className),children:(0,tl.jsx)(We,{className:"py-6 text-center",children:(0,tl.jsxs)("div",{className:"space-y-4",children:[(0,tl.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tl.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tl.jsxs)("div",{children:[(0,tl.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,tl.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"3D Hover Card is available exclusively to MoonUI Pro subscribers."}),(0,tl.jsx)("a",{href:"/pricing",children:(0,tl.jsxs)(oe,{size:"sm",children:[(0,tl.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tl.jsx)(RBe,{...e,ref:t})});NBe.displayName="HoverCard3D";var CP=A(ue(),1);Ur();var Mc=A(de(),1),K2t=xt("relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",gradient:"bg-gradient-to-r from-purple-600 to-pink-600 text-white shadow-lg hover:from-purple-700 hover:to-pink-700"},size:{default:"h-10 px-4 py-2",sm:"h-9 px-3",lg:"h-11 px-8",icon:"h-10 w-10"},radius:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl",full:"rounded-full"}},defaultVariants:{variant:"default",size:"default",radius:"md"}}),TBe=CP.default.forwardRef(({children:e,className:t,variant:r,size:n,radius:o,strength:a=.3,range:i=100,springConfig:s={stiffness:200,damping:15},...l},c)=>{let u=(0,CP.useRef)(null),[d,f]=(0,CP.useState)(!1),p=Xa(0),h=Xa(0),m=Rv(p,s),v=Rv(h,s),g=iu(v,[-i,i],[5,-5]),y=iu(m,[-i,i],[-5,5]),x=C=>{if(!u.current)return;let S=u.current.getBoundingClientRect(),P=S.left+S.width/2,T=S.top+S.height/2,L=C.clientX-P,M=C.clientY-T;Math.sqrt(L*L+M*M)<i&&(p.set(L*a),h.set(M*a))},w=()=>{f(!1),p.set(0),h.set(0)},b=()=>{f(!0)};return(0,Mc.jsxs)(ne.button,{ref:C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},className:F(K2t({variant:r,size:n,radius:o}),t),onMouseMove:x,onMouseLeave:w,onMouseEnter:b,style:{x:m,y:v,rotateX:g,rotateY:y,transformPerspective:1e3},whileHover:{scale:1.05},whileTap:{scale:.95},animate:{rotateX:d?g.get():0,rotateY:d?y.get():0},transition:{duration:.3},children:[(0,Mc.jsx)(ne.div,{className:"relative z-10 flex items-center justify-center",animate:{scale:d?1.02:1},transition:{duration:.2},children:e}),(0,Mc.jsx)(ne.div,{className:F("absolute inset-0 bg-primary/20 blur-md",o==="none"&&"rounded-none",o==="sm"&&"rounded-sm",o==="md"&&"rounded-md",o==="lg"&&"rounded-lg",o==="xl"&&"rounded-xl",o==="full"&&"rounded-full",!o&&"rounded-md"),animate:{opacity:d?.8:0,scale:d?1.1:1},transition:{duration:.3}})]})});TBe.displayName="MagneticButtonInternal";var MBe=CP.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Mc.jsx)($e,{className:F("w-fit",e),children:(0,Mc.jsx)(We,{className:"py-6 text-center",children:(0,Mc.jsxs)("div",{className:"space-y-4",children:[(0,Mc.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mc.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mc.jsxs)("div",{children:[(0,Mc.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Mc.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Magnetic Button is available exclusively to MoonUI Pro subscribers."}),(0,Mc.jsx)("a",{href:"/pricing",children:(0,Mc.jsxs)(oe,{size:"sm",children:[(0,Mc.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mc.jsx)(TBe,{className:e,ref:r,...t})});MBe.displayName="MagneticButton";var ha=A(ue(),1);Ur();var so=A(de(),1),EBe=ha.default.forwardRef(({children:e,minZoom:t=.5,maxZoom:r=3,initialZoom:n=1,className:o,contentClassName:a,onZoomChange:i,showControls:s=!0,showIndicator:l=!0,doubleTapBehavior:c="zoom",wheelScaling:u=!0,dragEnabled:d=!0,zoomStep:f=.5,smoothZoom:p=!0,boundaryConstraints:h=!0,...m},v)=>{let g=(0,ha.useRef)(null),y=(0,ha.useRef)(null),[x,w]=(0,ha.useState)(!1),[b,C]=(0,ha.useState)(!1),[S,P]=(0,ha.useState)(0),[T,L]=(0,ha.useState)(!1),[M,N]=(0,ha.useState)(!1),V=Xa(n),_=Xa(0),I=Xa(0),k=iu(V,H=>Math.min(Math.max(H,t),r)),R=iu(V,H=>Math.round(H*100)),E=(0,ha.useCallback)(()=>{if(!g.current||!y.current||!h)return{left:0,right:0,top:0,bottom:0};let H=g.current.getBoundingClientRect(),K=V.get(),G=H.width*K,J=H.height*K,ae=Math.max(0,(G-H.width)/2),Z=Math.max(0,(J-H.height)/2);return{left:-ae,right:ae,top:-Z,bottom:Z}},[V,h]);(0,ha.useEffect)(()=>{if(!g.current||!u)return;let H=g.current,K=G=>{T&&u&&(G.ctrlKey||G.metaKey)&&G.preventDefault()};return H.addEventListener("wheel",K,{passive:!1}),()=>{H.removeEventListener("wheel",K)}},[T,u]);let O=(0,ha.useCallback)(H=>{if(!u||!H.ctrlKey&&!H.metaKey)return;H.preventDefault();let K=-H.deltaY/1e3,G=V.get(),J=Math.min(Math.max(G+K,t),r);if(g.current){let ae=g.current.getBoundingClientRect(),Z=(H.clientX-ae.left)/ae.width-.5,Pe=(H.clientY-ae.top)/ae.height-.5,be=J-G,_e=_.get(),he=I.get(),Ne=_e-Z*ae.width*be,ve=he-Pe*ae.height*be;p?(fa(_,Ne,{duration:.2}),fa(I,ve,{duration:.2})):(_.set(Ne),I.set(ve))}p?fa(V,J,{duration:.2}):V.set(J),i?.(J),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,_,I,t,r,i,u,p,l]),B=(0,ha.useCallback)(H=>{H.preventDefault();let K=V.get(),G;if(c==="reset")G=n;else if(G=K>1?1:2,G>1&&g.current){let J=g.current.getBoundingClientRect(),ae=(H.clientX-J.left)/J.width-.5,Z=(H.clientY-J.top)/J.height-.5,Pe=-ae*J.width*(G-1),be=-Z*J.height*(G-1);fa(_,Pe,{duration:.3,type:"spring",stiffness:300}),fa(I,be,{duration:.3,type:"spring",stiffness:300})}fa(V,Math.min(Math.max(G,t),r),{duration:.3,type:"spring",stiffness:300}),(G===1||c==="reset")&&(fa(_,0,{duration:.3}),fa(I,0,{duration:.3})),i?.(G),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,_,I,t,r,n,i,c,l]),U=(0,ha.useCallback)(H=>{let K=Date.now(),G=K-S;if(G<300&&G>0){let J=H.changedTouches[0],ae={clientX:J.clientX,clientY:J.clientY,preventDefault:()=>{}};B(ae)}P(K)},[S,B]),D=(0,ha.useCallback)(()=>{fa(V,n,{duration:.3,type:"spring",stiffness:300}),fa(_,0,{duration:.3,type:"spring",stiffness:300}),fa(I,0,{duration:.3,type:"spring",stiffness:300}),i?.(n)},[V,_,I,n,i]),j=(0,ha.useCallback)(()=>{let H=V.get(),K=Math.min(H+f,r);fa(V,K,{duration:.3,type:"spring",stiffness:300}),i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,r,f,i,l]),$=(0,ha.useCallback)(()=>{let H=V.get(),K=Math.max(H-f,t);if(fa(V,K,{duration:.3,type:"spring",stiffness:300}),K<V.get()){let G=E(),J=_.get(),ae=I.get();(J<G.left||J>G.right)&&fa(_,0,{duration:.3}),(ae<G.top||ae>G.bottom)&&fa(I,0,{duration:.3})}i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[V,t,f,_,I,E,i,l]),z=(0,ha.useCallback)(()=>{D()},[D]),q=(0,ha.useCallback)(()=>{g.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{N(!1)}).catch(H=>{console.error("Exit fullscreen error:",H)}):(g.current.parentElement||g.current).requestFullscreen().then(()=>{N(!0)}).catch(K=>{console.error("Fullscreen error:",K)}))},[]);return(0,ha.useEffect)(()=>{let H=()=>{N(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",H),document.addEventListener("webkitfullscreenchange",H),document.addEventListener("mozfullscreenchange",H),document.addEventListener("MSFullscreenChange",H),()=>{document.removeEventListener("fullscreenchange",H),document.removeEventListener("webkitfullscreenchange",H),document.removeEventListener("mozfullscreenchange",H),document.removeEventListener("MSFullscreenChange",H)}},[]),(0,ha.useEffect)(()=>{if(!T||!u)return;let H=K=>{!K.ctrlKey&&!K.metaKey||(K.key==="+"||K.key==="="?(K.preventDefault(),j()):K.key==="-"||K.key==="_"?(K.preventDefault(),$()):K.key==="0"&&(K.preventDefault(),D()))};return document.addEventListener("keydown",H),()=>{document.removeEventListener("keydown",H)}},[T,u,j,$,D]),(0,ha.useEffect)(()=>V.onChange(()=>{let K=E(),G=_.get(),J=I.get();h&&((G<K.left||G>K.right)&&fa(_,Math.max(K.left,Math.min(K.right,G)),{duration:.2}),(J<K.top||J>K.bottom)&&fa(I,Math.max(K.top,Math.min(K.bottom,J)),{duration:.2}))}),[V,_,I,E,h]),(0,so.jsxs)("div",{ref:v,className:F("relative overflow-hidden touch-none select-none",d&&"cursor-grab active:cursor-grabbing",M&&"fixed inset-0 z-50 bg-background",o),onWheel:O,onDoubleClick:B,onTouchEnd:U,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),...m,children:[(0,so.jsx)("div",{ref:g,className:"w-full h-full",children:(0,so.jsx)(ne.div,{ref:y,drag:d,dragElastic:.1,dragMomentum:!1,dragConstraints:h?E():!1,onDragStart:()=>w(!0),onDragEnd:()=>w(!1),style:{scale:k,x:_,y:I},className:F("w-full h-full flex items-center justify-center",x&&"cursor-grabbing",a),children:e})}),(0,so.jsx)(Ft,{children:l&&b&&(0,so.jsxs)(ne.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.2},className:"absolute top-4 left-1/2 -translate-x-1/2 px-3 py-1.5 bg-black/80 dark:bg-white/80 text-white dark:text-black rounded-full text-sm font-medium pointer-events-none",children:[R.get(),"%"]})}),s&&(0,so.jsxs)("div",{className:"absolute bottom-4 right-4 flex gap-2",children:[(0,so.jsx)("button",{onClick:$,disabled:V.get()<=t,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","shadow-sm hover:shadow-md"),"aria-label":"Zoom out",children:(0,so.jsx)(rp,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:j,disabled:V.get()>=r,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","disabled:opacity-50 disabled:cursor-not-allowed","shadow-sm hover:shadow-md"),"aria-label":"Zoom in",children:(0,so.jsx)(tp,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:D,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","shadow-sm hover:shadow-md"),"aria-label":"Reset zoom",children:(0,so.jsx)(v1,{className:"w-4 h-4"})}),(0,so.jsx)("button",{onClick:q,className:F("p-2 bg-background/80 backdrop-blur-sm border rounded-md","hover:bg-background/90 transition-all duration-200","shadow-sm hover:shadow-md"),"aria-label":M?"Exit fullscreen":"Enter fullscreen",children:M?(0,so.jsx)(h1,{className:"w-4 h-4"}):(0,so.jsx)(Ic,{className:"w-4 h-4"})})]}),s&&(0,so.jsx)("div",{className:"absolute bottom-4 left-4 px-3 py-1.5 bg-background/80 backdrop-blur-sm border rounded-md text-sm",children:(0,so.jsxs)("div",{className:"flex items-center gap-2",children:[(0,so.jsxs)("span",{children:[Math.round(V.get()*100),"%"]}),u&&!b&&(0,so.jsx)("span",{className:"text-xs text-muted-foreground",children:"(Ctrl+Scroll to zoom)"})]})})]})});EBe.displayName="PinchZoomInternal";var ABe=ha.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,so.jsx)($e,{className:F("w-fit",e),children:(0,so.jsx)(We,{className:"py-6 text-center",children:(0,so.jsxs)("div",{className:"space-y-4",children:[(0,so.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,so.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,so.jsxs)("div",{children:[(0,so.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,so.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Pinch Zoom is available exclusively to MoonUI Pro subscribers."}),(0,so.jsx)("a",{href:"/pricing",children:(0,so.jsxs)(oe,{size:"sm",children:[(0,so.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,so.jsx)(EBe,{className:e,ref:r,...t})});ABe.displayName="PinchZoom";var Xw=A(ue(),1);Ur();var Ts=A(de(),1),LBe=Xw.default.forwardRef(({children:e,className:t,spotlightColor:r="rgba(255, 255, 255, 0.25)",spotlightSize:n=300,intensity:o=.8,borderGlow:a=!0,...i},s)=>{let l=(0,Xw.useRef)(null),[c,u]=(0,Xw.useState)({x:0,y:0}),[d,f]=(0,Xw.useState)(!1),p=v=>{if(!l.current)return;let g=l.current.getBoundingClientRect(),y=v.clientX-g.left,x=v.clientY-g.top;u({x:y,y:x})},h=()=>{f(!0)},m=()=>{f(!1)};return(0,Ts.jsxs)(ne.div,{ref:v=>{l.current=v,typeof s=="function"?s(v):s&&(s.current=v)},className:F("relative overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm",t),onMouseMove:p,onMouseEnter:h,onMouseLeave:m,whileHover:{scale:1.02},transition:{duration:.2},children:[(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?o:0},transition:{duration:.3},style:{background:`radial-gradient(${n}px circle at ${c.x}px ${c.y}px, ${r}, transparent 70%)`}}),(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?o*.5:0},transition:{duration:.4,delay:.1},style:{background:`radial-gradient(${n*1.5}px circle at ${c.x}px ${c.y}px, ${r.replace("0.25","0.1")}, transparent 80%)`}}),a&&(0,Ts.jsx)(ne.div,{className:"absolute inset-0 rounded-lg pointer-events-none",animate:{opacity:d?.6:0},transition:{duration:.3},style:{background:`linear-gradient(135deg, transparent 30%, ${r.replace("0.25","0.4")} 50%, transparent 70%)`,backgroundSize:"200% 200%",backgroundPosition:`${c.x/l.current?.offsetWidth*100}% ${c.y/l.current?.offsetHeight*100}%`}}),(0,Ts.jsx)("div",{className:"relative z-10",children:e}),(0,Ts.jsx)(ne.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?.3:0},transition:{duration:.5},children:[...Array(3)].map((v,g)=>(0,Ts.jsx)(ne.div,{className:"absolute w-1 h-1 bg-white rounded-full",animate:d?{x:[c.x,c.x+Math.random()*100-50],y:[c.y,c.y+Math.random()*100-50],opacity:[0,1,0],scale:[0,1,0]}:{},transition:{duration:2,delay:g*.2,repeat:d?1/0:0,ease:"easeOut"},style:{left:c.x,top:c.y}},g))})]})});LBe.displayName="SpotlightCardInternal";var DBe=Xw.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=st();return!o&&!n?(0,Ts.jsx)($e,{className:F("w-fit",e),children:(0,Ts.jsx)(We,{className:"py-6 text-center",children:(0,Ts.jsxs)("div",{className:"space-y-4",children:[(0,Ts.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ts.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ts.jsxs)("div",{children:[(0,Ts.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ts.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Spotlight Card is available exclusively to MoonUI Pro subscribers."}),(0,Ts.jsx)("a",{href:"/pricing",children:(0,Ts.jsxs)(oe,{size:"sm",children:[(0,Ts.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ts.jsx)(LBe,{className:e,ref:r,...t})});DBe.displayName="SpotlightCard";var Ml=A(ue(),1);Ur();var PT=A(ue(),1);var sr=A(de(),1),OBe=[{value:"meeting",label:"Meeting",color:"#3b82f6"},{value:"task",label:"Task",color:"#10b981"},{value:"reminder",label:"Reminder",color:"#f59e0b"},{value:"event",label:"Event",color:"#8b5cf6"}],X2t=["#3b82f6","#10b981","#f59e0b","#8b5cf6","#ef4444","#06b6d4","#84cc16","#f97316","#ec4899","#6366f1","#14b8a6","#eab308","#f43f5e","#a855f7","#22c55e","#64748b"];function _Be({open:e,onOpenChange:t,event:r,selectedDate:n,onSave:o,onDelete:a,mode:i="create"}){let[s,l]=(0,PT.useState)({title:"",description:"",date:"",startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""}),[c,u]=(0,PT.useState)({}),[d,f]=(0,PT.useState)(!1);(0,PT.useEffect)(()=>{if(i==="edit"&&r)l({title:r.title||"",description:r.description||"",date:r.date.toISOString().split("T")[0],startTime:r.startTime||"",endTime:r.endTime||"",location:r.location||"",type:r.type||"meeting",color:r.color||"#3b82f6",attendees:r.attendees?.join(", ")||""});else if(i==="create"){let g=n?n.toISOString().split("T")[0]:new Date().toISOString().split("T")[0];l({title:"",description:"",date:g,startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""})}u({})},[r,n,i,e]);let p=()=>{let g={};return s.title.trim()||(g.title="Title is required"),s.date||(g.date="Date is required"),s.startTime&&s.endTime&&s.startTime>=s.endTime&&(g.endTime="End time must be after start time"),u(g),Object.keys(g).length===0},h=async g=>{if(g.preventDefault(),!!p()){f(!0);try{let y={...i==="edit"&&r?{id:r.id}:{},title:s.title.trim(),description:s.description.trim(),date:new Date(s.date+"T00:00:00"),startTime:s.startTime||void 0,endTime:s.endTime||void 0,location:s.location.trim()||void 0,type:s.type,color:s.color,attendees:s.attendees?s.attendees.split(",").map(x=>x.trim()).filter(Boolean):void 0};await o(y),t(!1)}catch(y){console.error("Error saving event:",y)}finally{f(!1)}}},m=()=>{r&&a&&(a(r.id),t(!1))},v=g=>{let y=OBe.find(x=>x.value===g);l(x=>({...x,type:g,color:y?.color||x.color}))};return(0,sr.jsx)(Na,{open:e,onOpenChange:t,children:(0,sr.jsxs)(pa,{className:"sm:max-w-[500px]",children:[(0,sr.jsxs)(Qa,{children:[(0,sr.jsxs)(Ta,{className:"flex items-center gap-2",children:[(0,sr.jsx)(hi,{className:"w-5 h-5"}),i==="create"?"Create Event":"Edit Event"]}),(0,sr.jsx)(Zl,{children:i==="create"?"Add a new event to your calendar.":"Edit the event details."})]}),(0,sr.jsxs)("form",{onSubmit:h,className:"space-y-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"title",children:"Title *"}),(0,sr.jsx)(Jt,{id:"title",value:s.title,onChange:g=>l(y=>({...y,title:g.target.value})),placeholder:"Event title",className:F(c.title&&"border-red-500")}),c.title&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.title})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"description",children:"Description"}),(0,sr.jsx)(nd,{id:"description",value:s.description,onChange:g=>l(y=>({...y,description:g.target.value})),placeholder:"Event description (optional)",rows:3})]}),(0,sr.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"date",children:"Date *"}),(0,sr.jsx)(Jt,{id:"date",type:"date",value:s.date,onChange:g=>l(y=>({...y,date:g.target.value})),className:F(c.date&&"border-red-500")}),c.date&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.date})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"startTime",children:"Start Time"}),(0,sr.jsx)(Jt,{id:"startTime",type:"time",value:s.startTime,onChange:g=>l(y=>({...y,startTime:g.target.value})),placeholder:"09:00"})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"endTime",children:"End Time"}),(0,sr.jsx)(Jt,{id:"endTime",type:"time",value:s.endTime,onChange:g=>l(y=>({...y,endTime:g.target.value})),placeholder:"10:00",className:F(c.endTime&&"border-red-500")}),c.endTime&&(0,sr.jsx)("p",{className:"text-sm text-red-500",children:c.endTime})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{htmlFor:"location",className:"flex items-center gap-2",children:[(0,sr.jsx)(im,{className:"w-4 h-4"}),"Location"]}),(0,sr.jsx)(Jt,{id:"location",value:s.location,onChange:g=>l(y=>({...y,location:g.target.value})),placeholder:"Meeting room, address, or link"})]}),(0,sr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{className:"flex items-center gap-2",children:[(0,sr.jsx)(w1,{className:"w-4 h-4"}),"Type"]}),(0,sr.jsxs)(Qo,{value:s.type,onValueChange:v,children:[(0,sr.jsx)(Zo,{children:(0,sr.jsx)(ma,{})}),(0,sr.jsx)(Jo,{children:OBe.map(g=>(0,sr.jsx)(Bt,{value:g.value,children:(0,sr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,sr.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:g.color}}),g.label]})},g.value))})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)(Rt,{className:"flex items-center gap-2",children:[(0,sr.jsx)($u,{className:"w-4 h-4"}),"Color"]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsxs)("div",{className:"flex items-center gap-2",children:[(0,sr.jsx)("input",{type:"color",value:s.color,onChange:g=>l(y=>({...y,color:g.target.value})),className:"w-8 h-8 rounded border cursor-pointer flex-shrink-0"}),(0,sr.jsx)("span",{className:"text-sm text-muted-foreground",children:"Custom color"})]}),(0,sr.jsx)("div",{className:"grid grid-cols-8 gap-1",children:X2t.map(g=>(0,sr.jsx)("button",{type:"button",onClick:()=>l(y=>({...y,color:g})),className:F("w-full aspect-square rounded border-2 hover:scale-110 transition-transform",s.color===g?"border-foreground shadow-sm":"border-transparent"),style:{backgroundColor:g},"aria-label":`Select color ${g}`},g))})]})]})]}),(0,sr.jsxs)("div",{className:"space-y-2",children:[(0,sr.jsx)(Rt,{htmlFor:"attendees",children:"Attendees"}),(0,sr.jsx)(Jt,{id:"attendees",value:s.attendees,onChange:g=>l(y=>({...y,attendees:g.target.value})),placeholder:"John Doe, Jane Smith (comma-separated)"})]}),(0,sr.jsxs)(Yh,{className:"gap-2",children:[i==="edit"&&a&&(0,sr.jsx)(oe,{type:"button",variant:"destructive",onClick:m,className:"mr-auto",children:"Delete Event"}),(0,sr.jsx)(oe,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:d,children:"Cancel"}),(0,sr.jsx)(oe,{type:"submit",disabled:d,children:d?i==="create"?"Creating...":"Saving...":i==="create"?"Create Event":"Save Changes"})]})]})]})})}var Ie=A(de(),1),Kae=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],FBe=["January","February","March","April","May","June","July","August","September","October","November","December"],IT={meeting:"bg-blue-500",task:"bg-green-500",reminder:"bg-yellow-500",event:"bg-purple-500",birthday:"bg-pink-500",holiday:"bg-orange-500",conference:"bg-indigo-500"},Y2t={low:"border-l-4 border-l-muted-foreground",medium:"border-l-4 border-l-yellow-500",high:"border-l-4 border-l-red-500"},Q2t={confirmed:"",tentative:"opacity-70 border-dashed",cancelled:"opacity-50 line-through"};function Z2t({events:e=[],onEventClick:t,onEventAdd:r,onEventEdit:n,onEventDelete:o,onDateChange:a,onViewChange:i,onEventDrop:s,className:l,showWeekends:c=!0,showEventDetails:u=!0,disabled:d=!1,minDate:f,maxDate:p,highlightToday:h=!0,height:m,defaultView:v="month",enableDragDrop:g=!0,enableSearch:y=!0,enableFilters:x=!0,enableExport:w=!0,enableImport:b=!1,enableRecurringEvents:C=!0,enableReminders:S=!0,eventCategories:P,workingHours:T={start:"09:00",end:"18:00"},holidays:L=[],locale:M="en-US",timeFormat:N="12h",firstDayOfWeek:V=0,theme:_="auto",customTheme:I,compactMode:k=!1,showProUpgrade:R=!1}){if(R)return(0,Ie.jsx)($e,{className:F("w-full",l),children:(0,Ie.jsx)(We,{className:"py-12 text-center",children:(0,Ie.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Ie.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ie.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ie.jsxs)("div",{children:[(0,Ie.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Ie.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Calendar is available exclusively to MoonUI Pro subscribers."}),(0,Ie.jsx)("div",{className:"flex gap-3 justify-center",children:(0,Ie.jsx)("a",{href:"/pricing",children:(0,Ie.jsxs)(oe,{size:"sm",children:[(0,Ie.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[E,O]=Ml.default.useState(new Date),[B,U]=Ml.default.useState(null),[D,j]=Ml.default.useState(v),[$,z]=Ml.default.useState(!1),[q,H]=Ml.default.useState("create"),[K,G]=Ml.default.useState(null),[J,ae]=Ml.default.useState(null),[Z,Pe]=Ml.default.useState(null),[be,_e]=Ml.default.useState(""),[he,Ne]=Ml.default.useState("all"),[ve,Oe]=Ml.default.useState("all"),[Y,Q]=Ml.default.useState(!1),[pe,Re]=Ml.default.useState([]),[fe,Ce]=Ml.default.useState(new Date),[re,ye]=Ml.default.useState(!1),[se,ie]=Ml.default.useState(!1),Fe=new Date,At=E.getMonth(),to=E.getFullYear(),Ke=new Date(to,At,1),Je=new Date(to,At+1,0),Se=new Date(Ke),ht=(Se.getDay()-V+7)%7;Se.setDate(Se.getDate()-ht);let Tt=new Date(Je),De=(6-Tt.getDay()+V)%7;Tt.setDate(Tt.getDate()+De);let gt=[],Ge=new Date(Se);for(;Ge<=Tt;)gt.push(new Date(Ge)),Ge.setDate(Ge.getDate()+1);let Ut=Ml.default.useMemo(()=>{let Be=new Set;return e.forEach(rt=>{rt.tags?.forEach(St=>Be.add(St))}),Array.from(Be)},[e]),qt=Ml.default.useMemo(()=>e.filter(Be=>!(be&&!Be.title.toLowerCase().includes(be.toLowerCase())&&!Be.description?.toLowerCase().includes(be.toLowerCase())||he!=="all"&&Be.type!==he||ve!=="all"&&Be.priority!==ve||pe.length>0&&(!Be.tags||!Be.tags.some(rt=>pe.includes(rt))))),[e,be,he,ve,pe]),jr=Be=>qt.filter(rt=>{let St=new Date(rt.date);return rt.recurring?gn(Be,rt):St.toDateString()===Be.toDateString()}),gn=(Be,rt)=>{if(!rt.recurring)return!1;let St=new Date(rt.date),Dr=Math.floor((Be.getTime()-St.getTime())/(1e3*60*60*24));if(Dr<0||rt.recurring.endDate&&Be>rt.recurring.endDate)return!1;switch(rt.recurring.pattern){case"daily":return Dr%rt.recurring.interval===0;case"weekly":return Dr%(rt.recurring.interval*7)!==0?!1:rt.recurring.daysOfWeek?rt.recurring.daysOfWeek.includes(Be.getDay()):Be.getDay()===St.getDay();case"monthly":return((Be.getFullYear()-St.getFullYear())*12+(Be.getMonth()-St.getMonth()))%rt.recurring.interval!==0?!1:rt.recurring.dayOfMonth?Be.getDate()===rt.recurring.dayOfMonth:Be.getDate()===St.getDate();case"yearly":return(Be.getFullYear()-St.getFullYear())%rt.recurring.interval!==0?!1:Be.getMonth()===St.getMonth()&&Be.getDate()===St.getDate();default:return!1}},Oi=Be=>Be.toDateString()===Fe.toDateString(),Do=Be=>Be.getMonth()===At,ja=Be=>B&&Be.toDateString()===B.toDateString(),Vr=Be=>!!(d||f&&Be<f||p&&Be>p),Cn=Be=>{let rt=new Date(E);Be==="prev"?rt.setMonth(At-1):rt.setMonth(At+1),O(rt),a?.(rt)},vl=Be=>{j(Be),i?.(Be)},Td=()=>{let Be=bc(qt),rt=new Blob([Be],{type:"text/calendar"}),St=URL.createObjectURL(rt),Dr=document.createElement("a");Dr.href=St,Dr.download="calendar.ics",Dr.click(),URL.revokeObjectURL(St)},bc=Be=>{let rt=`BEGIN:VCALENDAR\r
128
128
  VERSION:2.0\r
129
129
  PRODID:-//MoonUI//Calendar//EN\r
130
130
  `;return Be.forEach(St=>{rt+=`BEGIN:VEVENT\r
@@ -411,7 +411,7 @@ Alternatively, you can use your own component as a description by assigning it a
411
411
  For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _p.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Xnt=Bnt;var Ynt=Vnt,xhe=Unt,bhe=znt,whe=qnt,Che=Knt,She=jnt,Phe=Wnt;var ih=A(de(),1),Qnt=Xnt;var Kmr=Ynt,Znt=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(xhe,{className:F("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:r}));Znt.displayName=xhe.displayName;var Ihe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsxs)(Kmr,{children:[(0,ih.jsx)(Znt,{}),(0,ih.jsx)(bhe,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...t})]}));Ihe.displayName=bhe.displayName;var khe=({className:e,...t})=>(0,ih.jsx)("div",{className:F("flex flex-col space-y-2 text-center sm:text-left",e),...t});khe.displayName="AlertDialogHeader";var Rhe=({className:e,...t})=>(0,ih.jsx)("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2 mt-6",e),...t});Rhe.displayName="AlertDialogFooter";var Nhe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(She,{ref:r,className:F("text-lg font-semibold",e),...t}));Nhe.displayName=She.displayName;var The=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(Phe,{ref:r,className:F("text-sm text-muted-foreground",e),...t}));The.displayName=Phe.displayName;var Mhe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(whe,{ref:r,className:F(jd(),e),...t}));Mhe.displayName=whe.displayName;var Ehe=WI.forwardRef(({className:e,...t},r)=>(0,ih.jsx)(Che,{ref:r,className:F(jd({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));Ehe.displayName=Che.displayName;var $n=A(de(),1);function Jnt({selectedRows:e,actions:t,onClearSelection:r,className:n}){let[o,a]=Ahe.default.useState(!1),[i,s]=Ahe.default.useState(null),l=e.length,c=async f=>{if(f.confirmMessage){s(f);return}await u(f)},u=async f=>{a(!0);try{await f.action(e),r&&r()}catch(p){console.error("Bulk action failed:",p)}finally{a(!1),s(null)}},d=async()=>{i&&await u(i)};return l===0?null:(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsxs)("div",{className:F("flex items-center gap-2",n),children:[(0,$n.jsxs)(pt,{variant:"secondary",className:"gap-1",children:[(0,$n.jsx)("span",{className:"font-semibold",children:l}),(0,$n.jsx)("span",{children:" Selected"})]}),(0,$n.jsxs)(Er,{children:[(0,$n.jsx)(Ar,{asChild:!0,children:(0,$n.jsx)(oe,{variant:"outline",size:"sm",disabled:o,className:"gap-2",children:o?(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Mr,{className:"h-4 w-4 animate-spin"}),"Processing..."]}):(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(vi,{className:"h-4 w-4"}),"Bulk Actions"]})})}),(0,$n.jsxs)(kr,{align:"end",className:"w-48",children:[t.map((f,p)=>{let h=typeof f.disabled=="function"?f.disabled(e):f.disabled;return(0,$n.jsxs)(Ve,{disabled:h||o,onSelect:()=>c(f),className:F("cursor-pointer",f.variant==="destructive"&&"text-destructive focus:text-destructive"),children:[f.icon&&(0,$n.jsx)("span",{className:"mr-2 h-4 w-4",children:f.icon}),f.label]},p)}),r&&(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Zr,{}),(0,$n.jsx)(Ve,{onSelect:r,className:"cursor-pointer text-muted-foreground",children:"Clear selection"})]})]})]})]}),(0,$n.jsx)(Qnt,{open:!!i,onOpenChange:f=>!f&&s(null),children:(0,$n.jsxs)(Ihe,{children:[(0,$n.jsxs)(khe,{children:[(0,$n.jsxs)(Nhe,{className:"flex items-center gap-2",children:[i?.variant==="destructive"&&(0,$n.jsx)(ka,{className:"h-5 w-5 text-destructive"}),i?.confirmTitle||"Confirm Action"]}),(0,$n.jsx)(The,{children:i?.confirmMessage||`This action will affect ${l} selected item${l>1?"s":""}. This action cannot be undone.`})]}),(0,$n.jsxs)(Rhe,{children:[(0,$n.jsx)(Ehe,{disabled:o,children:"Cancel"}),(0,$n.jsx)(Mhe,{onClick:d,disabled:o,className:F(i?.variant==="destructive"&&"bg-destructive text-destructive-foreground hover:bg-destructive/90"),children:o?(0,$n.jsxs)($n.Fragment,{children:[(0,$n.jsx)(Mr,{className:"mr-2 h-4 w-4 animate-spin"}),"Processing..."]}):"Confirm"})]})]})})]})}function Xmr(e,t,r=!0){if(e.length===0)return"";let n=t||Object.keys(e[0]),o=[];if(r){let a=n.map(i=>{let s=String(i);return s.includes(",")||s.includes('"')||s.includes(`
412
412
  `)?`"${s.replace(/"/g,'""')}"`:s});o.push(a.join(","))}return e.forEach(a=>{let i=n.map(s=>{let l=a[s];if(l==null)return"";if(l instanceof Date)return l.toISOString();if(typeof l=="object")return JSON.stringify(l);let c=String(l);return c.includes(",")||c.includes('"')||c.includes(`
413
413
  `)?`"${c.replace(/"/g,'""')}"`:c});o.push(i.join(","))}),o.join(`
414
- `)}function Ymr(e,t){if(!t||t.length===0)return JSON.stringify(e,null,2);let r=e.map(n=>{let o={};return t.forEach(a=>{a in n&&(o[a]=n[a])}),o});return JSON.stringify(r,null,2)}function Qmr(e,t,r){let n=new Blob([e],{type:r}),o=URL.createObjectURL(n),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}async function eot(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=Xmr(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=Ymr(e,o),s="application/json;charset=utf-8;",l="json";break;case"xlsx":throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");default:throw new Error(`Unsupported export format: ${r}`)}let c=`${n}-${new Date().toISOString().split("T")[0]}.${l}`;Qmr(i,c,s)}function tot(e,t){return e.filter(r=>{let n=r.id||r.accessorKey;return n&&t[n]!==!1}).map(r=>r.id||r.accessorKey).filter(Boolean)}var qI=A(ue(),1),rot=A(uv(),1);var zt=A(de(),1),Zmr={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",in:"In",notIn:"Not in",isNull:"Is empty",isNotNull:"Is not empty"};function Jmr(e){switch(e){case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"date":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"boolean":return["equals","notEquals","isNull","isNotNull"];case"select":return["equals","notEquals","in","notIn","isNull","isNotNull"];default:return["equals","notEquals","contains","notContains","startsWith","endsWith","isNull","isNotNull"]}}function not({table:e,open:t,onOpenChange:r,position:n="right",width:o="400px",filters:a,onFiltersChange:i,customFilters:s,matchAll:l,onMatchAllChange:c}){let[u,d]=(0,qI.useState)([]),[f,p]=(0,qI.useState)(!0),h=a||u,m=i||d,v=l!==void 0?l:f,g=c||p,y=(0,qI.useMemo)(()=>e.getAllColumns().filter(T=>T.id==="select"||T.id==="actions"||T.id==="expander"?!1:T.getCanFilter()),[e]),x=()=>{let T=y[0];if(!T)return;let L={column:T.id,operator:"contains",value:""};m([...h,L])},w=(T,L)=>{let M=[...h];M[T]={...M[T],...L},m(M)},b=T=>{m(h.filter((L,M)=>M!==T))},C=()=>{m([]),e.resetColumnFilters()},S=()=>{e.resetColumnFilters(),[...new Set(h.map(L=>L.column))].forEach(L=>{let M=e.getColumn(L);M&&M.setFilterValue({custom:!0,filters:h,matchAll:v})}),h.length===0&&e.resetColumnFilters(),r(!1)};if(typeof document>"u")return null;let P=(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20",style:{zIndex:9998},onClick:()=>r(!1)})}),(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:F("fixed top-0 bottom-0 bg-background border-l shadow-xl",n==="right"?"right-0":"left-0"),style:{width:o,zIndex:9999},children:(0,zt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(ns,{className:"h-5 w-5"}),(0,zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),h.length>0&&(0,zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",h.length," active)"]})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,zt.jsxs)("div",{className:"mb-6",children:[(0,zt.jsx)(Rt,{className:"text-sm font-medium mb-2 block",children:"Match conditions"}),(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(oe,{variant:v?"primary":"outline",size:"sm",onClick:()=>g(!0),className:"flex-1",children:"Match all"}),(0,zt.jsx)(oe,{variant:v?"outline":"primary",size:"sm",onClick:()=>g(!1),className:"flex-1",children:"Match any"})]})]}),(0,zt.jsx)(Ys,{className:"mb-6"}),s&&(0,zt.jsxs)(zt.Fragment,{children:[s,(0,zt.jsx)(Ys,{className:"my-6"})]}),(0,zt.jsx)("div",{className:"space-y-4",children:h.map((T,L)=>(0,zt.jsx)(ehr,{filter:T,columns:y,onUpdate:M=>w(L,M),onRemove:()=>b(L)},L))}),(0,zt.jsxs)(oe,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,zt.jsx)(Vi,{className:"h-4 w-4 mr-2"}),"Add filter"]})]}),(0,zt.jsx)("div",{className:"p-4 border-t space-y-2",children:(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsxs)(oe,{variant:"outline",onClick:C,disabled:h.length===0,className:"flex-1",children:[(0,zt.jsx)(Ss,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,zt.jsx)(oe,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]});return(0,rot.createPortal)(P,document.body)}function ehr({filter:e,columns:t,onUpdate:r,onRemove:n}){let a=t.find(p=>p.id===e.column)?.columnDef,i=a?.meta?.filterType||"string",s=a?.meta?.filterOptions,l=a?.meta?.filterValueAccessor,c=Jmr(i),u=e.operator!=="isNull"&&e.operator!=="isNotNull",d=e.operator==="in"||e.operator==="notIn",f=qI.default.useMemo(()=>i!=="select"&&!s?null:s||null,[i,s]);return(0,zt.jsxs)("div",{className:"space-y-2 p-3 border rounded-lg bg-muted/30",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsxs)(Qo,{value:e.column,onValueChange:p=>r({column:p}),children:[(0,zt.jsx)(Zo,{className:"flex-1",children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:t.map(p=>{let h=p.columnDef.header,m=typeof h=="function"?p.id:h||p.id;return(0,zt.jsx)(Bt,{value:p.id,children:m},p.id)})})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)(Qo,{value:e.operator,onValueChange:p=>r({operator:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:c.map(p=>(0,zt.jsx)(Bt,{value:p,children:Zmr[p]},p))})]}),u&&(0,zt.jsx)("div",{children:i==="boolean"?(0,zt.jsxs)(Qo,{value:String(e.value),onValueChange:p=>r({value:p==="true"}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsxs)(Jo,{style:{zIndex:1e4},children:[(0,zt.jsx)(Bt,{value:"true",children:"True"}),(0,zt.jsx)(Bt,{value:"false",children:"False"})]})]}):(i==="select"||f)&&!d?(0,zt.jsxs)(Qo,{value:e.value||"",onValueChange:p=>r({value:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{placeholder:"Select value..."})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:f?.map(p=>(0,zt.jsx)(Bt,{value:p,children:p},p))})]}):(i==="select"||f)&&d?(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Select multiple values:"}),(0,zt.jsx)("div",{className:"space-y-1 max-h-32 overflow-y-auto border rounded-md p-2",children:f?.map(p=>{let h=Array.isArray(e.value)?e.value:[],m=h.includes(p);return(0,zt.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded",children:[(0,zt.jsx)("input",{type:"checkbox",checked:m,onChange:v=>{let g=v.target.checked?[...h,p]:h.filter(y=>y!==p);r({value:g})},className:"rounded border-gray-300"}),(0,zt.jsx)("span",{className:"text-sm",children:p})]},p)})})]}):i==="number"?(0,zt.jsx)(Jt,{type:"number",value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."}):d?(0,zt.jsx)(Jt,{value:Array.isArray(e.value)?e.value.join(", "):e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter values separated by comma..."}):(0,zt.jsx)(Jt,{value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."})})]})}var Ay=A(ue(),1);var ya=A(de(),1);function oot({table:e,filter:t,data:r}){let[n,o]=(0,Ay.useState)(!1),[a,i]=(0,Ay.useState)(""),s=Ay.default.useMemo(()=>{let g=e.getColumn(t.column);return g||(g=e.getAllColumns().find(x=>x.id===t.column||x.columnDef.accessorKey===t.column)),g},[e,t.column]),l=(0,Ay.useMemo)(()=>{if(t.options&&t.options!=="auto")return t.options;let g=new Set;return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}x!=null&&x!==""&&g.add(String(x))}),Array.from(g).sort()},[r,t.column,t.options]),c=s?.getFilterValue(),u=(0,Ay.useMemo)(()=>c?Array.isArray(c)?new Set(c):new Set([String(c)]):new Set,[c]),d=(0,Ay.useMemo)(()=>{if(!t.showCounts)return{};let g={};return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}if(x!=null&&x!==""){let w=String(x);g[w]=(g[w]||0)+1}}),g},[r,t.column,t.showCounts]),f=g=>{if(s)if(t.multi){let y=new Set(u);y.has(g)?y.delete(g):y.add(g),y.size===0?s.setFilterValue(void 0):s.setFilterValue(Array.from(y))}else u.has(g)?s.setFilterValue(void 0):s.setFilterValue(g)},p=()=>{s?.setFilterValue(void 0),i("")},h=t.label||t.column,m=(0,Ay.useMemo)(()=>a?l.filter(g=>g.toLowerCase().includes(a.toLowerCase())):l,[l,a]),v=!s||l.length===0;return(0,ya.jsxs)(ls,{open:n,onOpenChange:o,children:[(0,ya.jsx)(cs,{asChild:!0,children:(0,ya.jsxs)(oe,{variant:"outline",size:"sm",disabled:v,className:F("h-8 border-dashed",u.size>0&&"border-solid"),children:[h,u.size>0&&(0,ya.jsxs)(ya.Fragment,{children:[(0,ya.jsx)("span",{className:"mx-2 h-4 w-px bg-border"}),(0,ya.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:u.size})]})]})}),(0,ya.jsx)(Wi,{className:"w-[250px] p-0",align:"start",children:(0,ya.jsxs)("div",{className:"p-2",children:[l.length>0&&(0,ya.jsx)("div",{className:"pb-2",children:(0,ya.jsxs)("div",{className:"relative",children:[(0,ya.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,ya.jsx)(Jt,{placeholder:`Search ${h.toLowerCase()}...`,value:a,onChange:g=>i(g.target.value),className:"h-8 w-full pl-8"})]})}),l.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No options available"}):m.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No results found"}):(0,ya.jsx)("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:m.map(g=>{let y=u.has(g);return(0,ya.jsxs)("button",{onClick:()=>f(g),className:F("flex w-full items-center justify-between rounded px-2 py-1.5 text-sm hover:bg-accent",y&&"bg-accent"),children:[(0,ya.jsxs)("div",{className:"flex items-center",children:[(0,ya.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,ya.jsx)(on,{className:"h-4 w-4"})}),(0,ya.jsx)("span",{children:g})]}),t.showCounts&&d[g]!==void 0&&(0,ya.jsx)("span",{className:"text-xs text-muted-foreground",children:d[g]})]},g)})}),u.size>0&&(0,ya.jsx)("div",{className:"border-t mt-2 pt-2",children:(0,ya.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-center",onClick:p,children:"Clear filter"})})]})})]})}var q4=A(ue(),1);var Bn=A(de(),1);function aot({table:e,column:t,title:r,options:n="auto",data:o}){let a=e.getColumn(t),[i,s]=(0,q4.useState)("");if(!a)return null;let l=a.columnDef,c=l?.meta?.filterValueAccessor,u=l?.meta?.filterOptions,d=b=>c?c(b):b[t],{availableOptions:f,optionCounts:p}=(0,q4.useMemo)(()=>{let b={},C=new Set;o.forEach(P=>{let T=d(P);if(T!=null&&T!==""){let L=String(T);C.add(L),b[L]=(b[L]||0)+1}});let S=[];return n!=="auto"?S=n:u?S=u.map(P=>({value:P,label:P})):S=Array.from(C).sort().slice(0,50).map(P=>({value:P,label:P})),{availableOptions:S,optionCounts:b}},[o,n,u]),h=a.getFilterValue(),m=new Set(h||[]),v=(0,q4.useMemo)(()=>i?f.filter(b=>(b.label||b.value).toLowerCase().includes(i.toLowerCase())):f,[f,i]),g=r||a.columnDef.header||t,y=b=>{let C=new Set(m);C.has(b)?C.delete(b):C.add(b),C.size===0?a.setFilterValue(void 0):a.setFilterValue(Array.from(C))},x=()=>{a.setFilterValue(void 0),s("")},w=()=>{let b=v.map(C=>C.value);a.setFilterValue(b)};return(0,Bn.jsxs)(ls,{children:[(0,Bn.jsx)(cs,{asChild:!0,children:(0,Bn.jsxs)(oe,{variant:"outline",size:"sm",className:F("h-8 border-dashed",m.size>0&&"border-solid"),children:[(0,Bn.jsx)(jb,{className:"mr-2 h-4 w-4"}),g,m.size>0&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{orientation:"vertical",className:"mx-2 h-4"}),(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:m.size}),(0,Bn.jsx)("div",{className:"hidden space-x-1 lg:flex",children:m.size>2?(0,Bn.jsxs)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[m.size," selected"]}):Array.from(m).slice(0,2).map(b=>{let C=f.find(S=>S.value===b);return(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:C?.label||b},b)})})]})]})}),(0,Bn.jsxs)(Wi,{className:"w-[300px] p-0",align:"start",children:[(0,Bn.jsx)("div",{className:"p-3",children:(0,Bn.jsxs)("div",{className:"relative",children:[(0,Bn.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Bn.jsx)(Jt,{placeholder:`Search ${g.toLowerCase()}...`,value:i,onChange:b=>s(b.target.value),className:"h-8 pl-8"})]})}),(0,Bn.jsx)(Ys,{}),(0,Bn.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:v.length===0?(0,Bn.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No results found"}):(0,Bn.jsx)("div",{className:"p-2",children:v.map(b=>{let C=m.has(b.value),S=p[b.value]||0;return(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start font-normal",onClick:()=>y(b.value),children:[(0,Bn.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,Bn.jsx)(on,{className:F("h-4 w-4")})}),b.icon&&(0,Bn.jsx)("span",{className:"mr-2",children:b.icon}),(0,Bn.jsx)("span",{className:"flex-1 text-left",children:b.label||b.value}),S>0&&(0,Bn.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:S})]},b.value)})})}),(m.size>0||v.length>0)&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{}),(0,Bn.jsxs)("div",{className:"flex items-center justify-between p-2",children:[m.size>0?(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:x,className:"h-8 px-2 lg:px-3",children:["Clear",(0,Bn.jsx)(lr,{className:"ml-2 h-4 w-4"})]}):(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:w,className:"h-8 px-2 lg:px-3",children:["Select all",(0,Bn.jsx)(on,{className:"ml-2 h-4 w-4"})]}),(0,Bn.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.size," of ",f.length," selected"]})]})]})]})]})}var ot=A(de(),1);function Lhe({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,pageSizeOptions:l=[5,10,20,50,100],className:c,onRowSelect:u,onExport:d,enableExpandable:f=!1,renderSubComponent:p,expandedRows:h,onRowExpandChange:m,bulkActions:v=[],quickFilters:g=[],facetedFilters:y=[],features:x={},theme:w={},texts:b={},enableSorting:C=!0,enableFiltering:S=!0,enablePagination:P=!0,enableColumnVisibility:T=!0,enableRowSelection:L,filterPlaceholder:M="Search all columns...",defaultPageSize:N,manualPagination:V=!1,pageCount:_,onPaginationChange:I,onSortingChange:k,onColumnFiltersChange:R,state:E}){let O=vs.default.useMemo(()=>e.map(De=>{let{enableHiding:gt,...Ge}=De;return{...Ge,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:B,isLoading:U}=st();if(!U&&!B)return(0,ot.jsx)(Rn,{componentName:"Data Table",className:F("w-full",c)});let[D,j]=vs.default.useState([]),[$,z]=vs.default.useState([]),[q,H]=vs.default.useState({}),[K,G]=vs.default.useState({}),[J,ae]=vs.default.useState(""),[Z,Pe]=vs.default.useState({pageIndex:0,pageSize:N||s||10}),[be,_e]=vs.default.useState(!1),[he,Ne]=vs.default.useState(new Set),[ve,Oe]=vs.default.useState(!1),Y=h||he,Q=m?De=>m(De):Ne,pe=N||s,Re=vs.default.useMemo(()=>t,[t]),fe=De=>()=>{let Ge=(E?.sorting??D).find(jr=>jr.id===De),Ut=[];Ge?Ge.desc?Ut=[]:Ut=[{id:De,desc:!0}]:Ut=[{id:De,desc:!1}];let qt=k!==void 0?k:j;typeof qt=="function"&&qt(Ut)},Ce=vs.default.useRef(null),re=vs.default.useCallback(De=>{let gt=typeof De=="function"?De(K):De;if(G(gt),u&&Ce.current){let Ge=Object.keys(gt).filter(qt=>gt[qt]),Ut=Ce.current.getRowModel().rows.filter(qt=>Ge.includes(qt.id)).map(qt=>qt.original);u(Ut)}},[K,u]),ye=vs.default.useMemo(()=>{let De=O.map(Ge=>!Ge.id&&Ge.accessorKey?{...Ge,id:Ge.accessorKey}:Ge),gt=De.some(Ge=>{if(Ge.id==="select")return!0;let Ut=Ge.header?.toString()||"",qt=Ge.cell?.toString()||"";return Ut.includes("Checkbox")||qt.includes("Checkbox")});return(a||L)&&!gt&&(De=[{id:"select",header:({table:Ut})=>{let qt=Ut.getIsAllPageRowsSelected(),jr=Ut.getIsSomePageRowsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt?!0:jr?"indeterminate":!1,onCheckedChange:gn=>{Ut.toggleAllPageRowsSelected(!!gn)},"aria-label":"Select all",className:"h-4 w-4"})})},cell:({row:Ut})=>{let qt=Ut.getIsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt,onCheckedChange:jr=>Ut.toggleSelected(!!jr),disabled:!Ut.getCanSelect(),"aria-label":"Select row",className:"h-4 w-4"},`select-${Ut.id}-${qt}`)})},enableSorting:!1,enableHiding:!1,size:40,maxSize:40},...De]),De},[O,a,L]),se=Ort({data:Re,columns:ye,onSortingChange:k!==void 0?k:j,onColumnFiltersChange:R!==void 0?R:z,onPaginationChange:I!==void 0?I:Pe,getCoreRowModel:Ert(),getPaginationRowModel:Lrt(),getSortedRowModel:Drt(),getFilteredRowModel:Art(),enableSortingRemoval:!0,enableMultiSort:!1,sortDescFirst:!1,onColumnVisibilityChange:H,onRowSelectionChange:re,onGlobalFilterChange:ae,globalFilterFn:"includesString",enableRowSelection:a||L||!1,filterFns:{custom:(De,gt,Ge)=>{if(Array.isArray(Ge)){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return Ge.includes(String(ja))}if(typeof Ge=="string"||typeof Ge=="number"||typeof Ge=="boolean"){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return String(ja)===String(Ge)}if(!Ge?.custom||!Ge?.filters)return!0;let Ut=Ge.filters,qt=Ge.matchAll!==void 0?Ge.matchAll:!0,jr=Ut.map(gn=>{let ja=se.getColumn(gn.column)?.columnDef?.meta?.filterValueAccessor,Vr=ja?ja(De.original):De.getValue(gn.column),Cn=gn.value;switch(gn.operator){case"equals":return Vr===Cn;case"notEquals":return Vr!==Cn;case"contains":return String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"notContains":return!String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"startsWith":return String(Vr).toLowerCase().startsWith(String(Cn).toLowerCase());case"endsWith":return String(Vr).toLowerCase().endsWith(String(Cn).toLowerCase());case"greaterThan":return Number(Vr)>Number(Cn);case"lessThan":return Number(Vr)<Number(Cn);case"greaterThanOrEqual":return Number(Vr)>=Number(Cn);case"lessThanOrEqual":return Number(Vr)<=Number(Cn);case"in":return Array.isArray(Cn)?Cn.includes(Vr):String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"notIn":return Array.isArray(Cn)?!Cn.includes(Vr):!String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"isNull":return Vr==null||Vr==="";case"isNotNull":return Vr!=null&&Vr!=="";default:return!0}});return qt?jr.every(gn=>gn):jr.some(gn=>gn)}},manualPagination:V,pageCount:_,state:{sorting:E?.sorting??D,columnFilters:E?.columnFilters??$,columnVisibility:E?.columnVisibility??q,rowSelection:E?.rowSelection??K,globalFilter:E?.globalFilter??J,pagination:E?.pagination??Z},initialState:{pagination:{pageSize:pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:(De,gt)=>{let Ge=De;return Ge.id!==void 0&&Ge.id!==null&&Ge.id!==""?String(Ge.id):Ge.orderId!==void 0&&Ge.orderId!==null?String(Ge.orderId):Ge.orderNumber!==void 0&&Ge.orderNumber!==null?String(Ge.orderNumber):Ge.email?`email-${Ge.email}`:Ge.name&&Ge.email?`${Ge.name}-${Ge.email}`:Ge.name?`name-${Ge.name}-${gt}`:String(gt)}});Ce.current=se;let ie=se.getState(),Fe=se.getRowModel(),At=vs.default.useRef(Fe.rows),to=vs.default.useMemo(()=>{let De=At.current!==Fe.rows;return De&&(At.current=Fe.rows),De},[Fe.rows]),Ke=At.current,Je={sorting:x.sorting!==!1,filtering:x.filtering!==!1||n,pagination:x.pagination!==!1||i,search:x.search!==!1||r,columnVisibility:x.columnVisibility!==!1,rowSelection:x.rowSelection!==!1||a,export:x.export!==!1||o},Se=async De=>{let gt=se.getFilteredSelectedRowModel().rows,Ge=gt.length>0?gt.map(jr=>jr.original):se.getFilteredRowModel().rows.map(jr=>jr.original);if(typeof o=="object"&&o.onExport){o.onExport(Ge,De);return}if(d){d(Ge);return}let Ut=typeof o=="object"&&o.filename?o.filename:"data-export",qt=tot(O,q);await eot(Ge,{format:De,filename:Ut,columns:qt,includeHeaders:!0})},ht=vs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Tt=()=>{se.resetRowSelection()};return(0,ot.jsxs)("div",{className:F("moonui-pro-datatable-container flex flex-col gap-4",c),children:[a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-4 py-2",children:[(0,ot.jsxs)("span",{className:"text-sm text-muted-foreground",children:[se.getFilteredSelectedRowModel().rows.length," Selected"]}),v.length>0&&(0,ot.jsx)(Jnt,{selectedRows:se.getFilteredSelectedRowModel().rows.map(De=>De.original),actions:v,onClearSelection:Tt})]}),(0,ot.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r&&(0,ot.jsxs)("div",{className:"relative",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,ot.jsx)(Jt,{placeholder:M,value:J,onChange:De=>ae(De.target.value),className:"pl-8 w-full sm:w-64"})]}),g.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.map((De,gt)=>(0,ot.jsx)(oot,{table:se,filter:De,data:t},`quick-${De.column}-${gt}`))}),y.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:y.map((De,gt)=>{let Ge=typeof De=="string"?De:De.column,Ut=typeof De=="string"?void 0:De.label;return(0,ot.jsx)(aot,{table:se,column:Ge,title:Ut,data:t},`faceted-${Ge}-${gt}`)})}),n&&(0,ot.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>Oe(!0),children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(ns,{className:"mr-2 h-4 w-4"})}),"Filters",$.length>0&&(0,ot.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:$.length})]})]}),(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o&&ht.length>0&&(0,ot.jsxs)(Er,{children:[(0,ot.jsx)(Ar,{asChild:!0,children:(0,ot.jsxs)(oe,{variant:"outline",size:"sm",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Pn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,ot.jsxs)(kr,{align:"end",children:[ht.includes("csv")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("csv"),children:[(0,ot.jsx)(gx,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ht.includes("json")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("json"),children:[(0,ot.jsx)(f1,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ht.includes("xlsx")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("xlsx"),children:[(0,ot.jsx)(fO,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,ot.jsx)(_rt,{table:se})]})]}),(0,ot.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,ot.jsx)("div",{style:{overflowX:"auto"},children:(0,ot.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,ot.jsx)("thead",{className:"moonui-data-table-header",children:se.getHeaderGroups().map(De=>(0,ot.jsx)("tr",{className:"moonui-data-table-row border-b",children:De.headers.filter(gt=>gt.column.getIsVisible()).map(gt=>(0,ot.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:gt.isPlaceholder?null:(0,ot.jsxs)("div",{className:F("flex items-center space-x-2",gt.column.getCanSort()&&"cursor-pointer select-none"),onClick:gt.column.getCanSort()?fe(gt.column.id):void 0,children:[Gme(gt.column.columnDef.header,gt.getContext()),gt.column.getCanSort()&&(0,ot.jsx)("div",{className:"ml-2",children:gt.column.getIsSorted()==="asc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(mx,{className:"h-4 w-4"})}):gt.column.getIsSorted()==="desc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(om,{className:"h-4 w-4"})}):(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(px,{className:"h-4 w-4"})})})]})},gt.id))},De.id))}),(0,ot.jsx)("tbody",{className:"moonui-data-table-body",children:be?(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:(0,ot.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Mr,{className:"h-4 w-4 animate-spin"})}),(0,ot.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ke?.length?(0,ot.jsx)(ot.Fragment,{children:Ke.map((De,gt)=>{let Ge=De.original.id||De.id,Ut=f&&Y.has(Ge);return(0,ot.jsx)(iot,{row:De,columns:O,isExpanded:Ut,enableExpandable:f,renderSubComponent:p,visibilityState:se.getState().columnVisibility},Ge)})}):(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,ot.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,ot.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("span",{children:[se.getFilteredSelectedRowModel().rows.length," ","of ",se.getFilteredRowModel().rows.length," ","row(s) selected."]})}),(0,ot.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,ot.jsx)("select",{value:se.getState().pagination.pageSize,onChange:async De=>{let gt=Number(De.target.value);I?I({pageIndex:se.getState().pagination.pageIndex,pageSize:gt}):(_e(!0),await new Promise(Ge=>setTimeout(Ge,300)),se.setPageSize(gt),_e(!1))},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:be,children:l.map(De=>(0,ot.jsx)("option",{value:De,children:De},De))})]}),(0,ot.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",se.getState().pagination.pageIndex+1," of"," ",se.getPageCount()]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{I?I({pageIndex:0,pageSize:se.getState().pagination.pageSize}):(_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(0),_e(!1))},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(sO,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(I){let De=se.getState().pagination.pageIndex;I({pageIndex:De-1,pageSize:se.getState().pagination.pageSize})}else _e(!0),await new Promise(De=>setTimeout(De,300)),se.previousPage(),_e(!1)},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(gi,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.nextPage(),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Jn,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(se.getPageCount()-1),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(lO,{className:"h-4 w-4"})})})]})]})]}),n&&(0,ot.jsx)(not,{table:se,open:ve,onOpenChange:Oe})]})}function thr(e,t){return{id:"expander",header:()=>null,size:50,cell:({row:r})=>{let n=r.original.id||r.id,o=e.has(n);return(0,ot.jsx)("button",{onClick:a=>{a.stopPropagation(),t(n)},className:"p-2 hover:bg-muted rounded-md transition-colors","aria-label":o?"Collapse row":"Expand row",children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,ot.jsx)(ca,{className:"h-4 w-4 text-muted-foreground"}):(0,ot.jsx)(Jn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function rhr(e=new Set){let[t,r]=vs.default.useState(e),n=vs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=vs.default.useCallback(i=>{r(new Set(i))},[]),a=vs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var iot=({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("tr",{className:F("border-b transition-colors hover:bg-muted/50",e.getIsSelected()&&"bg-muted",r&&"border-b-0"),children:e.getAllCells().filter(s=>a[s.column.id]!==!1).map(s=>(0,ot.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:Gme(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,ot.jsx)("tr",{className:"border-b",children:(0,ot.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,ot.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,ot.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})};iot.displayName="TableRow";var nhr=Lhe;var An=A(ue(),1);Ur();var u7=A(Ohe(),1);var Qe=A(de(),1),_he=An.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,An.useState)(r||""),s=(0,An.useRef)(void 0);(0,An.useEffect)(()=>{i(r)},[r]);let l=(0,An.useCallback)(c=>{let u=c.target.value;i(u),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(u),e.current&&e.current.focus()},150)},[n,e]);return(0,An.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,Qe.jsx)("div",{className:"p-4 border-b",children:(0,Qe.jsxs)("div",{className:"relative",children:[(0,Qe.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,Qe.jsx)("input",{ref:e,type:"text",placeholder:t,value:a,onChange:l,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",className:"w-full h-10 pl-9 pr-9 text-sm bg-background border border-input rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),o&&(0,Qe.jsxs)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:[(0,Qe.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});_he.displayName="SearchInput";function ohr({sections:e,footer:t,showSearch:r=!0,searchPlaceholder:n="Search...",searchQuery:o="",onSearchChange:a,showThemeToggle:i=!1,theme:s="system",onThemeChange:l,branding:c,collapsible:u=!0,defaultCollapsed:d=!1,floatingActionButton:f=!0,floatingActionButtonPosition:p={bottom:"1rem",left:"1rem"},floatingActionButtonClassName:h,glassmorphism:m=!1,animatedBackground:v=!1,keyboardShortcuts:g=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:w,customStyles:b,fullWidthItems:C=!0,enableNProgress:S=!0,className:P,activePath:T,onNavigate:L}){let[M,N]=(0,An.useState)(!1),[V,_]=(0,An.useState)(!1),[I,k]=(0,An.useState)(d),[R,E]=(0,An.useState)([]),[O,B]=(0,An.useState)(o),[U,D]=(0,An.useState)([]),j=(0,An.useRef)(null);(0,An.useEffect)(()=>{S&&u7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[S]);let $=Xa(0),z=Xa(0),q=Rv($,{stiffness:300,damping:30}),H=Rv(z,{stiffness:300,damping:30});(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q=localStorage.getItem(x);if(Q){let pe=JSON.parse(Q);k(pe.collapsed),E(pe.expandedSections),D(pe.pinnedItems||[])}}},[y,x]),(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q={collapsed:I,expandedSections:R,searchQuery:O,pinnedItems:U,recentItems:[]};localStorage.setItem(x,JSON.stringify(Q)),w?.(Q)}},[I,R,O,U,y,x,w]),(0,An.useEffect)(()=>{let Q=()=>{N(window.innerWidth<768)};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]),(0,An.useEffect)(()=>{let Q=e.filter(pe=>pe.defaultExpanded!==!1).map(pe=>pe.id);E(Q)},[e]),(0,An.useEffect)(()=>{if(!g)return;let Q=pe=>{(pe.metaKey||pe.ctrlKey)&&pe.key==="k"&&(pe.preventDefault(),j.current?.focus()),(pe.metaKey||pe.ctrlKey)&&pe.key==="b"&&(pe.preventDefault(),M?_(!V):k(!I))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[g,M,V,I]),(0,An.useEffect)(()=>{if(!v)return;let Q=pe=>{let Re=document.querySelector(".sidebar-container")?.getBoundingClientRect();Re&&($.set(pe.clientX-Re.left),z.set(pe.clientY-Re.top))};return document.addEventListener("mousemove",Q),()=>document.removeEventListener("mousemove",Q)},[v,$,z]);let K=(0,An.useCallback)(Q=>{E(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),G=(0,An.useCallback)(Q=>{D(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),J=(0,An.useCallback)(Q=>{Q.action?Q.action():Q.href&&(S&&(u7.default.start(),setTimeout(()=>u7.default.done(),500)),L?L(Q.href):window.location.href=Q.href,M&&_(!1))},[L,M,S]);(0,An.useEffect)(()=>{B(o)},[o]);let ae=(0,An.useCallback)(Q=>{B(Q),a?.(Q)},[a]),Z=(0,An.useCallback)((Q,pe)=>pe?Q.filter(Re=>{let fe=Re.title.toLowerCase().includes(pe.toLowerCase()),Ce=Re.items?.some(re=>re.title.toLowerCase().includes(pe.toLowerCase()));return fe||Ce}):Q,[]),Pe=(0,An.useMemo)(()=>O?e.map(Q=>({...Q,filteredItems:Z(Q.items,O).map(pe=>({...pe,filteredChildren:pe.items?Z(pe.items,O):void 0}))})).filter(Q=>Q.filteredItems.length>0):e.map(Q=>({...Q,filteredItems:Q.items.map(pe=>({...pe,filteredChildren:pe.items}))})),[e,O,Z]),be=(0,An.useCallback)(Q=>{let pe=Q.items&&Q.items.length>0;return!pe&&!Q.title?null:(0,Qe.jsxs)("div",{className:F("min-w-[240px] max-w-[320px] p-3",m&&"bg-background/95 backdrop-blur-sm"),children:[(0,Qe.jsx)("div",{className:"font-medium px-2 py-1.5 text-sm",children:Q.title}),pe&&(0,Qe.jsx)("div",{className:"mt-1 space-y-0.5",children:Q.items?.map(Re=>{let fe=Re.href===T,Ce=Re.items&&Re.items.length>0;return(0,Qe.jsx)("div",{className:"relative",children:Ce?(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,Qe.jsxs)("div",{className:"flex items-center gap-2",children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title})]}),(0,Qe.jsx)(Jn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-2 min-w-[200px] max-w-[280px] z-[110]",m&&"bg-background/95 backdrop-blur-sm"),children:(0,Qe.jsx)("div",{className:"space-y-0.5",children:Re.items?.map(re=>{let ye=re.href===T;return(0,Qe.jsxs)("button",{onClick:()=>J(re),disabled:re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",ye&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,Qe.jsx)(pt,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]},re.id)})})})]}):(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title}),Re.badge&&(0,Qe.jsx)(pt,{variant:Re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Re.badge})]})},Re.id)})})]})},[T,m,J]),_e=(0,An.useCallback)((Q,pe=0,Re)=>{let fe=Q.href===T,Ce=U.includes(Q.id),re=Q.items&&Q.items.length>0,ye=R.includes(Q.id),se=I&&!M&&pe===0,ie=Q.tooltip&&!I&&!se,Fe=Q.icon||(pe===0?(0,Qe.jsx)(zd,{className:"h-4 w-4"}):(0,Qe.jsx)(Vd,{className:"h-3 w-3"})),At=(0,Qe.jsxs)("button",{onClick:()=>{re&&!I?K(Q.id):re||J(Q)},className:F("group relative flex items-center gap-3 rounded-lg text-sm transition-all","w-full px-3 py-2.5","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Q.disabled&&"opacity-50 cursor-not-allowed",pe>0&&"ml-6 text-xs py-2",I&&pe===0&&"justify-center px-0 h-12",b?.hover),disabled:Q.disabled,children:[(0,Qe.jsx)("span",{className:F("flex-shrink-0 flex items-center justify-center",I&&pe===0&&"w-full",!I&&"w-5"),children:Fe}),(!I||pe>0)&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("span",{className:"flex-1 text-left truncate",children:Q.title}),Q.badge&&(0,Qe.jsx)(pt,{variant:Q.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Q.badge}),re&&pe===0&&(0,Qe.jsx)(ca,{className:F("h-4 w-4 flex-shrink-0 transition-transform",ye&&"rotate-180")}),Ce&&(0,Qe.jsx)(BO,{className:"h-3 w-3 flex-shrink-0"})]})]});return se?(0,Qe.jsx)("div",{children:(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:At}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,forceMount:!0,className:F("p-0 w-auto min-w-[240px] max-w-[320px] z-[100]",m&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-left-2"),children:(0,Qe.jsx)(ne.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15,ease:"easeOut"},children:be(Q)})})]})},Q.id):(0,Qe.jsxs)("div",{children:[ie?(0,Qe.jsx)(Il,{children:(0,Qe.jsxs)(qs,{children:[(0,Qe.jsx)(Gs,{asChild:!0,children:At}),(0,Qe.jsx)(Rs,{side:"right",children:(0,Qe.jsx)("p",{children:Q.tooltip})})]})}):At,re&&!I&&Re&&(0,Qe.jsx)(Ft,{initial:!1,children:ye&&(0,Qe.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:(0,Qe.jsx)("div",{className:"pt-1 space-y-1",children:Re.map(to=>_e(to,pe+1))})},`${Q.id}-children`)})]},Q.id)},[T,U,R,I,b,J,K,M,m,be,C]),he=An.default.memo(()=>(0,Qe.jsxs)("div",{className:F("flex items-center h-16 px-4 border-b",I&&!M&&"px-0 justify-center"),children:[c&&(0,Qe.jsxs)(Qe.Fragment,{children:[c.logo,(!I||M)&&c.title&&(0,Qe.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),M&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>_(!1),children:(0,Qe.jsx)(lr,{className:"h-4 w-4"})}),!M&&u&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:F("h-8 w-8 p-0 transition-all",!I&&"ml-auto",I&&"mx-auto"),onClick:()=>k(!I),children:(0,Qe.jsx)(ne.div,{animate:{rotate:I?0:180},transition:{duration:.2},children:(0,Qe.jsx)(Jn,{className:"h-4 w-4"})})})]})),Ne=An.default.memo(()=>(0,Qe.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",style:{scrollbarWidth:"thin"},children:(0,Qe.jsxs)("div",{className:"p-4 space-y-6",children:[U.length>0&&(!I||M)&&(0,Qe.jsxs)("div",{children:[(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,Qe.jsx)("div",{className:"space-y-1",children:e.flatMap(Q=>Q.items.filter(pe=>U.includes(pe.id))).map(Q=>_e(Q))}),(0,Qe.jsx)(Ys,{className:"mt-4"})]}),Pe.map((Q,pe)=>(0,Qe.jsxs)("div",{children:[Q.title&&(!I||M)&&(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:Q.title}),(0,Qe.jsx)("div",{className:"space-y-1",children:Q.filteredItems.map(Re=>_e(Re,0,Re.filteredChildren))}),Q.showDivider&&pe<Pe.length-1&&(0,Qe.jsx)(Ys,{className:"mt-4"})]},Q.id))]})}));Ne.displayName="SidebarMenuContent";let ve=An.default.memo(()=>t?(0,Qe.jsxs)("div",{className:"border-t p-4",children:[(0,Qe.jsx)("div",{className:"space-y-1",children:t.items.map(Q=>_e(Q))}),i&&(!I||M)&&(0,Qe.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,Qe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,Qe.jsxs)(Er,{children:[(0,Qe.jsx)(Ar,{asChild:!0,children:(0,Qe.jsxs)(oe,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,Qe.jsx)(gv,{className:"h-3 w-3"}),s==="dark"&&(0,Qe.jsx)(mv,{className:"h-3 w-3"}),s==="system"&&(0,Qe.jsx)(lm,{className:"h-3 w-3"})]})}),(0,Qe.jsxs)(kr,{align:"end",children:[(0,Qe.jsxs)(Ve,{onClick:()=>l?.("light"),children:[(0,Qe.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("dark"),children:[(0,Qe.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("system"),children:[(0,Qe.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null);ve.displayName="SidebarFooter";let Oe=An.default.memo(()=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Ne,{}),(0,Qe.jsx)(ve,{})]}));Oe.displayName="SidebarContent";let Y=F("moonui-pro flex h-full flex-col bg-background border-r transition-all duration-300 ease-in-out",m&&"bg-background/80 backdrop-blur-xl border-white/10",I&&!M&&"w-20",!I&&!M&&"w-64",b?.background,b?.border,P);return M?(0,Qe.jsxs)(Qe.Fragment,{children:[f&&(0,Qe.jsx)(oe,{onClick:()=>_(!0),className:F("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",h),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,Qe.jsx)(sm,{className:"h-5 w-5"})}),(0,Qe.jsx)($w,{open:V,onOpenChange:_,children:(0,Qe.jsx)(Wx,{side:"left",className:"w-80 p-0",children:(0,Qe.jsxs)("div",{className:F(Y,"sidebar-container flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-mobile"),(0,Qe.jsx)(Oe,{})]})})})]}):(0,Qe.jsxs)("aside",{className:F(Y,"sidebar-container hidden md:flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-desktop"),(0,Qe.jsx)(Oe,{})]})}function lot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Qe.jsx)(Rn,{componentName:"Advanced Sidebar",compact:!0,className:F("w-full max-w-xs",e.className)}):(0,Qe.jsx)(ohr,{...e})}var ys=A(ue(),1);Ur();var d7=A(Ohe(),1);var ke=A(de(),1);function ahr({sections:e=[],branding:t,showSearch:r=!0,enableCommandAI:n=!1,commandAIShortcut:o="\u2318K",commandAIPlaceholder:a="Search commands...",onCommandAIOpen:i,onCommandAIClose:s,onCommandAISelect:l,searchPlaceholder:c="Search...",onSearch:u,showThemeToggle:d=!1,theme:f="system",onThemeChange:p,userMenu:h,notifications:m,cta:v,sticky:g=!0,glassmorphism:y=!1,animatedBackground:x=!1,keyboardShortcuts:w=!0,hideNavItems:b=!1,mobileBreakpoint:C=768,customStyles:S,variant:P="default",size:T="md",blur:L=!0,shadow:M=!1,rounded:N=!1,logoPosition:V="left",mobileMenuPosition:_="left",hideOnScroll:I=!1,showScrollProgress:k=!1,maxWidth:R="2xl",fullWidth:E=!1,enableNProgress:O=!0,className:B,activePath:U,onNavigate:D}){let[j,$]=(0,ys.useState)(!1),[z,q]=(0,ys.useState)(!1),[H,K]=(0,ys.useState)(!1),[G,J]=(0,ys.useState)(!1),[ae,Z]=(0,ys.useState)(""),[Pe,be]=(0,ys.useState)(!1),[_e,he]=(0,ys.useState)(!1),[Ne,ve]=(0,ys.useState)(0),Oe=(0,ys.useRef)(0),Y=(0,ys.useRef)(null);(0,ys.useEffect)(()=>{O&&d7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[O]),(0,ys.useEffect)(()=>{let se=()=>{$(window.innerWidth<C)};return se(),window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[C]),(0,ys.useEffect)(()=>{if(!g&&!I&&!k)return;let se=()=>{let ie=window.scrollY;if(be(ie>10),I&&(ie>Oe.current&&ie>100?he(!0):he(!1),Oe.current=ie),k){let Fe=window.scrollY,At=document.documentElement.scrollHeight-document.documentElement.clientHeight,to=Fe/At*100;ve(to)}};return window.addEventListener("scroll",se,{passive:!0}),()=>window.removeEventListener("scroll",se)},[g,I,k]),(0,ys.useEffect)(()=>{if(!w&&!n)return;let se=ie=>{(ie.metaKey||ie.ctrlKey)&&ie.key==="k"&&(ie.preventDefault(),J(!0),n&&i?.())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[w,n,i]);let Q=(0,ys.useCallback)(se=>{se.action?se.action():se.href&&(O&&(d7.default.start(),setTimeout(()=>d7.default.done(),500)),D?D(se.href):window.location.href=se.href,j&&q(!1))},[D,j,O]),pe=(0,ys.useCallback)(se=>{Z(se),u?.(se)},[u]),Re=se=>(0,ke.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:se.map(ie=>(0,ke.jsxs)(B_,{className:F("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{className:"flex-shrink-0",children:ie.icon}),(0,ke.jsx)("div",{className:"text-sm font-medium leading-none",children:ie.title}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]}),ie.description&&(0,ke.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:ie.description})]},ie.id))}),fe=se=>(0,ke.jsx)(ke.Fragment,{children:se.map(ie=>ie.items&&ie.items.length>0?(0,ke.jsxs)(Qd,{children:[(0,ke.jsx)(Zu,{disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(Ju,{children:fe(ie.items)})]},ie.id):(0,ke.jsxs)(Ve,{disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]},ie.id))}),Ce=()=>(0,ke.jsxs)($w,{open:z,onOpenChange:q,children:[(0,ke.jsx)(a$,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,ke.jsx)(sm,{className:"h-5 w-5"})})}),(0,ke.jsx)(Wx,{side:_,className:"w-80 p-0",children:(0,ke.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>q(!1),className:"h-8 w-8",children:(0,ke.jsx)(lr,{className:"h-4 w-4"})})]}),(0,ke.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:!b&&e.map(se=>(0,ke.jsxs)("div",{className:"space-y-1",children:[se.items.map(ie=>(0,ke.jsx)("div",{children:ie.items&&ie.items.length>0?(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-between",disabled:ie.disabled,children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),(0,ke.jsx)(ca,{className:"h-4 w-4"})]})}),(0,ke.jsx)(kr,{align:"start",className:"w-56",children:ie.items&&fe(ie.items)})]}):(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-start",disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]})},ie.id)),(0,ke.jsx)(Ys,{className:"my-2"})]},se.id))})]})})]}),re=()=>{switch(T){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ye=F("moonui-pro w-full transition-all duration-300",P==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",P==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",P==="minimal"&&"bg-background",P==="transparent"&&"bg-transparent",g&&"sticky top-0 z-50",Pe&&g&&P!=="transparent"&&"shadow-sm",Pe&&P==="transparent"&&"bg-background/95 backdrop-blur border-b",_e&&"-translate-y-full",y&&"bg-background/80 backdrop-blur-xl border-white/10",L&&"backdrop-blur-md",M&&"shadow-lg",N&&"rounded-lg",S?.background,S?.border,B);return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("nav",{ref:Y,className:ye,children:[(0,ke.jsxs)("div",{className:F("flex items-center",re(),E?"w-full px-4 sm:px-6 lg:px-8":R==="sm"&&"container max-w-screen-sm"||R==="md"&&"container max-w-screen-md"||R==="lg"&&"container max-w-screen-lg"||R==="xl"&&"container max-w-screen-xl"||R==="2xl"&&"container max-w-screen-2xl"||R==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,ke.jsxs)("div",{className:F("flex items-center gap-2",V==="center"&&!j?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[V==="left"&&_==="left"&&(0,ke.jsx)(Ce,{}),(0,ke.jsxs)("a",{href:t.href||"/",onClick:se=>{t.href&&D&&(se.preventDefault(),D(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!j&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!j&&!b&&(0,ke.jsx)(A_,{className:"hidden md:flex",children:(0,ke.jsx)(L_,{children:e.map(se=>(0,ke.jsx)(ys.default.Fragment,{children:se.items.map(ie=>{let Fe=ie.items&&ie.items.length>0,At=ie.href===U;return Fe?(0,ke.jsxs)(D_,{children:[(0,ke.jsx)(__,{className:F(At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(F_,{children:ie.items&&Re(ie.items)})]},ie.id):(0,ke.jsx)(D_,{children:(0,ke.jsxs)(B_,{className:F(O_(),At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-2",children:ie.badge})]})},ie.id)})},se.id))})}),(0,ke.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,ke.jsx)(ke.Fragment,{children:j?(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>J(!0),children:(0,ke.jsx)(go,{className:"h-5 w-5"})}):(0,ke.jsxs)("div",{className:"relative",children:[(0,ke.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,ke.jsx)(Jt,{type:"search",placeholder:c,className:"w-64 pl-9 pr-4 h-9 cursor-pointer",value:ae,onChange:se=>pe(se.target.value),onClick:()=>{n&&(J(!0),i?.())},readOnly:n}),(w||n)&&(0,ke.jsx)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:n?o:(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})})]})}),d&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",children:[f==="light"&&(0,ke.jsx)(gv,{className:"h-5 w-5"}),f==="dark"&&(0,ke.jsx)(mv,{className:"h-5 w-5"}),f==="system"&&(0,ke.jsx)(lm,{className:"h-5 w-5"})]})}),(0,ke.jsxs)(kr,{align:"end",children:[(0,ke.jsxs)(Ve,{onClick:()=>p?.("light"),children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("dark"),children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("system"),children:[(0,ke.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),m&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",className:"relative",children:[(0,ke.jsx)(Uh,{className:"h-5 w-5"}),m.count&&m.count>0&&(0,ke.jsx)("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1",children:m.count>9?"9+":m.count})]})}),(0,ke.jsxs)(kr,{align:"end",className:"w-[380px] p-0",sideOffset:8,children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ke.jsx)("h4",{className:"text-base font-semibold",children:"Notifications"}),m.count&&m.count>0&&(0,ke.jsxs)(pt,{variant:"secondary",className:"h-5 px-2 rounded-full bg-primary/10 text-primary border-0",children:[m.count," ","new"]})]}),m.items&&m.items.length>0&&(0,ke.jsx)(oe,{variant:"ghost",size:"sm",className:"text-xs h-7 px-2 text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("Mark all as read")},children:"Mark all read"})]}),(0,ke.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:m.items&&m.items.length>0?(0,ke.jsx)("div",{className:"py-1",children:m.items.map((se,ie)=>(0,ke.jsxs)("div",{children:[(0,ke.jsx)("button",{className:F("w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors","focus:outline-none focus:bg-muted/50",!se.read&&"bg-primary/5 hover:bg-primary/10"),onClick:()=>m.onNotificationClick?.(se.id),children:(0,ke.jsxs)("div",{className:"flex gap-3",children:[(0,ke.jsx)("div",{className:"mt-1.5",children:(0,ke.jsx)("div",{className:F("h-2 w-2 rounded-full",se.read?"bg-transparent":"bg-primary")})}),(0,ke.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ke.jsx)("p",{className:F("text-sm leading-tight",se.read?"font-normal":"font-medium"),children:se.title}),se.description&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:se.description}),se.time&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:se.time})]})]})}),ie<(m.items?.length||0)-1&&(0,ke.jsx)("div",{className:"mx-4 border-b"})]},se.id))}):(0,ke.jsxs)("div",{className:"py-12 text-center",children:[(0,ke.jsx)(Uh,{className:"h-10 w-10 mx-auto text-muted-foreground/30 mb-3"}),(0,ke.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"No new notifications"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"You're all caught up!"})]})}),m.items&&m.items.length>0&&(0,ke.jsx)("div",{className:"border-t p-2",children:(0,ke.jsx)(oe,{variant:"ghost",className:"w-full h-8 text-xs text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("View all notifications")},children:"View all notifications"})})]})]}),v&&(0,ke.jsx)(oe,{variant:v.variant||"primary",size:"sm",onClick:()=>{v.action?v.action():v.href&&D&&D(v.href)},className:j?"":"ml-2",children:v.text}),h&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"relative",children:(0,ke.jsxs)(Ga,{className:"h-8 w-8",children:[(0,ke.jsx)(as,{src:h.user?.avatar,alt:h.user?.name}),(0,ke.jsx)(xi,{children:h.user?.name?.charAt(0)||(0,ke.jsx)(dm,{className:"h-4 w-4"})})]})})}),(0,ke.jsxs)(kr,{align:"end",className:"w-56",children:[h.user&&(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("div",{className:"p-2",children:[(0,ke.jsx)("p",{className:"text-sm font-medium",children:h.user.name}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground",children:h.user.email})]}),(0,ke.jsx)(Zr,{})]}),h.items&&fe(h.items)]})]})]})]}),x&&(0,ke.jsx)(ne.div,{className:"absolute inset-0 -z-10 opacity-30",animate:{background:["radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"]},transition:{duration:10,repeat:1/0,ease:"linear"}}),k&&(0,ke.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,ke.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${Ne}%`}})})]}),(0,ke.jsxs)(a_,{open:G,onOpenChange:se=>{J(se),se||s?.()},children:[(0,ke.jsx)(_v,{placeholder:n?a:c,value:ae,onValueChange:pe}),(0,ke.jsxs)(aT,{children:[(0,ke.jsx)(Fv,{children:n?(0,ke.jsxs)("div",{className:"flex flex-col items-center py-6",children:[(0,ke.jsx)(_t,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"No results found"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Try searching for pages, actions, or commands"})]}):"No results found."}),n&&!ae&&(0,ke.jsxs)(Sm,{heading:"Quick Actions",children:[(0,ke.jsxs)(Yd,{onSelect:()=>{let se={id:"home",title:"Go Home",href:"/"};l?.(se),Q(se),J(!1)},children:[(0,ke.jsx)(Wb,{className:"mr-2 h-4 w-4"}),"Go Home",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318H"})]}),(0,ke.jsxs)(Yd,{onSelect:()=>{K(!0),J(!1),l?.({id:"search",title:"Search",action:()=>K(!0)})},children:[(0,ke.jsx)(go,{className:"mr-2 h-4 w-4"}),"Search",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318S"})]}),d&&(0,ke.jsxs)(Yd,{onSelect:()=>{p?.(f==="dark"?"light":"dark"),J(!1)},children:[f==="dark"?(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Switch to Light Mode"]}):(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Switch to Dark Mode"]}),(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318T"})]})]}),e&&e.length>0&&e.map(se=>{if(!se||!se.items||se.items.length===0)return null;let ie=ae?se.items.filter(Fe=>Fe.title.toLowerCase().includes(ae.toLowerCase())||Fe.description?.toLowerCase().includes(ae.toLowerCase())):se.items;return ie.length===0?null:(0,ke.jsx)(Sm,{heading:se.title||se.id,children:ie.map(Fe=>(0,ke.jsxs)(Yd,{disabled:Fe.disabled,onSelect:()=>{n&&l?.(Fe),Q(Fe),J(!1)},children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[Fe.icon&&(0,ke.jsx)("span",{children:Fe.icon}),Fe.title]}),Fe.badge&&(0,ke.jsx)(pt,{variant:Fe.badgeVariant||"secondary",className:"ml-auto",children:Fe.badge}),Fe.description&&n&&(0,ke.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Fe.description})]},Fe.id))},se.id)}),n&&h?.items&&(0,ke.jsx)(Sm,{heading:"Account",children:h.items.map(se=>(0,ke.jsx)(Yd,{disabled:se.disabled,onSelect:()=>{let ie={...se,action:se.onClick||se.action};ie.action?ie.action():ie.href&&(window.location.href=ie.href),l?.(ie),J(!1)},children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[se.icon&&(0,ke.jsx)("span",{children:se.icon}),se.title]})},se.id))})]})]})]})}function cot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,ke.jsx)(Rn,{componentName:"Advanced Navbar",className:F("w-full",e.className)}):(0,ke.jsx)(ahr,{...e})}var Fhe=A(ue(),1);Ur();var Ti=A(ue(),1),fot=A(de(),1),uot=(0,Ti.createContext)(null),zC=()=>{let e=(0,Ti.useContext)(uot);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},dot=({children:e,steps:t,initialStep:r=0,onStepChange:n,onComplete:o,validateOnStepChange:a=!0,allowBackNavigation:i=!0,allowStepSkip:s=!1,autoSave:l=!1,autoSaveDelay:c=2e3,onAutoSave:u,persistData:d=!1,storageKey:f="form-wizard-data"})=>{let[p,h]=(0,Ti.useState)(r),[m,v]=(0,Ti.useState)({}),[g,y]=(0,Ti.useState)(new Set),[x,w]=(0,Ti.useState)(!1),[b,C]=(0,Ti.useState)(null);(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R=localStorage.getItem(f);if(R)try{let E=JSON.parse(R);v(E.stepData||{}),h(E.currentStep||0),y(new Set(E.completedSteps||[]))}catch(E){console.error("Failed to load persisted wizard data:",E)}}},[d,f]),(0,Ti.useEffect)(()=>{if(!l||!u)return;let R=setTimeout(()=>{let E=m[t[p].id];E&&u(t[p].id,E)},c);return()=>clearTimeout(R)},[m,p,l,c,u,t]),(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R={stepData:m,currentStep:p,completedSteps:Array.from(g)};localStorage.setItem(f,JSON.stringify(R))}},[m,p,g,d,f]);let S=(0,Ti.useCallback)(async()=>{let R=t[p];if(R.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(R.requiredFields)){let B=[];if(R.requiredFields.forEach(U=>{let D=O.querySelector(`[name="${U}"], [id="${U}"]`);if(D){let j=D;D.tagName==="INPUT"&&D.type==="checkbox"?D.checked||B.push(U):(!j.value||j.value.trim()==="")&&B.push(U)}}),B.length>0)return C(`Please fill in the following required fields: ${B.join(", ")}`),!1}else{let B=O.querySelectorAll("input[required], select[required], textarea[required]"),U=[];if(B.forEach(j=>{let $=j;if(!$.value||$.value.trim()===""){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Field":$.name||$.id||"Field";U.push(q)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let $=j;if(!$.checked){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Checkbox":$.name||$.id||"Checkbox";U.push(q)}}),U.length>0)return C(`Please fill in the following required fields: ${U.join(", ")}`),!1}}if(!R.validation)return!0;w(!0),C(null);try{let O=await R.validation();if(typeof O=="boolean")return O||C("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let B=O;return B.isValid||(B.error?C(B.error):B.errors&&Array.isArray(B.errors)?C(B.errors.join(", ")):C("Please complete all required fields before proceeding")),B.isValid}return C("Invalid validation response"),!1}catch(O){return C(O instanceof Error?O.message:"Validation failed"),!1}finally{w(!1)}},[p,t]),P=(0,Ti.useCallback)((R,E)=>{v(O=>({...O,[R]:{...O[R],...E}})),C(null)},[]),T=(0,Ti.useCallback)(async R=>{if(R<0||R>=t.length||R===p)return;let E=t[R];if((typeof E.isDisabled=="function"?E.isDisabled(p,t):E.isDisabled)||a&&R>p&&!await S())return;let B=t[p];B.onExit&&await B.onExit(),R>p&&y(D=>new Set([...D,p])),E.onEnter&&await E.onEnter();let U=p;h(R),n?.(R,U)},[p,t,a,S,n]),L=(0,Ti.useCallback)(()=>{T(p+1)},[p,T]),M=(0,Ti.useCallback)(()=>{i&&T(p-1)},[p,T,i]),N=(0,Ti.useCallback)(async()=>{if(await S()&&(y(E=>new Set([...E,p])),o)){w(!0);try{await o(m),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(E){C(E instanceof Error?E.message:"Failed to complete wizard")}finally{w(!1)}}},[p,m,S,o,d,f]),V=(0,Ti.useCallback)(()=>{h(0),v({}),y(new Set),C(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),_=(0,Ti.useCallback)(R=>g.has(R),[g]),I=(0,Ti.useCallback)(R=>{if(R===0||s)return!0;for(let E=0;E<R;E++)if(!g.has(E)&&!t[E].isOptional)return!1;return!0},[g,s,t]),k={steps:t,currentStep:p,stepData:m,isLoading:x,error:b,goToNext:L,goToPrevious:M,goToStep:T,updateStepData:R=>P(t[p].id,R),validateCurrentStep:S,completeWizard:N,resetWizard:V,isStepCompleted:_,isStepAccessible:I,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,fot.jsx)(uot.Provider,{value:k,children:e})};var Pr=A(de(),1),f7=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,Pr.jsx)(Wo,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,Pr.jsx)(ho,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=zC();if(t==="linear")return(0,Pr.jsx)("div",{className:F("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,Pr.jsx)("div",{className:"relative w-full",children:(0,Pr.jsx)("div",{className:F("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&w&&(0,Pr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),a==="top"&&w&&(0,Pr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),o&&(0,Pr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]}),(0,Pr.jsxs)("div",{className:"relative flex items-center w-full",children:[m<c.length-1&&(0,Pr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,Pr.jsx)("div",{className:"h-full bg-border"}),m<u&&(0,Pr.jsx)(ne.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:m*.1},style:{transformOrigin:"left"}})]}),(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},transition:{duration:.2},className:F("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",v&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w&&a==="inside"?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})})]}),(0,Pr.jsx)("div",{className:"mt-3",children:(0,Pr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",m+1," of ",c.length]})})]},h.id)})})}):(0,Pr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,Pr.jsx)(ne.div,{className:"absolute left-6 top-8 w-[2px] bg-primary",initial:{height:0},animate:{height:`${u/(c.length-1)*(100-16)}%`},transition:{duration:.5}})]}),c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},className:F("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",v&&"border-primary bg-primary text-primary-foreground shadow-lg",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})}),(0,Pr.jsx)("div",{className:"ml-16",children:o&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]})})]},h.id)})]})});if(t==="dots")return(0,Pr.jsx)("div",{className:F("flex items-center justify-center space-x-2",e),children:c.map((h,m)=>{let v=m===u,g=d(m);return(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.2:1},className:F("rounded-full transition-all duration-300",v?"w-3 h-3 bg-primary":"w-2 h-2",g&&!v&&"bg-primary/60",!v&&!g&&"bg-muted")},m)})});if(t==="circular"){let h=(u+1)/c.length*100,m=2*Math.PI*45,v=m-h/100*m;return(0,Pr.jsxs)("div",{className:F("relative w-36 h-36 mx-auto",e),children:[(0,Pr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,Pr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,Pr.jsx)(ne.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:m,initial:{strokeDashoffset:m},animate:{strokeDashoffset:v},className:"text-primary",transition:{duration:.5}})]}),(0,Pr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Pr.jsxs)("div",{className:"text-center",children:[(0,Pr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,Pr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var p7=A(ue(),1);var HC=A(de(),1),ihr={slide:{initial:e=>({x:e>0?1e3:-1e3,opacity:0}),animate:{x:0,opacity:1},exit:e=>({x:e<0?1e3:-1e3,opacity:0})},fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},scale:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8}},none:{initial:{},animate:{},exit:{}}},m7=({className:e,animationType:t="slide",animationDuration:r=.3})=>{let{steps:n,currentStep:o,goToNext:a,goToPrevious:i,goToStep:s,updateStepData:l,stepData:c,error:u}=zC(),[d,f]=p7.default.useState(0),p=p7.default.useRef(o);p7.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let h=n[o],m=o===0,v=o===n.length-1,g={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:m,isLastStep:v,stepData:c[h.id]||{},updateStepData:x=>l(h.id,x)},y=typeof h.content=="function"?h.content(g):h.content;return(0,HC.jsx)(Ft,{mode:"wait",custom:d,children:(0,HC.jsx)(ne.div,{custom:d,variants:ihr[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:F("w-full",e),"data-wizard-step-content":!0,children:(0,HC.jsxs)("div",{className:"space-y-4",children:[u&&(0,HC.jsxs)(Zb,{variant:"error",children:[(0,HC.jsx)(On,{className:"h-4 w-4"}),(0,HC.jsx)(Jb,{children:u})]}),y]})},o)})};var Ol=A(de(),1),h7=({className:e,showStepIndicator:t=!0,previousText:r="Previous",nextText:n="Next",completeText:o="Complete",loadingText:a="Processing...",onPreviousClick:i,onNextClick:s,onCompleteClick:l})=>{let{steps:c,currentStep:u,isLoading:d,canGoNext:f,canGoPrevious:p,goToNext:h,goToPrevious:m,completeWizard:v}=zC(),g=u===c.length-1,y=c[u],x=()=>{i?.(),m()},w=()=>{g?(l?.(),v()):(s?.(),h())};return(0,Ol.jsxs)("div",{className:F("flex items-center justify-between",e),children:[(0,Ol.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ol.jsxs)(oe,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:F("transition-all duration-200",!p&&"invisible"),children:[(0,Ol.jsx)(gi,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Ol.jsxs)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"px-3 py-1 text-sm text-muted-foreground",children:["Step ",u+1," of ",c.length,y.isOptional&&(0,Ol.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Ol.jsx)(oe,{type:"button",onClick:w,disabled:d||!f&&!g,className:"min-w-[120px]",children:d?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(Mr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):g?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(on,{className:"w-4 h-4 mr-2"}),o]}):(0,Ol.jsxs)(Ol.Fragment,{children:[n,(0,Ol.jsx)(Jn,{className:"w-4 h-4 ml-1"})]})})]})};var Mi=A(de(),1),pot=Fhe.default.forwardRef(({steps:e,currentStep:t=0,onStepChange:r,onComplete:n,orientation:o="horizontal",progressType:a="linear",allowStepSkip:i=!1,allowBackNavigation:s=!0,validateOnStepChange:l=!0,animationType:c="slide",animationDuration:u=.3,showStepNumbers:d=!0,showStepTitles:f=!0,showProgressBar:p=!0,stepIconPosition:h="top",completedStepIcon:m,activeStepIcon:v,errorStepIcon:g,className:y,progressClassName:x,navigationClassName:w,contentClassName:b,stepClassName:C,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:T,persistData:L=!1,storageKey:M="form-wizard-data"},N)=>(0,Mi.jsx)(dot,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:T,persistData:L,storageKey:M,children:(0,Mi.jsxs)("div",{ref:N,className:F("w-full",y),children:[p&&(0,Mi.jsx)(Mi.Fragment,{children:(0,Mi.jsx)(f7,{className:F("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:h,completedStepIcon:m,activeStepIcon:v,errorStepIcon:g})}),(0,Mi.jsx)($e,{className:F("border-0 shadow-none",b),children:(0,Mi.jsx)(We,{className:"p-0",children:(0,Mi.jsx)(m7,{className:C,animationType:c,animationDuration:u})})}),(0,Mi.jsx)(h7,{className:F("mt-8",w)})]})}));pot.displayName="FormWizardInternal";var G4=Fhe.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Mi.jsx)($e,{className:F("w-full",e.className),children:(0,Mi.jsx)(We,{className:"py-12 text-center",children:(0,Mi.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Mi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mi.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Mi.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Mi.jsx)("a",{href:"/pricing",children:(0,Mi.jsxs)(oe,{size:"sm",children:[(0,Mi.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mi.jsx)(pot,{...e,ref:t})});G4.displayName="MoonUIFormWizardPro";var shr=G4;var bf=A(ue(),1);Ur();var Pt=A(de(),1);function mot(e){let t=[...e];for(let r=t.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t}var lhr=({title:e,description:t,questions:r,onComplete:n,showTimer:o=!0,totalTimeLimit:a,showProgress:i=!0,showQuestionNumbers:s=!0,allowReview:l=!0,allowSkip:c=!0,shuffleQuestions:u=!1,shuffleOptions:d=!1,passingScore:f=70,instantFeedback:p=!1,showHints:h=!1,className:m})=>{let[v]=(0,bf.useState)(()=>u?mot(r):r),[g,y]=(0,bf.useState)({}),[x,w]=(0,bf.useState)([]),[b,C]=(0,bf.useState)(a||0),[S,P]=(0,bf.useState)({}),[T,L]=(0,bf.useState)(!1),[M,N]=(0,bf.useState)(0);(0,bf.useEffect)(()=>{if(!o||!a||T)return;let R=setInterval(()=>{C(E=>E<=1?(_(),0):E-1)},1e3);return()=>clearInterval(R)},[o,a,T]),(0,bf.useEffect)(()=>{if(!o||T)return;let R=setInterval(()=>{N(E=>E+1)},1e3);return()=>clearInterval(R)},[o,T]);let V=(0,bf.useCallback)(()=>{let R=0,E=0;return{results:v.map(B=>{let U=g[B.id],D=B.points||1;E+=D;let j=!1;if(U!=null&&U!==""){if(B.type==="single-choice"||B.type==="true-false")j=U===B.correctAnswer;else if(B.type==="multiple-choice"){let z=Array.isArray(U)?U:[],q=Array.isArray(B.correctAnswer)?B.correctAnswer:[];j=z.length===q.length&&z.every(H=>q.includes(H))}}let $=j?D:0;return R+=$,{questionId:B.id,answer:U,isCorrect:j,points:$,timeSpent:S[B.id]||0}}),score:R,totalScore:E}},[v,g,S]),_=async()=>{let{results:R,score:E,totalScore:O}=V();w(R),L(!0),n&&await n(R,E,O)},I=R=>{let E=Math.floor(R/60),O=R%60;return`${E}:${O.toString().padStart(2,"0")}`},k=v.map((R,E)=>({id:R.id,title:`Question ${E+1}`,description:R.tags?.join(", "),content:({updateStepData:O,goToNext:B})=>{let U=g[R.id],D=d&&R.options?mot(R.options):R.options;(0,bf.useEffect)(()=>{S[R.id]||P($=>({...$,[R.id]:M}))},[]);let j=$=>{y(z=>({...z,[R.id]:$})),p&&R.type};return(0,Pt.jsxs)($e,{className:"border-0 shadow-none",children:[(0,Pt.jsxs)(br,{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,Pt.jsxs)(pt,{variant:"secondary",children:["Question ",E+1," of ",v.length]}),R.points&&R.points>1&&(0,Pt.jsxs)(pt,{variant:"outline",children:[R.points," points"]})]}),(0,Pt.jsx)(zr,{className:"text-xl",children:R.question}),R.description&&(0,Pt.jsx)(Is,{children:R.description})]}),(0,Pt.jsxs)(We,{className:"space-y-4",children:[R.image&&(0,Pt.jsx)("img",{src:R.image,alt:"Question illustration",className:"w-full rounded-lg"}),R.type==="single-choice"&&D&&(0,Pt.jsx)(sP,{value:U||"",onValueChange:j,children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)($x,{value:String($.value),id:`${R.id}-${$.value}`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="multiple-choice"&&D&&(0,Pt.jsx)("div",{className:"space-y-2",children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)(Nc,{id:`${R.id}-${$.value}`,checked:(U||[]).includes($.value),onCheckedChange:q=>{let H=U||[];j(q?[...H,$.value]:H.filter(K=>K!==$.value))}}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="true-false"&&(0,Pt.jsxs)(sP,{value:U?.toString()||"",onValueChange:$=>j($==="true"),children:[(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"true",id:`${R.id}-true`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"false",id:`${R.id}-false`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),R.type==="text"&&(0,Pt.jsx)(nd,{value:U||"",onChange:$=>j($.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),R.type==="rating"&&(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(qw,{value:[U||5],onValueChange:([$])=>j($),max:10,min:1,step:1,className:"w-full"}),(0,Pt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[U||5,"/10"]})]}),h&&R.hint&&(0,Pt.jsx)(Zb,{children:(0,Pt.jsxs)(Jb,{children:[(0,Pt.jsx)("strong",{children:"Hint:"})," ",R.hint]})})]})]})},validation:()=>!(R.required&&!g[R.id]),isOptional:!R.required}));if(T){let{score:R,totalScore:E}=V(),O=Math.round(R/E*100),B=O>=f;return(0,Pt.jsx)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:F("w-full max-w-2xl mx-auto",m),children:(0,Pt.jsxs)($e,{children:[(0,Pt.jsxs)(br,{className:"text-center",children:[(0,Pt.jsx)("div",{className:"mx-auto mb-4",children:(0,Pt.jsx)(e2,{className:F("w-16 h-16",B?"text-yellow-500":"text-muted-foreground")})}),(0,Pt.jsx)(zr,{className:"text-3xl",children:"Quiz Complete!"}),(0,Pt.jsx)(Is,{children:"Here's how you performed"})]}),(0,Pt.jsxs)(We,{className:"space-y-6",children:[(0,Pt.jsxs)("div",{className:"text-center",children:[(0,Pt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,Pt.jsx)(_o,{value:O,className:"h-3 mb-4"}),(0,Pt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Pt.jsxs)("span",{children:["Score: ",R,"/",E]}),(0,Pt.jsx)("span",{children:B?(0,Pt.jsx)(pt,{variant:"success",children:"Passed"}):(0,Pt.jsx)(pt,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,Pt.jsxs)("div",{className:"space-y-2",children:[(0,Pt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((U,D)=>{let j=v.find($=>$.id===U.questionId);return(0,Pt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,Pt.jsxs)("span",{className:"text-sm",children:[s&&`Q${D+1}: `,j?.question.substring(0,50),"..."]}),(0,Pt.jsxs)(pt,{variant:U.isCorrect?"success":"destructive",children:[U.points,"/",j?.points||1]})]},U.questionId)})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(oe,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,Pt.jsx)(wx,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Pn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Cx,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,Pt.jsxs)("div",{className:F("w-full",m),children:[o&&a&&(0,Pt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(Sn,{className:"w-4 h-4"}),(0,Pt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",I(b)]})]}),(0,Pt.jsx)(_o,{value:b/a*100,className:"w-32 h-2"})]}),(0,Pt.jsx)(G4,{steps:k,onComplete:_,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},chr=e=>{let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Pt.jsx)($e,{className:F("w-full",e.className),children:(0,Pt.jsx)(We,{className:"py-12 text-center",children:(0,Pt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Pt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Pt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Pt.jsx)("a",{href:"/pricing",children:(0,Pt.jsxs)(oe,{size:"sm",children:[(0,Pt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Pt.jsx)(lhr,{...e})},uhr=chr;var wf=A(ue(),1);var Qr=A(de(),1),dhr={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function fhr(e,t){let r=e.replace(/\s+/g,"").replace(/[^0-9]/gi,""),n=t==="amex"?r.match(/\d{1,4}/g):r.match(/\d{1,4}/g);return n?n.join(" "):r}function phr(e){let t=e.replace(/\s+/g,"").replace(/[^0-9]/gi,"");return t.length>=2?t.slice(0,2)+(t.length>2?"/"+t.slice(2,4):""):t}function mhr(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(dhr))if(n.test(t))return r;return null}function hhr(e){let t=e.replace(/\s+/g,"");if(!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let o=t.length-1;o>=0;o--){let a=parseInt(t.charAt(o),10);n&&(a*=2,a>9&&(a-=9)),r+=a,n=!n}return r%10===0}function ghr(e){let t=e.split("/");if(t.length!==2)return!1;let r=parseInt(t[0],10),n=parseInt("20"+t[1],10);if(r<1||r>12)return!1;let o=new Date;return new Date(n,r-1)>o}var hot=wf.default.forwardRef(({value:e={number:"",expiry:"",cvc:"",name:""},onChange:t,showCardPreview:r=!0,showCardType:n=!0,showSecurityBadge:o=!0,autoFormat:a=!0,validateOnChange:i=!1,labels:s={},placeholders:l={},errors:c={},className:u,inputClassName:d,labelClassName:f,errorClassName:p,disabled:h,required:m,...v},g)=>{let[y,x]=(0,wf.useState)(null),[w,b]=(0,wf.useState)(null),[C,S]=(0,wf.useState)({}),P=(0,wf.useRef)(null),T=(0,wf.useRef)(null),L=(0,wf.useRef)(null),M=(0,wf.useRef)(null);(0,wf.useEffect)(()=>{let _=mhr(e.number);x(_)},[e.number]),(0,wf.useEffect)(()=>{if(!i)return;let _={};e.number&&!hhr(e.number)&&(_.number="Invalid card number"),e.expiry&&!ghr(e.expiry)&&(_.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(_.cvc="Invalid CVC"),S(_)},[e,i]);let N=(_,I)=>{let k=I;if(a){if(_==="number"){k=fhr(I,y||void 0);let R=y==="amex"?18:19;if(k.length>R)return}else if(_==="expiry"){if(k=phr(I),k.length>5)return}else if(_==="cvc"){k=I.replace(/\D/g,"");let R=y==="amex"?4:3;if(k.length>R)return}}t?.({...e,[_]:k}),a&&(_==="number"&&k.length===(y==="amex"?18:19)?T.current?.focus():_==="expiry"&&k.length===5?L.current?.focus():_==="cvc"&&k.length===(y==="amex"?4:3)&&M.current?.focus())},V={...C,...c};return(0,Qr.jsxs)("div",{ref:g,className:F("space-y-4",u),...v,children:[r&&(0,Qr.jsxs)(ne.div,{className:"relative w-full max-w-md mx-auto h-48 rounded-xl bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700 p-6 text-white shadow-xl overflow-hidden",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,Qr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,Qr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,Qr.jsx)(hx,{className:"w-8 h-8 text-white/80"})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsx)("div",{className:"text-xl font-mono tracking-wider",children:e.number||"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022"}),(0,Qr.jsxs)("div",{className:"flex justify-between",children:[(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,Qr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,Qr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:_=>N("number",_.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:F("pr-20",V.number&&"border-destructive",d),disabled:h}),n&&y&&(0,Qr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),V.number&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.number})]}),(0,Qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsx)(Jt,{ref:T,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:_=>N("expiry",_.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:F(V.expiry&&"border-destructive",d),disabled:h}),V.expiry&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.expiry})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:L,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:_=>N("cvc",_.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:F(V.cvc&&"border-destructive",d),disabled:h}),o&&(0,Qr.jsx)($t,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),V.cvc&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.cvc})]})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsx)(Rt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,Qr.jsx)(Jt,{ref:M,id:"card-name",type:"text",value:e.name,onChange:_=>N("name",_.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:F(V.name&&"border-destructive",d),disabled:h}),V.name&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.name})]})]}),o&&(0,Qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Qr.jsx)($t,{className:"w-4 h-4"}),(0,Qr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});hot.displayName="MoonUICreditCardInputPro";var Hc=A(ue(),1);Ur();var tt=A(de(),1),got=xt("relative w-full rounded-lg border bg-card text-card-foreground shadow-sm",{variants:{variant:{default:"border-border",exam:"border-primary/20 bg-primary/5",personality:"border-secondary/20 bg-secondary/5"},size:{sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"default",size:"md"}}),vot=Hc.default.forwardRef(({className:e,variant:t,size:r,questions:n,settings:o={},onComplete:a,onProgress:i,title:s,description:l,...c},u)=>{let[d,f]=(0,Hc.useState)([]),[p,h]=(0,Hc.useState)(0),[m,v]=(0,Hc.useState)({}),[g,y]=(0,Hc.useState)(!1),[x,w]=(0,Hc.useState)(null),[b,C]=(0,Hc.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Hc.useState)(Date.now()),[T,L]=(0,Hc.useState)(!1),[M,N]=(0,Hc.useState)(0);(0,Hc.useEffect)(()=>{let $=[...n];o.shuffleQuestions&&($=_($)),o.shuffleOptions&&($=$.map(z=>z.options?{...z,options:_([...z.options])}:z)),f($)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Hc.useEffect)(()=>{if(b===null||b<=0||g)return;let $=setInterval(()=>{C(z=>z===null||z<=1?(E(),0):z-1)},1e3);return()=>clearInterval($)},[b,g]),(0,Hc.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let V=d[p],_=$=>{let z=[...$];for(let q=z.length-1;q>0;q--){let H=Math.floor(Math.random()*(q+1));[z[q],z[H]]=[z[H],z[q]]}return z},I=$=>{let z=Date.now()-S;v(q=>({...q,[V.id]:{questionId:V.id,answer:$,timeSpent:z}}))},k=()=>{p<d.length-1?(h($=>$+1),P(Date.now()),L(!1)):E()},R=()=>{p>0&&(h($=>$-1),L(!1))},E=()=>{let $=O();w($),y(!0),N(z=>z+1),a&&a($)},O=()=>{let $=0,z=0,q=[];d.forEach(G=>{let J=m[G.id],ae=G.points||1;$+=ae;let Z=!1;if(J?.answer&&G.correctAnswer!==void 0)switch(G.type){case"single-choice":case"true-false":case"text":Z=J.answer===G.correctAnswer;break;case"multiple-choice":Array.isArray(J.answer)&&Array.isArray(G.correctAnswer)&&(Z=J.answer.length===G.correctAnswer.length&&J.answer.every(Pe=>G.correctAnswer.includes(Pe)));break;case"matching":if(typeof J.answer=="object"&&typeof G.correctAnswer=="object"){let Pe=G.correctAnswer,be=J.answer;Z=Object.keys(Pe).every(_e=>Pe[_e]===be[_e])}break;case"rating":Z=!0;break}Z&&(z+=ae),q.push({questionId:G.id,userAnswer:J?.answer||null,correctAnswer:G.correctAnswer,isCorrect:Z,points:Z?ae:0})});let H=$>0?z/$*100:0,K=Object.values(m).reduce((G,J)=>G+(J.timeSpent||0),0);return{score:z,totalScore:$,percentage:H,passed:o.passingScore?H>=o.passingScore:void 0,answers:q,timeSpent:K,completedAt:new Date}},B=()=>{h(0),v({}),y(!1),w(null),C(o.timeLimit?o.timeLimit*60:null),P(Date.now()),L(!1),o.shuffleQuestions&&f(_([...n]))},U=()=>{if(!x)return;let $={title:s,completedAt:x.completedAt,score:x.score,totalScore:x.totalScore,percentage:x.percentage,passed:x.passed,timeSpent:x.timeSpent,answers:x.answers.map(K=>({question:d.find(J=>J.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},z=new Blob([JSON.stringify($,null,2)],{type:"application/json"}),q=URL.createObjectURL(z),H=document.createElement("a");H.href=q,H.download=`quiz-results-${Date.now()}.json`,H.click(),URL.revokeObjectURL(q)},D=$=>{let z=Math.floor($/60),q=$%60;return`${z}:${q.toString().padStart(2,"0")}`},j=()=>{if(!V)return null;let $=m[V.id]?.answer;switch(V.type){case"single-choice":case"true-false":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>I(K),className:F("w-full text-left p-4 rounded-lg border transition-colors",$===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},G))});case"multiple-choice":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>{let J=Array.isArray($)&&$.includes(K);return(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>{let ae=$||[],Z=J?ae.filter(Pe=>Pe!==K):[...ae,K];I(Z)},className:F("w-full text-left p-4 rounded-lg border transition-colors",J?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,tt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,tt.jsx)("div",{className:F("w-5 h-5 rounded border-2 transition-colors",J?"bg-primary border-primary":"border-border"),children:J&&(0,tt.jsx)(Cl,{className:"w-full h-full text-primary-foreground"})}),K]})},G)})});case"text":return(0,tt.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,tt.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:$||"",onChange:K=>I(K.target.value)})});case"rating":let z=V.maxRating||5,q=typeof $=="number"?$:0;return(0,tt.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,tt.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:z},(K,G)=>G+1).map(K=>(0,tt.jsx)("button",{onClick:()=>I(K),className:"transition-transform hover:scale-110",children:(0,tt.jsx)(Hs,{className:F("w-10 h-10 transition-colors",K<=q?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),V.ratingLabels&&(0,tt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,tt.jsx)("span",{children:V.ratingLabels[0]}),(0,tt.jsx)("span",{children:V.ratingLabels[1]})]})]});case"matching":let H=$||{};return(0,tt.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),V.leftOptions?.map((K,G)=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),V.leftOptions?.map(K=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,tt.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:H[K]||"",onChange:G=>I({...H,[K]:G.target.value}),children:[(0,tt.jsx)("option",{value:"",children:"Select..."}),V.rightOptions?.map(G=>(0,tt.jsx)("option",{value:G,children:G},G))]})},K))]})]});default:return null}};return g&&x?(0,tt.jsx)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:(0,tt.jsxs)(ne.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,tt.jsxs)("div",{className:"text-center",children:[(0,tt.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,tt.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,tt.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,tt.jsx)("div",{className:F("mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full",x.passed?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:x.passed?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Cl,{className:"w-5 h-5"}),"Passed"]}):(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ho,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,tt.jsxs)("div",{className:"space-y-4",children:[(0,tt.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map(($,z)=>{let q=d.find(H=>H.id===$.questionId);return q?(0,tt.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,tt.jsxs)("div",{className:"flex items-start gap-3",children:[$.isCorrect?(0,tt.jsx)(Cl,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,tt.jsxs)("div",{className:"flex-1",children:[(0,tt.jsxs)("p",{className:"font-medium mb-2",children:[z+1,". ",q.question]}),(0,tt.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify($.userAnswer)]}),!$.isCorrect&&q.correctAnswer!==void 0&&(0,tt.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(q.correctAnswer)]}),q.explanation&&(0,tt.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:q.explanation})]})]})},$.questionId):null})]}),(0,tt.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||M<o.maxAttempts)&&(0,tt.jsxs)("button",{onClick:B,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,tt.jsx)(wx,{className:"w-4 h-4"}),"Try Again"]}),(0,tt.jsxs)("button",{onClick:U,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,tt.jsx)(Pn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,tt.jsxs)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,tt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,tt.jsxs)("div",{children:[s&&(0,tt.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,tt.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,tt.jsxs)("div",{className:F("flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium",b<60?"bg-red-100 text-red-700":"bg-muted"),children:[(0,tt.jsx)(Sn,{className:"w-4 h-4"}),D(b)]})]}),(0,tt.jsxs)("div",{className:"mb-6",children:[(0,tt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,tt.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,tt.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,tt.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,tt.jsx)(ne.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,tt.jsx)(Ft,{mode:"wait",children:V&&(0,tt.jsxs)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,tt.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[V.question,V.required&&(0,tt.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&V.hint&&(0,tt.jsxs)("div",{className:"mt-4",children:[(0,tt.jsxs)("button",{onClick:()=>L(!T),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,tt.jsx)(zh,{className:"w-4 h-4"}),T?"Hide":"Show"," Hint"]}),T&&(0,tt.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:V.hint})]}),o.showInstantFeedback&&m[V.id]&&V.correctAnswer!==void 0&&(0,tt.jsx)(ne.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let $=m[V.id].answer,z=!1;switch(V.type){case"single-choice":case"true-false":z=$===V.correctAnswer;break}return(0,tt.jsxs)("div",{className:F("p-3 rounded-lg flex items-start gap-2",z?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[z?(0,tt.jsx)(Cl,{className:"w-5 h-5 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 mt-0.5"}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("p",{className:"font-medium",children:z?"Correct!":"Incorrect"}),V.explanation&&(0,tt.jsx)("p",{className:"text-sm mt-1",children:V.explanation})]})]})})()})]},V.id)}),(0,tt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,tt.jsxs)("button",{onClick:R,disabled:p===0,className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",p===0?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:[(0,tt.jsx)(gi,{className:"w-4 h-4"}),"Previous"]}),(0,tt.jsxs)("button",{onClick:p===d.length-1?E:k,disabled:V?.required&&!m[V.id],className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",V?.required&&!m[V.id]?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"),children:[p===d.length-1?"Complete":"Next",(0,tt.jsx)(Jn,{className:"w-4 h-4"})]})]})]})});vot.displayName="MoonUIQuizFormProInternal";var Bhe=Hc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tt.jsx)($e,{className:F("w-full",e.className),children:(0,tt.jsx)(We,{className:"py-12 text-center",children:(0,tt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,tt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,tt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,tt.jsx)("a",{href:"/pricing",children:(0,tt.jsxs)(oe,{size:"sm",children:[(0,tt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tt.jsx)(vot,{...e,ref:t})});Bhe.displayName="MoonUIQuizFormPro";var Uf=A(ue(),1);var te=A(bt(),1),qn=A(bt(),1);var Nf=A(bt(),1);var sh=A(bt(),1),$he=A(Qn(),1);function Dot(e,t){let r=sh.createContext(t),n=a=>{let{children:i,...s}=a,l=sh.useMemo(()=>s,Object.values(s));return(0,$he.jsx)(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){let i=sh.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Co(e,t=[]){let r=[];function n(a,i){let s=sh.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,v=sh.useMemo(()=>h,Object.values(h));return(0,$he.jsx)(m.Provider,{value:v,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,h=sh.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>sh.createContext(i));return function(s){let l=s?.[e]||a;return sh.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Bhr(o,...t)]}function Bhr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return sh.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var jC=A(bt(),1);var _ot=A(bt(),1);function Oot(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GI(...e){return t=>{let r=!1,n=e.map(o=>{let a=Oot(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():Oot(e[o],null)}}}}function gr(...e){return _ot.useCallback(GI(...e),e)}var _l=A(bt(),1);var sA=A(Qn(),1);function Pu(e){let t=Vhr(e),r=_l.forwardRef((n,o)=>{let{children:a,...i}=n,s=_l.Children.toArray(a),l=s.find(Uhr);if(l){let c=l.props.children,u=s.map(d=>d===l?_l.Children.count(c)>1?_l.Children.only(null):_l.isValidElement(c)?c.props.children:null:d);return(0,sA.jsx)(t,{...i,ref:o,children:_l.isValidElement(c)?_l.cloneElement(c,void 0,u):null})}return(0,sA.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Vhr(e){let t=_l.forwardRef((r,n)=>{let{children:o,...a}=r;if(_l.isValidElement(o)){let i=Hhr(o),s=zhr(a,o.props);return o.type!==_l.Fragment&&(s.ref=n?GI(n,i):i),_l.cloneElement(o,s)}return _l.Children.count(o)>1?_l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fot=Symbol("radix.slottable");function Bot(e){let t=({children:r})=>(0,sA.jsx)(sA.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Fot,t}function Uhr(e){return _l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fot}function zhr(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Hhr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b7=A(Qn(),1),jhr=A(bt(),1);var Whr=A(Qn(),1);function Ly(e){let t=e+"CollectionProvider",[r,n]=Co(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=jC.default.useRef(null),x=jC.default.useRef(new Map).current;return(0,b7.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=Pu(s),c=jC.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=gr(v,x.collectionRef);return(0,b7.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Pu(u),p=jC.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=jC.default.useRef(null),b=gr(v,w),C=a(u,g);return jC.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,b7.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return jC.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var Vot=new WeakMap,fl,Ag,_Gn=(Ag=class extends Map{constructor(r){super(r);rR(this,fl,void 0);tx(this,fl,[...super.keys()]),Vot.set(this,!0)}set(r,n){return Vot.get(this)&&(this.has(r)?Or(this,fl)[Or(this,fl).indexOf(r)]=r:Or(this,fl).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,fl).length,s=Uot(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,fl)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new Ag(this);return a.insert(r,n,o),a}before(r){let n=Or(this,fl).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,fl).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,fl,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,fl).splice(Or(this,fl).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,fl).indexOf(r)}keyAt(r){return Whe(Or(this,fl),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new Ag(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new Ag(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new Ag(n)}toReversed(){let r=new Ag;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new Ag(n)}slice(r,n){let o=new Ag,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},fl=new WeakMap,Ag);function Whe(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=$hr(e,t);return r===-1?void 0:e[r]}function $hr(e,t){let r=e.length,n=Uot(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function Uot(e){return e!==e||e===0?0:Math.trunc(e)}var VGn=!!(typeof window<"u"&&window.document&&window.document.createElement);function it(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lh=A(bt(),1);var zot=A(bt(),1),Mo=globalThis?.document?zot.useLayoutEffect:()=>{};var w7=A(bt(),1);var qhr=lh[" useInsertionEffect ".trim().toString()]||Mo;function Ba({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Ghr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lh.useRef(e!==void 0);lh.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=lh.useCallback(u=>{if(s){let d=Khr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Ghr({defaultProp:e,onChange:t}){let[r,n]=lh.useState(e),o=lh.useRef(r),a=lh.useRef(t);return qhr(()=>{a.current=t},[t]),lh.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Khr(e){return typeof e=="function"}var jGn=Symbol("RADIX:SYNC_STATE");var ilt=A(bt(),1),slt=A(ck(),1);var llt=A(Qn(),1),Qvr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=Qvr.reduce((e,t)=>{let r=Pu(`Primitive.${t}`),n=ilt.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,llt.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&slt.flushSync(()=>e.dispatchEvent(t))}var qc=A(bt(),1);var Rf=A(bt(),1);var clt=A(bt(),1);function Zvr(e,t){return clt.useReducer((r,n)=>t[r][n]??r,e)}var Ai=e=>{let{present:t,children:r}=e,n=Jvr(t),o=typeof r=="function"?r({present:n.isPresent}):Rf.Children.only(r),a=gr(n.ref,eyr(o));return typeof r=="function"||n.isPresent?Rf.cloneElement(o,{ref:a}):null};Ai.displayName="Presence";function Jvr(e){let[t,r]=Rf.useState(),n=Rf.useRef(null),o=Rf.useRef(e),a=Rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Zvr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Rf.useEffect(()=>{let c=zX(n.current);a.current=s==="mounted"?c:"none"},[s]),Mo(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=zX(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Mo(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=zX(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=zX(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function zX(e){return e?.animationName||"none"}function eyr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aye=A(bt(),1);var tyr=aye[" useId ".trim().toString()]||(()=>{}),ryr=0;function za(e){let[t,r]=aye.useState(tyr());return Mo(()=>{e||r(n=>n??String(ryr++))},[e]),e||(t?`radix-${t}`:"")}var uk=A(Qn(),1),HX="Collapsible",[nyr,iye]=Co(HX),[oyr,sye]=nyr(HX),ult=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Ba({prop:n,defaultProp:o??!1,onChange:i,caller:HX});return(0,uk.jsx)(oyr,{scope:r,disabled:a,contentId:za(),open:l,onOpenToggle:qc.useCallback(()=>c(u=>!u),[c]),children:(0,uk.jsx)(wt.div,{"data-state":cye(l),"data-disabled":a?"":void 0,...s,ref:t})})});ult.displayName=HX;var dlt="CollapsibleTrigger",flt=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=sye(dlt,r);return(0,uk.jsx)(wt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":cye(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:it(e.onClick,o.onOpenToggle)})});flt.displayName=dlt;var lye="CollapsibleContent",plt=qc.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sye(lye,e.__scopeCollapsible);return(0,uk.jsx)(Ai,{present:r||o.open,children:({present:a})=>(0,uk.jsx)(ayr,{...n,ref:t,present:a})})});plt.displayName=lye;var ayr=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=sye(lye,r),[s,l]=qc.useState(n),c=qc.useRef(null),u=gr(t,c),d=qc.useRef(0),f=d.current,p=qc.useRef(0),h=p.current,m=i.open||s,v=qc.useRef(m),g=qc.useRef(void 0);return qc.useEffect(()=>{let y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Mo(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(n)}},[i.open,n]),(0,uk.jsx)(wt.div,{"data-state":cye(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:h?`${h}px`:void 0,...e.style},children:m&&o})});function cye(e){return e?"open":"closed"}var mlt=ult,hlt=flt,glt=plt;var jX=A(bt(),1),syr=A(Qn(),1),lyr=jX.createContext(void 0);function Uy(e){let t=jX.useContext(lyr);return e||t||"ltr"}var Vl=A(Qn(),1),zg="Accordion",cyr=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[dye,uyr,dyr]=Ly(zg),[WX,b9n]=Co(zg,[dyr,iye]),fye=iye(),fyr=Nf.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Vl.jsx)(dye.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Vl.jsx)(gyr,{...a,ref:t}):(0,Vl.jsx)(hyr,{...o,ref:t})})});fyr.displayName=zg;var[vlt,pyr]=WX(zg),[ylt,myr]=WX(zg,{collapsible:!1}),hyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Ba({prop:r,defaultProp:n??"",onChange:o,caller:zg});return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:Nf.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Nf.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:a,children:(0,Vl.jsx)(xlt,{...i,ref:t})})})}),gyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Ba({prop:r,defaultProp:n??[],onChange:o,caller:zg}),l=Nf.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=Nf.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Vl.jsx)(xlt,{...a,ref:t})})})}),[vyr,qX]=WX(zg),xlt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=Nf.default.useRef(null),l=gr(s,t),c=uyr(r),d=Uy(o)==="ltr",f=it(e.onKeyDown,p=>{if(!cyr.includes(p.key))return;let h=p.target,m=c().filter(P=>!P.ref.current?.disabled),v=m.findIndex(P=>P.ref.current===h),g=m.length;if(v===-1)return;p.preventDefault();let y=v,x=0,w=g-1,b=()=>{y=v+1,y>w&&(y=x)},C=()=>{y=v-1,y<x&&(y=w)};switch(p.key){case"Home":y=x;break;case"End":y=w;break;case"ArrowRight":a==="horizontal"&&(d?b():C());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?C():b());break;case"ArrowUp":a==="vertical"&&C();break}let S=y%g;m[S].ref.current?.focus()});return(0,Vl.jsx)(vyr,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Vl.jsx)(dye.Slot,{scope:r,children:(0,Vl.jsx)(wt.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),$X="AccordionItem",[yyr,pye]=WX($X),blt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=qX($X,r),i=pyr($X,r),s=fye(r),l=za(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Vl.jsx)(yyr,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Vl.jsx)(mlt,{"data-orientation":a.orientation,"data-state":klt(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});blt.displayName=$X;var wlt="AccordionHeader",Clt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(wlt,r);return(0,Vl.jsx)(wt.h3,{"data-orientation":o.orientation,"data-state":klt(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Clt.displayName=wlt;var uye="AccordionTrigger",Slt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(uye,r),i=myr(uye,r),s=fye(r);return(0,Vl.jsx)(dye.ItemSlot,{scope:r,children:(0,Vl.jsx)(hlt,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});Slt.displayName=uye;var Plt="AccordionContent",Ilt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(Plt,r),i=fye(r);return(0,Vl.jsx)(glt,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{["--radix-accordion-content-height"]:"var(--radix-collapsible-content-height)",["--radix-accordion-content-width"]:"var(--radix-collapsible-content-width)",...e.style}})});Ilt.displayName=Plt;function klt(e){return e?"open":"closed"}var Rlt=blt,Nlt=Clt,mye=Slt,hye=Ilt;var KX=A(bt());var Tlt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),byr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),gye=e=>{let t=byr(e);return t.charAt(0).toUpperCase()+t.slice(1)},GX=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mlt=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var U3=A(bt());var Elt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Alt=(0,U3.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,U3.createElement)("svg",{ref:l,...Elt,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:GX("lucide",o),...!a&&!Mlt(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,U3.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var Ct=(e,t)=>{let r=(0,KX.forwardRef)(({className:n,...o},a)=>(0,KX.createElement)(Alt,{ref:a,iconNode:t,className:GX(`lucide-${Tlt(gye(e))}`,`lucide-${e}`,n),...o}));return r.displayName=gye(e),r};var wyr=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],z3=Ct("align-center",wyr);var Cyr=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],H3=Ct("align-justify",Cyr);var Syr=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],j3=Ct("align-left",Syr);var Pyr=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],$3=Ct("align-right",Pyr);var Iyr=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],W3=Ct("bold",Iyr);var kyr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q0=Ct("check",kyr);var Ryr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dS=Ct("chevron-down",Ryr);var Nyr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],BA=Ct("chevron-left",Nyr);var Tyr=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fS=Ct("chevron-right",Tyr);var Myr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],q3=Ct("chevron-up",Myr);var Eyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zy=Ct("circle-alert",Eyr);var Ayr=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pS=Ct("circle-check-big",Ayr);var Lyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VA=Ct("circle",Lyr);var Dyr=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],G3=Ct("code",Dyr);var Oyr=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],K3=Ct("credit-card",Oyr);var _yr=[["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"}]],G0=Ct("ellipsis",_yr);var Fyr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],X3=Ct("eye",Fyr);var Byr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Y3=Ct("file-text",Byr);var Vyr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Q3=Ct("file",Vyr);var Uyr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],UA=Ct("image",Uyr);var zyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zA=Ct("info",zyr);var Hyr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Z3=Ct("italic",Hyr);var jyr=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],J3=Ct("link",jyr);var $yr=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],eV=Ct("list-ordered",$yr);var Wyr=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],tV=Ct("list",Wyr);var qyr=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jp=Ct("loader-circle",qyr);var Gyr=[["path",{d:"M5 12h14",key:"1ays0h"}]],rV=Ct("minus",Gyr);var Kyr=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],nV=Ct("music",Kyr);var Xyr=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],oV=Ct("palette",Xyr);var Yyr=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],aV=Ct("phone",Yyr);var Qyr=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],iV=Ct("quote",Qyr);var Zyr=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],sV=Ct("redo",Zyr);var Jyr=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lV=Ct("search",Jyr);var exr=[["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"}]],Tf=Ct("square-pen",exr);var txr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],cV=Ct("strikethrough",txr);var rxr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mS=Ct("triangle-alert",rxr);var nxr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],uV=Ct("underline",nxr);var oxr=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],dV=Ct("undo",oxr);var axr=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],fV=Ct("upload",axr);var ixr=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pV=Ct("video",ixr);var sxr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K0=Ct("x",sxr);function Llt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Llt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function XX(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Llt(e))&&(n&&(n+=" "),n+=t);return n}var xye="-",lxr=e=>{let t=uxr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(xye);return s[0]===""&&s.length!==1&&s.shift(),_lt(s,t)||cxr(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},_lt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?_lt(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(xye);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Dlt=/^\[(.+)\]$/,cxr=e=>{if(Dlt.test(e)){let t=Dlt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},uxr=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fxr(Object.entries(e.classGroups),r).forEach(([a,i])=>{yye(i,n,a,t)}),n},yye=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Olt(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dxr(o)){yye(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{yye(i,Olt(t,a),r,n)})})},Olt=(e,t)=>{let r=e;return t.split(xye).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dxr=e=>e.isThemeGetter,fxr=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pxr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Flt="!",mxr=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let v=0;v<s.length;v++){let g=s[v];if(c===0){if(g===o&&(n||s.slice(v,v+a)===t)){l.push(s.slice(u,v)),u=v+a;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Flt),h=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},hxr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gxr=e=>({cache:pxr(e.cacheSize),parseClassName:mxr(e),...lxr(e)}),vxr=/\s+/,yxr=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vxr),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),h=!!p,m=n(h?f.substring(0,p):f);if(!m){if(!h){s=c+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=c+(s.length>0?" "+s:s);continue}h=!1}let v=hxr(u).join(":"),g=d?v+Flt:v,y=g+m;if(a.includes(y))continue;a.push(y);let x=o(m,h);for(let w=0;w<x.length;++w){let b=x[w];a.push(g+b)}s=c+(s.length>0?" "+s:s)}return s};function xxr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Blt(t))&&(n&&(n+=" "),n+=r);return n}var Blt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Blt(e[n]))&&(r&&(r+=" "),r+=t);return r};function bxr(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gxr(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=yxr(l,r);return o(l,u),u}return function(){return a(xxr.apply(null,arguments))}}var ui=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vlt=/^\[(?:([a-z-]+):)?(.+)\]$/i,wxr=/^\d+\/\d+$/,Cxr=new Set(["px","full","screen"]),Sxr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pxr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ixr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kxr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rxr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X0=e=>HA(e)||Cxr.has(e)||wxr.test(e),hS=e=>jA(e,"length",Oxr),HA=e=>!!e&&!Number.isNaN(Number(e)),vye=e=>jA(e,"number",HA),mV=e=>!!e&&Number.isInteger(Number(e)),Nxr=e=>e.endsWith("%")&&HA(e.slice(0,-1)),mn=e=>Vlt.test(e),gS=e=>Sxr.test(e),Txr=new Set(["length","size","percentage"]),Mxr=e=>jA(e,Txr,Ult),Exr=e=>jA(e,"position",Ult),Axr=new Set(["image","url"]),Lxr=e=>jA(e,Axr,Fxr),Dxr=e=>jA(e,"",_xr),hV=()=>!0,jA=(e,t,r)=>{let n=Vlt.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Oxr=e=>Pxr.test(e)&&!Ixr.test(e),Ult=()=>!1,_xr=e=>kxr.test(e),Fxr=e=>Rxr.test(e);var Bxr=()=>{let e=ui("colors"),t=ui("spacing"),r=ui("blur"),n=ui("brightness"),o=ui("borderColor"),a=ui("borderRadius"),i=ui("borderSpacing"),s=ui("borderWidth"),l=ui("contrast"),c=ui("grayscale"),u=ui("hueRotate"),d=ui("invert"),f=ui("gap"),p=ui("gradientColorStops"),h=ui("gradientColorStopPositions"),m=ui("inset"),v=ui("margin"),g=ui("opacity"),y=ui("padding"),x=ui("saturate"),w=ui("scale"),b=ui("sepia"),C=ui("skew"),S=ui("space"),P=ui("translate"),T=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",mn,t],N=()=>[mn,t],V=()=>["",X0,hS],_=()=>["auto",HA,mn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",mn],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[HA,mn];return{cacheSize:500,separator:":",theme:{colors:[hV],spacing:[X0,hS],blur:["none","",gS,mn],brightness:U(),borderColor:[e],borderRadius:["none","","full",gS,mn],borderSpacing:N(),borderWidth:V(),contrast:U(),grayscale:O(),hueRotate:U(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Nxr,hS],inset:M(),margin:M(),opacity:U(),padding:N(),saturate:U(),scale:U(),sepia:O(),skew:U(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",mn]}],container:["container"],columns:[{columns:[gS]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),mn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mV,mn]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",mn]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",mV,mn]}],"grid-cols":[{"grid-cols":[hV]}],"col-start-end":[{col:["auto",{span:["full",mV,mn]},mn]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[hV]}],"row-start-end":[{row:["auto",{span:[mV,mn]},mn]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",mn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",mn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",mn,t]}],"min-w":[{"min-w":[mn,t,"min","max","fit"]}],"max-w":[{"max-w":[mn,t,"none","full","min","max","fit","prose",{screen:[gS]},gS]}],h:[{h:[mn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[mn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gS,hS]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vye]}],"font-family":[{font:[hV]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",mn]}],"line-clamp":[{"line-clamp":["none",HA,vye]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X0,mn]}],"list-image":[{"list-image":["none",mn]}],"list-style-type":[{list:["none","disc","decimal",mn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X0,hS]}],"underline-offset":[{"underline-offset":["auto",X0,mn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Exr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mxr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Lxr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[X0,mn]}],"outline-w":[{outline:[X0,hS]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[X0,hS]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gS,Dxr]}],"shadow-color":[{shadow:[hV]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",gS,mn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",mn]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",mn]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",mn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[mV,mn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",mn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X0,hS,vye]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var zlt=bxr(Bxr);var W=A(Qn(),1);var Hlt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jlt=XX,Kn=(e,t)=>r=>{var n;if(t?.variants==null)return jlt(e,r?.class,r?.className);let{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{let u=r?.[c],d=a?.[c];if(u===null)return null;let f=Hlt(u)||Hlt(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...a,...s}[m]):{...a,...s}[m]===v})?[...c,d,f]:c},[]);return jlt(e,i,l,r?.class,r?.className)};var gh=A(bt(),1);var $A=A(bt(),1);function di(e){let t=$A.useRef(e);return $A.useEffect(()=>{t.current=e}),$A.useMemo(()=>(...r)=>t.current?.(...r),[])}var Klt=A(Glt(),1);function Xlt(){return(0,Klt.useSyncExternalStore)(Kxr,()=>!0,()=>!1)}function Kxr(){return()=>{}}var gV=A(Qn(),1),wye="Avatar",[Xxr,oXn]=Co(wye),[Yxr,Qlt]=Xxr(wye),Zlt=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=gh.useState("idle");return(0,gV.jsx)(Yxr,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,gV.jsx)(wt.span,{...n,ref:t})})});Zlt.displayName=wye;var Jlt="AvatarImage",ect=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=Qlt(Jlt,r),s=Qxr(n,a),l=di(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mo(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,gV.jsx)(wt.img,{...a,ref:t,src:n}):null});ect.displayName=Jlt;var tct="AvatarFallback",rct=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=Qlt(tct,r),[i,s]=gh.useState(n===void 0);return gh.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,gV.jsx)(wt.span,{...o,ref:t}):null});rct.displayName=tct;function Ylt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Qxr(e,{referrerPolicy:t,crossOrigin:r}){let n=Xlt(),o=gh.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=gh.useState(()=>Ylt(a,e));return Mo(()=>{s(Ylt(a,e))},[a,e]),Mo(()=>{let l=d=>()=>{s(d)};if(!a)return;let c=l("loaded"),u=l("error");return a.addEventListener("load",c),a.addEventListener("error",u),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",u)}},[a,r,t]),i}var Cye=Zlt,Sye=ect,Pye=rct;var e5=A(Qn(),1),Wy=A(bt(),1);var nct=A(bt(),1),qA=(0,nct.createContext)({});var oct=A(bt(),1);function Hy(e){let t=(0,oct.useRef)(null);return t.current===null&&(t.current=e()),t.current}var YX=A(bt(),1);var GA=typeof window<"u";var KA=GA?YX.useLayoutEffect:YX.useEffect;var oxe=A(Qn(),1),iut=A(bt(),1),ZV=A(bt(),1);var act=A(bt(),1),vS=(0,act.createContext)(null);var out=A(Qn(),1);function dk(e,t){e.indexOf(t)===-1&&e.push(t)}function Hg(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hc=(e,t,r)=>r>t?t:r<e?e:r;var Y0=()=>{},Gc=()=>{};var Mu={};var vV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yV(e){return typeof e=="object"&&e!==null}var xV=e=>/^0[^.\s]+$/u.test(e);function fk(e){let t;return()=>(t===void 0&&(t=e()),t)}var es=e=>e;var Jxr=(e,t)=>r=>t(e(r)),jg=(...e)=>e.reduce(Jxr);var vh=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Q0=class{constructor(){this.subscriptions=[]}add(t){return dk(this.subscriptions,t),()=>Hg(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Os=e=>e*1e3,Kc=e=>e/1e3;function bV(e,t){return t?e*(1e3/t):0}var ict=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var sct=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,e0r=1e-7,t0r=12;function r0r(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=sct(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>e0r&&++s<t0r);return i}function yS(e,t,r,n){if(e===t&&r===n)return es;let o=a=>r0r(a,0,1,e,r);return a=>a===0||a===1?a:sct(o(a),t,n)}var QX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ZX=e=>t=>1-e(1-t);var JX=yS(.33,1.53,.69,.99),XA=ZX(JX),wV=QX(XA);var CV=e=>(e*=2)<1?.5*XA(e):.5*(2-Math.pow(2,-10*(e-1)));var SV=e=>1-Math.sin(Math.acos(e)),PV=ZX(SV),IV=QX(SV);var Iye=yS(.42,0,1,1),kye=yS(0,0,.58,1),kV=yS(.42,0,.58,1);var RV=e=>Array.isArray(e)&&typeof e[0]!="number";function NV(e,t){return RV(e)?e[ict(0,e.length,t)]:e}var TV=e=>Array.isArray(e)&&typeof e[0]=="number";var lct={linear:es,easeIn:Iye,easeInOut:kV,easeOut:kye,circIn:SV,circInOut:IV,circOut:PV,backIn:XA,backInOut:wV,backOut:JX,anticipate:CV},n0r=e=>typeof e=="string",eY=e=>{if(TV(e)){Gc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return yS(t,r,n,o)}else if(n0r(e))return Gc(lct[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lct[e];return e};var MV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Mf={value:null,addProjectionMetrics:null};function cct(e,t){let r=new Set,n=new Set,o=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(s)}let u={schedule:(d,f=!1,p=!1)=>{let m=p&&o?r:n;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(s=d,o){a=!0;return}o=!0,[r,n]=[n,r],r.forEach(c),t&&Mf.value&&Mf.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var o0r=40;function tY(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=MV.reduce((x,w)=>(x[w]=cct(a,t?w:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let x=Mu.useManualTiming?o.timestamp:performance.now();r=!1,Mu.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,o0r),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},v=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:MV.reduce((x,w)=>{let b=i[w];return x[w]=(C,S=!1,P=!1)=>(r||v(),b.schedule(C,S,P)),x},{}),cancel:x=>{for(let w=0;w<MV.length;w++)i[MV[w]].cancel(x)},state:o,steps:i}}var{schedule:hn,cancel:Eu,state:bs,steps:EV}=tY(typeof requestAnimationFrame<"u"?requestAnimationFrame:es,!0);var rY;function a0r(){rY=void 0}var ws={now:()=>(rY===void 0&&ws.set(bs.isProcessing||Mu.useManualTiming?bs.timestamp:performance.now()),rY),set:e=>{rY=e,queueMicrotask(a0r)}};var $g={layout:0,mainThread:0,waapi:0};var uct=e=>t=>typeof t=="string"&&t.startsWith(e),pk=uct("--"),i0r=uct("var(--"),mk=e=>i0r(e)?s0r.test(e.split("/*")[0].trim()):!1,s0r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var jy={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Z0={...jy,transform:e=>hc(0,1,e)},AV={...jy,default:1};var xS=e=>Math.round(e*1e5)/1e5;var YA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dct(e){return e==null}var fct=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var QA=(e,t)=>r=>!!(typeof r=="string"&&fct.test(r)&&r.startsWith(e)||t&&!dct(r)&&Object.prototype.hasOwnProperty.call(r,t)),nY=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(YA);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var l0r=e=>hc(0,255,e),Rye={...jy,transform:e=>Math.round(l0r(e))},$y={test:QA("rgb","red"),parse:nY("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Rye.transform(e)+", "+Rye.transform(t)+", "+Rye.transform(r)+", "+xS(Z0.transform(n))+")"};function c0r(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var LV={test:QA("#"),parse:c0r,transform:$y.transform};var DV=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wg=DV("deg"),Au=DV("%"),hr=DV("px"),Nye=DV("vh"),Tye=DV("vw"),oY=(()=>({...Au,parse:e=>Au.parse(e)/100,transform:e=>Au.transform(e*100)}))();var bS={test:QA("hsl","hue"),parse:nY("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Au.transform(xS(t))+", "+Au.transform(xS(r))+", "+xS(Z0.transform(n))+")"};var Li={test:e=>$y.test(e)||LV.test(e)||bS.test(e),parse:e=>$y.test(e)?$y.parse(e):bS.test(e)?bS.parse(e):LV.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$y.transform(e):bS.transform(e),getAnimatableNone:e=>{let t=Li.parse(e);return t.alpha=0,Li.transform(t)}};var pct=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function u0r(e){return isNaN(e)&&typeof e=="string"&&(e.match(YA)?.length||0)+(e.match(pct)?.length||0)>0}var hct="number",gct="color",d0r="var",f0r="var(",mct="${}",p0r=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wS(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(p0r,l=>(Li.test(l)?(n.color.push(a),o.push(gct),r.push(Li.parse(l))):l.startsWith(f0r)?(n.var.push(a),o.push(d0r),r.push(l)):(n.number.push(a),o.push(hct),r.push(parseFloat(l))),++a,mct)).split(mct);return{values:r,split:s,indexes:n,types:o}}function vct(e){return wS(e).values}function yct(e){let{split:t,types:r}=wS(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===hct?a+=xS(o[i]):s===gct?a+=Li.transform(o[i]):a+=o[i]}return a}}var m0r=e=>typeof e=="number"?0:Li.test(e)?Li.getAnimatableNone(e):e;function h0r(e){let t=vct(e);return yct(e)(t.map(m0r))}var Lu={test:u0r,parse:vct,createTransformer:yct,getAnimatableNone:h0r};function Mye(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xct({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=Mye(l,s,e+1/3),a=Mye(l,s,e),i=Mye(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function ZA(e,t){return r=>r>0?t:e}var Vn=(e,t,r)=>e+(t-e)*r;var Eye=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},g0r=[LV,$y,bS],v0r=e=>g0r.find(t=>t.test(e));function bct(e){let t=v0r(e);if(Y0(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===bS&&(r=xct(r)),r}var Aye=(e,t)=>{let r=bct(e),n=bct(t);if(!r||!n)return ZA(e,t);let o={...r};return a=>(o.red=Eye(r.red,n.red,a),o.green=Eye(r.green,n.green,a),o.blue=Eye(r.blue,n.blue,a),o.alpha=Vn(r.alpha,n.alpha,a),$y.transform(o))};var aY=new Set(["none","hidden"]);function wct(e,t){return aY.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function y0r(e,t){return r=>Vn(e,t,r)}function iY(e){return typeof e=="number"?y0r:typeof e=="string"?mk(e)?ZA:Li.test(e)?Aye:w0r:Array.isArray(e)?Cct:typeof e=="object"?Li.test(e)?Aye:x0r:ZA}function Cct(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>iY(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function x0r(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=iY(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function b0r(e,t){let r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let a=t.types[o],i=e.indexes[a][n[a]],s=e.values[i]??0;r[o]=s,n[a]++}return r}var w0r=(e,t)=>{let r=Lu.createTransformer(t),n=wS(e),o=wS(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?aY.has(e)&&!o.values.length||aY.has(t)&&!n.values.length?wct(e,t):jg(Cct(b0r(n,o),o.values),r):(Y0(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ZA(e,t))};function sY(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Vn(e,t,r):iY(e)(e,t)}var Sct=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>hn.update(t,r),stop:()=>Eu(t),now:()=>bs.isProcessing?bs.timestamp:ws.now()}};var lY=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function JA(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function OV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(JA(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Kc(o)}}var C0r=5;function cY(e,t,r){let n=Math.max(t-C0r,0);return bV(r-e(n),t-n)}var fi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Dye=.001;function Pct({duration:e=fi.duration,bounce:t=fi.bounce,velocity:r=fi.velocity,mass:n=fi.mass}){let o,a;Y0(e<=Os(fi.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hc(fi.minDamping,fi.maxDamping,i),e=hc(fi.minDuration,fi.maxDuration,Kc(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=uY(c,i),h=Math.exp(-d);return Dye-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=uY(Math.pow(c,2),i);return(-o(c)+Dye>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Dye+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=P0r(o,a,s);if(e=Os(e),isNaN(l))return{stiffness:fi.stiffness,damping:fi.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var S0r=12;function P0r(e,t,r){let n=r;for(let o=1;o<S0r;o++)n=n-e(n)/t(n);return n}function uY(e,t){return e*Math.sqrt(1-t*t)}var I0r=["duration","bounce"],k0r=["stiffness","damping","mass"];function Ict(e,t){return t.some(r=>e[r]!==void 0)}function R0r(e){let t={velocity:fi.velocity,stiffness:fi.stiffness,damping:fi.damping,mass:fi.mass,isResolvedFromDuration:!1,...e};if(!Ict(e,k0r)&&Ict(e,I0r))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fi.mass,stiffness:o,damping:a}}else{let r=Pct(e);t={...t,...r,mass:fi.mass},t.isResolvedFromDuration=!0}return t}function J0(e=fi.visualDuration,t=fi.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=R0r({...r,velocity:-Kc(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=i-a,g=Kc(Math.sqrt(l/u)),y=Math.abs(v)<5;n||(n=y?fi.restSpeed.granular:fi.restSpeed.default),o||(o=y?fi.restDelta.granular:fi.restDelta.default);let x;if(m<1){let b=uY(g,m);x=C=>{let S=Math.exp(-m*g*C);return i-S*((h+m*g*v)/b*Math.sin(b*C)+v*Math.cos(b*C))}}else if(m===1)x=b=>i-Math.exp(-g*b)*(v+(h+g*v)*b);else{let b=g*Math.sqrt(m*m-1);x=C=>{let S=Math.exp(-m*g*C),P=Math.min(b*C,300);return i-S*((h+m*g*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=b===0?h:0;m<1&&(S=b===0?Os(h):cY(x,b,C));let P=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=P&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(JA(w),2e4),C=lY(S=>w.next(b*S).value,b,30);return b+"ms "+C},toTransition:()=>{}};return w}J0.applyToOptions=e=>{let t=OV(e,100,J0);return e.ease=t.ease,e.duration=Os(t.duration),e.type="keyframes",e};function _V({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);let y=P=>-m*Math.exp(-P/n),x=P=>g+y(P),w=P=>{let T=y(P),L=x(P);f.done=Math.abs(T)<=c,f.value=f.done?g:L},b,C,S=P=>{p(f.value)&&(b=P,C=J0({keyframes:[f.value,h(f.value)],velocity:cY(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let T=!1;return!C&&b===void 0&&(T=!0,w(P),S(P)),b!==void 0&&P>=b?C.next(P-b):(!T&&w(P),f)}}}function N0r(e,t,r){let n=[],o=r||Mu.mix||sY,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||es:t;s=jg(l,s)}n.push(s)}return n}function dY(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Gc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=N0r(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=vh(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hc(e[0],e[a-1],u)):c}function FV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=vh(0,t,n);e.push(Vn(r,1,o))}}function BV(e){let t=[0];return FV(t,e.length-1),t}function kct(e,t){return e.map(r=>r*t)}function T0r(e,t){return e.map(()=>t||kV).splice(0,e.length-1)}function hk({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=RV(n)?n.map(eY):eY(n),a={done:!1,value:t[0]},i=kct(r&&r.length===t.length?r:BV(t),e),s=dY(i,t,{ease:Array.isArray(o)?o:T0r(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var M0r=e=>e!==null;function eL(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(M0r),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var E0r={decay:_V,inertia:_V,tween:hk,keyframes:hk,spring:J0};function fY(e){typeof e.type=="string"&&(e.type=E0r[e.type])}var CS=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var A0r=e=>e/100,eb=class extends CS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==ws.now()&&this.tick(ws.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$g.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;fY(t);let{type:r=hk,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||hk;l!==hk&&typeof s[0]!="number"&&(this.mixKeyframes=jg(A0r,sY(s[0],s[1])),s=[0,100]);let c=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=JA(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:o,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,w=n;if(d){let P=Math.min(this.currentTime,o)/s,T=Math.floor(P),L=P%1;!L&&P>=1&&(L=1),L===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(w=i)),x=hc(0,1,L)*s}let b=y?{done:!1,value:u[0]}:w.next(x);a&&(b.value=a(b.value));let{done:C}=b;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&h!==_V&&(b.value=eL(u,this.options,v,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Kc(this.calculatedDuration)}get time(){return Kc(this.currentTime)}set time(t){t=Os(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ws.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Kc(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=Sct,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ws.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$g.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Rct(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gk=e=>e*180/Math.PI,Oye=e=>{let t=gk(Math.atan2(e[1],e[0]));return _ye(t)},L0r={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oye,rotateZ:Oye,skewX:e=>gk(Math.atan(e[1])),skewY:e=>gk(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_ye=e=>(e=e%360,e<0&&(e+=360),e),Nct=Oye,Tct=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Mct=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),D0r={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tct,scaleY:Mct,scale:e=>(Tct(e)+Mct(e))/2,rotateX:e=>_ye(gk(Math.atan2(e[6],e[5]))),rotateY:e=>_ye(gk(Math.atan2(-e[2],e[0]))),rotateZ:Nct,rotate:Nct,skewX:e=>gk(Math.atan(e[4])),skewY:e=>gk(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function VV(e){return e.includes("scale")?1:0}function UV(e,t){if(!e||e==="none")return VV(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=D0r,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=L0r,o=s}if(!o)return VV(t);let a=n[t],i=o[1].split(",").map(O0r);return typeof a=="function"?a(i):i[a]}var Fye=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return UV(r,t)};function O0r(e){return parseFloat(e.trim())}var qg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$p=(()=>new Set(qg))();var Bye=e=>e===jy||e===hr,_0r=new Set(["x","y","z"]),F0r=qg.filter(e=>!_0r.has(e));function Ect(e){let t=[];return F0r.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var SS={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UV(t,"x"),y:(e,{transform:t})=>UV(t,"y")};SS.translateX=SS.x;SS.translateY=SS.y;var vk=new Set,Vye=!1,Uye=!1,zye=!1;function Act(){if(Uye){let e=Array.from(vk).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=Ect(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{n.getValue(a)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Uye=!1,Vye=!1,vk.forEach(e=>e.complete(zye)),vk.clear()}function Lct(){vk.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uye=!0)})}function Hye(){zye=!0,Lct(),Act(),zye=!1}var tb=class{constructor(t,r,n,o,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(vk.add(this),Vye||(Vye=!0,hn.read(Lct),hn.resolveKeyframes(Act))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){let a=o?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){let s=n.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),o&&a===void 0&&o.set(t[0])}Rct(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vk.delete(this)}cancel(){this.state==="scheduled"&&(vk.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Dct=e=>e.startsWith("--");function Oct(e,t,r){Dct(t)?e.style.setProperty(t,r):e.style[t]=r}var _ct=fk(()=>window.ScrollTimeline!==void 0);var Fct={};function Bct(e,t){let r=fk(e);return()=>Fct[t]??r()}var pY=Bct(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var yk=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var jye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yk([0,.65,.55,1]),circOut:yk([.55,0,1,.45]),backIn:yk([.31,.01,.66,-.59]),backOut:yk([.33,1.53,.69,.99])};function $ye(e,t){if(e)return typeof e=="function"?pY()?lY(e,t):"ease-out":TV(e)?yk(e):Array.isArray(e)?e.map(r=>$ye(r,t)||jye.easeOut):jye[e]}function Vct(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){let u={[t]:r};l&&(u.offset=l);let d=$ye(s,o);Array.isArray(d)&&(u.easing=d),Mf.value&&$g.waapi++;let f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};c&&(f.pseudoElement=c);let p=e.animate(u,f);return Mf.value&&p.finished.finally(()=>{$g.waapi--}),p}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function Uct({type:e,...t}){return xk(e)&&pY()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var mY=class extends CS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:n,keyframes:o,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Gc(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=Uct(t);this.animation=Vct(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=eL(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):Oct(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Kc(Number(t))}get time(){return Kc(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Os(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_ct()?(this.animation.timeline=t,es):r(this)}};var zct={anticipate:CV,backInOut:wV,circInOut:IV};function B0r(e){return e in zct}function Hct(e){typeof e.ease=="string"&&B0r(e.ease)&&(e.ease=zct[e.ease])}var jct=10,hY=class extends mY{constructor(t){Hct(t),fY(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:o,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new eb({...i,autoplay:!1}),l=Os(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-jct).value,s.sample(l).value,jct),s.stop()}};var Wye=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lu.test(e)||e==="0")&&!e.startsWith("url("));function V0r(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function $ct(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Wye(o,t),s=Wye(a,t);return Y0(i===s,`You are trying to animate ${t} from "${o}" to "${a}". "${i?a:o}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:V0r(e)||(r==="spring"||xk(r))&&n}function tL(e){e.duration=0,e.type}var U0r=new Set(["opacity","clipPath","filter","transform"]),z0r=fk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wct(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=t.owner.getProps();return z0r()&&r&&U0r.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var H0r=40,zV=class extends CS{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ws.now();let f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||tb;this.keyframeResolver=new p(s,(h,m,v)=>this.onKeyframesResolved(h,m,f,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=ws.now(),$ct(t,a,i,s)||((Mu.instantAnimations||!l)&&u?.(eL(t,n,r)),t[0]=t[t.length-1],tL(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>H0r?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&Wct(f)?new hY({...f,element:f.motionValue.owner.current}):new eb(f);p.finished.then(()=>this.notifyFinished()).catch(es),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hye()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var gY=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t){let r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,o)=>{n&&n(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var HV=class extends gY{then(t,r){return this.finished.finally(t).then(()=>{})}};var j0r=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $0r(e){let t=j0r.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var W0r=4;function qye(e,t,r=1){Gc(r<=W0r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=$0r(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return vV(i)?parseFloat(i):i}return mk(o)?qye(o,t,r+1):o}function bk(e,t){return e?.[t]??e?.default??e}var jV=new Set(["width","height","top","left","right","bottom",...qg]);var qct={test:e=>e==="auto",parse:e=>e};var vY=e=>t=>t.test(e);var Gye=[jy,hr,Au,Wg,Tye,Nye,qct],Kye=e=>Gye.find(vY(e));function Gct(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var q0r=new Set(["brightness","contrast","saturate","opacity"]);function G0r(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(YA)||[];if(!n)return e;let o=r.replace(n,""),a=q0r.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var K0r=/\b([a-z-]*)\(.*?\)/gu,$V={...Lu,getAnimatableNone:e=>{let t=e.match(K0r);return t?t.map(G0r).join(" "):e}};var Xye={...jy,transform:Math.round};var Kct={rotate:Wg,rotateX:Wg,rotateY:Wg,rotateZ:Wg,scale:AV,scaleX:AV,scaleY:AV,scaleZ:AV,skew:Wg,skewX:Wg,skewY:Wg,distance:hr,translateX:hr,translateY:hr,translateZ:hr,x:hr,y:hr,z:hr,perspective:hr,transformPerspective:hr,opacity:Z0,originX:oY,originY:oY,originZ:hr};var wk={borderWidth:hr,borderTopWidth:hr,borderRightWidth:hr,borderBottomWidth:hr,borderLeftWidth:hr,borderRadius:hr,radius:hr,borderTopLeftRadius:hr,borderTopRightRadius:hr,borderBottomRightRadius:hr,borderBottomLeftRadius:hr,width:hr,maxWidth:hr,height:hr,maxHeight:hr,top:hr,right:hr,bottom:hr,left:hr,padding:hr,paddingTop:hr,paddingRight:hr,paddingBottom:hr,paddingLeft:hr,margin:hr,marginTop:hr,marginRight:hr,marginBottom:hr,marginLeft:hr,backgroundPositionX:hr,backgroundPositionY:hr,...Kct,zIndex:Xye,fillOpacity:Z0,strokeOpacity:Z0,numOctaves:Xye};var Xct={...wk,color:Li,backgroundColor:Li,outlineColor:Li,fill:Li,stroke:Li,borderColor:Li,borderTopColor:Li,borderRightColor:Li,borderBottomColor:Li,borderLeftColor:Li,filter:$V,WebkitFilter:$V},WV=e=>Xct[e];function qV(e,t){let r=WV(e);return r!==$V&&(r=Lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var X0r=new Set(["auto","none","0"]);function Yct(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!X0r.has(a)&&wS(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=qV(r,o)}var GV=class extends tb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),mk(c))){let u=qye(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!jV.has(n)||t.length!==2)return;let[o,a]=t,i=Kye(o),s=Kye(a);if(i!==s)if(Bye(i)&&Bye(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else SS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Gct(t[o]))&&n.push(o);n.length&&Yct(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=SS[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);let a=n.length-1,i=n[a];n[a]=SS[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function KV(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}var XV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function YV(e){return yV(e)&&"offsetHeight"in e}var Qct=30,Y0r=e=>!isNaN(parseFloat(e)),Ck={current:void 0},yY=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=ws.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=ws.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Y0r(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Q0);let n=this.events[t].add(r);return t==="change"?()=>{n(),hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ck.current&&Ck.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ws.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qct)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Qct);return bV(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ef(e,t){return new yY(e,t)}var{schedule:Sk,cancel:Q0r}=tY(queueMicrotask,!1);var yh={x:!1,y:!1};function xY(){return yh.x||yh.y}function Yye(e){return e==="x"||e==="y"?yh[e]?null:(yh[e]=!0,()=>{yh[e]=!1}):yh.x||yh.y?null:(yh.x=yh.y=!0,()=>{yh.x=yh.y=!1})}function bY(e,t){let r=KV(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Zct(e){return!(e.pointerType==="touch"||xY())}function Qye(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{if(!Zct(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{Zct(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Zye=(e,t)=>t?e===t?!0:Zye(e,t.parentElement):!1;var Pk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Z0r=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jct(e){return Z0r.has(e.tagName)||e.tabIndex!==-1}var rL=new WeakSet;function eut(e){return t=>{t.key==="Enter"&&e(t)}}function Jye(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tut=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=eut(()=>{if(rL.has(r))return;Jye(r,"down");let o=eut(()=>{Jye(r,"up")}),a=()=>Jye(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function rut(e){return Pk(e)&&!xY()}function exe(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{let l=s.currentTarget;if(!rut(s))return;rL.add(l);let c=t(l,s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),rL.has(l)&&rL.delete(l),rut(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Zye(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),YV(s)&&(s.addEventListener("focus",c=>tut(c,o)),!Jct(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Ik(e){return yV(e)&&"ownerSVGElement"in e}function QV(e){return Ik(e)&&e.tagName==="svg"}function txe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=dY(o,a,i);return t?s(n):s}var Eo=e=>!!(e&&e.getVelocity);var J0r=[...Gye,Li,Lu],rxe=e=>J0r.find(vY(e));var wY=A(bt(),1),rb=A(bt(),1);var nut=A(bt(),1),PS=(0,nut.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var nxe=class extends wY.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=YV(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function aut({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,rb.useId)(),a=(0,rb.useRef)(null),i=(0,rb.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,rb.useContext)(PS);return(0,rb.useInsertionEffect)(()=>{let{width:l,height:c,top:u,left:d,right:f}=i.current;if(t||!a.current||!l||!c)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=o;let h=document.createElement("style");s&&(h.nonce=s);let m=n??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
414
+ `)}function Ymr(e,t){if(!t||t.length===0)return JSON.stringify(e,null,2);let r=e.map(n=>{let o={};return t.forEach(a=>{a in n&&(o[a]=n[a])}),o});return JSON.stringify(r,null,2)}function Qmr(e,t,r){let n=new Blob([e],{type:r}),o=URL.createObjectURL(n),a=document.createElement("a");a.href=o,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(o)}async function eot(e,t){let{format:r,filename:n="data-export",columns:o,includeHeaders:a=!0}=t,i,s,l;switch(r){case"csv":i=Xmr(e,o,a),s="text/csv;charset=utf-8;",l="csv";break;case"json":i=Ymr(e,o),s="application/json;charset=utf-8;",l="json";break;case"xlsx":throw new Error("XLSX export requires additional dependencies. Use CSV format instead.");default:throw new Error(`Unsupported export format: ${r}`)}let c=`${n}-${new Date().toISOString().split("T")[0]}.${l}`;Qmr(i,c,s)}function tot(e,t){return e.filter(r=>{let n=r.id||r.accessorKey;return n&&t[n]!==!1}).map(r=>r.id||r.accessorKey).filter(Boolean)}var qI=A(ue(),1),rot=A(uv(),1);var zt=A(de(),1),Zmr={equals:"Equals",notEquals:"Not equals",contains:"Contains",notContains:"Not contains",startsWith:"Starts with",endsWith:"Ends with",greaterThan:"Greater than",lessThan:"Less than",greaterThanOrEqual:"Greater than or equal",lessThanOrEqual:"Less than or equal",between:"Between",in:"In",notIn:"Not in",isNull:"Is empty",isNotNull:"Is not empty"};function Jmr(e){switch(e){case"number":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"date":return["equals","notEquals","greaterThan","lessThan","greaterThanOrEqual","lessThanOrEqual","between","isNull","isNotNull"];case"boolean":return["equals","notEquals","isNull","isNotNull"];case"select":return["equals","notEquals","in","notIn","isNull","isNotNull"];default:return["equals","notEquals","contains","notContains","startsWith","endsWith","isNull","isNotNull"]}}function not({table:e,open:t,onOpenChange:r,position:n="right",width:o="400px",filters:a,onFiltersChange:i,customFilters:s,matchAll:l,onMatchAllChange:c}){let[u,d]=(0,qI.useState)([]),[f,p]=(0,qI.useState)(!0),h=a||u,m=i||d,v=l!==void 0?l:f,g=c||p,y=(0,qI.useMemo)(()=>e.getAllColumns().filter(T=>T.id==="select"||T.id==="actions"||T.id==="expander"?!1:T.getCanFilter()),[e]),x=()=>{let T=y[0];if(!T)return;let L={column:T.id,operator:"contains",value:""};m([...h,L])},w=(T,L)=>{let M=[...h];M[T]={...M[T],...L},m(M)},b=T=>{m(h.filter((L,M)=>M!==T))},C=()=>{m([]),e.resetColumnFilters()},S=()=>{e.resetColumnFilters(),[...new Set(h.map(L=>L.column))].forEach(L=>{let M=e.getColumn(L);M&&M.setFilterValue({custom:!0,filters:h,matchAll:v})}),h.length===0&&e.resetColumnFilters(),r(!1)};if(typeof document>"u")return null;let P=(0,zt.jsxs)(zt.Fragment,{children:[(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20",style:{zIndex:9998},onClick:()=>r(!1)})}),(0,zt.jsx)(Ft,{children:t&&(0,zt.jsx)(ne.div,{initial:{x:n==="right"?"100%":"-100%"},animate:{x:0},exit:{x:n==="right"?"100%":"-100%"},transition:{type:"spring",damping:30,stiffness:300},className:F("fixed top-0 bottom-0 bg-background border-l shadow-xl",n==="right"?"right-0":"left-0"),style:{width:o,zIndex:9999},children:(0,zt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,zt.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(ns,{className:"h-5 w-5"}),(0,zt.jsx)("h2",{className:"text-lg font-semibold",children:"Filters"}),h.length>0&&(0,zt.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",h.length," active)"]})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>r(!1),children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[(0,zt.jsxs)("div",{className:"mb-6",children:[(0,zt.jsx)(Rt,{className:"text-sm font-medium mb-2 block",children:"Match conditions"}),(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsx)(oe,{variant:v?"primary":"outline",size:"sm",onClick:()=>g(!0),className:"flex-1",children:"Match all"}),(0,zt.jsx)(oe,{variant:v?"outline":"primary",size:"sm",onClick:()=>g(!1),className:"flex-1",children:"Match any"})]})]}),(0,zt.jsx)(Ys,{className:"mb-6"}),s&&(0,zt.jsxs)(zt.Fragment,{children:[s,(0,zt.jsx)(Ys,{className:"my-6"})]}),(0,zt.jsx)("div",{className:"space-y-4",children:h.map((T,L)=>(0,zt.jsx)(ehr,{filter:T,columns:y,onUpdate:M=>w(L,M),onRemove:()=>b(L)},L))}),(0,zt.jsxs)(oe,{variant:"outline",size:"sm",onClick:x,className:"w-full mt-4",children:[(0,zt.jsx)(Vi,{className:"h-4 w-4 mr-2"}),"Add filter"]})]}),(0,zt.jsx)("div",{className:"p-4 border-t space-y-2",children:(0,zt.jsxs)("div",{className:"flex gap-2",children:[(0,zt.jsxs)(oe,{variant:"outline",onClick:C,disabled:h.length===0,className:"flex-1",children:[(0,zt.jsx)(Ss,{className:"h-4 w-4 mr-2"}),"Clear all"]}),(0,zt.jsx)(oe,{onClick:S,className:"flex-1",children:"Apply filters"})]})})]})})})]});return(0,rot.createPortal)(P,document.body)}function ehr({filter:e,columns:t,onUpdate:r,onRemove:n}){let a=t.find(p=>p.id===e.column)?.columnDef,i=a?.meta?.filterType||"string",s=a?.meta?.filterOptions,l=a?.meta?.filterValueAccessor,c=Jmr(i),u=e.operator!=="isNull"&&e.operator!=="isNotNull",d=e.operator==="in"||e.operator==="notIn",f=qI.default.useMemo(()=>i!=="select"&&!s?null:s||null,[i,s]);return(0,zt.jsxs)("div",{className:"space-y-2 p-3 border rounded-lg bg-muted/30",children:[(0,zt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,zt.jsxs)(Qo,{value:e.column,onValueChange:p=>r({column:p}),children:[(0,zt.jsx)(Zo,{className:"flex-1",children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:t.map(p=>{let h=p.columnDef.header,m=typeof h=="function"?p.id:h||p.id;return(0,zt.jsx)(Bt,{value:p.id,children:m},p.id)})})]}),(0,zt.jsx)(oe,{variant:"ghost",size:"icon",onClick:n,className:"h-8 w-8",children:(0,zt.jsx)(lr,{className:"h-4 w-4"})})]}),(0,zt.jsxs)(Qo,{value:e.operator,onValueChange:p=>r({operator:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:c.map(p=>(0,zt.jsx)(Bt,{value:p,children:Zmr[p]},p))})]}),u&&(0,zt.jsx)("div",{children:i==="boolean"?(0,zt.jsxs)(Qo,{value:String(e.value),onValueChange:p=>r({value:p==="true"}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{})}),(0,zt.jsxs)(Jo,{style:{zIndex:1e4},children:[(0,zt.jsx)(Bt,{value:"true",children:"True"}),(0,zt.jsx)(Bt,{value:"false",children:"False"})]})]}):(i==="select"||f)&&!d?(0,zt.jsxs)(Qo,{value:e.value||"",onValueChange:p=>r({value:p}),children:[(0,zt.jsx)(Zo,{children:(0,zt.jsx)(ma,{placeholder:"Select value..."})}),(0,zt.jsx)(Jo,{style:{zIndex:1e4},children:f?.map(p=>(0,zt.jsx)(Bt,{value:p,children:p},p))})]}):(i==="select"||f)&&d?(0,zt.jsxs)("div",{className:"space-y-2",children:[(0,zt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Select multiple values:"}),(0,zt.jsx)("div",{className:"space-y-1 max-h-32 overflow-y-auto border rounded-md p-2",children:f?.map(p=>{let h=Array.isArray(e.value)?e.value:[],m=h.includes(p);return(0,zt.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer hover:bg-muted/50 p-1 rounded",children:[(0,zt.jsx)("input",{type:"checkbox",checked:m,onChange:v=>{let g=v.target.checked?[...h,p]:h.filter(y=>y!==p);r({value:g})},className:"rounded border-gray-300"}),(0,zt.jsx)("span",{className:"text-sm",children:p})]},p)})})]}):i==="number"?(0,zt.jsx)(Jt,{type:"number",value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."}):d?(0,zt.jsx)(Jt,{value:Array.isArray(e.value)?e.value.join(", "):e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter values separated by comma..."}):(0,zt.jsx)(Jt,{value:e.value||"",onChange:p=>r({value:p.target.value}),placeholder:"Enter value..."})})]})}var Ay=A(ue(),1);var ya=A(de(),1);function oot({table:e,filter:t,data:r}){let[n,o]=(0,Ay.useState)(!1),[a,i]=(0,Ay.useState)(""),s=Ay.default.useMemo(()=>{let g=e.getColumn(t.column);return g||(g=e.getAllColumns().find(x=>x.id===t.column||x.columnDef.accessorKey===t.column)),g},[e,t.column]),l=(0,Ay.useMemo)(()=>{if(t.options&&t.options!=="auto")return t.options;let g=new Set;return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}x!=null&&x!==""&&g.add(String(x))}),Array.from(g).sort()},[r,t.column,t.options]),c=s?.getFilterValue(),u=(0,Ay.useMemo)(()=>c?Array.isArray(c)?new Set(c):new Set([String(c)]):new Set,[c]),d=(0,Ay.useMemo)(()=>{if(!t.showCounts)return{};let g={};return r.forEach(y=>{let x=y[t.column];if(x===void 0&&t.column.includes(".")){let w=t.column.split(".");x=y;for(let b of w)x=x?.[b]}if(x!=null&&x!==""){let w=String(x);g[w]=(g[w]||0)+1}}),g},[r,t.column,t.showCounts]),f=g=>{if(s)if(t.multi){let y=new Set(u);y.has(g)?y.delete(g):y.add(g),y.size===0?s.setFilterValue(void 0):s.setFilterValue(Array.from(y))}else u.has(g)?s.setFilterValue(void 0):s.setFilterValue(g)},p=()=>{s?.setFilterValue(void 0),i("")},h=t.label||t.column,m=(0,Ay.useMemo)(()=>a?l.filter(g=>g.toLowerCase().includes(a.toLowerCase())):l,[l,a]),v=!s||l.length===0;return(0,ya.jsxs)(ls,{open:n,onOpenChange:o,children:[(0,ya.jsx)(cs,{asChild:!0,children:(0,ya.jsxs)(oe,{variant:"outline",size:"sm",disabled:v,className:F("h-8 border-dashed",u.size>0&&"border-solid"),children:[h,u.size>0&&(0,ya.jsxs)(ya.Fragment,{children:[(0,ya.jsx)("span",{className:"mx-2 h-4 w-px bg-border"}),(0,ya.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:u.size})]})]})}),(0,ya.jsx)(Wi,{className:"w-[250px] p-0",align:"start",children:(0,ya.jsxs)("div",{className:"p-2",children:[l.length>0&&(0,ya.jsx)("div",{className:"pb-2",children:(0,ya.jsxs)("div",{className:"relative",children:[(0,ya.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,ya.jsx)(Jt,{placeholder:`Search ${h.toLowerCase()}...`,value:a,onChange:g=>i(g.target.value),className:"h-8 w-full pl-8"})]})}),l.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No options available"}):m.length===0?(0,ya.jsx)("div",{className:"text-center text-sm text-muted-foreground py-4",children:"No results found"}):(0,ya.jsx)("div",{className:"space-y-1 max-h-[300px] overflow-y-auto",children:m.map(g=>{let y=u.has(g);return(0,ya.jsxs)("button",{onClick:()=>f(g),className:F("flex w-full items-center justify-between rounded px-2 py-1.5 text-sm hover:bg-accent",y&&"bg-accent"),children:[(0,ya.jsxs)("div",{className:"flex items-center",children:[(0,ya.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",y?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,ya.jsx)(on,{className:"h-4 w-4"})}),(0,ya.jsx)("span",{children:g})]}),t.showCounts&&d[g]!==void 0&&(0,ya.jsx)("span",{className:"text-xs text-muted-foreground",children:d[g]})]},g)})}),u.size>0&&(0,ya.jsx)("div",{className:"border-t mt-2 pt-2",children:(0,ya.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-center",onClick:p,children:"Clear filter"})})]})})]})}var q4=A(ue(),1);var Bn=A(de(),1);function aot({table:e,column:t,title:r,options:n="auto",data:o}){let a=e.getColumn(t),[i,s]=(0,q4.useState)("");if(!a)return null;let l=a.columnDef,c=l?.meta?.filterValueAccessor,u=l?.meta?.filterOptions,d=b=>c?c(b):b[t],{availableOptions:f,optionCounts:p}=(0,q4.useMemo)(()=>{let b={},C=new Set;o.forEach(P=>{let T=d(P);if(T!=null&&T!==""){let L=String(T);C.add(L),b[L]=(b[L]||0)+1}});let S=[];return n!=="auto"?S=n:u?S=u.map(P=>({value:P,label:P})):S=Array.from(C).sort().slice(0,50).map(P=>({value:P,label:P})),{availableOptions:S,optionCounts:b}},[o,n,u]),h=a.getFilterValue(),m=new Set(h||[]),v=(0,q4.useMemo)(()=>i?f.filter(b=>(b.label||b.value).toLowerCase().includes(i.toLowerCase())):f,[f,i]),g=r||a.columnDef.header||t,y=b=>{let C=new Set(m);C.has(b)?C.delete(b):C.add(b),C.size===0?a.setFilterValue(void 0):a.setFilterValue(Array.from(C))},x=()=>{a.setFilterValue(void 0),s("")},w=()=>{let b=v.map(C=>C.value);a.setFilterValue(b)};return(0,Bn.jsxs)(ls,{children:[(0,Bn.jsx)(cs,{asChild:!0,children:(0,Bn.jsxs)(oe,{variant:"outline",size:"sm",className:F("h-8 border-dashed",m.size>0&&"border-solid"),children:[(0,Bn.jsx)(jb,{className:"mr-2 h-4 w-4"}),g,m.size>0&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{orientation:"vertical",className:"mx-2 h-4"}),(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:m.size}),(0,Bn.jsx)("div",{className:"hidden space-x-1 lg:flex",children:m.size>2?(0,Bn.jsxs)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[m.size," selected"]}):Array.from(m).slice(0,2).map(b=>{let C=f.find(S=>S.value===b);return(0,Bn.jsx)(pt,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:C?.label||b},b)})})]})]})}),(0,Bn.jsxs)(Wi,{className:"w-[300px] p-0",align:"start",children:[(0,Bn.jsx)("div",{className:"p-3",children:(0,Bn.jsxs)("div",{className:"relative",children:[(0,Bn.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"}),(0,Bn.jsx)(Jt,{placeholder:`Search ${g.toLowerCase()}...`,value:i,onChange:b=>s(b.target.value),className:"h-8 pl-8"})]})}),(0,Bn.jsx)(Ys,{}),(0,Bn.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:v.length===0?(0,Bn.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No results found"}):(0,Bn.jsx)("div",{className:"p-2",children:v.map(b=>{let C=m.has(b.value),S=p[b.value]||0;return(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start font-normal",onClick:()=>y(b.value),children:[(0,Bn.jsx)("div",{className:F("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",C?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:(0,Bn.jsx)(on,{className:F("h-4 w-4")})}),b.icon&&(0,Bn.jsx)("span",{className:"mr-2",children:b.icon}),(0,Bn.jsx)("span",{className:"flex-1 text-left",children:b.label||b.value}),S>0&&(0,Bn.jsx)("span",{className:"ml-auto text-xs text-muted-foreground",children:S})]},b.value)})})}),(m.size>0||v.length>0)&&(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)(Ys,{}),(0,Bn.jsxs)("div",{className:"flex items-center justify-between p-2",children:[m.size>0?(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:x,className:"h-8 px-2 lg:px-3",children:["Clear",(0,Bn.jsx)(lr,{className:"ml-2 h-4 w-4"})]}):(0,Bn.jsxs)(oe,{variant:"ghost",size:"sm",onClick:w,className:"h-8 px-2 lg:px-3",children:["Select all",(0,Bn.jsx)(on,{className:"ml-2 h-4 w-4"})]}),(0,Bn.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.size," of ",f.length," selected"]})]})]})]})]})}var ot=A(de(),1);function Lhe({columns:e,data:t,searchable:r=!0,filterable:n=!0,exportable:o=!0,selectable:a=!1,pagination:i=!0,pageSize:s=10,pageSizeOptions:l=[5,10,20,50,100],className:c,onRowSelect:u,onExport:d,enableExpandable:f=!1,renderSubComponent:p,expandedRows:h,onRowExpandChange:m,bulkActions:v=[],quickFilters:g=[],facetedFilters:y=[],features:x={},theme:w={},texts:b={},enableSorting:C=!0,enableFiltering:S=!0,enablePagination:P=!0,enableColumnVisibility:T=!0,enableRowSelection:L,filterPlaceholder:M="Search all columns...",defaultPageSize:N,manualPagination:V=!1,pageCount:_,onPaginationChange:I,onSortingChange:k,onColumnFiltersChange:R,state:E}){let O=vs.default.useMemo(()=>e.map(De=>{let{enableHiding:gt,...Ge}=De;return{...Ge,enableHiding:!0,filterFn:"custom"}}),[e]),{hasProAccess:B,isLoading:U}=st();if(!U&&!B)return(0,ot.jsx)(Rn,{componentName:"Data Table",className:F("w-full",c)});let[D,j]=vs.default.useState([]),[$,z]=vs.default.useState([]),[q,H]=vs.default.useState({}),[K,G]=vs.default.useState({}),[J,ae]=vs.default.useState(""),[Z,Pe]=vs.default.useState({pageIndex:0,pageSize:N||s||10}),[be,_e]=vs.default.useState(!1),[he,Ne]=vs.default.useState(new Set),[ve,Oe]=vs.default.useState(!1),Y=h||he,Q=m?De=>m(De):Ne,pe=N||s,Re=vs.default.useMemo(()=>t,[t]),fe=De=>()=>{let Ge=(E?.sorting??D).find(jr=>jr.id===De),Ut=[];Ge?Ge.desc?Ut=[]:Ut=[{id:De,desc:!0}]:Ut=[{id:De,desc:!1}];let qt=k!==void 0?k:j;typeof qt=="function"&&qt(Ut)},Ce=vs.default.useRef(null),re=vs.default.useCallback(De=>{let gt=typeof De=="function"?De(K):De;if(G(gt),u&&Ce.current){let Ge=Object.keys(gt).filter(qt=>gt[qt]),Ut=Ce.current.getRowModel().rows.filter(qt=>Ge.includes(qt.id)).map(qt=>qt.original);u(Ut)}},[K,u]),ye=vs.default.useMemo(()=>{let De=O.map(Ge=>!Ge.id&&Ge.accessorKey?{...Ge,id:Ge.accessorKey}:Ge),gt=De.some(Ge=>{if(Ge.id==="select")return!0;let Ut=Ge.header?.toString()||"",qt=Ge.cell?.toString()||"";return Ut.includes("Checkbox")||qt.includes("Checkbox")});return(a||L)&&!gt&&(De=[{id:"select",header:({table:Ut})=>{let qt=Ut.getIsAllPageRowsSelected(),jr=Ut.getIsSomePageRowsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt?!0:jr?"indeterminate":!1,onCheckedChange:gn=>{Ut.toggleAllPageRowsSelected(!!gn)},"aria-label":"Select all",className:"h-4 w-4"})})},cell:({row:Ut})=>{let qt=Ut.getIsSelected();return(0,ot.jsx)("div",{className:"flex items-center justify-center",children:(0,ot.jsx)(Nc,{checked:qt,onCheckedChange:jr=>Ut.toggleSelected(!!jr),disabled:!Ut.getCanSelect(),"aria-label":"Select row",className:"h-4 w-4"},`select-${Ut.id}-${qt}`)})},enableSorting:!1,enableHiding:!1,size:40,maxSize:40},...De]),De},[O,a,L]),se=Ort({data:Re,columns:ye,onSortingChange:k!==void 0?k:j,onColumnFiltersChange:R!==void 0?R:z,onPaginationChange:I!==void 0?I:Pe,getCoreRowModel:Ert(),getPaginationRowModel:Lrt(),getSortedRowModel:Drt(),getFilteredRowModel:Art(),enableSortingRemoval:!0,enableMultiSort:!1,sortDescFirst:!1,onColumnVisibilityChange:H,onRowSelectionChange:re,onGlobalFilterChange:ae,globalFilterFn:"includesString",enableRowSelection:a||L||!1,filterFns:{custom:(De,gt,Ge)=>{if(Array.isArray(Ge)){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return Ge.includes(String(ja))}if(typeof Ge=="string"||typeof Ge=="number"||typeof Ge=="boolean"){let Do=se.getColumn(gt)?.columnDef?.meta?.filterValueAccessor,ja=Do?Do(De.original):De.getValue(gt);return String(ja)===String(Ge)}if(!Ge?.custom||!Ge?.filters)return!0;let Ut=Ge.filters,qt=Ge.matchAll!==void 0?Ge.matchAll:!0,jr=Ut.map(gn=>{let ja=se.getColumn(gn.column)?.columnDef?.meta?.filterValueAccessor,Vr=ja?ja(De.original):De.getValue(gn.column),Cn=gn.value;switch(gn.operator){case"equals":return Vr===Cn;case"notEquals":return Vr!==Cn;case"contains":return String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"notContains":return!String(Vr).toLowerCase().includes(String(Cn).toLowerCase());case"startsWith":return String(Vr).toLowerCase().startsWith(String(Cn).toLowerCase());case"endsWith":return String(Vr).toLowerCase().endsWith(String(Cn).toLowerCase());case"greaterThan":return Number(Vr)>Number(Cn);case"lessThan":return Number(Vr)<Number(Cn);case"greaterThanOrEqual":return Number(Vr)>=Number(Cn);case"lessThanOrEqual":return Number(Vr)<=Number(Cn);case"in":return Array.isArray(Cn)?Cn.includes(Vr):String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"notIn":return Array.isArray(Cn)?!Cn.includes(Vr):!String(Cn).split(",").map(vl=>vl.trim()).includes(String(Vr));case"isNull":return Vr==null||Vr==="";case"isNotNull":return Vr!=null&&Vr!=="";default:return!0}});return qt?jr.every(gn=>gn):jr.some(gn=>gn)}},manualPagination:V,pageCount:_,state:{sorting:E?.sorting??D,columnFilters:E?.columnFilters??$,columnVisibility:E?.columnVisibility??q,rowSelection:E?.rowSelection??K,globalFilter:E?.globalFilter??J,pagination:E?.pagination??Z},initialState:{pagination:{pageSize:pe}},autoResetAll:!1,autoResetPageIndex:!1,autoResetExpanded:!1,getRowId:(De,gt)=>{let Ge=De;return Ge.id!==void 0&&Ge.id!==null&&Ge.id!==""?String(Ge.id):Ge.orderId!==void 0&&Ge.orderId!==null?String(Ge.orderId):Ge.orderNumber!==void 0&&Ge.orderNumber!==null?String(Ge.orderNumber):Ge.email?`email-${Ge.email}`:Ge.name&&Ge.email?`${Ge.name}-${Ge.email}`:Ge.name?`name-${Ge.name}-${gt}`:String(gt)}});Ce.current=se;let ie=se.getState(),Fe=se.getRowModel(),At=vs.default.useRef(Fe.rows),to=vs.default.useMemo(()=>{let De=At.current!==Fe.rows;return De&&(At.current=Fe.rows),De},[Fe.rows]),Ke=At.current,Je={sorting:x.sorting!==!1,filtering:x.filtering!==!1||n,pagination:x.pagination!==!1||i,search:x.search!==!1||r,columnVisibility:x.columnVisibility!==!1,rowSelection:x.rowSelection!==!1||a,export:x.export!==!1||o},Se=async De=>{let gt=se.getFilteredSelectedRowModel().rows,Ge=gt.length>0?gt.map(jr=>jr.original):se.getFilteredRowModel().rows.map(jr=>jr.original);if(typeof o=="object"&&o.onExport){o.onExport(Ge,De);return}if(d){d(Ge);return}let Ut=typeof o=="object"&&o.filename?o.filename:"data-export",qt=tot(O,q);await eot(Ge,{format:De,filename:Ut,columns:qt,includeHeaders:!0})},ht=vs.default.useMemo(()=>o?o===!0?["csv","json"]:typeof o=="object"&&o.formats?o.formats:["csv","json"]:[],[o]),Tt=()=>{se.resetRowSelection()};return(0,ot.jsxs)("div",{className:F("moonui-pro-datatable-container flex flex-col gap-4",c),children:[a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("div",{className:"flex items-center justify-between rounded-md bg-muted/50 px-4 py-2",children:[(0,ot.jsxs)("span",{className:"text-sm text-muted-foreground",children:[se.getFilteredSelectedRowModel().rows.length," Selected"]}),v.length>0&&(0,ot.jsx)(Jnt,{selectedRows:se.getFilteredSelectedRowModel().rows.map(De=>De.original),actions:v,onClearSelection:Tt})]}),(0,ot.jsxs)("div",{className:"moonui-pro-datatable-toolbar flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r&&(0,ot.jsxs)("div",{className:"relative",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(go,{className:"absolute left-2 top-2.5 h-4 w-4 text-muted-foreground"})}),(0,ot.jsx)(Jt,{placeholder:M,value:J,onChange:De=>ae(De.target.value),className:"pl-8 w-full sm:w-64"})]}),g.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:g.map((De,gt)=>(0,ot.jsx)(oot,{table:se,filter:De,data:t},`quick-${De.column}-${gt}`))}),y.length>0&&(0,ot.jsx)("div",{className:"flex items-center gap-2",children:y.map((De,gt)=>{let Ge=typeof De=="string"?De:De.column,Ut=typeof De=="string"?void 0:De.label;return(0,ot.jsx)(aot,{table:se,column:Ge,title:Ut,data:t},`faceted-${Ge}-${gt}`)})}),n&&(0,ot.jsxs)(oe,{variant:"outline",size:"sm",onClick:()=>Oe(!0),children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(ns,{className:"mr-2 h-4 w-4"})}),"Filters",$.length>0&&(0,ot.jsx)("span",{className:"ml-2 rounded-full bg-primary px-2 py-0.5 text-xs text-primary-foreground",children:$.length})]})]}),(0,ot.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o&&ht.length>0&&(0,ot.jsxs)(Er,{children:[(0,ot.jsx)(Ar,{asChild:!0,children:(0,ot.jsxs)(oe,{variant:"outline",size:"sm",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Pn,{className:"mr-2 h-4 w-4"})}),"Export"]})}),(0,ot.jsxs)(kr,{align:"end",children:[ht.includes("csv")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("csv"),children:[(0,ot.jsx)(gx,{className:"mr-2 h-4 w-4"}),"Export as CSV"]}),ht.includes("json")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("json"),children:[(0,ot.jsx)(f1,{className:"mr-2 h-4 w-4"}),"Export as JSON"]}),ht.includes("xlsx")&&(0,ot.jsxs)(Ve,{onClick:()=>Se("xlsx"),children:[(0,ot.jsx)(fO,{className:"mr-2 h-4 w-4"}),"Export as Excel"]})]})]}),(0,ot.jsx)(_rt,{table:se})]})]}),(0,ot.jsx)("div",{className:"moonui-pro-datatable-wrapper rounded-md border overflow-hidden",style:{contain:"layout style"},children:(0,ot.jsx)("div",{style:{overflowX:"auto"},children:(0,ot.jsxs)("table",{className:"moonui-pro-datatable",style:{width:"100%",tableLayout:"auto"},children:[(0,ot.jsx)("thead",{className:"moonui-data-table-header",children:se.getHeaderGroups().map(De=>(0,ot.jsx)("tr",{className:"moonui-data-table-row border-b",children:De.headers.filter(gt=>gt.column.getIsVisible()).map(gt=>(0,ot.jsx)("th",{className:"moonui-data-table-th h-12 px-4 text-left align-middle font-medium text-muted-foreground",children:gt.isPlaceholder?null:(0,ot.jsxs)("div",{className:F("flex items-center space-x-2",gt.column.getCanSort()&&"cursor-pointer select-none"),onClick:gt.column.getCanSort()?fe(gt.column.id):void 0,children:[Gme(gt.column.columnDef.header,gt.getContext()),gt.column.getCanSort()&&(0,ot.jsx)("div",{className:"ml-2",children:gt.column.getIsSorted()==="asc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(mx,{className:"h-4 w-4"})}):gt.column.getIsSorted()==="desc"?(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(om,{className:"h-4 w-4"})}):(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(px,{className:"h-4 w-4"})})})]})},gt.id))},De.id))}),(0,ot.jsx)("tbody",{className:"moonui-data-table-body",children:be?(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:(0,ot.jsxs)("div",{className:"flex items-center justify-center space-x-2",children:[(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Mr,{className:"h-4 w-4 animate-spin"})}),(0,ot.jsx)("span",{className:"text-sm text-muted-foreground",children:"Loading..."})]})})},"loading"):Ke?.length?(0,ot.jsx)(ot.Fragment,{children:Ke.map((De,gt)=>{let Ge=De.original.id||De.id,Ut=f&&Y.has(Ge);return(0,ot.jsx)(iot,{row:De,columns:O,isExpanded:Ut,enableExpandable:f,renderSubComponent:p,visibilityState:se.getState().columnVisibility},Ge)})}):(0,ot.jsx)(ne.tr,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},children:(0,ot.jsx)("td",{colSpan:se.getAllLeafColumns().filter(De=>De.getIsVisible()).length,className:"h-24 text-center",children:"No results found."})},"no-results")})]})})}),i&&(0,ot.jsxs)("div",{className:"flex items-center justify-between px-2",children:[(0,ot.jsx)("div",{className:"flex-1 text-sm text-muted-foreground",children:a&&se.getFilteredSelectedRowModel().rows.length>0&&(0,ot.jsxs)("span",{children:[se.getFilteredSelectedRowModel().rows.length," ","of ",se.getFilteredRowModel().rows.length," ","row(s) selected."]})}),(0,ot.jsxs)("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)("p",{className:"text-sm font-medium",children:"Rows per page"}),(0,ot.jsx)("select",{value:se.getState().pagination.pageSize,onChange:async De=>{let gt=Number(De.target.value);I?I({pageIndex:se.getState().pagination.pageIndex,pageSize:gt}):(_e(!0),await new Promise(Ge=>setTimeout(Ge,300)),se.setPageSize(gt),_e(!1))},className:"h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",disabled:be,children:l.map(De=>(0,ot.jsx)("option",{value:De,children:De},De))})]}),(0,ot.jsxs)("div",{className:"flex w-[100px] items-center justify-center text-sm font-medium",children:["Page ",se.getState().pagination.pageIndex+1," of"," ",se.getPageCount()]}),(0,ot.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{I?I({pageIndex:0,pageSize:se.getState().pagination.pageSize}):(_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(0),_e(!1))},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(sO,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{if(I){let De=se.getState().pagination.pageIndex;I({pageIndex:De-1,pageSize:se.getState().pagination.pageSize})}else _e(!0),await new Promise(De=>setTimeout(De,300)),se.previousPage(),_e(!1)},disabled:!se.getCanPreviousPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(gi,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"h-8 w-8 p-0",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.nextPage(),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(Jn,{className:"h-4 w-4"})})}),(0,ot.jsx)(oe,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:async()=>{_e(!0),await new Promise(De=>setTimeout(De,300)),se.setPageIndex(se.getPageCount()-1),_e(!1)},disabled:!se.getCanNextPage()||be,children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:(0,ot.jsx)(lO,{className:"h-4 w-4"})})})]})]})]}),n&&(0,ot.jsx)(not,{table:se,open:ve,onOpenChange:Oe})]})}function thr(e,t){return{id:"expander",header:()=>null,size:50,cell:({row:r})=>{let n=r.original.id||r.id,o=e.has(n);return(0,ot.jsx)("button",{onClick:a=>{a.stopPropagation(),t(n)},className:"p-2 hover:bg-muted rounded-md transition-colors","aria-label":o?"Collapse row":"Expand row",children:(0,ot.jsx)("span",{suppressHydrationWarning:!0,children:o?(0,ot.jsx)(ca,{className:"h-4 w-4 text-muted-foreground"}):(0,ot.jsx)(Jn,{className:"h-4 w-4 text-muted-foreground"})})})}}}function rhr(e=new Set){let[t,r]=vs.default.useState(e),n=vs.default.useCallback(i=>{r(s=>{let l=new Set(s);return l.has(i)?l.delete(i):l.add(i),l})},[]),o=vs.default.useCallback(i=>{r(new Set(i))},[]),a=vs.default.useCallback(()=>{r(new Set)},[]);return{expandedRows:t,setExpandedRows:r,toggleRow:n,expandAll:o,collapseAll:a}}var iot=({row:e,columns:t,isExpanded:r,enableExpandable:n,renderSubComponent:o,visibilityState:a})=>{let i=e.original.id||e.id;return(0,ot.jsxs)(ot.Fragment,{children:[(0,ot.jsx)("tr",{className:F("border-b transition-colors hover:bg-muted/50",e.getIsSelected()&&"bg-muted",r&&"border-b-0"),children:e.getAllCells().filter(s=>a[s.column.id]!==!1).map(s=>(0,ot.jsx)("td",{className:"moonui-data-table-td p-4 align-middle",children:Gme(s.column.columnDef.cell,s.getContext())},s.id))}),r&&o&&(0,ot.jsx)("tr",{className:"border-b",children:(0,ot.jsx)("td",{colSpan:e.getAllCells().filter(s=>a[s.column.id]!==!1).length||1,className:"p-0 overflow-hidden",children:(0,ot.jsx)("div",{className:"transition-all duration-300 ease-out",style:{maxHeight:r?"1000px":"0",opacity:r?1:0},children:(0,ot.jsx)("div",{className:"border-t border-border/50",children:o({row:{original:e.original,id:i}})})})})})]})};iot.displayName="TableRow";var nhr=Lhe;var An=A(ue(),1);Ur();var u7=A(Ohe(),1);var Qe=A(de(),1),_he=An.default.memo(({searchInputRef:e,searchPlaceholder:t,initialValue:r,onSearchChange:n,keyboardShortcuts:o})=>{let[a,i]=(0,An.useState)(r||""),s=(0,An.useRef)(void 0);(0,An.useEffect)(()=>{i(r)},[r]);let l=(0,An.useCallback)(c=>{let u=c.target.value;i(u),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>{n(u),e.current&&e.current.focus()},150)},[n,e]);return(0,An.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,Qe.jsx)("div",{className:"p-4 border-b",children:(0,Qe.jsxs)("div",{className:"relative",children:[(0,Qe.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),(0,Qe.jsx)("input",{ref:e,type:"text",placeholder:t,value:a,onChange:l,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",className:"w-full h-10 pl-9 pr-9 text-sm bg-background border border-input rounded-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"}),o&&(0,Qe.jsxs)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:[(0,Qe.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})]})})});_he.displayName="SearchInput";function ohr({sections:e,footer:t,showSearch:r=!0,searchPlaceholder:n="Search...",searchQuery:o="",onSearchChange:a,showThemeToggle:i=!1,theme:s="system",onThemeChange:l,branding:c,collapsible:u=!0,defaultCollapsed:d=!1,floatingActionButton:f=!0,floatingActionButtonPosition:p={bottom:"1rem",left:"1rem"},floatingActionButtonClassName:h,glassmorphism:m=!1,animatedBackground:v=!1,keyboardShortcuts:g=!0,persistState:y=!0,persistKey:x="moonui-sidebar-state",onStateChange:w,customStyles:b,fullWidthItems:C=!0,enableNProgress:S=!0,className:P,activePath:T,onNavigate:L}){let[M,N]=(0,An.useState)(!1),[V,_]=(0,An.useState)(!1),[I,k]=(0,An.useState)(d),[R,E]=(0,An.useState)([]),[O,B]=(0,An.useState)(o),[U,D]=(0,An.useState)([]),j=(0,An.useRef)(null);(0,An.useEffect)(()=>{S&&u7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[S]);let $=Xa(0),z=Xa(0),q=Rv($,{stiffness:300,damping:30}),H=Rv(z,{stiffness:300,damping:30});(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q=localStorage.getItem(x);if(Q){let pe=JSON.parse(Q);k(pe.collapsed),E(pe.expandedSections),D(pe.pinnedItems||[])}}},[y,x]),(0,An.useEffect)(()=>{if(y&&typeof window<"u"){let Q={collapsed:I,expandedSections:R,searchQuery:O,pinnedItems:U,recentItems:[]};localStorage.setItem(x,JSON.stringify(Q)),w?.(Q)}},[I,R,O,U,y,x,w]),(0,An.useEffect)(()=>{let Q=()=>{N(window.innerWidth<768)};return Q(),window.addEventListener("resize",Q),()=>window.removeEventListener("resize",Q)},[]),(0,An.useEffect)(()=>{let Q=e.filter(pe=>pe.defaultExpanded!==!1).map(pe=>pe.id);E(Q)},[e]),(0,An.useEffect)(()=>{if(!g)return;let Q=pe=>{(pe.metaKey||pe.ctrlKey)&&pe.key==="k"&&(pe.preventDefault(),j.current?.focus()),(pe.metaKey||pe.ctrlKey)&&pe.key==="b"&&(pe.preventDefault(),M?_(!V):k(!I))};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[g,M,V,I]),(0,An.useEffect)(()=>{if(!v)return;let Q=pe=>{let Re=document.querySelector(".sidebar-container")?.getBoundingClientRect();Re&&($.set(pe.clientX-Re.left),z.set(pe.clientY-Re.top))};return document.addEventListener("mousemove",Q),()=>document.removeEventListener("mousemove",Q)},[v,$,z]);let K=(0,An.useCallback)(Q=>{E(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),G=(0,An.useCallback)(Q=>{D(pe=>pe.includes(Q)?pe.filter(Re=>Re!==Q):[...pe,Q])},[]),J=(0,An.useCallback)(Q=>{Q.action?Q.action():Q.href&&(S&&(u7.default.start(),setTimeout(()=>u7.default.done(),500)),L?L(Q.href):window.location.href=Q.href,M&&_(!1))},[L,M,S]);(0,An.useEffect)(()=>{B(o)},[o]);let ae=(0,An.useCallback)(Q=>{B(Q),a?.(Q)},[a]),Z=(0,An.useCallback)((Q,pe)=>pe?Q.filter(Re=>{let fe=Re.title.toLowerCase().includes(pe.toLowerCase()),Ce=Re.items?.some(re=>re.title.toLowerCase().includes(pe.toLowerCase()));return fe||Ce}):Q,[]),Pe=(0,An.useMemo)(()=>O?e.map(Q=>({...Q,filteredItems:Z(Q.items,O).map(pe=>({...pe,filteredChildren:pe.items?Z(pe.items,O):void 0}))})).filter(Q=>Q.filteredItems.length>0):e.map(Q=>({...Q,filteredItems:Q.items.map(pe=>({...pe,filteredChildren:pe.items}))})),[e,O,Z]),be=(0,An.useCallback)(Q=>{let pe=Q.items&&Q.items.length>0;return!pe&&!Q.title?null:(0,Qe.jsxs)("div",{className:F("min-w-[240px] max-w-[320px] p-3",m&&"bg-background/95 backdrop-blur-sm"),children:[(0,Qe.jsx)("div",{className:"font-medium px-2 py-1.5 text-sm",children:Q.title}),pe&&(0,Qe.jsx)("div",{className:"mt-1 space-y-0.5",children:Q.items?.map(Re=>{let fe=Re.href===T,Ce=Re.items&&Re.items.length>0;return(0,Qe.jsx)("div",{className:"relative",children:Ce?(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center justify-between gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[(0,Qe.jsxs)("div",{className:"flex items-center gap-2",children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title})]}),(0,Qe.jsx)(Jn,{className:"h-3 w-3 flex-shrink-0"})]})}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-2 min-w-[200px] max-w-[280px] z-[99999]",m&&"bg-background/95 backdrop-blur-sm"),children:(0,Qe.jsx)("div",{className:"space-y-0.5",children:Re.items?.map(re=>{let ye=re.href===T;return(0,Qe.jsxs)("button",{onClick:()=>J(re),disabled:re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",ye&&"bg-primary/10 text-primary font-medium",re.disabled&&"opacity-50 cursor-not-allowed"),children:[re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:re.title}),re.badge&&(0,Qe.jsx)(pt,{variant:re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:re.badge})]},re.id)})})})]}):(0,Qe.jsxs)("button",{onClick:()=>J(Re),disabled:Re.disabled,className:F("w-full flex items-center gap-2 rounded-md px-2 py-1.5 text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Re.disabled&&"opacity-50 cursor-not-allowed"),children:[Re.icon&&(0,Qe.jsx)("span",{className:"flex-shrink-0",children:Re.icon}),(0,Qe.jsx)("span",{className:"truncate",children:Re.title}),Re.badge&&(0,Qe.jsx)(pt,{variant:Re.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Re.badge})]})},Re.id)})})]})},[T,m,J]),_e=(0,An.useCallback)((Q,pe=0,Re)=>{let fe=Q.href===T,Ce=U.includes(Q.id),re=Q.items&&Q.items.length>0,ye=R.includes(Q.id),se=I&&!M&&pe===0,ie=Q.tooltip&&!I&&!se,Fe=Q.icon||(pe===0?(0,Qe.jsx)(zd,{className:"h-4 w-4"}):(0,Qe.jsx)(Vd,{className:"h-3 w-3"})),At=(0,Qe.jsxs)("button",{onClick:()=>{re&&!I?K(Q.id):re||J(Q)},className:F("group relative flex items-center gap-3 rounded-lg text-sm transition-all","w-full px-3 py-2.5","hover:bg-accent hover:text-accent-foreground",fe&&"bg-primary/10 text-primary font-medium",Q.disabled&&"opacity-50 cursor-not-allowed",pe>0&&"ml-6 text-xs py-2",I&&pe===0&&"justify-center px-0 h-12",b?.hover),disabled:Q.disabled,children:[(0,Qe.jsx)("span",{className:F("flex-shrink-0 flex items-center justify-center",I&&pe===0&&"w-full",!I&&"w-5"),children:Fe}),(!I||pe>0)&&(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("span",{className:"flex-1 text-left truncate",children:Q.title}),Q.badge&&(0,Qe.jsx)(pt,{variant:Q.badgeVariant||"secondary",className:"ml-auto flex-shrink-0 text-[10px] px-1.5 py-0 h-5",children:Q.badge}),re&&pe===0&&(0,Qe.jsx)(ca,{className:F("h-4 w-4 flex-shrink-0 transition-transform",ye&&"rotate-180")}),Ce&&(0,Qe.jsx)(BO,{className:"h-3 w-3 flex-shrink-0"})]})]});return se?(0,Qe.jsx)("div",{children:(0,Qe.jsxs)(M_,{openDelay:200,closeDelay:100,children:[(0,Qe.jsx)(E_,{asChild:!0,children:At}),(0,Qe.jsx)(xT,{side:"right",align:"start",sideOffset:20,collisionPadding:20,avoidCollisions:!0,className:F("p-0 w-auto min-w-[240px] max-w-[320px] z-[9999]",m&&"bg-background/95 backdrop-blur-sm","animate-in fade-in-0 slide-in-from-left-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-left-2"),children:(0,Qe.jsx)(ne.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15,ease:"easeOut"},children:be(Q)})})]})},Q.id):(0,Qe.jsxs)("div",{children:[ie?(0,Qe.jsx)(Il,{children:(0,Qe.jsxs)(qs,{children:[(0,Qe.jsx)(Gs,{asChild:!0,children:At}),(0,Qe.jsx)(Rs,{side:"right",children:(0,Qe.jsx)("p",{children:Q.tooltip})})]})}):At,re&&!I&&Re&&(0,Qe.jsx)(Ft,{initial:!1,children:ye&&(0,Qe.jsx)(ne.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2,ease:"easeInOut"},style:{overflow:"hidden"},children:(0,Qe.jsx)("div",{className:"pt-1 space-y-1",children:Re.map(to=>_e(to,pe+1))})},`${Q.id}-children`)})]},Q.id)},[T,U,R,I,b,J,K,M,m,be,C]),he=An.default.memo(()=>(0,Qe.jsxs)("div",{className:F("flex items-center h-16 px-4 border-b",I&&!M&&"px-0 justify-center"),children:[c&&(0,Qe.jsxs)(Qe.Fragment,{children:[c.logo,(!I||M)&&c.title&&(0,Qe.jsx)("span",{className:"font-semibold text-lg",children:c.title})]}),M&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:"ml-auto h-8 w-8 p-0",onClick:()=>_(!1),children:(0,Qe.jsx)(lr,{className:"h-4 w-4"})}),!M&&u&&(0,Qe.jsx)(oe,{variant:"ghost",size:"sm",className:F("h-8 w-8 p-0 transition-all",!I&&"ml-auto",I&&"mx-auto"),onClick:()=>k(!I),children:(0,Qe.jsx)(ne.div,{animate:{rotate:I?0:180},transition:{duration:.2},children:(0,Qe.jsx)(Jn,{className:"h-4 w-4"})})})]})),Ne=An.default.memo(()=>(0,Qe.jsx)("div",{className:"flex-1 overflow-y-auto overscroll-contain",style:{scrollbarWidth:"thin"},children:(0,Qe.jsxs)("div",{className:"p-4 space-y-6",children:[U.length>0&&(!I||M)&&(0,Qe.jsxs)("div",{children:[(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Pinned"}),(0,Qe.jsx)("div",{className:"space-y-1",children:e.flatMap(Q=>Q.items.filter(pe=>U.includes(pe.id))).map(Q=>_e(Q))}),(0,Qe.jsx)(Ys,{className:"mt-4"})]}),Pe.map((Q,pe)=>(0,Qe.jsxs)("div",{children:[Q.title&&(!I||M)&&(0,Qe.jsx)("h4",{className:"text-xs font-medium text-muted-foreground mb-2",children:Q.title}),(0,Qe.jsx)("div",{className:"space-y-1",children:Q.filteredItems.map(Re=>_e(Re,0,Re.filteredChildren))}),Q.showDivider&&pe<Pe.length-1&&(0,Qe.jsx)(Ys,{className:"mt-4"})]},Q.id))]})}));Ne.displayName="SidebarMenuContent";let ve=An.default.memo(()=>t?(0,Qe.jsxs)("div",{className:"border-t p-4",children:[(0,Qe.jsx)("div",{className:"space-y-1",children:t.items.map(Q=>_e(Q))}),i&&(!I||M)&&(0,Qe.jsxs)("div",{className:"mt-3 flex items-center justify-between",children:[(0,Qe.jsx)("span",{className:"text-xs text-muted-foreground",children:"Theme"}),(0,Qe.jsxs)(Er,{children:[(0,Qe.jsx)(Ar,{asChild:!0,children:(0,Qe.jsxs)(oe,{variant:"ghost",size:"sm",className:"h-7 px-2",children:[s==="light"&&(0,Qe.jsx)(gv,{className:"h-3 w-3"}),s==="dark"&&(0,Qe.jsx)(mv,{className:"h-3 w-3"}),s==="system"&&(0,Qe.jsx)(lm,{className:"h-3 w-3"})]})}),(0,Qe.jsxs)(kr,{align:"end",children:[(0,Qe.jsxs)(Ve,{onClick:()=>l?.("light"),children:[(0,Qe.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("dark"),children:[(0,Qe.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,Qe.jsxs)(Ve,{onClick:()=>l?.("system"),children:[(0,Qe.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]})]})]}):null);ve.displayName="SidebarFooter";let Oe=An.default.memo(()=>(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)(Ne,{}),(0,Qe.jsx)(ve,{})]}));Oe.displayName="SidebarContent";let Y=F("moonui-pro flex h-full flex-col bg-background border-r transition-all duration-300 ease-in-out relative z-[9990]",m&&"bg-background/80 backdrop-blur-xl border-white/10",I&&!M&&"w-20",!I&&!M&&"w-64",b?.background,b?.border,P);return M?(0,Qe.jsxs)(Qe.Fragment,{children:[f&&(0,Qe.jsx)(oe,{onClick:()=>_(!0),className:F("fixed z-40 h-12 w-12 rounded-full shadow-lg md:hidden",h),size:"icon",style:{bottom:p?.bottom,left:p?.left,right:p?.right,top:p?.top},children:(0,Qe.jsx)(sm,{className:"h-5 w-5"})}),(0,Qe.jsx)($w,{open:V,onOpenChange:_,children:(0,Qe.jsx)(Wx,{side:"left",className:"w-80 p-0",children:(0,Qe.jsxs)("div",{className:F(Y,"sidebar-container flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-mobile"),(0,Qe.jsx)(Oe,{})]})})})]}):(0,Qe.jsxs)("aside",{className:F(Y,"sidebar-container hidden md:flex flex-col"),children:[v&&(0,Qe.jsx)(ne.div,{className:"absolute inset-0 opacity-30",style:{background:`radial-gradient(circle at ${q}px ${H}px, rgba(var(--primary-rgb), 0.15), transparent 50%)`}}),(0,Qe.jsx)(he,{}),r&&(!I||M)&&(0,Qe.jsx)(_he,{searchInputRef:j,searchPlaceholder:n,initialValue:O,onSearchChange:ae,keyboardShortcuts:g},"sidebar-search-desktop"),(0,Qe.jsx)(Oe,{})]})}function lot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Qe.jsx)(Rn,{componentName:"Advanced Sidebar",compact:!0,className:F("w-full max-w-xs",e.className)}):(0,Qe.jsx)(ohr,{...e})}var ys=A(ue(),1);Ur();var d7=A(Ohe(),1);var ke=A(de(),1);function ahr({sections:e=[],branding:t,showSearch:r=!0,enableCommandAI:n=!1,commandAIShortcut:o="\u2318K",commandAIPlaceholder:a="Search commands...",onCommandAIOpen:i,onCommandAIClose:s,onCommandAISelect:l,searchPlaceholder:c="Search...",onSearch:u,showThemeToggle:d=!1,theme:f="system",onThemeChange:p,userMenu:h,notifications:m,cta:v,sticky:g=!0,glassmorphism:y=!1,animatedBackground:x=!1,keyboardShortcuts:w=!0,hideNavItems:b=!1,mobileBreakpoint:C=768,customStyles:S,variant:P="default",size:T="md",blur:L=!0,shadow:M=!1,rounded:N=!1,logoPosition:V="left",mobileMenuPosition:_="left",hideOnScroll:I=!1,showScrollProgress:k=!1,maxWidth:R="2xl",fullWidth:E=!1,enableNProgress:O=!0,className:B,activePath:U,onNavigate:D}){let[j,$]=(0,ys.useState)(!1),[z,q]=(0,ys.useState)(!1),[H,K]=(0,ys.useState)(!1),[G,J]=(0,ys.useState)(!1),[ae,Z]=(0,ys.useState)(""),[Pe,be]=(0,ys.useState)(!1),[_e,he]=(0,ys.useState)(!1),[Ne,ve]=(0,ys.useState)(0),Oe=(0,ys.useRef)(0),Y=(0,ys.useRef)(null);(0,ys.useEffect)(()=>{O&&d7.default.configure({easing:"ease",speed:800,showSpinner:!1,trickleSpeed:200,minimum:.2})},[O]),(0,ys.useEffect)(()=>{let se=()=>{$(window.innerWidth<C)};return se(),window.addEventListener("resize",se),()=>window.removeEventListener("resize",se)},[C]),(0,ys.useEffect)(()=>{if(!g&&!I&&!k)return;let se=()=>{let ie=window.scrollY;if(be(ie>10),I&&(ie>Oe.current&&ie>100?he(!0):he(!1),Oe.current=ie),k){let Fe=window.scrollY,At=document.documentElement.scrollHeight-document.documentElement.clientHeight,to=Fe/At*100;ve(to)}};return window.addEventListener("scroll",se,{passive:!0}),()=>window.removeEventListener("scroll",se)},[g,I,k]),(0,ys.useEffect)(()=>{if(!w&&!n)return;let se=ie=>{(ie.metaKey||ie.ctrlKey)&&ie.key==="k"&&(ie.preventDefault(),J(!0),n&&i?.())};return document.addEventListener("keydown",se),()=>document.removeEventListener("keydown",se)},[w,n,i]);let Q=(0,ys.useCallback)(se=>{se.action?se.action():se.href&&(O&&(d7.default.start(),setTimeout(()=>d7.default.done(),500)),D?D(se.href):window.location.href=se.href,j&&q(!1))},[D,j,O]),pe=(0,ys.useCallback)(se=>{Z(se),u?.(se)},[u]),Re=se=>(0,ke.jsx)("div",{className:"grid gap-3 p-6 md:w-[400px] lg:w-[500px] lg:grid-cols-[.75fr_1fr]",children:se.map(ie=>(0,ke.jsxs)(B_,{className:F("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{className:"flex-shrink-0",children:ie.icon}),(0,ke.jsx)("div",{className:"text-sm font-medium leading-none",children:ie.title}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]}),ie.description&&(0,ke.jsx)("p",{className:"line-clamp-2 text-sm leading-snug text-muted-foreground",children:ie.description})]},ie.id))}),fe=se=>(0,ke.jsx)(ke.Fragment,{children:se.map(ie=>ie.items&&ie.items.length>0?(0,ke.jsxs)(Qd,{children:[(0,ke.jsx)(Zu,{disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(Ju,{children:fe(ie.items)})]},ie.id):(0,ke.jsxs)(Ve,{disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]},ie.id))}),Ce=()=>(0,ke.jsxs)($w,{open:z,onOpenChange:q,children:[(0,ke.jsx)(a$,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"md:hidden",children:(0,ke.jsx)(sm,{className:"h-5 w-5"})})}),(0,ke.jsx)(Wx,{side:_,className:"w-80 p-0",children:(0,ke.jsxs)("div",{className:"flex h-full flex-col",children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between p-4 border-b",children:[t&&(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[t.logo,t.title&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]}),(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>q(!1),className:"h-8 w-8",children:(0,ke.jsx)(lr,{className:"h-4 w-4"})})]}),(0,ke.jsx)("div",{className:"flex-1 overflow-y-auto p-4",children:!b&&e.map(se=>(0,ke.jsxs)("div",{className:"space-y-1",children:[se.items.map(ie=>(0,ke.jsx)("div",{children:ie.items&&ie.items.length>0?(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-between",disabled:ie.disabled,children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),(0,ke.jsx)(ca,{className:"h-4 w-4"})]})}),(0,ke.jsx)(kr,{align:"start",className:"w-56",children:ie.items&&fe(ie.items)})]}):(0,ke.jsxs)(oe,{variant:"ghost",className:"w-full justify-start",disabled:ie.disabled,onClick:()=>Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-auto",children:ie.badge})]})},ie.id)),(0,ke.jsx)(Ys,{className:"my-2"})]},se.id))})]})})]}),re=()=>{switch(T){case"sm":return"h-14";case"lg":return"h-20";default:return"h-16"}},ye=F("moonui-pro w-full transition-all duration-300",P==="default"&&"border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",P==="floating"&&"mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",P==="minimal"&&"bg-background",P==="transparent"&&"bg-transparent",g&&"sticky top-0 z-50",Pe&&g&&P!=="transparent"&&"shadow-sm",Pe&&P==="transparent"&&"bg-background/95 backdrop-blur border-b",_e&&"-translate-y-full",y&&"bg-background/80 backdrop-blur-xl border-white/10",L&&"backdrop-blur-md",M&&"shadow-lg",N&&"rounded-lg",S?.background,S?.border,B);return(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("nav",{ref:Y,className:ye,children:[(0,ke.jsxs)("div",{className:F("flex items-center",re(),E?"w-full px-4 sm:px-6 lg:px-8":R==="sm"&&"container max-w-screen-sm"||R==="md"&&"container max-w-screen-md"||R==="lg"&&"container max-w-screen-lg"||R==="xl"&&"container max-w-screen-xl"||R==="2xl"&&"container max-w-screen-2xl"||R==="full"&&"w-full px-4 sm:px-6 lg:px-8"),children:[t&&(0,ke.jsxs)("div",{className:F("flex items-center gap-2",V==="center"&&!j?"absolute left-1/2 -translate-x-1/2":"mr-4"),children:[V==="left"&&_==="left"&&(0,ke.jsx)(Ce,{}),(0,ke.jsxs)("a",{href:t.href||"/",onClick:se=>{t.href&&D&&(se.preventDefault(),D(t.href))},className:"flex items-center gap-2",children:[t.logo,t.title&&!j&&(0,ke.jsx)("span",{className:"font-semibold text-lg",children:t.title})]})]}),!j&&!b&&(0,ke.jsx)(A_,{className:"hidden md:flex",children:(0,ke.jsx)(L_,{children:e.map(se=>(0,ke.jsx)(ys.default.Fragment,{children:se.items.map(ie=>{let Fe=ie.items&&ie.items.length>0,At=ie.href===U;return Fe?(0,ke.jsxs)(D_,{children:[(0,ke.jsx)(__,{className:F(At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),disabled:ie.disabled,children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]})}),(0,ke.jsx)(F_,{children:ie.items&&Re(ie.items)})]},ie.id):(0,ke.jsx)(D_,{children:(0,ke.jsxs)(B_,{className:F(O_(),At&&"bg-accent text-accent-foreground",ie.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>!ie.disabled&&Q(ie),children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[ie.icon&&(0,ke.jsx)("span",{children:ie.icon}),ie.title]}),ie.badge&&(0,ke.jsx)(pt,{variant:ie.badgeVariant||"secondary",className:"ml-2",children:ie.badge})]})},ie.id)})},se.id))})}),(0,ke.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[r&&(0,ke.jsx)(ke.Fragment,{children:j?(0,ke.jsx)(oe,{variant:"ghost",size:"icon",onClick:()=>J(!0),children:(0,ke.jsx)(go,{className:"h-5 w-5"})}):(0,ke.jsxs)("div",{className:"relative",children:[(0,ke.jsx)(go,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),(0,ke.jsx)(Jt,{type:"search",placeholder:c,className:"w-64 pl-9 pr-4 h-9 cursor-pointer",value:ae,onChange:se=>pe(se.target.value),onClick:()=>{n&&(J(!0),i?.())},readOnly:n}),(w||n)&&(0,ke.jsx)("kbd",{className:"absolute right-2 top-1/2 -translate-y-1/2 pointer-events-none h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 hidden sm:flex",children:n?o:(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)("span",{className:"text-xs",children:"\u2318"}),"K"]})})]})}),d&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",children:[f==="light"&&(0,ke.jsx)(gv,{className:"h-5 w-5"}),f==="dark"&&(0,ke.jsx)(mv,{className:"h-5 w-5"}),f==="system"&&(0,ke.jsx)(lm,{className:"h-5 w-5"})]})}),(0,ke.jsxs)(kr,{align:"end",children:[(0,ke.jsxs)(Ve,{onClick:()=>p?.("light"),children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Light"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("dark"),children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Dark"]}),(0,ke.jsxs)(Ve,{onClick:()=>p?.("system"),children:[(0,ke.jsx)(lm,{className:"mr-2 h-4 w-4"}),"System"]})]})]}),m&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsxs)(oe,{variant:"ghost",size:"icon",className:"relative",children:[(0,ke.jsx)(Uh,{className:"h-5 w-5"}),m.count&&m.count>0&&(0,ke.jsx)("span",{className:"absolute -top-1 -right-1 min-w-[18px] h-[18px] rounded-full bg-red-500 text-[11px] font-medium text-white flex items-center justify-center px-1",children:m.count>9?"9+":m.count})]})}),(0,ke.jsxs)(kr,{align:"end",className:"w-[380px] p-0",sideOffset:8,children:[(0,ke.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b",children:[(0,ke.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ke.jsx)("h4",{className:"text-base font-semibold",children:"Notifications"}),m.count&&m.count>0&&(0,ke.jsxs)(pt,{variant:"secondary",className:"h-5 px-2 rounded-full bg-primary/10 text-primary border-0",children:[m.count," ","new"]})]}),m.items&&m.items.length>0&&(0,ke.jsx)(oe,{variant:"ghost",size:"sm",className:"text-xs h-7 px-2 text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("Mark all as read")},children:"Mark all read"})]}),(0,ke.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:m.items&&m.items.length>0?(0,ke.jsx)("div",{className:"py-1",children:m.items.map((se,ie)=>(0,ke.jsxs)("div",{children:[(0,ke.jsx)("button",{className:F("w-full px-4 py-3 text-left hover:bg-muted/50 transition-colors","focus:outline-none focus:bg-muted/50",!se.read&&"bg-primary/5 hover:bg-primary/10"),onClick:()=>m.onNotificationClick?.(se.id),children:(0,ke.jsxs)("div",{className:"flex gap-3",children:[(0,ke.jsx)("div",{className:"mt-1.5",children:(0,ke.jsx)("div",{className:F("h-2 w-2 rounded-full",se.read?"bg-transparent":"bg-primary")})}),(0,ke.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ke.jsx)("p",{className:F("text-sm leading-tight",se.read?"font-normal":"font-medium"),children:se.title}),se.description&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground leading-relaxed",children:se.description}),se.time&&(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:se.time})]})]})}),ie<(m.items?.length||0)-1&&(0,ke.jsx)("div",{className:"mx-4 border-b"})]},se.id))}):(0,ke.jsxs)("div",{className:"py-12 text-center",children:[(0,ke.jsx)(Uh,{className:"h-10 w-10 mx-auto text-muted-foreground/30 mb-3"}),(0,ke.jsx)("p",{className:"text-sm font-medium text-muted-foreground",children:"No new notifications"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground/70 mt-1",children:"You're all caught up!"})]})}),m.items&&m.items.length>0&&(0,ke.jsx)("div",{className:"border-t p-2",children:(0,ke.jsx)(oe,{variant:"ghost",className:"w-full h-8 text-xs text-muted-foreground hover:text-foreground",onClick:se=>{se.preventDefault(),console.log("View all notifications")},children:"View all notifications"})})]})]}),v&&(0,ke.jsx)(oe,{variant:v.variant||"primary",size:"sm",onClick:()=>{v.action?v.action():v.href&&D&&D(v.href)},className:j?"":"ml-2",children:v.text}),h&&(0,ke.jsxs)(Er,{children:[(0,ke.jsx)(Ar,{asChild:!0,children:(0,ke.jsx)(oe,{variant:"ghost",size:"icon",className:"relative",children:(0,ke.jsxs)(Ga,{className:"h-8 w-8",children:[(0,ke.jsx)(as,{src:h.user?.avatar,alt:h.user?.name}),(0,ke.jsx)(xi,{children:h.user?.name?.charAt(0)||(0,ke.jsx)(dm,{className:"h-4 w-4"})})]})})}),(0,ke.jsxs)(kr,{align:"end",className:"w-56",children:[h.user&&(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsxs)("div",{className:"p-2",children:[(0,ke.jsx)("p",{className:"text-sm font-medium",children:h.user.name}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground",children:h.user.email})]}),(0,ke.jsx)(Zr,{})]}),h.items&&fe(h.items)]})]})]})]}),x&&(0,ke.jsx)(ne.div,{className:"absolute inset-0 -z-10 opacity-30",animate:{background:["radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 80% 50%, rgba(120, 119, 198, 0.3), transparent 50%)","radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3), transparent 50%)"]},transition:{duration:10,repeat:1/0,ease:"linear"}}),k&&(0,ke.jsx)("div",{className:"absolute bottom-0 left-0 w-full h-0.5 bg-muted",children:(0,ke.jsx)("div",{className:"h-full bg-primary transition-all duration-150",style:{width:`${Ne}%`}})})]}),(0,ke.jsxs)(a_,{open:G,onOpenChange:se=>{J(se),se||s?.()},children:[(0,ke.jsx)(_v,{placeholder:n?a:c,value:ae,onValueChange:pe}),(0,ke.jsxs)(aT,{children:[(0,ke.jsx)(Fv,{children:n?(0,ke.jsxs)("div",{className:"flex flex-col items-center py-6",children:[(0,ke.jsx)(_t,{className:"h-8 w-8 text-muted-foreground mb-2"}),(0,ke.jsx)("p",{className:"text-sm text-muted-foreground",children:"No results found"}),(0,ke.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Try searching for pages, actions, or commands"})]}):"No results found."}),n&&!ae&&(0,ke.jsxs)(Sm,{heading:"Quick Actions",children:[(0,ke.jsxs)(Yd,{onSelect:()=>{let se={id:"home",title:"Go Home",href:"/"};l?.(se),Q(se),J(!1)},children:[(0,ke.jsx)(Wb,{className:"mr-2 h-4 w-4"}),"Go Home",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318H"})]}),(0,ke.jsxs)(Yd,{onSelect:()=>{K(!0),J(!1),l?.({id:"search",title:"Search",action:()=>K(!0)})},children:[(0,ke.jsx)(go,{className:"mr-2 h-4 w-4"}),"Search",(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318S"})]}),d&&(0,ke.jsxs)(Yd,{onSelect:()=>{p?.(f==="dark"?"light":"dark"),J(!1)},children:[f==="dark"?(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(gv,{className:"mr-2 h-4 w-4"}),"Switch to Light Mode"]}):(0,ke.jsxs)(ke.Fragment,{children:[(0,ke.jsx)(mv,{className:"mr-2 h-4 w-4"}),"Switch to Dark Mode"]}),(0,ke.jsx)("kbd",{className:"ml-auto text-xs",children:"\u2318T"})]})]}),e&&e.length>0&&e.map(se=>{if(!se||!se.items||se.items.length===0)return null;let ie=ae?se.items.filter(Fe=>Fe.title.toLowerCase().includes(ae.toLowerCase())||Fe.description?.toLowerCase().includes(ae.toLowerCase())):se.items;return ie.length===0?null:(0,ke.jsx)(Sm,{heading:se.title||se.id,children:ie.map(Fe=>(0,ke.jsxs)(Yd,{disabled:Fe.disabled,onSelect:()=>{n&&l?.(Fe),Q(Fe),J(!1)},children:[(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[Fe.icon&&(0,ke.jsx)("span",{children:Fe.icon}),Fe.title]}),Fe.badge&&(0,ke.jsx)(pt,{variant:Fe.badgeVariant||"secondary",className:"ml-auto",children:Fe.badge}),Fe.description&&n&&(0,ke.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:Fe.description})]},Fe.id))},se.id)}),n&&h?.items&&(0,ke.jsx)(Sm,{heading:"Account",children:h.items.map(se=>(0,ke.jsx)(Yd,{disabled:se.disabled,onSelect:()=>{let ie={...se,action:se.onClick||se.action};ie.action?ie.action():ie.href&&(window.location.href=ie.href),l?.(ie),J(!1)},children:(0,ke.jsxs)("span",{className:"flex items-center gap-2",children:[se.icon&&(0,ke.jsx)("span",{children:se.icon}),se.title]})},se.id))})]})]})]})}function cot(e){let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,ke.jsx)(Rn,{componentName:"Advanced Navbar",className:F("w-full",e.className)}):(0,ke.jsx)(ahr,{...e})}var Fhe=A(ue(),1);Ur();var Ti=A(ue(),1),fot=A(de(),1),uot=(0,Ti.createContext)(null),zC=()=>{let e=(0,Ti.useContext)(uot);if(!e)throw new Error("useFormWizard must be used within a FormWizardProvider");return e},dot=({children:e,steps:t,initialStep:r=0,onStepChange:n,onComplete:o,validateOnStepChange:a=!0,allowBackNavigation:i=!0,allowStepSkip:s=!1,autoSave:l=!1,autoSaveDelay:c=2e3,onAutoSave:u,persistData:d=!1,storageKey:f="form-wizard-data"})=>{let[p,h]=(0,Ti.useState)(r),[m,v]=(0,Ti.useState)({}),[g,y]=(0,Ti.useState)(new Set),[x,w]=(0,Ti.useState)(!1),[b,C]=(0,Ti.useState)(null);(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R=localStorage.getItem(f);if(R)try{let E=JSON.parse(R);v(E.stepData||{}),h(E.currentStep||0),y(new Set(E.completedSteps||[]))}catch(E){console.error("Failed to load persisted wizard data:",E)}}},[d,f]),(0,Ti.useEffect)(()=>{if(!l||!u)return;let R=setTimeout(()=>{let E=m[t[p].id];E&&u(t[p].id,E)},c);return()=>clearTimeout(R)},[m,p,l,c,u,t]),(0,Ti.useEffect)(()=>{if(d&&typeof window<"u"){let R={stepData:m,currentStep:p,completedSteps:Array.from(g)};localStorage.setItem(f,JSON.stringify(R))}},[m,p,g,d,f]);let S=(0,Ti.useCallback)(async()=>{let R=t[p];if(R.requiredFields!==!1&&typeof window<"u"){let O=document.querySelector("[data-wizard-step-content]");if(O)if(Array.isArray(R.requiredFields)){let B=[];if(R.requiredFields.forEach(U=>{let D=O.querySelector(`[name="${U}"], [id="${U}"]`);if(D){let j=D;D.tagName==="INPUT"&&D.type==="checkbox"?D.checked||B.push(U):(!j.value||j.value.trim()==="")&&B.push(U)}}),B.length>0)return C(`Please fill in the following required fields: ${B.join(", ")}`),!1}else{let B=O.querySelectorAll("input[required], select[required], textarea[required]"),U=[];if(B.forEach(j=>{let $=j;if(!$.value||$.value.trim()===""){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Field":$.name||$.id||"Field";U.push(q)}}),O.querySelectorAll('input[type="checkbox"][required]').forEach(j=>{let $=j;if(!$.checked){let z=document.querySelector(`label[for="${$.id}"]`),q=z?z.textContent?.replace(" *","")||"Checkbox":$.name||$.id||"Checkbox";U.push(q)}}),U.length>0)return C(`Please fill in the following required fields: ${U.join(", ")}`),!1}}if(!R.validation)return!0;w(!0),C(null);try{let O=await R.validation();if(typeof O=="boolean")return O||C("Please complete all required fields before proceeding"),O;if(typeof O=="object"&&O!==null&&"isValid"in O){let B=O;return B.isValid||(B.error?C(B.error):B.errors&&Array.isArray(B.errors)?C(B.errors.join(", ")):C("Please complete all required fields before proceeding")),B.isValid}return C("Invalid validation response"),!1}catch(O){return C(O instanceof Error?O.message:"Validation failed"),!1}finally{w(!1)}},[p,t]),P=(0,Ti.useCallback)((R,E)=>{v(O=>({...O,[R]:{...O[R],...E}})),C(null)},[]),T=(0,Ti.useCallback)(async R=>{if(R<0||R>=t.length||R===p)return;let E=t[R];if((typeof E.isDisabled=="function"?E.isDisabled(p,t):E.isDisabled)||a&&R>p&&!await S())return;let B=t[p];B.onExit&&await B.onExit(),R>p&&y(D=>new Set([...D,p])),E.onEnter&&await E.onEnter();let U=p;h(R),n?.(R,U)},[p,t,a,S,n]),L=(0,Ti.useCallback)(()=>{T(p+1)},[p,T]),M=(0,Ti.useCallback)(()=>{i&&T(p-1)},[p,T,i]),N=(0,Ti.useCallback)(async()=>{if(await S()&&(y(E=>new Set([...E,p])),o)){w(!0);try{await o(m),d&&typeof window<"u"&&localStorage.removeItem(f)}catch(E){C(E instanceof Error?E.message:"Failed to complete wizard")}finally{w(!1)}}},[p,m,S,o,d,f]),V=(0,Ti.useCallback)(()=>{h(0),v({}),y(new Set),C(null),d&&typeof window<"u"&&localStorage.removeItem(f)},[d,f]),_=(0,Ti.useCallback)(R=>g.has(R),[g]),I=(0,Ti.useCallback)(R=>{if(R===0||s)return!0;for(let E=0;E<R;E++)if(!g.has(E)&&!t[E].isOptional)return!1;return!0},[g,s,t]),k={steps:t,currentStep:p,stepData:m,isLoading:x,error:b,goToNext:L,goToPrevious:M,goToStep:T,updateStepData:R=>P(t[p].id,R),validateCurrentStep:S,completeWizard:N,resetWizard:V,isStepCompleted:_,isStepAccessible:I,canGoNext:p<t.length-1,canGoPrevious:i&&p>0};return(0,fot.jsx)(uot.Provider,{value:k,children:e})};var Pr=A(de(),1),f7=({className:e,progressType:t="linear",orientation:r="horizontal",showStepNumbers:n=!0,showStepTitles:o=!0,stepIconPosition:a="top",completedStepIcon:i=(0,Pr.jsx)(Wo,{className:"w-5 h-5"}),activeStepIcon:s,errorStepIcon:l=(0,Pr.jsx)(ho,{className:"w-5 h-5"})})=>{let{steps:c,currentStep:u,isStepCompleted:d,isStepAccessible:f,error:p}=zC();if(t==="linear")return(0,Pr.jsx)("div",{className:F("relative w-full",r==="vertical"?"flex flex-col space-y-8":"",e),children:r==="horizontal"?(0,Pr.jsx)("div",{className:"relative w-full",children:(0,Pr.jsx)("div",{className:F("relative flex items-start justify-between w-full",a==="left"&&"pl-14"),children:c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex-1 flex flex-col items-center",children:[a==="left"&&w&&(0,Pr.jsx)("div",{className:"absolute -left-12 top-1/2 -translate-y-1/2 flex items-center justify-center",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),a==="top"&&w&&(0,Pr.jsx)("div",{className:"flex items-center justify-center mb-2",children:(0,Pr.jsx)("span",{className:F("w-8 h-8 flex items-center justify-center transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:w})}),o&&(0,Pr.jsxs)("div",{className:"text-center mb-3 min-h-[40px] px-2",children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]}),(0,Pr.jsxs)("div",{className:"relative flex items-center w-full",children:[m<c.length-1&&(0,Pr.jsxs)("div",{className:"absolute left-1/2 w-full h-[2px]",style:{width:"calc(100% + 24px)",marginLeft:"24px"},children:[(0,Pr.jsx)("div",{className:"h-full bg-border"}),m<u&&(0,Pr.jsx)(ne.div,{className:"absolute inset-0 bg-primary",initial:{scaleX:0},animate:{scaleX:1},transition:{duration:.5,delay:m*.1},style:{transformOrigin:"left"}})]}),(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},transition:{duration:.2},className:F("relative z-10 flex items-center justify-center rounded-full transition-all duration-300 mx-auto","w-12 h-12 border-2",v&&"border-primary bg-primary text-primary-foreground shadow-lg shadow-primary/20",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w&&a==="inside"?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})})]}),(0,Pr.jsx)("div",{className:"mt-3",children:(0,Pr.jsxs)("p",{className:"text-xs text-muted-foreground font-medium",children:["Step ",m+1," of ",c.length]})})]},h.id)})})}):(0,Pr.jsxs)("div",{className:"relative pl-12",children:[c.length>1&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("div",{className:"absolute left-6 top-8 bottom-8 w-[2px] bg-border"}),(0,Pr.jsx)(ne.div,{className:"absolute left-6 top-8 w-[2px] bg-primary",initial:{height:0},animate:{height:`${u/(c.length-1)*(100-16)}%`},transition:{duration:.5}})]}),c.map((h,m)=>{let v=m===u,g=d(m),y=f(m),x=v&&p,w=typeof h.icon=="function"?h.icon({isActive:v,isCompleted:g}):h.icon;return(0,Pr.jsxs)("div",{className:"relative flex items-center mb-8 last:mb-0",children:[(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.05:1},className:F("absolute left-0 z-20 flex items-center justify-center rounded-full border-2 transition-all duration-300","w-12 h-12",v&&"border-primary bg-primary text-primary-foreground shadow-lg",g&&!v&&"border-primary bg-primary text-primary-foreground",!v&&!g&&y&&"border-border bg-background text-muted-foreground hover:border-accent",!y&&"border-border/50 bg-muted text-muted-foreground/50 cursor-not-allowed",x&&"border-destructive bg-destructive text-destructive-foreground"),children:x?l:g&&!v?i:v&&s?s:w?(0,Pr.jsx)("span",{className:"w-5 h-5 flex items-center justify-center",children:w}):n?(0,Pr.jsx)("span",{className:"text-sm font-semibold",children:m+1}):(0,Pr.jsx)(Vd,{className:"w-4 h-4"})}),(0,Pr.jsx)("div",{className:"ml-16",children:o&&(0,Pr.jsxs)(Pr.Fragment,{children:[(0,Pr.jsx)("p",{className:F("text-sm font-semibold transition-colors",v&&"text-primary",g&&!v&&"text-primary",!v&&!g&&"text-muted-foreground"),children:h.title}),h.description&&(0,Pr.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:h.description})]})})]},h.id)})]})});if(t==="dots")return(0,Pr.jsx)("div",{className:F("flex items-center justify-center space-x-2",e),children:c.map((h,m)=>{let v=m===u,g=d(m);return(0,Pr.jsx)(ne.div,{initial:{scale:.8},animate:{scale:v?1.2:1},className:F("rounded-full transition-all duration-300",v?"w-3 h-3 bg-primary":"w-2 h-2",g&&!v&&"bg-primary/60",!v&&!g&&"bg-muted")},m)})});if(t==="circular"){let h=(u+1)/c.length*100,m=2*Math.PI*45,v=m-h/100*m;return(0,Pr.jsxs)("div",{className:F("relative w-36 h-36 mx-auto",e),children:[(0,Pr.jsxs)("svg",{className:"w-full h-full -rotate-90",viewBox:"0 0 144 144",children:[(0,Pr.jsx)("circle",{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",className:"text-border"}),(0,Pr.jsx)(ne.circle,{cx:"72",cy:"72",r:"45",fill:"none",stroke:"currentColor",strokeWidth:"8",strokeDasharray:m,initial:{strokeDashoffset:m},animate:{strokeDashoffset:v},className:"text-primary",transition:{duration:.5}})]}),(0,Pr.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Pr.jsxs)("div",{className:"text-center",children:[(0,Pr.jsx)("p",{className:"text-3xl font-bold",children:u+1}),(0,Pr.jsxs)("p",{className:"text-sm text-muted-foreground",children:["of ",c.length]})]})})]})}return null};var p7=A(ue(),1);var HC=A(de(),1),ihr={slide:{initial:e=>({x:e>0?1e3:-1e3,opacity:0}),animate:{x:0,opacity:1},exit:e=>({x:e<0?1e3:-1e3,opacity:0})},fade:{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}},scale:{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8}},none:{initial:{},animate:{},exit:{}}},m7=({className:e,animationType:t="slide",animationDuration:r=.3})=>{let{steps:n,currentStep:o,goToNext:a,goToPrevious:i,goToStep:s,updateStepData:l,stepData:c,error:u}=zC(),[d,f]=p7.default.useState(0),p=p7.default.useRef(o);p7.default.useEffect(()=>{f(o>p.current?1:-1),p.current=o},[o]);let h=n[o],m=o===0,v=o===n.length-1,g={currentStep:o,totalSteps:n.length,goToNext:a,goToPrevious:i,goToStep:s,isFirstStep:m,isLastStep:v,stepData:c[h.id]||{},updateStepData:x=>l(h.id,x)},y=typeof h.content=="function"?h.content(g):h.content;return(0,HC.jsx)(Ft,{mode:"wait",custom:d,children:(0,HC.jsx)(ne.div,{custom:d,variants:ihr[t],initial:"initial",animate:"animate",exit:"exit",transition:{duration:r,ease:"easeInOut"},className:F("w-full",e),"data-wizard-step-content":!0,children:(0,HC.jsxs)("div",{className:"space-y-4",children:[u&&(0,HC.jsxs)(Zb,{variant:"error",children:[(0,HC.jsx)(On,{className:"h-4 w-4"}),(0,HC.jsx)(Jb,{children:u})]}),y]})},o)})};var Ol=A(de(),1),h7=({className:e,showStepIndicator:t=!0,previousText:r="Previous",nextText:n="Next",completeText:o="Complete",loadingText:a="Processing...",onPreviousClick:i,onNextClick:s,onCompleteClick:l})=>{let{steps:c,currentStep:u,isLoading:d,canGoNext:f,canGoPrevious:p,goToNext:h,goToPrevious:m,completeWizard:v}=zC(),g=u===c.length-1,y=c[u],x=()=>{i?.(),m()},w=()=>{g?(l?.(),v()):(s?.(),h())};return(0,Ol.jsxs)("div",{className:F("flex items-center justify-between",e),children:[(0,Ol.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ol.jsxs)(oe,{type:"button",variant:"outline",onClick:x,disabled:!p||d,className:F("transition-all duration-200",!p&&"invisible"),children:[(0,Ol.jsx)(gi,{className:"w-4 h-4 mr-1"}),r]}),t&&(0,Ol.jsxs)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:"px-3 py-1 text-sm text-muted-foreground",children:["Step ",u+1," of ",c.length,y.isOptional&&(0,Ol.jsx)("span",{className:"ml-1 text-xs",children:"(Optional)"})]})]}),(0,Ol.jsx)(oe,{type:"button",onClick:w,disabled:d||!f&&!g,className:"min-w-[120px]",children:d?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(Mr,{className:"w-4 h-4 mr-2 animate-spin"}),a]}):g?(0,Ol.jsxs)(Ol.Fragment,{children:[(0,Ol.jsx)(on,{className:"w-4 h-4 mr-2"}),o]}):(0,Ol.jsxs)(Ol.Fragment,{children:[n,(0,Ol.jsx)(Jn,{className:"w-4 h-4 ml-1"})]})})]})};var Mi=A(de(),1),pot=Fhe.default.forwardRef(({steps:e,currentStep:t=0,onStepChange:r,onComplete:n,orientation:o="horizontal",progressType:a="linear",allowStepSkip:i=!1,allowBackNavigation:s=!0,validateOnStepChange:l=!0,animationType:c="slide",animationDuration:u=.3,showStepNumbers:d=!0,showStepTitles:f=!0,showProgressBar:p=!0,stepIconPosition:h="top",completedStepIcon:m,activeStepIcon:v,errorStepIcon:g,className:y,progressClassName:x,navigationClassName:w,contentClassName:b,stepClassName:C,autoSave:S=!1,autoSaveDelay:P=2e3,onAutoSave:T,persistData:L=!1,storageKey:M="form-wizard-data"},N)=>(0,Mi.jsx)(dot,{steps:e,initialStep:t,onStepChange:r,onComplete:n,validateOnStepChange:l,allowBackNavigation:s,allowStepSkip:i,autoSave:S,autoSaveDelay:P,onAutoSave:T,persistData:L,storageKey:M,children:(0,Mi.jsxs)("div",{ref:N,className:F("w-full",y),children:[p&&(0,Mi.jsx)(Mi.Fragment,{children:(0,Mi.jsx)(f7,{className:F("mb-12",x),progressType:a,orientation:o,showStepNumbers:d,showStepTitles:f,stepIconPosition:h,completedStepIcon:m,activeStepIcon:v,errorStepIcon:g})}),(0,Mi.jsx)($e,{className:F("border-0 shadow-none",b),children:(0,Mi.jsx)(We,{className:"p-0",children:(0,Mi.jsx)(m7,{className:C,animationType:c,animationDuration:u})})}),(0,Mi.jsx)(h7,{className:F("mt-8",w)})]})}));pot.displayName="FormWizardInternal";var G4=Fhe.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,Mi.jsx)($e,{className:F("w-full",e.className),children:(0,Mi.jsx)(We,{className:"py-12 text-center",children:(0,Mi.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Mi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Mi.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Mi.jsxs)("div",{children:[(0,Mi.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Mi.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Form Wizard is available exclusively to MoonUI Pro subscribers."}),(0,Mi.jsx)("a",{href:"/pricing",children:(0,Mi.jsxs)(oe,{size:"sm",children:[(0,Mi.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Mi.jsx)(pot,{...e,ref:t})});G4.displayName="MoonUIFormWizardPro";var shr=G4;var bf=A(ue(),1);Ur();var Pt=A(de(),1);function mot(e){let t=[...e];for(let r=t.length-1;r>0;r--){let n=Math.floor(Math.random()*(r+1));[t[r],t[n]]=[t[n],t[r]]}return t}var lhr=({title:e,description:t,questions:r,onComplete:n,showTimer:o=!0,totalTimeLimit:a,showProgress:i=!0,showQuestionNumbers:s=!0,allowReview:l=!0,allowSkip:c=!0,shuffleQuestions:u=!1,shuffleOptions:d=!1,passingScore:f=70,instantFeedback:p=!1,showHints:h=!1,className:m})=>{let[v]=(0,bf.useState)(()=>u?mot(r):r),[g,y]=(0,bf.useState)({}),[x,w]=(0,bf.useState)([]),[b,C]=(0,bf.useState)(a||0),[S,P]=(0,bf.useState)({}),[T,L]=(0,bf.useState)(!1),[M,N]=(0,bf.useState)(0);(0,bf.useEffect)(()=>{if(!o||!a||T)return;let R=setInterval(()=>{C(E=>E<=1?(_(),0):E-1)},1e3);return()=>clearInterval(R)},[o,a,T]),(0,bf.useEffect)(()=>{if(!o||T)return;let R=setInterval(()=>{N(E=>E+1)},1e3);return()=>clearInterval(R)},[o,T]);let V=(0,bf.useCallback)(()=>{let R=0,E=0;return{results:v.map(B=>{let U=g[B.id],D=B.points||1;E+=D;let j=!1;if(U!=null&&U!==""){if(B.type==="single-choice"||B.type==="true-false")j=U===B.correctAnswer;else if(B.type==="multiple-choice"){let z=Array.isArray(U)?U:[],q=Array.isArray(B.correctAnswer)?B.correctAnswer:[];j=z.length===q.length&&z.every(H=>q.includes(H))}}let $=j?D:0;return R+=$,{questionId:B.id,answer:U,isCorrect:j,points:$,timeSpent:S[B.id]||0}}),score:R,totalScore:E}},[v,g,S]),_=async()=>{let{results:R,score:E,totalScore:O}=V();w(R),L(!0),n&&await n(R,E,O)},I=R=>{let E=Math.floor(R/60),O=R%60;return`${E}:${O.toString().padStart(2,"0")}`},k=v.map((R,E)=>({id:R.id,title:`Question ${E+1}`,description:R.tags?.join(", "),content:({updateStepData:O,goToNext:B})=>{let U=g[R.id],D=d&&R.options?mot(R.options):R.options;(0,bf.useEffect)(()=>{S[R.id]||P($=>({...$,[R.id]:M}))},[]);let j=$=>{y(z=>({...z,[R.id]:$})),p&&R.type};return(0,Pt.jsxs)($e,{className:"border-0 shadow-none",children:[(0,Pt.jsxs)(br,{children:[(0,Pt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[s&&(0,Pt.jsxs)(pt,{variant:"secondary",children:["Question ",E+1," of ",v.length]}),R.points&&R.points>1&&(0,Pt.jsxs)(pt,{variant:"outline",children:[R.points," points"]})]}),(0,Pt.jsx)(zr,{className:"text-xl",children:R.question}),R.description&&(0,Pt.jsx)(Is,{children:R.description})]}),(0,Pt.jsxs)(We,{className:"space-y-4",children:[R.image&&(0,Pt.jsx)("img",{src:R.image,alt:"Question illustration",className:"w-full rounded-lg"}),R.type==="single-choice"&&D&&(0,Pt.jsx)(sP,{value:U||"",onValueChange:j,children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)($x,{value:String($.value),id:`${R.id}-${$.value}`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="multiple-choice"&&D&&(0,Pt.jsx)("div",{className:"space-y-2",children:D.map(($,z)=>(0,Pt.jsxs)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:z*.1},className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50 transition-colors",children:[(0,Pt.jsx)(Nc,{id:`${R.id}-${$.value}`,checked:(U||[]).includes($.value),onCheckedChange:q=>{let H=U||[];j(q?[...H,$.value]:H.filter(K=>K!==$.value))}}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-${$.value}`,className:"flex-1 cursor-pointer",children:$.label||$.value})]},String($.value)))}),R.type==="true-false"&&(0,Pt.jsxs)(sP,{value:U?.toString()||"",onValueChange:$=>j($==="true"),children:[(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"true",id:`${R.id}-true`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-true`,className:"flex-1 cursor-pointer",children:"True"})]}),(0,Pt.jsxs)("div",{className:"flex items-center space-x-2 p-3 rounded-lg hover:bg-muted/50",children:[(0,Pt.jsx)($x,{value:"false",id:`${R.id}-false`}),(0,Pt.jsx)(Rt,{htmlFor:`${R.id}-false`,className:"flex-1 cursor-pointer",children:"False"})]})]}),R.type==="text"&&(0,Pt.jsx)(nd,{value:U||"",onChange:$=>j($.target.value),placeholder:"Type your answer here...",className:"min-h-[120px]"}),R.type==="rating"&&(0,Pt.jsxs)("div",{className:"space-y-4",children:[(0,Pt.jsx)(qw,{value:[U||5],onValueChange:([$])=>j($),max:10,min:1,step:1,className:"w-full"}),(0,Pt.jsxs)("div",{className:"text-center text-2xl font-bold",children:[U||5,"/10"]})]}),h&&R.hint&&(0,Pt.jsx)(Zb,{children:(0,Pt.jsxs)(Jb,{children:[(0,Pt.jsx)("strong",{children:"Hint:"})," ",R.hint]})})]})]})},validation:()=>!(R.required&&!g[R.id]),isOptional:!R.required}));if(T){let{score:R,totalScore:E}=V(),O=Math.round(R/E*100),B=O>=f;return(0,Pt.jsx)(ne.div,{initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},className:F("w-full max-w-2xl mx-auto",m),children:(0,Pt.jsxs)($e,{children:[(0,Pt.jsxs)(br,{className:"text-center",children:[(0,Pt.jsx)("div",{className:"mx-auto mb-4",children:(0,Pt.jsx)(e2,{className:F("w-16 h-16",B?"text-yellow-500":"text-muted-foreground")})}),(0,Pt.jsx)(zr,{className:"text-3xl",children:"Quiz Complete!"}),(0,Pt.jsx)(Is,{children:"Here's how you performed"})]}),(0,Pt.jsxs)(We,{className:"space-y-6",children:[(0,Pt.jsxs)("div",{className:"text-center",children:[(0,Pt.jsxs)("div",{className:"text-5xl font-bold mb-2",children:[O,"%"]}),(0,Pt.jsx)(_o,{value:O,className:"h-3 mb-4"}),(0,Pt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,Pt.jsxs)("span",{children:["Score: ",R,"/",E]}),(0,Pt.jsx)("span",{children:B?(0,Pt.jsx)(pt,{variant:"success",children:"Passed"}):(0,Pt.jsx)(pt,{variant:"destructive",children:"Failed"})})]})]}),l&&(0,Pt.jsxs)("div",{className:"space-y-2",children:[(0,Pt.jsx)("h3",{className:"font-semibold",children:"Review Answers"}),x.map((U,D)=>{let j=v.find($=>$.id===U.questionId);return(0,Pt.jsxs)("div",{className:"flex items-center justify-between p-2 rounded-lg bg-muted/50",children:[(0,Pt.jsxs)("span",{className:"text-sm",children:[s&&`Q${D+1}: `,j?.question.substring(0,50),"..."]}),(0,Pt.jsxs)(pt,{variant:U.isCorrect?"success":"destructive",children:[U.points,"/",j?.points||1]})]},U.questionId)})]}),(0,Pt.jsxs)("div",{className:"flex gap-2",children:[(0,Pt.jsxs)(oe,{className:"flex-1",onClick:()=>window.location.reload(),children:[(0,Pt.jsx)(wx,{className:"w-4 h-4 mr-2"}),"Retake Quiz"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Pn,{className:"w-4 h-4 mr-2"}),"Download Results"]}),(0,Pt.jsxs)(oe,{variant:"outline",children:[(0,Pt.jsx)(Cx,{className:"w-4 h-4 mr-2"}),"Share"]})]})]})]})})}return(0,Pt.jsxs)("div",{className:F("w-full",m),children:[o&&a&&(0,Pt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,Pt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pt.jsx)(Sn,{className:"w-4 h-4"}),(0,Pt.jsxs)("span",{className:"text-sm font-medium",children:["Time Remaining: ",I(b)]})]}),(0,Pt.jsx)(_o,{value:b/a*100,className:"w-32 h-2"})]}),(0,Pt.jsx)(G4,{steps:k,onComplete:_,allowStepSkip:c,validateOnStepChange:!0,showProgressBar:i,progressType:"dots",animationType:"slide"})]})},chr=e=>{let{hasProAccess:t,isLoading:r}=st();return!r&&!t?(0,Pt.jsx)($e,{className:F("w-full",e.className),children:(0,Pt.jsx)(We,{className:"py-12 text-center",children:(0,Pt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Pt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Pt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Pt.jsxs)("div",{children:[(0,Pt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Pt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,Pt.jsx)("a",{href:"/pricing",children:(0,Pt.jsxs)(oe,{size:"sm",children:[(0,Pt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Pt.jsx)(lhr,{...e})},uhr=chr;var wf=A(ue(),1);var Qr=A(de(),1),dhr={visa:/^4/,mastercard:/^5[1-5]/,amex:/^3[47]/,discover:/^6(?:011|5)/,diners:/^3(?:0[0-5]|[68])/,jcb:/^35/,unionpay:/^62/};function fhr(e,t){let r=e.replace(/\s+/g,"").replace(/[^0-9]/gi,""),n=t==="amex"?r.match(/\d{1,4}/g):r.match(/\d{1,4}/g);return n?n.join(" "):r}function phr(e){let t=e.replace(/\s+/g,"").replace(/[^0-9]/gi,"");return t.length>=2?t.slice(0,2)+(t.length>2?"/"+t.slice(2,4):""):t}function mhr(e){let t=e.replace(/\s+/g,"");for(let[r,n]of Object.entries(dhr))if(n.test(t))return r;return null}function hhr(e){let t=e.replace(/\s+/g,"");if(!/^\d+$/.test(t))return!1;let r=0,n=!1;for(let o=t.length-1;o>=0;o--){let a=parseInt(t.charAt(o),10);n&&(a*=2,a>9&&(a-=9)),r+=a,n=!n}return r%10===0}function ghr(e){let t=e.split("/");if(t.length!==2)return!1;let r=parseInt(t[0],10),n=parseInt("20"+t[1],10);if(r<1||r>12)return!1;let o=new Date;return new Date(n,r-1)>o}var hot=wf.default.forwardRef(({value:e={number:"",expiry:"",cvc:"",name:""},onChange:t,showCardPreview:r=!0,showCardType:n=!0,showSecurityBadge:o=!0,autoFormat:a=!0,validateOnChange:i=!1,labels:s={},placeholders:l={},errors:c={},className:u,inputClassName:d,labelClassName:f,errorClassName:p,disabled:h,required:m,...v},g)=>{let[y,x]=(0,wf.useState)(null),[w,b]=(0,wf.useState)(null),[C,S]=(0,wf.useState)({}),P=(0,wf.useRef)(null),T=(0,wf.useRef)(null),L=(0,wf.useRef)(null),M=(0,wf.useRef)(null);(0,wf.useEffect)(()=>{let _=mhr(e.number);x(_)},[e.number]),(0,wf.useEffect)(()=>{if(!i)return;let _={};e.number&&!hhr(e.number)&&(_.number="Invalid card number"),e.expiry&&!ghr(e.expiry)&&(_.expiry="Invalid expiry date"),e.cvc&&(e.cvc.length<3||e.cvc.length>4)&&(_.cvc="Invalid CVC"),S(_)},[e,i]);let N=(_,I)=>{let k=I;if(a){if(_==="number"){k=fhr(I,y||void 0);let R=y==="amex"?18:19;if(k.length>R)return}else if(_==="expiry"){if(k=phr(I),k.length>5)return}else if(_==="cvc"){k=I.replace(/\D/g,"");let R=y==="amex"?4:3;if(k.length>R)return}}t?.({...e,[_]:k}),a&&(_==="number"&&k.length===(y==="amex"?18:19)?T.current?.focus():_==="expiry"&&k.length===5?L.current?.focus():_==="cvc"&&k.length===(y==="amex"?4:3)&&M.current?.focus())},V={...C,...c};return(0,Qr.jsxs)("div",{ref:g,className:F("space-y-4",u),...v,children:[r&&(0,Qr.jsxs)(ne.div,{className:"relative w-full max-w-md mx-auto h-48 rounded-xl bg-gradient-to-r from-blue-600 to-purple-600 dark:from-blue-700 dark:to-purple-700 p-6 text-white shadow-xl overflow-hidden",initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3},children:[(0,Qr.jsxs)("div",{className:"flex justify-between items-start mb-8",children:[(0,Qr.jsx)("div",{className:"text-lg font-semibold",children:y?y.toUpperCase():"CARD"}),(0,Qr.jsx)(hx,{className:"w-8 h-8 text-white/80"})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsx)("div",{className:"text-xl font-mono tracking-wider",children:e.number||"\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022"}),(0,Qr.jsxs)("div",{className:"flex justify-between",children:[(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"NAME"}),(0,Qr.jsx)("div",{className:"text-sm uppercase",children:e.name||"YOUR NAME"})]}),(0,Qr.jsxs)("div",{children:[(0,Qr.jsx)("div",{className:"text-xs text-white/70",children:"EXPIRES"}),(0,Qr.jsx)("div",{className:"text-sm",children:e.expiry||"MM/YY"})]})]})]})]}),(0,Qr.jsxs)("div",{className:"space-y-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-number",className:f,children:[s.number||"Card Number",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:P,id:"card-number",type:"text",inputMode:"numeric",value:e.number,onChange:_=>N("number",_.target.value),onFocus:()=>b("number"),onBlur:()=>b(null),placeholder:l.number||"1234 5678 9012 3456",className:F("pr-20",V.number&&"border-destructive",d),disabled:h}),n&&y&&(0,Qr.jsx)("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm font-medium text-muted-foreground",children:y.toUpperCase()})]}),V.number&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.number})]}),(0,Qr.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-expiry",className:f,children:[s.expiry||"Expiry Date",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsx)(Jt,{ref:T,id:"card-expiry",type:"text",inputMode:"numeric",value:e.expiry,onChange:_=>N("expiry",_.target.value),onFocus:()=>b("expiry"),onBlur:()=>b(null),placeholder:l.expiry||"MM/YY",className:F(V.expiry&&"border-destructive",d),disabled:h}),V.expiry&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.expiry})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsxs)(Rt,{htmlFor:"card-cvc",className:f,children:[s.cvc||"CVC",m&&(0,Qr.jsx)("span",{className:"text-destructive ml-1",children:"*"})]}),(0,Qr.jsxs)("div",{className:"relative",children:[(0,Qr.jsx)(Jt,{ref:L,id:"card-cvc",type:"text",inputMode:"numeric",value:e.cvc,onChange:_=>N("cvc",_.target.value),onFocus:()=>b("cvc"),onBlur:()=>b(null),placeholder:l.cvc||y==="amex"?"1234":"123",className:F(V.cvc&&"border-destructive",d),disabled:h}),o&&(0,Qr.jsx)($t,{className:"absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"})]}),V.cvc&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.cvc})]})]}),(0,Qr.jsxs)("div",{className:"space-y-1",children:[(0,Qr.jsx)(Rt,{htmlFor:"card-name",className:f,children:s.name||"Cardholder Name"}),(0,Qr.jsx)(Jt,{ref:M,id:"card-name",type:"text",value:e.name,onChange:_=>N("name",_.target.value),onFocus:()=>b("name"),onBlur:()=>b(null),placeholder:l.name||"John Doe",className:F(V.name&&"border-destructive",d),disabled:h}),V.name&&(0,Qr.jsx)("p",{className:F("text-sm text-destructive",p),children:V.name})]})]}),o&&(0,Qr.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Qr.jsx)($t,{className:"w-4 h-4"}),(0,Qr.jsx)("span",{children:"Your payment information is secure and encrypted"})]})]})});hot.displayName="MoonUICreditCardInputPro";var Hc=A(ue(),1);Ur();var tt=A(de(),1),got=xt("relative w-full rounded-lg border bg-card text-card-foreground shadow-sm",{variants:{variant:{default:"border-border",exam:"border-primary/20 bg-primary/5",personality:"border-secondary/20 bg-secondary/5"},size:{sm:"p-4",md:"p-6",lg:"p-8"}},defaultVariants:{variant:"default",size:"md"}}),vot=Hc.default.forwardRef(({className:e,variant:t,size:r,questions:n,settings:o={},onComplete:a,onProgress:i,title:s,description:l,...c},u)=>{let[d,f]=(0,Hc.useState)([]),[p,h]=(0,Hc.useState)(0),[m,v]=(0,Hc.useState)({}),[g,y]=(0,Hc.useState)(!1),[x,w]=(0,Hc.useState)(null),[b,C]=(0,Hc.useState)(o.timeLimit?o.timeLimit*60:null),[S,P]=(0,Hc.useState)(Date.now()),[T,L]=(0,Hc.useState)(!1),[M,N]=(0,Hc.useState)(0);(0,Hc.useEffect)(()=>{let $=[...n];o.shuffleQuestions&&($=_($)),o.shuffleOptions&&($=$.map(z=>z.options?{...z,options:_([...z.options])}:z)),f($)},[n,o.shuffleQuestions,o.shuffleOptions]),(0,Hc.useEffect)(()=>{if(b===null||b<=0||g)return;let $=setInterval(()=>{C(z=>z===null||z<=1?(E(),0):z-1)},1e3);return()=>clearInterval($)},[b,g]),(0,Hc.useEffect)(()=>{i&&i(p+1,d.length)},[p,d.length,i]);let V=d[p],_=$=>{let z=[...$];for(let q=z.length-1;q>0;q--){let H=Math.floor(Math.random()*(q+1));[z[q],z[H]]=[z[H],z[q]]}return z},I=$=>{let z=Date.now()-S;v(q=>({...q,[V.id]:{questionId:V.id,answer:$,timeSpent:z}}))},k=()=>{p<d.length-1?(h($=>$+1),P(Date.now()),L(!1)):E()},R=()=>{p>0&&(h($=>$-1),L(!1))},E=()=>{let $=O();w($),y(!0),N(z=>z+1),a&&a($)},O=()=>{let $=0,z=0,q=[];d.forEach(G=>{let J=m[G.id],ae=G.points||1;$+=ae;let Z=!1;if(J?.answer&&G.correctAnswer!==void 0)switch(G.type){case"single-choice":case"true-false":case"text":Z=J.answer===G.correctAnswer;break;case"multiple-choice":Array.isArray(J.answer)&&Array.isArray(G.correctAnswer)&&(Z=J.answer.length===G.correctAnswer.length&&J.answer.every(Pe=>G.correctAnswer.includes(Pe)));break;case"matching":if(typeof J.answer=="object"&&typeof G.correctAnswer=="object"){let Pe=G.correctAnswer,be=J.answer;Z=Object.keys(Pe).every(_e=>Pe[_e]===be[_e])}break;case"rating":Z=!0;break}Z&&(z+=ae),q.push({questionId:G.id,userAnswer:J?.answer||null,correctAnswer:G.correctAnswer,isCorrect:Z,points:Z?ae:0})});let H=$>0?z/$*100:0,K=Object.values(m).reduce((G,J)=>G+(J.timeSpent||0),0);return{score:z,totalScore:$,percentage:H,passed:o.passingScore?H>=o.passingScore:void 0,answers:q,timeSpent:K,completedAt:new Date}},B=()=>{h(0),v({}),y(!1),w(null),C(o.timeLimit?o.timeLimit*60:null),P(Date.now()),L(!1),o.shuffleQuestions&&f(_([...n]))},U=()=>{if(!x)return;let $={title:s,completedAt:x.completedAt,score:x.score,totalScore:x.totalScore,percentage:x.percentage,passed:x.passed,timeSpent:x.timeSpent,answers:x.answers.map(K=>({question:d.find(J=>J.id===K.questionId)?.question,userAnswer:K.userAnswer,correctAnswer:K.correctAnswer,isCorrect:K.isCorrect,points:K.points}))},z=new Blob([JSON.stringify($,null,2)],{type:"application/json"}),q=URL.createObjectURL(z),H=document.createElement("a");H.href=q,H.download=`quiz-results-${Date.now()}.json`,H.click(),URL.revokeObjectURL(q)},D=$=>{let z=Math.floor($/60),q=$%60;return`${z}:${q.toString().padStart(2,"0")}`},j=()=>{if(!V)return null;let $=m[V.id]?.answer;switch(V.type){case"single-choice":case"true-false":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>I(K),className:F("w-full text-left p-4 rounded-lg border transition-colors",$===K?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:K},G))});case"multiple-choice":return(0,tt.jsx)("div",{className:"space-y-3",children:V.options?.map((K,G)=>{let J=Array.isArray($)&&$.includes(K);return(0,tt.jsx)(ne.button,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},onClick:()=>{let ae=$||[],Z=J?ae.filter(Pe=>Pe!==K):[...ae,K];I(Z)},className:F("w-full text-left p-4 rounded-lg border transition-colors",J?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,tt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,tt.jsx)("div",{className:F("w-5 h-5 rounded border-2 transition-colors",J?"bg-primary border-primary":"border-border"),children:J&&(0,tt.jsx)(Cl,{className:"w-full h-full text-primary-foreground"})}),K]})},G)})});case"text":return(0,tt.jsx)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},children:(0,tt.jsx)("textarea",{className:"w-full p-4 rounded-lg border border-input bg-background resize-none",rows:4,placeholder:"Type your answer here...",value:$||"",onChange:K=>I(K.target.value)})});case"rating":let z=V.maxRating||5,q=typeof $=="number"?$:0;return(0,tt.jsxs)(ne.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"space-y-4",children:[(0,tt.jsx)("div",{className:"flex justify-center gap-2",children:Array.from({length:z},(K,G)=>G+1).map(K=>(0,tt.jsx)("button",{onClick:()=>I(K),className:"transition-transform hover:scale-110",children:(0,tt.jsx)(Hs,{className:F("w-10 h-10 transition-colors",K<=q?"fill-yellow-500 text-yellow-500":"text-muted-foreground")})},K))}),V.ratingLabels&&(0,tt.jsxs)("div",{className:"flex justify-between text-sm text-muted-foreground",children:[(0,tt.jsx)("span",{children:V.ratingLabels[0]}),(0,tt.jsx)("span",{children:V.ratingLabels[1]})]})]});case"matching":let H=$||{};return(0,tt.jsxs)("div",{className:"grid grid-cols-2 gap-6",children:[(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"Match these items:"}),V.leftOptions?.map((K,G)=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:G*.1},className:"p-3 rounded-lg border bg-muted/50",children:K},K))]}),(0,tt.jsxs)("div",{className:"space-y-3",children:[(0,tt.jsx)("h4",{className:"font-medium mb-2",children:"With these:"}),V.leftOptions?.map(K=>(0,tt.jsx)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},children:(0,tt.jsxs)("select",{className:"w-full p-3 rounded-lg border bg-background",value:H[K]||"",onChange:G=>I({...H,[K]:G.target.value}),children:[(0,tt.jsx)("option",{value:"",children:"Select..."}),V.rightOptions?.map(G=>(0,tt.jsx)("option",{value:G,children:G},G))]})},K))]})]});default:return null}};return g&&x?(0,tt.jsx)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:(0,tt.jsxs)(ne.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},className:"space-y-6",children:[(0,tt.jsxs)("div",{className:"text-center",children:[(0,tt.jsx)("h2",{className:"text-2xl font-bold mb-2",children:"Quiz Completed!"}),(0,tt.jsxs)("div",{className:"text-5xl font-bold mb-4",children:[x.percentage.toFixed(1),"%"]}),(0,tt.jsxs)("p",{className:"text-muted-foreground",children:["You scored ",x.score," out of ",x.totalScore," points"]}),x.passed!==void 0&&(0,tt.jsx)("div",{className:F("mt-4 inline-flex items-center gap-2 px-4 py-2 rounded-full",x.passed?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:x.passed?(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(Cl,{className:"w-5 h-5"}),"Passed"]}):(0,tt.jsxs)(tt.Fragment,{children:[(0,tt.jsx)(ho,{className:"w-5 h-5"}),"Failed"]})})]}),o.allowReview&&(0,tt.jsxs)("div",{className:"space-y-4",children:[(0,tt.jsx)("h3",{className:"font-semibold",children:"Review Answers:"}),x.answers.map(($,z)=>{let q=d.find(H=>H.id===$.questionId);return q?(0,tt.jsx)("div",{className:"p-4 rounded-lg border bg-muted/50",children:(0,tt.jsxs)("div",{className:"flex items-start gap-3",children:[$.isCorrect?(0,tt.jsx)(Cl,{className:"w-5 h-5 text-green-600 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 text-red-600 mt-0.5"}),(0,tt.jsxs)("div",{className:"flex-1",children:[(0,tt.jsxs)("p",{className:"font-medium mb-2",children:[z+1,". ",q.question]}),(0,tt.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your answer: ",JSON.stringify($.userAnswer)]}),!$.isCorrect&&q.correctAnswer!==void 0&&(0,tt.jsxs)("p",{className:"text-sm text-green-600 mt-1",children:["Correct answer: ",JSON.stringify(q.correctAnswer)]}),q.explanation&&(0,tt.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:q.explanation})]})]})},$.questionId):null})]}),(0,tt.jsxs)("div",{className:"flex gap-3 justify-center",children:[(!o.maxAttempts||M<o.maxAttempts)&&(0,tt.jsxs)("button",{onClick:B,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg bg-primary text-primary-foreground hover:bg-primary/90",children:[(0,tt.jsx)(wx,{className:"w-4 h-4"}),"Try Again"]}),(0,tt.jsxs)("button",{onClick:U,className:"inline-flex items-center gap-2 px-4 py-2 rounded-lg border hover:bg-muted",children:[(0,tt.jsx)(Pn,{className:"w-4 h-4"}),"Download Results"]})]})]})}):(0,tt.jsxs)("div",{ref:u,className:F(got({variant:t,size:r}),e),...c,children:[(s||b!==null)&&(0,tt.jsxs)("div",{className:"mb-6 flex items-center justify-between",children:[(0,tt.jsxs)("div",{children:[s&&(0,tt.jsx)("h2",{className:"text-2xl font-bold",children:s}),l&&(0,tt.jsx)("p",{className:"text-muted-foreground mt-1",children:l})]}),b!==null&&(0,tt.jsxs)("div",{className:F("flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium",b<60?"bg-red-100 text-red-700":"bg-muted"),children:[(0,tt.jsx)(Sn,{className:"w-4 h-4"}),D(b)]})]}),(0,tt.jsxs)("div",{className:"mb-6",children:[(0,tt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground mb-2",children:[(0,tt.jsxs)("span",{children:["Question ",p+1," of ",d.length]}),(0,tt.jsxs)("span",{children:[Math.round((p+1)/d.length*100),"%"]})]}),(0,tt.jsx)("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:(0,tt.jsx)(ne.div,{className:"h-full bg-primary",initial:{width:0},animate:{width:`${(p+1)/d.length*100}%`},transition:{duration:.3}})})]}),(0,tt.jsx)(Ft,{mode:"wait",children:V&&(0,tt.jsxs)(ne.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},className:"mb-6",children:[(0,tt.jsxs)("h3",{className:"text-lg font-semibold mb-4",children:[V.question,V.required&&(0,tt.jsx)("span",{className:"text-red-500 ml-1",children:"*"})]}),j(),o.showHints&&V.hint&&(0,tt.jsxs)("div",{className:"mt-4",children:[(0,tt.jsxs)("button",{onClick:()=>L(!T),className:"inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground",children:[(0,tt.jsx)(zh,{className:"w-4 h-4"}),T?"Hide":"Show"," Hint"]}),T&&(0,tt.jsx)(ne.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},className:"mt-2 p-3 rounded-lg bg-muted/50 text-sm",children:V.hint})]}),o.showInstantFeedback&&m[V.id]&&V.correctAnswer!==void 0&&(0,tt.jsx)(ne.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"mt-4",children:(()=>{let $=m[V.id].answer,z=!1;switch(V.type){case"single-choice":case"true-false":z=$===V.correctAnswer;break}return(0,tt.jsxs)("div",{className:F("p-3 rounded-lg flex items-start gap-2",z?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:[z?(0,tt.jsx)(Cl,{className:"w-5 h-5 mt-0.5"}):(0,tt.jsx)(ho,{className:"w-5 h-5 mt-0.5"}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("p",{className:"font-medium",children:z?"Correct!":"Incorrect"}),V.explanation&&(0,tt.jsx)("p",{className:"text-sm mt-1",children:V.explanation})]})]})})()})]},V.id)}),(0,tt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,tt.jsxs)("button",{onClick:R,disabled:p===0,className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",p===0?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-muted hover:bg-muted/80"),children:[(0,tt.jsx)(gi,{className:"w-4 h-4"}),"Previous"]}),(0,tt.jsxs)("button",{onClick:p===d.length-1?E:k,disabled:V?.required&&!m[V.id],className:F("inline-flex items-center gap-2 px-4 py-2 rounded-lg transition-colors",V?.required&&!m[V.id]?"opacity-50 cursor-not-allowed bg-muted text-muted-foreground":"bg-primary text-primary-foreground hover:bg-primary/90"),children:[p===d.length-1?"Complete":"Next",(0,tt.jsx)(Jn,{className:"w-4 h-4"})]})]})]})});vot.displayName="MoonUIQuizFormProInternal";var Bhe=Hc.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=st();return!n&&!r?(0,tt.jsx)($e,{className:F("w-full",e.className),children:(0,tt.jsx)(We,{className:"py-12 text-center",children:(0,tt.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,tt.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,tt.jsx)($t,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,tt.jsxs)("div",{children:[(0,tt.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,tt.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"MoonUI Quiz Form is available exclusively to MoonUI Pro subscribers."}),(0,tt.jsx)("a",{href:"/pricing",children:(0,tt.jsxs)(oe,{size:"sm",children:[(0,tt.jsx)(_t,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,tt.jsx)(vot,{...e,ref:t})});Bhe.displayName="MoonUIQuizFormPro";var Uf=A(ue(),1);var te=A(bt(),1),qn=A(bt(),1);var Nf=A(bt(),1);var sh=A(bt(),1),$he=A(Qn(),1);function Dot(e,t){let r=sh.createContext(t),n=a=>{let{children:i,...s}=a,l=sh.useMemo(()=>s,Object.values(s));return(0,$he.jsx)(r.Provider,{value:l,children:i})};n.displayName=e+"Provider";function o(a){let i=sh.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Co(e,t=[]){let r=[];function n(a,i){let s=sh.createContext(i),l=r.length;r=[...r,i];let c=d=>{let{scope:f,children:p,...h}=d,m=f?.[e]?.[l]||s,v=sh.useMemo(()=>h,Object.values(h));return(0,$he.jsx)(m.Provider,{value:v,children:p})};c.displayName=a+"Provider";function u(d,f){let p=f?.[e]?.[l]||s,h=sh.useContext(p);if(h)return h;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[c,u]}let o=()=>{let a=r.map(i=>sh.createContext(i));return function(s){let l=s?.[e]||a;return sh.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Bhr(o,...t)]}function Bhr(...e){let t=e[0];if(e.length===1)return t;let r=()=>{let n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){let i=n.reduce((s,{useScope:l,scopeName:c})=>{let d=l(a)[`__scope${c}`];return{...s,...d}},{});return sh.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}var jC=A(bt(),1);var _ot=A(bt(),1);function Oot(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function GI(...e){return t=>{let r=!1,n=e.map(o=>{let a=Oot(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){let a=n[o];typeof a=="function"?a():Oot(e[o],null)}}}}function gr(...e){return _ot.useCallback(GI(...e),e)}var _l=A(bt(),1);var sA=A(Qn(),1);function Pu(e){let t=Vhr(e),r=_l.forwardRef((n,o)=>{let{children:a,...i}=n,s=_l.Children.toArray(a),l=s.find(Uhr);if(l){let c=l.props.children,u=s.map(d=>d===l?_l.Children.count(c)>1?_l.Children.only(null):_l.isValidElement(c)?c.props.children:null:d);return(0,sA.jsx)(t,{...i,ref:o,children:_l.isValidElement(c)?_l.cloneElement(c,void 0,u):null})}return(0,sA.jsx)(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Vhr(e){let t=_l.forwardRef((r,n)=>{let{children:o,...a}=r;if(_l.isValidElement(o)){let i=Hhr(o),s=zhr(a,o.props);return o.type!==_l.Fragment&&(s.ref=n?GI(n,i):i),_l.cloneElement(o,s)}return _l.Children.count(o)>1?_l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fot=Symbol("radix.slottable");function Bot(e){let t=({children:r})=>(0,sA.jsx)(sA.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Fot,t}function Uhr(e){return _l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fot}function zhr(e,t){let r={...t};for(let n in t){let o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...s)=>{let l=a(...s);return o(...s),l}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Hhr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var b7=A(Qn(),1),jhr=A(bt(),1);var Whr=A(Qn(),1);function Ly(e){let t=e+"CollectionProvider",[r,n]=Co(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=m=>{let{scope:v,children:g}=m,y=jC.default.useRef(null),x=jC.default.useRef(new Map).current;return(0,b7.jsx)(o,{scope:v,itemMap:x,collectionRef:y,children:g})};i.displayName=t;let s=e+"CollectionSlot",l=Pu(s),c=jC.default.forwardRef((m,v)=>{let{scope:g,children:y}=m,x=a(s,g),w=gr(v,x.collectionRef);return(0,b7.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=Pu(u),p=jC.default.forwardRef((m,v)=>{let{scope:g,children:y,...x}=m,w=jC.default.useRef(null),b=gr(v,w),C=a(u,g);return jC.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...x}),()=>void C.itemMap.delete(w))),(0,b7.jsx)(f,{[d]:"",ref:b,children:y})});p.displayName=u;function h(m){let v=a(e+"CollectionConsumer",m);return jC.default.useCallback(()=>{let y=v.collectionRef.current;if(!y)return[];let x=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort((C,S)=>x.indexOf(C.ref.current)-x.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},h,n]}var Vot=new WeakMap,fl,Ag,_Gn=(Ag=class extends Map{constructor(r){super(r);rR(this,fl,void 0);tx(this,fl,[...super.keys()]),Vot.set(this,!0)}set(r,n){return Vot.get(this)&&(this.has(r)?Or(this,fl)[Or(this,fl).indexOf(r)]=r:Or(this,fl).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Or(this,fl).length,s=Uot(r),l=s>=0?s:i+s,c=l<0||l>=i?-1:l;if(c===this.size||a&&c===this.size-1||c===-1)return this.set(n,o),this;let u=this.size+(a?0:1);s<0&&l++;let d=[...Or(this,fl)],f,p=!1;for(let h=l;h<u;h++)if(l===h){let m=d[h];d[h]===n&&(m=d[h+1]),a&&this.delete(n),f=this.get(m),this.set(n,o)}else{!p&&d[h-1]===n&&(p=!0);let m=d[p?h:h-1],v=f;f=this.get(m),this.delete(m),this.set(m,v)}return this}with(r,n,o){let a=new Ag(this);return a.insert(r,n,o),a}before(r){let n=Or(this,fl).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Or(this,fl).indexOf(r);if(n=n===-1||n===this.size-1?-1:n+1,n!==-1)return this.entryAt(n)}setAfter(r,n,o){let a=Or(this,fl).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return tx(this,fl,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Or(this,fl).splice(Or(this,fl).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=Whe(Or(this,fl),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Or(this,fl).indexOf(r)}keyAt(r){return Whe(Or(this,fl),r)}from(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.at(a)}keyFrom(r,n){let o=this.indexOf(r);if(o===-1)return;let a=o+n;return a<0&&(a=0),a>=this.size&&(a=this.size-1),this.keyAt(a)}find(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return a;o++}}findIndex(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return o;o++}return-1}filter(r,n){let o=[],a=0;for(let i of this)Reflect.apply(r,n,[i,a,this])&&o.push(i),a++;return new Ag(o)}map(r,n){let o=[],a=0;for(let i of this)o.push([i[0],Reflect.apply(r,n,[i,a,this])]),a++;return new Ag(o)}reduce(...r){let[n,o]=r,a=0,i=o??this.at(0);for(let s of this)a===0&&r.length===1?i=s:i=Reflect.apply(n,this,[i,s,a,this]),a++;return i}reduceRight(...r){let[n,o]=r,a=o??this.at(-1);for(let i=this.size-1;i>=0;i--){let s=this.at(i);i===this.size-1&&r.length===1?a=s:a=Reflect.apply(n,this,[a,s,i,this])}return a}toSorted(r){let n=[...this.entries()].sort(r);return new Ag(n)}toReversed(){let r=new Ag;for(let n=this.size-1;n>=0;n--){let o=this.keyAt(n),a=this.get(o);r.set(o,a)}return r}toSpliced(...r){let n=[...this.entries()];return n.splice(...r),new Ag(n)}slice(r,n){let o=new Ag,a=this.size-1;if(r===void 0)return o;r<0&&(r=r+this.size),n!==void 0&&n>0&&(a=n-1);for(let i=r;i<=a;i++){let s=this.keyAt(i),l=this.get(s);o.set(s,l)}return o}every(r,n){let o=0;for(let a of this){if(!Reflect.apply(r,n,[a,o,this]))return!1;o++}return!0}some(r,n){let o=0;for(let a of this){if(Reflect.apply(r,n,[a,o,this]))return!0;o++}return!1}},fl=new WeakMap,Ag);function Whe(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=$hr(e,t);return r===-1?void 0:e[r]}function $hr(e,t){let r=e.length,n=Uot(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function Uot(e){return e!==e||e===0?0:Math.trunc(e)}var VGn=!!(typeof window<"u"&&window.document&&window.document.createElement);function it(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lh=A(bt(),1);var zot=A(bt(),1),Mo=globalThis?.document?zot.useLayoutEffect:()=>{};var w7=A(bt(),1);var qhr=lh[" useInsertionEffect ".trim().toString()]||Mo;function Ba({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=Ghr({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lh.useRef(e!==void 0);lh.useEffect(()=>{let d=u.current;d!==s&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=s},[s,n])}let c=lh.useCallback(u=>{if(s){let d=Khr(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function Ghr({defaultProp:e,onChange:t}){let[r,n]=lh.useState(e),o=lh.useRef(r),a=lh.useRef(t);return qhr(()=>{a.current=t},[t]),lh.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function Khr(e){return typeof e=="function"}var jGn=Symbol("RADIX:SYNC_STATE");var ilt=A(bt(),1),slt=A(ck(),1);var llt=A(Qn(),1),Qvr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],wt=Qvr.reduce((e,t)=>{let r=Pu(`Primitive.${t}`),n=ilt.forwardRef((o,a)=>{let{asChild:i,...s}=o,l=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,llt.jsx)(l,{...s,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function FA(e,t){e&&slt.flushSync(()=>e.dispatchEvent(t))}var qc=A(bt(),1);var Rf=A(bt(),1);var clt=A(bt(),1);function Zvr(e,t){return clt.useReducer((r,n)=>t[r][n]??r,e)}var Ai=e=>{let{present:t,children:r}=e,n=Jvr(t),o=typeof r=="function"?r({present:n.isPresent}):Rf.Children.only(r),a=gr(n.ref,eyr(o));return typeof r=="function"||n.isPresent?Rf.cloneElement(o,{ref:a}):null};Ai.displayName="Presence";function Jvr(e){let[t,r]=Rf.useState(),n=Rf.useRef(null),o=Rf.useRef(e),a=Rf.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Zvr(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Rf.useEffect(()=>{let c=zX(n.current);a.current=s==="mounted"?c:"none"},[s]),Mo(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=zX(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Mo(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let m=zX(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&m&&(l("ANIMATION_END"),!o.current)){let v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},f=p=>{p.target===t&&(a.current=zX(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:Rf.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function zX(e){return e?.animationName||"none"}function eyr(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var aye=A(bt(),1);var tyr=aye[" useId ".trim().toString()]||(()=>{}),ryr=0;function za(e){let[t,r]=aye.useState(tyr());return Mo(()=>{e||r(n=>n??String(ryr++))},[e]),e||(t?`radix-${t}`:"")}var uk=A(Qn(),1),HX="Collapsible",[nyr,iye]=Co(HX),[oyr,sye]=nyr(HX),ult=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,c]=Ba({prop:n,defaultProp:o??!1,onChange:i,caller:HX});return(0,uk.jsx)(oyr,{scope:r,disabled:a,contentId:za(),open:l,onOpenToggle:qc.useCallback(()=>c(u=>!u),[c]),children:(0,uk.jsx)(wt.div,{"data-state":cye(l),"data-disabled":a?"":void 0,...s,ref:t})})});ult.displayName=HX;var dlt="CollapsibleTrigger",flt=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,...n}=e,o=sye(dlt,r);return(0,uk.jsx)(wt.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":cye(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:it(e.onClick,o.onOpenToggle)})});flt.displayName=dlt;var lye="CollapsibleContent",plt=qc.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sye(lye,e.__scopeCollapsible);return(0,uk.jsx)(Ai,{present:r||o.open,children:({present:a})=>(0,uk.jsx)(ayr,{...n,ref:t,present:a})})});plt.displayName=lye;var ayr=qc.forwardRef((e,t)=>{let{__scopeCollapsible:r,present:n,children:o,...a}=e,i=sye(lye,r),[s,l]=qc.useState(n),c=qc.useRef(null),u=gr(t,c),d=qc.useRef(0),f=d.current,p=qc.useRef(0),h=p.current,m=i.open||s,v=qc.useRef(m),g=qc.useRef(void 0);return qc.useEffect(()=>{let y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Mo(()=>{let y=c.current;if(y){g.current=g.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";let x=y.getBoundingClientRect();d.current=x.height,p.current=x.width,v.current||(y.style.transitionDuration=g.current.transitionDuration,y.style.animationName=g.current.animationName),l(n)}},[i.open,n]),(0,uk.jsx)(wt.div,{"data-state":cye(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!m,...a,ref:u,style:{["--radix-collapsible-content-height"]:f?`${f}px`:void 0,["--radix-collapsible-content-width"]:h?`${h}px`:void 0,...e.style},children:m&&o})});function cye(e){return e?"open":"closed"}var mlt=ult,hlt=flt,glt=plt;var jX=A(bt(),1),syr=A(Qn(),1),lyr=jX.createContext(void 0);function Uy(e){let t=jX.useContext(lyr);return e||t||"ltr"}var Vl=A(Qn(),1),zg="Accordion",cyr=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[dye,uyr,dyr]=Ly(zg),[WX,b9n]=Co(zg,[dyr,iye]),fye=iye(),fyr=Nf.default.forwardRef((e,t)=>{let{type:r,...n}=e,o=n,a=n;return(0,Vl.jsx)(dye.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?(0,Vl.jsx)(gyr,{...a,ref:t}):(0,Vl.jsx)(hyr,{...o,ref:t})})});fyr.displayName=zg;var[vlt,pyr]=WX(zg),[ylt,myr]=WX(zg,{collapsible:!1}),hyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,l]=Ba({prop:r,defaultProp:n??"",onChange:o,caller:zg});return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:Nf.default.useMemo(()=>s?[s]:[],[s]),onItemOpen:l,onItemClose:Nf.default.useCallback(()=>a&&l(""),[a,l]),children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:a,children:(0,Vl.jsx)(xlt,{...i,ref:t})})})}),gyr=Nf.default.forwardRef((e,t)=>{let{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,s]=Ba({prop:r,defaultProp:n??[],onChange:o,caller:zg}),l=Nf.default.useCallback(u=>s((d=[])=>[...d,u]),[s]),c=Nf.default.useCallback(u=>s((d=[])=>d.filter(f=>f!==u)),[s]);return(0,Vl.jsx)(vlt,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:(0,Vl.jsx)(ylt,{scope:e.__scopeAccordion,collapsible:!0,children:(0,Vl.jsx)(xlt,{...a,ref:t})})})}),[vyr,qX]=WX(zg),xlt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,s=Nf.default.useRef(null),l=gr(s,t),c=uyr(r),d=Uy(o)==="ltr",f=it(e.onKeyDown,p=>{if(!cyr.includes(p.key))return;let h=p.target,m=c().filter(P=>!P.ref.current?.disabled),v=m.findIndex(P=>P.ref.current===h),g=m.length;if(v===-1)return;p.preventDefault();let y=v,x=0,w=g-1,b=()=>{y=v+1,y>w&&(y=x)},C=()=>{y=v-1,y<x&&(y=w)};switch(p.key){case"Home":y=x;break;case"End":y=w;break;case"ArrowRight":a==="horizontal"&&(d?b():C());break;case"ArrowDown":a==="vertical"&&b();break;case"ArrowLeft":a==="horizontal"&&(d?C():b());break;case"ArrowUp":a==="vertical"&&C();break}let S=y%g;m[S].ref.current?.focus()});return(0,Vl.jsx)(vyr,{scope:r,disabled:n,direction:o,orientation:a,children:(0,Vl.jsx)(dye.Slot,{scope:r,children:(0,Vl.jsx)(wt.div,{...i,"data-orientation":a,ref:l,onKeyDown:n?void 0:f})})})}),$X="AccordionItem",[yyr,pye]=WX($X),blt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,value:n,...o}=e,a=qX($X,r),i=pyr($X,r),s=fye(r),l=za(),c=n&&i.value.includes(n)||!1,u=a.disabled||e.disabled;return(0,Vl.jsx)(yyr,{scope:r,open:c,disabled:u,triggerId:l,children:(0,Vl.jsx)(mlt,{"data-orientation":a.orientation,"data-state":klt(c),...s,...o,ref:t,disabled:u,open:c,onOpenChange:d=>{d?i.onItemOpen(n):i.onItemClose(n)}})})});blt.displayName=$X;var wlt="AccordionHeader",Clt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(wlt,r);return(0,Vl.jsx)(wt.h3,{"data-orientation":o.orientation,"data-state":klt(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Clt.displayName=wlt;var uye="AccordionTrigger",Slt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(uye,r),i=myr(uye,r),s=fye(r);return(0,Vl.jsx)(dye.ItemSlot,{scope:r,children:(0,Vl.jsx)(hlt,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...n,ref:t})})});Slt.displayName=uye;var Plt="AccordionContent",Ilt=Nf.default.forwardRef((e,t)=>{let{__scopeAccordion:r,...n}=e,o=qX(zg,r),a=pye(Plt,r),i=fye(r);return(0,Vl.jsx)(glt,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{["--radix-accordion-content-height"]:"var(--radix-collapsible-content-height)",["--radix-accordion-content-width"]:"var(--radix-collapsible-content-width)",...e.style}})});Ilt.displayName=Plt;function klt(e){return e?"open":"closed"}var Rlt=blt,Nlt=Clt,mye=Slt,hye=Ilt;var KX=A(bt());var Tlt=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),byr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,n)=>n?n.toUpperCase():r.toLowerCase()),gye=e=>{let t=byr(e);return t.charAt(0).toUpperCase()+t.slice(1)},GX=(...e)=>e.filter((t,r,n)=>!!t&&t.trim()!==""&&n.indexOf(t)===r).join(" ").trim(),Mlt=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var U3=A(bt());var Elt={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var Alt=(0,U3.forwardRef)(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:o="",children:a,iconNode:i,...s},l)=>(0,U3.createElement)("svg",{ref:l,...Elt,width:t,height:t,stroke:e,strokeWidth:n?Number(r)*24/Number(t):r,className:GX("lucide",o),...!a&&!Mlt(s)&&{"aria-hidden":"true"},...s},[...i.map(([c,u])=>(0,U3.createElement)(c,u)),...Array.isArray(a)?a:[a]]));var Ct=(e,t)=>{let r=(0,KX.forwardRef)(({className:n,...o},a)=>(0,KX.createElement)(Alt,{ref:a,iconNode:t,className:GX(`lucide-${Tlt(gye(e))}`,`lucide-${e}`,n),...o}));return r.displayName=gye(e),r};var wyr=[["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 18H5",key:"18s9l3"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],z3=Ct("align-center",wyr);var Cyr=[["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 18h18",key:"1h113x"}],["path",{d:"M3 6h18",key:"d0wm0j"}]],H3=Ct("align-justify",Cyr);var Syr=[["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 18H3",key:"1amg6g"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],j3=Ct("align-left",Syr);var Pyr=[["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 18H7",key:"1ygte8"}],["path",{d:"M21 6H3",key:"1jwq7v"}]],$3=Ct("align-right",Pyr);var Iyr=[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]],W3=Ct("bold",Iyr);var kyr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],q0=Ct("check",kyr);var Ryr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dS=Ct("chevron-down",Ryr);var Nyr=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],BA=Ct("chevron-left",Nyr);var Tyr=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],fS=Ct("chevron-right",Tyr);var Myr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],q3=Ct("chevron-up",Myr);var Eyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],zy=Ct("circle-alert",Eyr);var Ayr=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],pS=Ct("circle-check-big",Ayr);var Lyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],VA=Ct("circle",Lyr);var Dyr=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],G3=Ct("code",Dyr);var Oyr=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],K3=Ct("credit-card",Oyr);var _yr=[["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"}]],G0=Ct("ellipsis",_yr);var Fyr=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],X3=Ct("eye",Fyr);var Byr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Y3=Ct("file-text",Byr);var Vyr=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Q3=Ct("file",Vyr);var Uyr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],UA=Ct("image",Uyr);var zyr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zA=Ct("info",zyr);var Hyr=[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]],Z3=Ct("italic",Hyr);var jyr=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],J3=Ct("link",jyr);var $yr=[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]],eV=Ct("list-ordered",$yr);var Wyr=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],tV=Ct("list",Wyr);var qyr=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],jp=Ct("loader-circle",qyr);var Gyr=[["path",{d:"M5 12h14",key:"1ays0h"}]],rV=Ct("minus",Gyr);var Kyr=[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]],nV=Ct("music",Kyr);var Xyr=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],oV=Ct("palette",Xyr);var Yyr=[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]],aV=Ct("phone",Yyr);var Qyr=[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]],iV=Ct("quote",Qyr);var Zyr=[["path",{d:"M21 7v6h-6",key:"3ptur4"}],["path",{d:"M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7",key:"1kgawr"}]],sV=Ct("redo",Zyr);var Jyr=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],lV=Ct("search",Jyr);var exr=[["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"}]],Tf=Ct("square-pen",exr);var txr=[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]],cV=Ct("strikethrough",txr);var rxr=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],mS=Ct("triangle-alert",rxr);var nxr=[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]],uV=Ct("underline",nxr);var oxr=[["path",{d:"M3 7v6h6",key:"1v2h90"}],["path",{d:"M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13",key:"1r6uu6"}]],dV=Ct("undo",oxr);var axr=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],fV=Ct("upload",axr);var ixr=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],pV=Ct("video",ixr);var sxr=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],K0=Ct("x",sxr);function Llt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=Llt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function XX(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=Llt(e))&&(n&&(n+=" "),n+=t);return n}var xye="-",lxr=e=>{let t=uxr(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{let s=i.split(xye);return s[0]===""&&s.length!==1&&s.shift(),_lt(s,t)||cxr(i)},getConflictingClassGroupIds:(i,s)=>{let l=r[i]||[];return s&&n[i]?[...l,...n[i]]:l}}},_lt=(e,t)=>{if(e.length===0)return t.classGroupId;let r=e[0],n=t.nextPart.get(r),o=n?_lt(e.slice(1),n):void 0;if(o)return o;if(t.validators.length===0)return;let a=e.join(xye);return t.validators.find(({validator:i})=>i(a))?.classGroupId},Dlt=/^\[(.+)\]$/,cxr=e=>{if(Dlt.test(e)){let t=Dlt.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},uxr=e=>{let{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return fxr(Object.entries(e.classGroups),r).forEach(([a,i])=>{yye(i,n,a,t)}),n},yye=(e,t,r,n)=>{e.forEach(o=>{if(typeof o=="string"){let a=o===""?t:Olt(t,o);a.classGroupId=r;return}if(typeof o=="function"){if(dxr(o)){yye(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(([a,i])=>{yye(i,Olt(t,a),r,n)})})},Olt=(e,t)=>{let r=e;return t.split(xye).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},dxr=e=>e.isThemeGetter,fxr=(e,t)=>t?e.map(([r,n])=>{let o=n.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[r,o]}):e,pxr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map,o=(a,i)=>{r.set(a,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(a){let i=r.get(a);if(i!==void 0)return i;if((i=n.get(a))!==void 0)return o(a,i),i},set(a,i){r.has(a)?r.set(a,i):o(a,i)}}},Flt="!",mxr=e=>{let{separator:t,experimentalParseClassName:r}=e,n=t.length===1,o=t[0],a=t.length,i=s=>{let l=[],c=0,u=0,d;for(let v=0;v<s.length;v++){let g=s[v];if(c===0){if(g===o&&(n||s.slice(v,v+a)===t)){l.push(s.slice(u,v)),u=v+a;continue}if(g==="/"){d=v;continue}}g==="["?c++:g==="]"&&c--}let f=l.length===0?s:s.substring(u),p=f.startsWith(Flt),h=p?f.substring(1):f,m=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:h,maybePostfixModifierPosition:m}};return r?s=>r({className:s,parseClassName:i}):i},hxr=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t},gxr=e=>({cache:pxr(e.cacheSize),parseClassName:mxr(e),...lxr(e)}),vxr=/\s+/,yxr=(e,t)=>{let{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(vxr),s="";for(let l=i.length-1;l>=0;l-=1){let c=i[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=r(c),h=!!p,m=n(h?f.substring(0,p):f);if(!m){if(!h){s=c+(s.length>0?" "+s:s);continue}if(m=n(f),!m){s=c+(s.length>0?" "+s:s);continue}h=!1}let v=hxr(u).join(":"),g=d?v+Flt:v,y=g+m;if(a.includes(y))continue;a.push(y);let x=o(m,h);for(let w=0;w<x.length;++w){let b=x[w];a.push(g+b)}s=c+(s.length>0?" "+s:s)}return s};function xxr(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Blt(t))&&(n&&(n+=" "),n+=r);return n}var Blt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Blt(e[n]))&&(r&&(r+=" "),r+=t);return r};function bxr(e,...t){let r,n,o,a=i;function i(l){let c=t.reduce((u,d)=>d(u),e());return r=gxr(c),n=r.cache.get,o=r.cache.set,a=s,s(l)}function s(l){let c=n(l);if(c)return c;let u=yxr(l,r);return o(l,u),u}return function(){return a(xxr.apply(null,arguments))}}var ui=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Vlt=/^\[(?:([a-z-]+):)?(.+)\]$/i,wxr=/^\d+\/\d+$/,Cxr=new Set(["px","full","screen"]),Sxr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Pxr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ixr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,kxr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Rxr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,X0=e=>HA(e)||Cxr.has(e)||wxr.test(e),hS=e=>jA(e,"length",Oxr),HA=e=>!!e&&!Number.isNaN(Number(e)),vye=e=>jA(e,"number",HA),mV=e=>!!e&&Number.isInteger(Number(e)),Nxr=e=>e.endsWith("%")&&HA(e.slice(0,-1)),mn=e=>Vlt.test(e),gS=e=>Sxr.test(e),Txr=new Set(["length","size","percentage"]),Mxr=e=>jA(e,Txr,Ult),Exr=e=>jA(e,"position",Ult),Axr=new Set(["image","url"]),Lxr=e=>jA(e,Axr,Fxr),Dxr=e=>jA(e,"",_xr),hV=()=>!0,jA=(e,t,r)=>{let n=Vlt.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1},Oxr=e=>Pxr.test(e)&&!Ixr.test(e),Ult=()=>!1,_xr=e=>kxr.test(e),Fxr=e=>Rxr.test(e);var Bxr=()=>{let e=ui("colors"),t=ui("spacing"),r=ui("blur"),n=ui("brightness"),o=ui("borderColor"),a=ui("borderRadius"),i=ui("borderSpacing"),s=ui("borderWidth"),l=ui("contrast"),c=ui("grayscale"),u=ui("hueRotate"),d=ui("invert"),f=ui("gap"),p=ui("gradientColorStops"),h=ui("gradientColorStopPositions"),m=ui("inset"),v=ui("margin"),g=ui("opacity"),y=ui("padding"),x=ui("saturate"),w=ui("scale"),b=ui("sepia"),C=ui("skew"),S=ui("space"),P=ui("translate"),T=()=>["auto","contain","none"],L=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",mn,t],N=()=>[mn,t],V=()=>["",X0,hS],_=()=>["auto",HA,mn],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],R=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",mn],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[HA,mn];return{cacheSize:500,separator:":",theme:{colors:[hV],spacing:[X0,hS],blur:["none","",gS,mn],brightness:U(),borderColor:[e],borderRadius:["none","","full",gS,mn],borderSpacing:N(),borderWidth:V(),contrast:U(),grayscale:O(),hueRotate:U(),invert:O(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[Nxr,hS],inset:M(),margin:M(),opacity:U(),padding:N(),saturate:U(),scale:U(),sepia:O(),skew:U(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",mn]}],container:["container"],columns:[{columns:[gS]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),mn]}],overflow:[{overflow:L()}],"overflow-x":[{"overflow-x":L()}],"overflow-y":[{"overflow-y":L()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",mV,mn]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",mn]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",mV,mn]}],"grid-cols":[{"grid-cols":[hV]}],"col-start-end":[{col:["auto",{span:["full",mV,mn]},mn]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[hV]}],"row-start-end":[{row:["auto",{span:[mV,mn]},mn]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",mn]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",mn]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...E()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",mn,t]}],"min-w":[{"min-w":[mn,t,"min","max","fit"]}],"max-w":[{"max-w":[mn,t,"none","full","min","max","fit","prose",{screen:[gS]},gS]}],h:[{h:[mn,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[mn,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[mn,t,"auto","min","max","fit"]}],"font-size":[{text:["base",gS,hS]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",vye]}],"font-family":[{font:[hV]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",mn]}],"line-clamp":[{"line-clamp":["none",HA,vye]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",X0,mn]}],"list-image":[{"list-image":["none",mn]}],"list-style-type":[{list:["none","disc","decimal",mn]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",X0,hS]}],"underline-offset":[{"underline-offset":["auto",X0,mn]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",mn]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",mn]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Exr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Mxr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Lxr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:k()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[X0,mn]}],"outline-w":[{outline:[X0,hS]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[X0,hS]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",gS,Dxr]}],"shadow-color":[{shadow:[hV]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...R(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":R()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",gS,mn]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[x]}],sepia:[{sepia:[b]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[b]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",mn]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",mn]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",mn]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[mV,mn]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",mn]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",mn]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",mn]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[X0,hS,vye]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var zlt=bxr(Bxr);var W=A(Qn(),1);var Hlt=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,jlt=XX,Kn=(e,t)=>r=>{var n;if(t?.variants==null)return jlt(e,r?.class,r?.className);let{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(c=>{let u=r?.[c],d=a?.[c];if(u===null)return null;let f=Hlt(u)||Hlt(d);return o[c][f]}),s=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...p}=u;return Object.entries(p).every(h=>{let[m,v]=h;return Array.isArray(v)?v.includes({...a,...s}[m]):{...a,...s}[m]===v})?[...c,d,f]:c},[]);return jlt(e,i,l,r?.class,r?.className)};var gh=A(bt(),1);var $A=A(bt(),1);function di(e){let t=$A.useRef(e);return $A.useEffect(()=>{t.current=e}),$A.useMemo(()=>(...r)=>t.current?.(...r),[])}var Klt=A(Glt(),1);function Xlt(){return(0,Klt.useSyncExternalStore)(Kxr,()=>!0,()=>!1)}function Kxr(){return()=>{}}var gV=A(Qn(),1),wye="Avatar",[Xxr,oXn]=Co(wye),[Yxr,Qlt]=Xxr(wye),Zlt=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,...n}=e,[o,a]=gh.useState("idle");return(0,gV.jsx)(Yxr,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:(0,gV.jsx)(wt.span,{...n,ref:t})})});Zlt.displayName=wye;var Jlt="AvatarImage",ect=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...a}=e,i=Qlt(Jlt,r),s=Qxr(n,a),l=di(c=>{o(c),i.onImageLoadingStatusChange(c)});return Mo(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?(0,gV.jsx)(wt.img,{...a,ref:t,src:n}):null});ect.displayName=Jlt;var tct="AvatarFallback",rct=gh.forwardRef((e,t)=>{let{__scopeAvatar:r,delayMs:n,...o}=e,a=Qlt(tct,r),[i,s]=gh.useState(n===void 0);return gh.useEffect(()=>{if(n!==void 0){let l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),i&&a.imageLoadingStatus!=="loaded"?(0,gV.jsx)(wt.span,{...o,ref:t}):null});rct.displayName=tct;function Ylt(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function Qxr(e,{referrerPolicy:t,crossOrigin:r}){let n=Xlt(),o=gh.useRef(null),a=(()=>n?(o.current||(o.current=new window.Image),o.current):null)(),[i,s]=gh.useState(()=>Ylt(a,e));return Mo(()=>{s(Ylt(a,e))},[a,e]),Mo(()=>{let l=d=>()=>{s(d)};if(!a)return;let c=l("loaded"),u=l("error");return a.addEventListener("load",c),a.addEventListener("error",u),t&&(a.referrerPolicy=t),typeof r=="string"&&(a.crossOrigin=r),()=>{a.removeEventListener("load",c),a.removeEventListener("error",u)}},[a,r,t]),i}var Cye=Zlt,Sye=ect,Pye=rct;var e5=A(Qn(),1),Wy=A(bt(),1);var nct=A(bt(),1),qA=(0,nct.createContext)({});var oct=A(bt(),1);function Hy(e){let t=(0,oct.useRef)(null);return t.current===null&&(t.current=e()),t.current}var YX=A(bt(),1);var GA=typeof window<"u";var KA=GA?YX.useLayoutEffect:YX.useEffect;var oxe=A(Qn(),1),iut=A(bt(),1),ZV=A(bt(),1);var act=A(bt(),1),vS=(0,act.createContext)(null);var out=A(Qn(),1);function dk(e,t){e.indexOf(t)===-1&&e.push(t)}function Hg(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var hc=(e,t,r)=>r>t?t:r<e?e:r;var Y0=()=>{},Gc=()=>{};var Mu={};var vV=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);function yV(e){return typeof e=="object"&&e!==null}var xV=e=>/^0[^.\s]+$/u.test(e);function fk(e){let t;return()=>(t===void 0&&(t=e()),t)}var es=e=>e;var Jxr=(e,t)=>r=>t(e(r)),jg=(...e)=>e.reduce(Jxr);var vh=(e,t,r)=>{let n=t-e;return n===0?1:(r-e)/n};var Q0=class{constructor(){this.subscriptions=[]}add(t){return dk(this.subscriptions,t),()=>Hg(this.subscriptions,t)}notify(t,r,n){let o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,r,n);else for(let a=0;a<o;a++){let i=this.subscriptions[a];i&&i(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var Os=e=>e*1e3,Kc=e=>e/1e3;function bV(e,t){return t?e*(1e3/t):0}var ict=(e,t,r)=>{let n=t-e;return((r-e)%n+n)%n+e};var sct=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,e0r=1e-7,t0r=12;function r0r(e,t,r,n,o){let a,i,s=0;do i=t+(r-t)/2,a=sct(i,n,o)-e,a>0?r=i:t=i;while(Math.abs(a)>e0r&&++s<t0r);return i}function yS(e,t,r,n){if(e===t&&r===n)return es;let o=a=>r0r(a,0,1,e,r);return a=>a===0||a===1?a:sct(o(a),t,n)}var QX=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var ZX=e=>t=>1-e(1-t);var JX=yS(.33,1.53,.69,.99),XA=ZX(JX),wV=QX(XA);var CV=e=>(e*=2)<1?.5*XA(e):.5*(2-Math.pow(2,-10*(e-1)));var SV=e=>1-Math.sin(Math.acos(e)),PV=ZX(SV),IV=QX(SV);var Iye=yS(.42,0,1,1),kye=yS(0,0,.58,1),kV=yS(.42,0,.58,1);var RV=e=>Array.isArray(e)&&typeof e[0]!="number";function NV(e,t){return RV(e)?e[ict(0,e.length,t)]:e}var TV=e=>Array.isArray(e)&&typeof e[0]=="number";var lct={linear:es,easeIn:Iye,easeInOut:kV,easeOut:kye,circIn:SV,circInOut:IV,circOut:PV,backIn:XA,backInOut:wV,backOut:JX,anticipate:CV},n0r=e=>typeof e=="string",eY=e=>{if(TV(e)){Gc(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,n,o]=e;return yS(t,r,n,o)}else if(n0r(e))return Gc(lct[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),lct[e];return e};var MV=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Mf={value:null,addProjectionMetrics:null};function cct(e,t){let r=new Set,n=new Set,o=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function c(d){i.has(d)&&(u.schedule(d),e()),l++,d(s)}let u={schedule:(d,f=!1,p=!1)=>{let m=p&&o?r:n;return f&&i.add(d),m.has(d)||m.add(d),d},cancel:d=>{n.delete(d),i.delete(d)},process:d=>{if(s=d,o){a=!0;return}o=!0,[r,n]=[n,r],r.forEach(c),t&&Mf.value&&Mf.value.frameloop[t].push(l),l=0,r.clear(),o=!1,a&&(a=!1,u.process(d))}};return u}var o0r=40;function tY(e,t){let r=!1,n=!0,o={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=MV.reduce((x,w)=>(x[w]=cct(a,t?w:void 0),x),{}),{setup:s,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:f,render:p,postRender:h}=i,m=()=>{let x=Mu.useManualTiming?o.timestamp:performance.now();r=!1,Mu.useManualTiming||(o.delta=n?1e3/60:Math.max(Math.min(x-o.timestamp,o0r),1)),o.timestamp=x,o.isProcessing=!0,s.process(o),l.process(o),c.process(o),u.process(o),d.process(o),f.process(o),p.process(o),h.process(o),o.isProcessing=!1,r&&t&&(n=!1,e(m))},v=()=>{r=!0,n=!0,o.isProcessing||e(m)};return{schedule:MV.reduce((x,w)=>{let b=i[w];return x[w]=(C,S=!1,P=!1)=>(r||v(),b.schedule(C,S,P)),x},{}),cancel:x=>{for(let w=0;w<MV.length;w++)i[MV[w]].cancel(x)},state:o,steps:i}}var{schedule:hn,cancel:Eu,state:bs,steps:EV}=tY(typeof requestAnimationFrame<"u"?requestAnimationFrame:es,!0);var rY;function a0r(){rY=void 0}var ws={now:()=>(rY===void 0&&ws.set(bs.isProcessing||Mu.useManualTiming?bs.timestamp:performance.now()),rY),set:e=>{rY=e,queueMicrotask(a0r)}};var $g={layout:0,mainThread:0,waapi:0};var uct=e=>t=>typeof t=="string"&&t.startsWith(e),pk=uct("--"),i0r=uct("var(--"),mk=e=>i0r(e)?s0r.test(e.split("/*")[0].trim()):!1,s0r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;var jy={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Z0={...jy,transform:e=>hc(0,1,e)},AV={...jy,default:1};var xS=e=>Math.round(e*1e5)/1e5;var YA=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function dct(e){return e==null}var fct=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var QA=(e,t)=>r=>!!(typeof r=="string"&&fct.test(r)&&r.startsWith(e)||t&&!dct(r)&&Object.prototype.hasOwnProperty.call(r,t)),nY=(e,t,r)=>n=>{if(typeof n!="string")return n;let[o,a,i,s]=n.match(YA);return{[e]:parseFloat(o),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var l0r=e=>hc(0,255,e),Rye={...jy,transform:e=>Math.round(l0r(e))},$y={test:QA("rgb","red"),parse:nY("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Rye.transform(e)+", "+Rye.transform(t)+", "+Rye.transform(r)+", "+xS(Z0.transform(n))+")"};function c0r(e){let t="",r="",n="",o="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),o=e.substring(4,5),t+=t,r+=r,n+=n,o+=o),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:o?parseInt(o,16)/255:1}}var LV={test:QA("#"),parse:c0r,transform:$y.transform};var DV=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Wg=DV("deg"),Au=DV("%"),hr=DV("px"),Nye=DV("vh"),Tye=DV("vw"),oY=(()=>({...Au,parse:e=>Au.parse(e)/100,transform:e=>Au.transform(e*100)}))();var bS={test:QA("hsl","hue"),parse:nY("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Au.transform(xS(t))+", "+Au.transform(xS(r))+", "+xS(Z0.transform(n))+")"};var Li={test:e=>$y.test(e)||LV.test(e)||bS.test(e),parse:e=>$y.test(e)?$y.parse(e):bS.test(e)?bS.parse(e):LV.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?$y.transform(e):bS.transform(e),getAnimatableNone:e=>{let t=Li.parse(e);return t.alpha=0,Li.transform(t)}};var pct=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function u0r(e){return isNaN(e)&&typeof e=="string"&&(e.match(YA)?.length||0)+(e.match(pct)?.length||0)>0}var hct="number",gct="color",d0r="var",f0r="var(",mct="${}",p0r=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function wS(e){let t=e.toString(),r=[],n={color:[],number:[],var:[]},o=[],a=0,s=t.replace(p0r,l=>(Li.test(l)?(n.color.push(a),o.push(gct),r.push(Li.parse(l))):l.startsWith(f0r)?(n.var.push(a),o.push(d0r),r.push(l)):(n.number.push(a),o.push(hct),r.push(parseFloat(l))),++a,mct)).split(mct);return{values:r,split:s,indexes:n,types:o}}function vct(e){return wS(e).values}function yct(e){let{split:t,types:r}=wS(e),n=t.length;return o=>{let a="";for(let i=0;i<n;i++)if(a+=t[i],o[i]!==void 0){let s=r[i];s===hct?a+=xS(o[i]):s===gct?a+=Li.transform(o[i]):a+=o[i]}return a}}var m0r=e=>typeof e=="number"?0:Li.test(e)?Li.getAnimatableNone(e):e;function h0r(e){let t=vct(e);return yct(e)(t.map(m0r))}var Lu={test:u0r,parse:vct,createTransformer:yct,getAnimatableNone:h0r};function Mye(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function xct({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let o=0,a=0,i=0;if(!t)o=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;o=Mye(l,s,e+1/3),a=Mye(l,s,e),i=Mye(l,s,e-1/3)}return{red:Math.round(o*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:n}}function ZA(e,t){return r=>r>0?t:e}var Vn=(e,t,r)=>e+(t-e)*r;var Eye=(e,t,r)=>{let n=e*e,o=r*(t*t-n)+n;return o<0?0:Math.sqrt(o)},g0r=[LV,$y,bS],v0r=e=>g0r.find(t=>t.test(e));function bct(e){let t=v0r(e);if(Y0(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===bS&&(r=xct(r)),r}var Aye=(e,t)=>{let r=bct(e),n=bct(t);if(!r||!n)return ZA(e,t);let o={...r};return a=>(o.red=Eye(r.red,n.red,a),o.green=Eye(r.green,n.green,a),o.blue=Eye(r.blue,n.blue,a),o.alpha=Vn(r.alpha,n.alpha,a),$y.transform(o))};var aY=new Set(["none","hidden"]);function wct(e,t){return aY.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function y0r(e,t){return r=>Vn(e,t,r)}function iY(e){return typeof e=="number"?y0r:typeof e=="string"?mk(e)?ZA:Li.test(e)?Aye:w0r:Array.isArray(e)?Cct:typeof e=="object"?Li.test(e)?Aye:x0r:ZA}function Cct(e,t){let r=[...e],n=r.length,o=e.map((a,i)=>iY(a)(a,t[i]));return a=>{for(let i=0;i<n;i++)r[i]=o[i](a);return r}}function x0r(e,t){let r={...e,...t},n={};for(let o in r)e[o]!==void 0&&t[o]!==void 0&&(n[o]=iY(e[o])(e[o],t[o]));return o=>{for(let a in n)r[a]=n[a](o);return r}}function b0r(e,t){let r=[],n={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){let a=t.types[o],i=e.indexes[a][n[a]],s=e.values[i]??0;r[o]=s,n[a]++}return r}var w0r=(e,t)=>{let r=Lu.createTransformer(t),n=wS(e),o=wS(t);return n.indexes.var.length===o.indexes.var.length&&n.indexes.color.length===o.indexes.color.length&&n.indexes.number.length>=o.indexes.number.length?aY.has(e)&&!o.values.length||aY.has(t)&&!n.values.length?wct(e,t):jg(Cct(b0r(n,o),o.values),r):(Y0(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),ZA(e,t))};function sY(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?Vn(e,t,r):iY(e)(e,t)}var Sct=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>hn.update(t,r),stop:()=>Eu(t),now:()=>bs.isProcessing?bs.timestamp:ws.now()}};var lY=(e,t,r=10)=>{let n="",o=Math.max(Math.round(t/r),2);for(let a=0;a<o;a++)n+=Math.round(e(a/(o-1))*1e4)/1e4+", ";return`linear(${n.substring(0,n.length-2)})`};function JA(e){let t=0,r=50,n=e.next(t);for(;!n.done&&t<2e4;)t+=r,n=e.next(t);return t>=2e4?1/0:t}function OV(e,t=100,r){let n=r({...e,keyframes:[0,t]}),o=Math.min(JA(n),2e4);return{type:"keyframes",ease:a=>n.next(o*a).value/t,duration:Kc(o)}}var C0r=5;function cY(e,t,r){let n=Math.max(t-C0r,0);return bV(r-e(n),t-n)}var fi={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};var Dye=.001;function Pct({duration:e=fi.duration,bounce:t=fi.bounce,velocity:r=fi.velocity,mass:n=fi.mass}){let o,a;Y0(e<=Os(fi.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=hc(fi.minDamping,fi.maxDamping,i),e=hc(fi.minDuration,fi.maxDuration,Kc(e)),i<1?(o=c=>{let u=c*i,d=u*e,f=u-r,p=uY(c,i),h=Math.exp(-d);return Dye-f/p*h},a=c=>{let d=c*i*e,f=d*r+r,p=Math.pow(i,2)*Math.pow(c,2)*e,h=Math.exp(-d),m=uY(Math.pow(c,2),i);return(-o(c)+Dye>0?-1:1)*((f-p)*h)/m}):(o=c=>{let u=Math.exp(-c*e),d=(c-r)*e+1;return-Dye+u*d},a=c=>{let u=Math.exp(-c*e),d=(r-c)*(e*e);return u*d});let s=5/e,l=P0r(o,a,s);if(e=Os(e),isNaN(l))return{stiffness:fi.stiffness,damping:fi.damping,duration:e};{let c=Math.pow(l,2)*n;return{stiffness:c,damping:i*2*Math.sqrt(n*c),duration:e}}}var S0r=12;function P0r(e,t,r){let n=r;for(let o=1;o<S0r;o++)n=n-e(n)/t(n);return n}function uY(e,t){return e*Math.sqrt(1-t*t)}var I0r=["duration","bounce"],k0r=["stiffness","damping","mass"];function Ict(e,t){return t.some(r=>e[r]!==void 0)}function R0r(e){let t={velocity:fi.velocity,stiffness:fi.stiffness,damping:fi.damping,mass:fi.mass,isResolvedFromDuration:!1,...e};if(!Ict(e,k0r)&&Ict(e,I0r))if(e.visualDuration){let r=e.visualDuration,n=2*Math.PI/(r*1.2),o=n*n,a=2*hc(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fi.mass,stiffness:o,damping:a}}else{let r=Pct(e);t={...t,...r,mass:fi.mass},t.isResolvedFromDuration=!0}return t}function J0(e=fi.visualDuration,t=fi.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:n,restDelta:o}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=R0r({...r,velocity:-Kc(r.velocity||0)}),h=f||0,m=c/(2*Math.sqrt(l*u)),v=i-a,g=Kc(Math.sqrt(l/u)),y=Math.abs(v)<5;n||(n=y?fi.restSpeed.granular:fi.restSpeed.default),o||(o=y?fi.restDelta.granular:fi.restDelta.default);let x;if(m<1){let b=uY(g,m);x=C=>{let S=Math.exp(-m*g*C);return i-S*((h+m*g*v)/b*Math.sin(b*C)+v*Math.cos(b*C))}}else if(m===1)x=b=>i-Math.exp(-g*b)*(v+(h+g*v)*b);else{let b=g*Math.sqrt(m*m-1);x=C=>{let S=Math.exp(-m*g*C),P=Math.min(b*C,300);return i-S*((h+m*g*v)*Math.sinh(P)+b*v*Math.cosh(P))/b}}let w={calculatedDuration:p&&d||null,next:b=>{let C=x(b);if(p)s.done=b>=d;else{let S=b===0?h:0;m<1&&(S=b===0?Os(h):cY(x,b,C));let P=Math.abs(S)<=n,T=Math.abs(i-C)<=o;s.done=P&&T}return s.value=s.done?i:C,s},toString:()=>{let b=Math.min(JA(w),2e4),C=lY(S=>w.next(b*S).value,b,30);return b+"ms "+C},toTransition:()=>{}};return w}J0.applyToOptions=e=>{let t=OV(e,100,J0);return e.ease=t.ease,e.duration=Os(t.duration),e.type="keyframes",e};function _V({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:o=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:c=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=P=>s!==void 0&&P<s||l!==void 0&&P>l,h=P=>s===void 0?l:l===void 0||Math.abs(s-P)<Math.abs(l-P)?s:l,m=r*t,v=d+m,g=i===void 0?v:i(v);g!==v&&(m=g-d);let y=P=>-m*Math.exp(-P/n),x=P=>g+y(P),w=P=>{let T=y(P),L=x(P);f.done=Math.abs(T)<=c,f.value=f.done?g:L},b,C,S=P=>{p(f.value)&&(b=P,C=J0({keyframes:[f.value,h(f.value)],velocity:cY(x,P,f.value),damping:o,stiffness:a,restDelta:c,restSpeed:u}))};return S(0),{calculatedDuration:null,next:P=>{let T=!1;return!C&&b===void 0&&(T=!0,w(P),S(P)),b!==void 0&&P>=b?C.next(P-b):(!T&&w(P),f)}}}function N0r(e,t,r){let n=[],o=r||Mu.mix||sY,a=e.length-1;for(let i=0;i<a;i++){let s=o(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||es:t;s=jg(l,s)}n.push(s)}return n}function dY(e,t,{clamp:r=!0,ease:n,mixer:o}={}){let a=e.length;if(Gc(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=N0r(t,n,o),l=s.length,c=u=>{if(i&&u<e[0])return t[0];let d=0;if(l>1)for(;d<e.length-2&&!(u<e[d+1]);d++);let f=vh(e[d],e[d+1],u);return s[d](f)};return r?u=>c(hc(e[0],e[a-1],u)):c}function FV(e,t){let r=e[e.length-1];for(let n=1;n<=t;n++){let o=vh(0,t,n);e.push(Vn(r,1,o))}}function BV(e){let t=[0];return FV(t,e.length-1),t}function kct(e,t){return e.map(r=>r*t)}function T0r(e,t){return e.map(()=>t||kV).splice(0,e.length-1)}function hk({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){let o=RV(n)?n.map(eY):eY(n),a={done:!1,value:t[0]},i=kct(r&&r.length===t.length?r:BV(t),e),s=dY(i,t,{ease:Array.isArray(o)?o:T0r(t,o)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var M0r=e=>e!==null;function eL(e,{repeat:t,repeatType:r="loop"},n,o=1){let a=e.filter(M0r),s=o<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||n===void 0?a[s]:n}var E0r={decay:_V,inertia:_V,tween:hk,keyframes:hk,spring:J0};function fY(e){typeof e.type=="string"&&(e.type=E0r[e.type])}var CS=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var A0r=e=>e/100,eb=class extends CS{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==ws.now()&&this.tick(ws.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},$g.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;fY(t);let{type:r=hk,repeat:n=0,repeatDelay:o=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||hk;l!==hk&&typeof s[0]!="number"&&(this.mixKeyframes=jg(A0r,sY(s[0],s[1])),s=[0,100]);let c=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),c.calculatedDuration===null&&(c.calculatedDuration=JA(c));let{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+o,this.totalDuration=this.resolvedDuration*(n+1)-o,this.generator=c}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:n,totalDuration:o,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:u,repeat:d,repeatType:f,repeatDelay:p,type:h,onUpdate:m,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),y=this.playbackSpeed>=0?g<0:g>o;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);let x=this.currentTime,w=n;if(d){let P=Math.min(this.currentTime,o)/s,T=Math.floor(P),L=P%1;!L&&P>=1&&(L=1),L===1&&T--,T=Math.min(T,d+1),!!(T%2)&&(f==="reverse"?(L=1-L,p&&(L-=p/s)):f==="mirror"&&(w=i)),x=hc(0,1,L)*s}let b=y?{done:!1,value:u[0]}:w.next(x);a&&(b.value=a(b.value));let{done:C}=b;!y&&l!==null&&(C=this.playbackSpeed>=0?this.currentTime>=o:this.currentTime<=0);let S=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return S&&h!==_V&&(b.value=eL(u,this.options,v,this.speed)),m&&m(b.value),S&&this.finish(),b}then(t,r){return this.finished.then(t,r)}get duration(){return Kc(this.calculatedDuration)}get time(){return Kc(this.currentTime)}set time(t){t=Os(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(t){this.updateTime(ws.now());let r=this.playbackSpeed!==t;this.playbackSpeed=t,r&&(this.time=Kc(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=Sct,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();let n=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=n):this.holdTime!==null?this.startTime=n-this.holdTime:this.startTime||(this.startTime=r??n),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ws.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,$g.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function Rct(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var gk=e=>e*180/Math.PI,Oye=e=>{let t=gk(Math.atan2(e[1],e[0]));return _ye(t)},L0r={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Oye,rotateZ:Oye,skewX:e=>gk(Math.atan(e[1])),skewY:e=>gk(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},_ye=e=>(e=e%360,e<0&&(e+=360),e),Nct=Oye,Tct=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Mct=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),D0r={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Tct,scaleY:Mct,scale:e=>(Tct(e)+Mct(e))/2,rotateX:e=>_ye(gk(Math.atan2(e[6],e[5]))),rotateY:e=>_ye(gk(Math.atan2(-e[2],e[0]))),rotateZ:Nct,rotate:Nct,skewX:e=>gk(Math.atan(e[4])),skewY:e=>gk(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function VV(e){return e.includes("scale")?1:0}function UV(e,t){if(!e||e==="none")return VV(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),n,o;if(r)n=D0r,o=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);n=L0r,o=s}if(!o)return VV(t);let a=n[t],i=o[1].split(",").map(O0r);return typeof a=="function"?a(i):i[a]}var Fye=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return UV(r,t)};function O0r(e){return parseFloat(e.trim())}var qg=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],$p=(()=>new Set(qg))();var Bye=e=>e===jy||e===hr,_0r=new Set(["x","y","z"]),F0r=qg.filter(e=>!_0r.has(e));function Ect(e){let t=[];return F0r.forEach(r=>{let n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t}var SS={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>UV(t,"x"),y:(e,{transform:t})=>UV(t,"y")};SS.translateX=SS.x;SS.translateY=SS.y;var vk=new Set,Vye=!1,Uye=!1,zye=!1;function Act(){if(Uye){let e=Array.from(vk).filter(n=>n.needsMeasurement),t=new Set(e.map(n=>n.element)),r=new Map;t.forEach(n=>{let o=Ect(n);o.length&&(r.set(n,o),n.render())}),e.forEach(n=>n.measureInitialState()),t.forEach(n=>{n.render();let o=r.get(n);o&&o.forEach(([a,i])=>{n.getValue(a)?.set(i)})}),e.forEach(n=>n.measureEndState()),e.forEach(n=>{n.suspendedScrollY!==void 0&&window.scrollTo(0,n.suspendedScrollY)})}Uye=!1,Vye=!1,vk.forEach(e=>e.complete(zye)),vk.clear()}function Lct(){vk.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Uye=!0)})}function Hye(){zye=!0,Lct(),Act(),zye=!1}var tb=class{constructor(t,r,n,o,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=n,this.motionValue=o,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(vk.add(this),Vye||(Vye=!0,hn.read(Lct),hn.resolveKeyframes(Act))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:n,motionValue:o}=this;if(t[0]===null){let a=o?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(n&&r){let s=n.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),o&&a===void 0&&o.set(t[0])}Rct(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),vk.delete(this)}cancel(){this.state==="scheduled"&&(vk.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var Dct=e=>e.startsWith("--");function Oct(e,t,r){Dct(t)?e.style.setProperty(t,r):e.style[t]=r}var _ct=fk(()=>window.ScrollTimeline!==void 0);var Fct={};function Bct(e,t){let r=fk(e);return()=>Fct[t]??r()}var pY=Bct(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var yk=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`;var jye={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:yk([0,.65,.55,1]),circOut:yk([.55,0,1,.45]),backIn:yk([.31,.01,.66,-.59]),backOut:yk([.33,1.53,.69,.99])};function $ye(e,t){if(e)return typeof e=="function"?pY()?lY(e,t):"ease-out":TV(e)?yk(e):Array.isArray(e)?e.map(r=>$ye(r,t)||jye.easeOut):jye[e]}function Vct(e,t,r,{delay:n=0,duration:o=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},c=void 0){let u={[t]:r};l&&(u.offset=l);let d=$ye(s,o);Array.isArray(d)&&(u.easing=d),Mf.value&&$g.waapi++;let f={delay:n,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};c&&(f.pseudoElement=c);let p=e.animate(u,f);return Mf.value&&p.finished.finally(()=>{$g.waapi--}),p}function xk(e){return typeof e=="function"&&"applyToOptions"in e}function Uct({type:e,...t}){return xk(e)&&pY()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var mY=class extends CS{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,!t)return;let{element:r,name:n,keyframes:o,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Gc(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let c=Uct(t);this.animation=Vct(r,n,o,c,a),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let u=eL(o,this.options,s,this.speed);this.updateMotionValue?this.updateMotionValue(u):Oct(r,n,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return Kc(Number(t))}get time(){return Kc(Number(this.animation.currentTime)||0)}set time(t){this.finishedTime=null,this.animation.currentTime=Os(t)}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(t){this.animation.startTime=t}attachTimeline({timeline:t,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&_ct()?(this.animation.timeline=t,es):r(this)}};var zct={anticipate:CV,backInOut:wV,circInOut:IV};function B0r(e){return e in zct}function Hct(e){typeof e.ease=="string"&&B0r(e.ease)&&(e.ease=zct[e.ease])}var jct=10,hY=class extends mY{constructor(t){Hct(t),fY(t),super(t),t.startTime&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:n,onComplete:o,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new eb({...i,autoplay:!1}),l=Os(this.finishedTime??this.time);r.setWithVelocity(s.sample(l-jct).value,s.sample(l).value,jct),s.stop()}};var Wye=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lu.test(e)||e==="0")&&!e.startsWith("url("));function V0r(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function $ct(e,t,r,n){let o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=Wye(o,t),s=Wye(a,t);return Y0(i===s,`You are trying to animate ${t} from "${o}" to "${a}". "${i?a:o}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:V0r(e)||(r==="spring"||xk(r))&&n}function tL(e){e.duration=0,e.type}var U0r=new Set(["opacity","clipPath","filter","transform"]),z0r=fk(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function Wct(e){let{motionValue:t,name:r,repeatDelay:n,repeatType:o,damping:a,type:i}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:l,transformTemplate:c}=t.owner.getProps();return z0r()&&r&&U0r.has(r)&&(r!=="transform"||!c)&&!l&&!n&&o!=="mirror"&&a!==0&&i!=="inertia"}var H0r=40,zV=class extends CS{constructor({autoplay:t=!0,delay:r=0,type:n="keyframes",repeat:o=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:c,element:u,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=ws.now();let f={autoplay:t,delay:r,type:n,repeat:o,repeatDelay:a,repeatType:i,name:l,motionValue:c,element:u,...d},p=u?.KeyframeResolver||tb;this.keyframeResolver=new p(s,(h,m,v)=>this.onKeyframesResolved(h,m,f,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,n,o){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:c,onUpdate:u}=n;this.resolvedAt=ws.now(),$ct(t,a,i,s)||((Mu.instantAnimations||!l)&&u?.(eL(t,n,r)),t[0]=t[t.length-1],tL(n),n.repeat=0);let f={startTime:o?this.resolvedAt?this.resolvedAt-this.createdAt>H0r?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...n,keyframes:t},p=!c&&Wct(f)?new hY({...f,element:f.motionValue.owner.current}):new eb(f);p.finished.then(()=>this.notifyFinished()).catch(es),this.pendingTimeline&&(this.stopTimeline=p.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=p}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Hye()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};var gY=class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,r){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=r}attachTimeline(t){let r=this.animations.map(n=>n.attachTimeline(t));return()=>{r.forEach((n,o)=>{n&&n(),this.animations[o].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let r=0;r<this.animations.length;r++)t=Math.max(t,this.animations[r].duration);return t}runAll(t){this.animations.forEach(r=>r[t]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}};var HV=class extends gY{then(t,r){return this.finished.finally(t).then(()=>{})}};var j0r=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function $0r(e){let t=j0r.exec(e);if(!t)return[,];let[,r,n,o]=t;return[`--${r??n}`,o]}var W0r=4;function qye(e,t,r=1){Gc(r<=W0r,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[n,o]=$0r(e);if(!n)return;let a=window.getComputedStyle(t).getPropertyValue(n);if(a){let i=a.trim();return vV(i)?parseFloat(i):i}return mk(o)?qye(o,t,r+1):o}function bk(e,t){return e?.[t]??e?.default??e}var jV=new Set(["width","height","top","left","right","bottom",...qg]);var qct={test:e=>e==="auto",parse:e=>e};var vY=e=>t=>t.test(e);var Gye=[jy,hr,Au,Wg,Tye,Nye,qct],Kye=e=>Gye.find(vY(e));function Gct(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||xV(e):!0}var q0r=new Set(["brightness","contrast","saturate","opacity"]);function G0r(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[n]=r.match(YA)||[];if(!n)return e;let o=r.replace(n,""),a=q0r.has(t)?1:0;return n!==r&&(a*=100),t+"("+a+o+")"}var K0r=/\b([a-z-]*)\(.*?\)/gu,$V={...Lu,getAnimatableNone:e=>{let t=e.match(K0r);return t?t.map(G0r).join(" "):e}};var Xye={...jy,transform:Math.round};var Kct={rotate:Wg,rotateX:Wg,rotateY:Wg,rotateZ:Wg,scale:AV,scaleX:AV,scaleY:AV,scaleZ:AV,skew:Wg,skewX:Wg,skewY:Wg,distance:hr,translateX:hr,translateY:hr,translateZ:hr,x:hr,y:hr,z:hr,perspective:hr,transformPerspective:hr,opacity:Z0,originX:oY,originY:oY,originZ:hr};var wk={borderWidth:hr,borderTopWidth:hr,borderRightWidth:hr,borderBottomWidth:hr,borderLeftWidth:hr,borderRadius:hr,radius:hr,borderTopLeftRadius:hr,borderTopRightRadius:hr,borderBottomRightRadius:hr,borderBottomLeftRadius:hr,width:hr,maxWidth:hr,height:hr,maxHeight:hr,top:hr,right:hr,bottom:hr,left:hr,padding:hr,paddingTop:hr,paddingRight:hr,paddingBottom:hr,paddingLeft:hr,margin:hr,marginTop:hr,marginRight:hr,marginBottom:hr,marginLeft:hr,backgroundPositionX:hr,backgroundPositionY:hr,...Kct,zIndex:Xye,fillOpacity:Z0,strokeOpacity:Z0,numOctaves:Xye};var Xct={...wk,color:Li,backgroundColor:Li,outlineColor:Li,fill:Li,stroke:Li,borderColor:Li,borderTopColor:Li,borderRightColor:Li,borderBottomColor:Li,borderLeftColor:Li,filter:$V,WebkitFilter:$V},WV=e=>Xct[e];function qV(e,t){let r=WV(e);return r!==$V&&(r=Lu),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var X0r=new Set(["auto","none","0"]);function Yct(e,t,r){let n=0,o;for(;n<e.length&&!o;){let a=e[n];typeof a=="string"&&!X0r.has(a)&&wS(a).values.length&&(o=e[n]),n++}if(o&&r)for(let a of t)e[a]=qV(r,o)}var GV=class extends tb{constructor(t,r,n,o,a){super(t,r,n,o,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:n}=this;if(!r||!r.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),mk(c))){let u=qye(c,r.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!jV.has(n)||t.length!==2)return;let[o,a]=t,i=Kye(o),s=Kye(a);if(i!==s)if(Bye(i)&&Bye(s))for(let l=0;l<t.length;l++){let c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else SS[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,n=[];for(let o=0;o<t.length;o++)(t[o]===null||Gct(t[o]))&&n.push(o);n.length&&Yct(t,n,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:n}=this;if(!t||!t.current)return;n==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=SS[n](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let o=r[r.length-1];o!==void 0&&t.getValue(n,o).jump(o,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:n}=this;if(!t||!t.current)return;let o=t.getValue(r);o&&o.jump(this.measuredOrigin,!1);let a=n.length-1,i=n[a];n[a]=SS[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function KV(e,t,r){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let n=document;t&&(n=t.current);let o=r?.[e]??n.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}var XV=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function YV(e){return yV(e)&&"offsetHeight"in e}var Qct=30,Y0r=e=>!isNaN(parseFloat(e)),Ck={current:void 0},yY=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=n=>{let o=ws.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(n),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=ws.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Y0r(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Q0);let n=this.events[t].add(r);return t==="change"?()=>{n(),hn.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,n){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return Ck.current&&Ck.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=ws.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Qct)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,Qct);return bV(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Ef(e,t){return new yY(e,t)}var{schedule:Sk,cancel:Q0r}=tY(queueMicrotask,!1);var yh={x:!1,y:!1};function xY(){return yh.x||yh.y}function Yye(e){return e==="x"||e==="y"?yh[e]?null:(yh[e]=!0,()=>{yh[e]=!1}):yh.x||yh.y?null:(yh.x=yh.y=!0,()=>{yh.x=yh.y=!1})}function bY(e,t){let r=KV(e),n=new AbortController,o={passive:!0,...t,signal:n.signal};return[r,o,()=>n.abort()]}function Zct(e){return!(e.pointerType==="touch"||xY())}function Qye(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{if(!Zct(s))return;let{target:l}=s,c=t(l,s);if(typeof c!="function"||!l)return;let u=d=>{Zct(d)&&(c(d),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,o)};return n.forEach(s=>{s.addEventListener("pointerenter",i,o)}),a}var Zye=(e,t)=>t?e===t?!0:Zye(e,t.parentElement):!1;var Pk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var Z0r=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Jct(e){return Z0r.has(e.tagName)||e.tabIndex!==-1}var rL=new WeakSet;function eut(e){return t=>{t.key==="Enter"&&e(t)}}function Jye(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var tut=(e,t)=>{let r=e.currentTarget;if(!r)return;let n=eut(()=>{if(rL.has(r))return;Jye(r,"down");let o=eut(()=>{Jye(r,"up")}),a=()=>Jye(r,"cancel");r.addEventListener("keyup",o,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",n,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",n),t)};function rut(e){return Pk(e)&&!xY()}function exe(e,t,r={}){let[n,o,a]=bY(e,r),i=s=>{let l=s.currentTarget;if(!rut(s))return;rL.add(l);let c=t(l,s),u=(p,h)=>{window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",f),rL.has(l)&&rL.delete(l),rut(p)&&typeof c=="function"&&c(p,{success:h})},d=p=>{u(p,l===window||l===document||r.useGlobalTarget||Zye(l,p.target))},f=p=>{u(p,!1)};window.addEventListener("pointerup",d,o),window.addEventListener("pointercancel",f,o)};return n.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,o),YV(s)&&(s.addEventListener("focus",c=>tut(c,o)),!Jct(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function Ik(e){return yV(e)&&"ownerSVGElement"in e}function QV(e){return Ik(e)&&e.tagName==="svg"}function txe(...e){let t=!Array.isArray(e[0]),r=t?0:-1,n=e[0+r],o=e[1+r],a=e[2+r],i=e[3+r],s=dY(o,a,i);return t?s(n):s}var Eo=e=>!!(e&&e.getVelocity);var J0r=[...Gye,Li,Lu],rxe=e=>J0r.find(vY(e));var wY=A(bt(),1),rb=A(bt(),1);var nut=A(bt(),1),PS=(0,nut.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var nxe=class extends wY.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){let n=r.offsetParent,o=YV(n)&&n.offsetWidth||0,a=this.props.sizeRef.current;a.height=r.offsetHeight||0,a.width=r.offsetWidth||0,a.top=r.offsetTop,a.left=r.offsetLeft,a.right=o-a.width-a.left}return null}componentDidUpdate(){}render(){return this.props.children}};function aut({children:e,isPresent:t,anchorX:r,root:n}){let o=(0,rb.useId)(),a=(0,rb.useRef)(null),i=(0,rb.useRef)({width:0,height:0,top:0,left:0,right:0}),{nonce:s}=(0,rb.useContext)(PS);return(0,rb.useInsertionEffect)(()=>{let{width:l,height:c,top:u,left:d,right:f}=i.current;if(t||!a.current||!l||!c)return;let p=r==="left"?`left: ${d}`:`right: ${f}`;a.current.dataset.motionPopId=o;let h=document.createElement("style");s&&(h.nonce=s);let m=n??document.head;return m.appendChild(h),h.sheet&&h.sheet.insertRule(`
415
415
  [data-motion-pop-id="${o}"] {
416
416
  position: absolute !important;
417
417
  width: ${l}px !important;