@moontra/moonui-pro 2.33.28 → 2.33.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cdn/index.global.js
CHANGED
|
@@ -117,7 +117,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
117
117
|
- less than the value passed to \`max\` (or ${Gq} if no \`max\` prop is set)
|
|
118
118
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
119
119
|
|
|
120
|
-
Defaulting to \`null\`.`}var Kq=Gge,Jge=Yge;var Yq=A(ae(),1),oo=Qge.forwardRef(({className:e,value:t,...r},n)=>(0,Yq.jsx)(Kq,{ref:n,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,Yq.jsx)(Jge,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));oo.displayName=Kq.displayName;var af=A(le(),1);var Zu=A(ae(),1),gF=ot("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"}}),ST=af.createContext({}),nx=af.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,Zu.jsx)(ST.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,Zu.jsx)("div",{ref:i,role:"radiogroup",className:M("grid gap-2",e),...a})}));nx.displayName="RadioGroupPro";var vg=af.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=af.useContext(ST),u=af.useId(),d=o||u,f=c.value===a,p=m=>{c.onValueChange&&c.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,Zu.jsxs)("div",{className:"relative flex items-center",children:[(0,Zu.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,Zu.jsx)("label",{htmlFor:d,className:M(gF({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,Zu.jsx)("span",{className:M("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,Zu.jsx)(Gc,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});vg.displayName="RadioGroupItemPro";var PT=af.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,Zu.jsx)("label",{ref:a,htmlFor:t,className:M("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));PT.displayName="RadioLabelPro";var vF=af.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=af.useId(),i=e||a;return(0,Zu.jsxs)("div",{className:"flex items-center",children:[(0,Zu.jsx)(vg,{ref:o,id:i,...n}),(0,Zu.jsx)(PT,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});vF.displayName="RadioItemWithLabelPro";var t8=A(le(),1);var nr=A(le(),1);var eve=A(le(),1),Xn=A(ae(),1);function QZe(e,t){return eve.useReducer((r,n)=>t[r][n]??r,e)}var Xq="ScrollArea",[tve,Hyr]=kn(Xq),[ZZe,sf]=tve(Xq),rve=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=nr.useState(null),[c,u]=nr.useState(null),[d,f]=nr.useState(null),[p,m]=nr.useState(null),[h,g]=nr.useState(null),[v,y]=nr.useState(0),[b,w]=nr.useState(0),[x,C]=nr.useState(!1),[S,R]=nr.useState(!1),D=qt(t,T=>l(T)),_=_d(o);return(0,Xn.jsx)(ZZe,{scope:r,type:n,dir:_,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:R,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,Xn.jsx)(nt.div,{dir:_,...i,ref:D,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:b+"px",...e.style}})})});rve.displayName=Xq;var nve="ScrollAreaViewport",ove=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=sf(nve,r),s=nr.useRef(null),l=qt(t,s,i.onViewportChange);return(0,Xn.jsxs)(Xn.Fragment,{children:[(0,Xn.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,Xn.jsx)(nt.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Xn.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});ove.displayName=nve;var Am="ScrollAreaScrollbar",xF=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return nr.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,Xn.jsx)(eet,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Xn.jsx)(tet,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Xn.jsx)(ave,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Xn.jsx)(Jq,{...n,ref:t}):null});xF.displayName=Am;var eet=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),[a,i]=nr.useState(!1);return nr.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,Xn.jsx)(po,{present:r||a,children:(0,Xn.jsx)(ave,{"data-state":a?"visible":"hidden",...n,ref:t})})}),tet=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),a=e.orientation==="horizontal",i=CF(()=>l("SCROLL_END"),100),[s,l]=QZe("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 nr.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),nr.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,Xn.jsx)(po,{present:r||s!=="hidden",children:(0,Xn.jsx)(Jq,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Qe(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Qe(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ave=nr.forwardRef((e,t)=>{let r=sf(Am,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=nr.useState(!1),s=e.orientation==="horizontal",l=CF(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return a1(r.viewport,l),a1(r.content,l),(0,Xn.jsx)(po,{present:n||a,children:(0,Xn.jsx)(Jq,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Jq=nr.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=sf(Am,e.__scopeScrollArea),a=nr.useRef(null),i=nr.useRef(0),[s,l]=nr.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=cve(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 set(f,i.current,s,p)}return r==="horizontal"?(0,Xn.jsx)(ret,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=Zge(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,Xn.jsx)(net,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=Zge(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}),ret=nr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=sf(Am,e.__scopeScrollArea),[i,s]=nr.useState(),l=nr.useRef(null),c=qt(t,l,a.onScrollbarXChange);return nr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Xn.jsx)(sve,{"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"]:wF(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),dve(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:bF(i.paddingLeft),paddingEnd:bF(i.paddingRight)}})}})}),net=nr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=sf(Am,e.__scopeScrollArea),[i,s]=nr.useState(),l=nr.useRef(null),c=qt(t,l,a.onScrollbarYChange);return nr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Xn.jsx)(sve,{"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"]:wF(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),dve(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:bF(i.paddingTop),paddingEnd:bF(i.paddingBottom)}})}})}),[oet,ive]=tve(Am),sve=nr.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=sf(Am,r),[m,h]=nr.useState(null),g=qt(t,D=>h(D)),v=nr.useRef(null),y=nr.useRef(""),b=p.viewport,w=n.content-n.viewport,x=Ln(u),C=Ln(l),S=CF(d,10);function R(D){if(v.current){let _=D.clientX-v.current.left,T=D.clientY-v.current.top;c({x:_,y:T})}}return nr.useEffect(()=>{let D=_=>{let T=_.target;m?.contains(T)&&x(_,w)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[b,m,w,x]),nr.useEffect(C,[n,C]),a1(m,S),a1(p.content,S),(0,Xn.jsx)(oet,{scope:r,scrollbar:m,hasThumb:o,onThumbChange:Ln(a),onThumbPointerUp:Ln(i),onThumbPositionChange:C,onThumbPointerDown:Ln(s),children:(0,Xn.jsx)(nt.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:Qe(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),R(D))}),onPointerMove:Qe(e.onPointerMove,R),onPointerUp:Qe(e.onPointerUp,D=>{let _=D.target;_.hasPointerCapture(D.pointerId)&&_.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),yF="ScrollAreaThumb",Qq=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=ive(yF,e.__scopeScrollArea);return(0,Xn.jsx)(po,{present:r||o.hasThumb,children:(0,Xn.jsx)(aet,{ref:t,...n})})}),aet=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=sf(yF,r),i=ive(yF,r),{onThumbPositionChange:s}=i,l=qt(t,d=>i.onThumbChange(d)),c=nr.useRef(void 0),u=CF(()=>{c.current&&(c.current(),c.current=void 0)},100);return nr.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=cet(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,Xn.jsx)(nt.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:Qe(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;i.onThumbPointerDown({x:m,y:h})}),onPointerUp:Qe(e.onPointerUp,i.onThumbPointerUp)})});Qq.displayName=yF;var Zq="ScrollAreaCorner",lve=nr.forwardRef((e,t)=>{let r=sf(Zq,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,Xn.jsx)(iet,{...e,ref:t}):null});lve.displayName=Zq;var iet=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=sf(Zq,r),[a,i]=nr.useState(0),[s,l]=nr.useState(0),c=!!(a&&s);return a1(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),a1(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,Xn.jsx)(nt.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 bF(e){return e?parseInt(e,10):0}function cve(e,t){let r=e/t;return isNaN(r)?0:r}function wF(e){let t=cve(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function set(e,t,r,n="ltr"){let o=wF(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 uve([l,c],d)(e)}function Zge(e,t,r="ltr"){let n=wF(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=sT(e,l);return uve([0,i],[0,s])(c)}function uve(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 dve(e,t){return e>0&&e<t}var cet=(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 CF(e,t){let r=Ln(e),n=nr.useRef(0);return nr.useEffect(()=>()=>window.clearTimeout(n.current),[]),nr.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function a1(e,t){let r=Ln(t);In(()=>{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 e8=rve,fve=ove;var pve=lve;var By=A(ae(),1),lu=t8.forwardRef(({className:e,children:t,...r},n)=>(0,By.jsxs)(e8,{ref:n,className:M("relative overflow-hidden",e),...r,children:[(0,By.jsx)(fve,{className:"h-full w-full rounded-[inherit]",children:t}),(0,By.jsx)(SF,{}),(0,By.jsx)(pve,{})]}));lu.displayName=e8.displayName;var SF=t8.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,By.jsx)(xF,{ref:n,orientation:t,className:M("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,By.jsx)(Qq,{className:"relative flex-1 rounded-full bg-border"})}));SF.displayName=xF.displayName;var yve=A(le(),1);var hve=A(le(),1);var gve=A(ae(),1),det="Separator",mve="horizontal",fet=["horizontal","vertical"],vve=hve.forwardRef((e,t)=>{let{decorative:r,orientation:n=mve,...o}=e,a=pet(n)?n:mve,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,gve.jsx)(nt.div,{"data-orientation":a,...s,...o,ref:t})});vve.displayName=det;function pet(e){return fet.includes(e)}var r8=vve;var bve=A(ae(),1),PF=ot("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"}}),Wi=yve.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,bve.jsx)(r8,{ref:i,decorative:o,orientation:t,className:M(PF({orientation:t,variant:r,size:n}),e),...a}));Wi.displayName=r8.displayName;var NT=A(le(),1);var ed=A(ae(),1),zy=xy,NF=y2,xve=$S,n8=wy,kF=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(Cm,{className:M("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}));kF.displayName=Cm.displayName;var het=ot("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"}}),yg=NT.forwardRef(({side:e="right",className:t,children:r,...n},o)=>(0,ed.jsxs)(n8,{children:[(0,ed.jsx)(kF,{}),(0,ed.jsxs)(Cy,{ref:o,className:M(het({side:e}),t),...n,children:[r,(0,ed.jsxs)($S,{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,ed.jsx)(Qt,{className:"h-4 w-4"}),(0,ed.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));yg.displayName=Cy.displayName;var kT=({className:e,...t})=>(0,ed.jsx)("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});kT.displayName="SheetHeader";var o8=({className:e,...t})=>(0,ed.jsx)("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});o8.displayName="SheetFooter";var RT=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(HS,{ref:r,className:M("text-lg font-semibold text-foreground",e),...t}));RT.displayName=HS.displayName;var ET=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(jS,{ref:r,className:M("text-sm text-muted-foreground",e),...t}));ET.displayName=jS.displayName;var wve=A(ae(),1);function Qo({className:e,...t}){return(0,wve.jsx)("div",{className:M("animate-pulse rounded-md bg-muted",e),...t})}var Uy=A(le(),1);var Dm=A(ae(),1),get=ot("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"}}),vet=ot("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"}}),yet=ot("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"}}),bet=ot("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"}}),Vy=Uy.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},m)=>{let[h,g]=Uy.useState(c||u||[0]);Uy.useEffect(()=>{c!==void 0&&g(c)},[c]);let v=_=>s?s(_):`${Math.round(_*100)/100}`,y=(_,T,E)=>(_-T)/(E-T)*100,b=Uy.useRef(null),w=p.min||0,x=p.max||100,C=p.step||1,S=_=>{let T=_.map(E=>{if(C<1){let z=C.toString().split(".")[1]?.length||0;return Math.round(E*Math.pow(10,z))/Math.pow(10,z)}return Math.round(E)});g(T),d&&d(T)},R=_=>{if(f)return;let T=b.current;if(!T)return;let E=T.getBoundingClientRect(),z=(_.clientX-E.left)/E.width,U=w+z*(x-w),N=Math.round(U/C)*C,P=Math.max(w,Math.min(x,N)),k=[...h];k[0]=P,S(k)},D=_=>T=>{if(f)return;T.preventDefault();let E=U=>{let N=b.current;if(!N)return;let P=N.getBoundingClientRect(),k=(U.clientX-P.left)/P.width,I=w+k*(x-w),L=Math.round(I/C)*C,F=Math.max(w,Math.min(x,L)),B=[...h];B[_]=F,S(B)},z=()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",E),document.addEventListener("mouseup",z)};return(0,Dm.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,Dm.jsx)("div",{className:M("flex justify-end mb-1 text-sm text-muted-foreground",l),children:h.length===1?(0,Dm.jsx)("span",{children:v(h[0])}):(0,Dm.jsxs)("span",{children:[v(h[0])," - ",v(h[h.length-1])]})}),(0,Dm.jsxs)("div",{className:M(get({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Dm.jsx)("div",{ref:b,className:M(vet({variant:r||o||"default"})),onClick:R,children:(0,Dm.jsx)("div",{className:M(yet({variant:n||o||"primary"})),style:{left:"0%",width:`${y(h[0],w,x)}%`}})}),h.map((_,T)=>(0,Dm.jsx)("div",{className:M(bet({variant:o||"primary",size:a})),style:{left:`${y(_,w,x)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:D(T),"aria-label":`Thumb ${T+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":x,"aria-valuenow":_,"aria-disabled":f},T))]})]})});Vy.displayName="MoonUISliderPro";var Eve=A(le(),1);var yp=A(le(),1);var ox=A(ae(),1),RF="Switch",[xet,dbr]=kn(RF),[wet,Cet]=xet(RF),Cve=yp.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]=yp.useState(null),m=qt(t,b=>p(b)),h=yp.useRef(!1),g=f?u||!!f.closest("form"):!0,[v,y]=Mo({prop:o,defaultProp:a??!1,onChange:c,caller:RF});return(0,ox.jsxs)(wet,{scope:r,checked:v,disabled:s,children:[(0,ox.jsx)(nt.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":kve(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:Qe(e.onClick,b=>{y(w=>!w),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&(0,ox.jsx)(Nve,{control:f,bubbles:!h.current,name:n,value:l,checked:v,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Cve.displayName=RF;var Sve="SwitchThumb",Pve=yp.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=Cet(Sve,r);return(0,ox.jsx)(nt.span,{"data-state":kve(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Pve.displayName=Sve;var Pet="SwitchBubbleInput",Nve=yp.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=yp.useRef(null),s=qt(i,a),l=OS(r),c=_S(t);return yp.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(m)}},[l,r,n]),(0,ox.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}})});Nve.displayName=Pet;function kve(e){return e?"checked":"unchecked"}var a8=Cve,Rve=Pve;var Lm=A(ae(),1),Om=Eve.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,Lm.jsxs)("div",{className:"inline-flex items-center gap-2",children:[o&&(0,Lm.jsx)("span",{className:"text-muted-foreground",children:o}),(0,Lm.jsxs)(a8,{className:M("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,Lm.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Lm.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Lm.jsx)(Rve,{className:M("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,Lm.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Lm.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));Om.displayName=a8.displayName;var Ll=A(le(),1);var Aa=A(ae(),1),EF=ot("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"}}),TF=Ll.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=Ll.Children.map(a.children,c=>{if(Ll.isValidElement(c)&&c.type==="tbody"){let u=c.props;return Ll.cloneElement(c,{className:M(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,Aa.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,Aa.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Aa.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Aa.jsx)("table",{ref:i,className:M(EF({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});TF.displayName="TablePro";var MF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("thead",{ref:r,className:M("[&_tr]:border-b",e),...t}));MF.displayName="TableHeaderPro";var IF=Ll.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=Ll.Children.count(n)>0;return(0,Aa.jsx)("tbody",{ref:a,className:M("[&_tr:last-child]:border-0",e),...o,children:i?n:(0,Aa.jsx)("tr",{children:(0,Aa.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Aa.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Aa.jsx)("div",{className:"text-sm",children:r})})})})})});IF.displayName="TableBodyPro";var AF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("tfoot",{ref:r,className:M("bg-primary text-primary-foreground font-medium",e),...t}));AF.displayName="TableFooterPro";var DF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("tr",{ref:r,className:M("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));DF.displayName="TableRowPro";var LF=Ll.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,Aa.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,Aa.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,Aa.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,Aa.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,Aa.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,Aa.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,Aa.jsx)("th",{ref:i,className:M("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,Aa.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});LF.displayName="TableHeadPro";var OF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("td",{ref:r,className:M("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));OF.displayName="TableCellPro";var _F=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("caption",{ref:r,className:M("mt-4 text-sm text-muted-foreground",e),...t}));_F.displayName="TableCaptionPro";var zF=A(le(),1);var xg=A(le(),1);var bg=A(ae(),1),FF="Tabs",[ket,Nbr]=kn(FF,[ZS]),Tve=ZS(),[Ret,i8]=ket(FF),Mve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=_d(s),[d,f]=Mo({prop:n,onChange:o,defaultProp:a??"",caller:FF});return(0,bg.jsx)(Ret,{scope:r,baseId:Dn(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,bg.jsx)(nt.div,{dir:u,"data-orientation":i,...c,ref:t})})});Mve.displayName=FF;var Ive="TabsList",Ave=xg.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=i8(Ive,r),i=Tve(r);return(0,bg.jsx)(Y2,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,bg.jsx)(nt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Ave.displayName=Ive;var Dve="TabsTrigger",Lve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=i8(Dve,r),s=Tve(r),l=Fve(i.baseId,n),c=Bve(i.baseId,n),u=n===i.value;return(0,bg.jsx)(X2,{asChild:!0,...s,focusable:!o,active:u,children:(0,bg.jsx)(nt.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:Qe(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:Qe(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:Qe(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});Lve.displayName=Dve;var Ove="TabsContent",_ve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=i8(Ove,r),l=Fve(s.baseId,n),c=Bve(s.baseId,n),u=n===s.value,d=xg.useRef(u);return xg.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,bg.jsx)(po,{present:o||u,children:({present:f})=>(0,bg.jsx)(nt.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})})});_ve.displayName=Ove;function Fve(e,t){return`${e}-trigger-${t}`}function Bve(e,t){return`${e}-content-${t}`}var BF=Mve,i1=Ave,s1=Lve,ax=_ve;var UF=A(ae(),1),zs=BF,xs=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(i1,{ref:r,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));xs.displayName=i1.displayName;var bn=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(s1,{ref:r,className:M("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}));bn.displayName=s1.displayName;var En=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(ax,{ref:r,className:M("mt-6 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));En.displayName=ax.displayName;var Us=A(le(),1);ar();var Qr=A(ae(),1),Eet={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)"}}},VF=Us.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:m=!1,scrollable:h=!1,onAnalytics:g,onBeforeChange:v,shortcuts:y=!1,maxTabs:b,groups:w,className:x,children:C,value:S,defaultValue:R,onValueChange:D,..._},T)=>{let{hasProAccess:E,isLoading:z}=Ye(),[U,N]=Us.useState(c),[P,k]=Us.useState(()=>{if(i&&typeof window<"u"){let q=localStorage.getItem(`tabs-${i}`);if(q)return JSON.parse(q).activeTab||R||U[0]?.value}if(s&&typeof window<"u"){let te=new URLSearchParams(window.location.search).get("tab");if(te)return te}return R||U[0]?.value}),[I,L]=Us.useState(new Set),[F,B]=Us.useState(!1),O=Us.useRef(null),j=S!==void 0?S:P,H=Us.useCallback(async q=>{if(!(p||F)){if(v){B(!0);let te=await v(j||"",q);if(B(!1),!te)return}if(k(q),D?.(q),l&&!I.has(q)&&L(te=>new Set([...te,q])),g?.("tab_switch",{from:j,to:q}),i&&typeof window<"u"&&localStorage.setItem(`tabs-${i}`,JSON.stringify({activeTab:q,tabs:U})),s&&typeof window<"u"){let te=new URLSearchParams(window.location.search);te.set("tab",q),window.history.replaceState({},"",`${window.location.pathname}?${te}`)}}},[j,p,F,v,D,l,I,g,i,U,s]),V=Us.useCallback((q,te)=>{te.stopPropagation();let oe=U.filter(ee=>ee.value!==q);N(oe),u?.(oe),d?.(q),g?.("tab_close",{value:q}),j===q&&oe.length>0&&H(oe[0].value)},[U,j,u,d,g,H]),W=Us.useCallback(()=>{if(b&&U.length>=b){g?.("tab_add_blocked",{reason:"max_tabs"});return}f?.(),g?.("tab_add",{count:U.length+1})},[U.length,b,f,g]);Us.useEffect(()=>{if(!y)return;let q=te=>{if((te.metaKey||te.ctrlKey)&&te.key>="1"&&te.key<="9"){te.preventDefault();let oe=parseInt(te.key)-1;U[oe]&&H(U[oe].value)}(te.metaKey||te.ctrlKey)&&te.key==="w"&&n&&(te.preventDefault(),U.find(ee=>ee.value===j)?.closeable!==!1&&V(j||"",new MouseEvent("click"))),(te.metaKey||te.ctrlKey)&&te.key==="t"&&o&&(te.preventDefault(),W())};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[y,U,j,n,o,H,V,W]);let $=()=>{O.current&&O.current.scrollBy({left:-200,behavior:"smooth"})},K=()=>{O.current&&O.current.scrollBy({left:200,behavior:"smooth"})};return!z&&!E?(0,Qr.jsx)(rr,{componentName:"Tabs Pro",compact:!0}):(0,Qr.jsxs)("div",{className:M("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)]",x),children:[p&&(0,Qr.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm rounded-lg",children:(0,Qr.jsx)(yr,{className:"h-6 w-6 animate-spin text-primary"})}),(0,Qr.jsx)(BF,{ref:T,value:j,onValueChange:H,orientation:r,..._,children:U.length>0?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsxs)("div",{className:M("relative flex items-center",r==="vertical"&&"flex-col items-start"),children:[h&&r==="horizontal"&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute left-0 z-10",onClick:$,children:(0,Qr.jsx)(ka,{className:"h-4 w-4"})}),(0,Qr.jsx)("div",{ref:O,className:M("flex-1 overflow-x-auto scrollbar-hide",h&&r==="horizontal"&&"mx-10"),children:(0,Qr.jsxs)(i1,{className:M("flex items-center gap-1",r==="vertical"&&"flex-col items-start w-full",e==="underline"&&"border-b border-border"),children:[U.map((q,te)=>(0,Qr.jsxs)(Z.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,Qr.jsxs)(s1,{value:q.value,disabled:q.disabled,className:M("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:[q.icon&&(0,Qr.jsx)("span",{className:"mr-2",children:q.icon}),q.label,q.badge&&(0,Qr.jsx)("span",{className:"ml-2",children:q.badge}),n&&q.closeable!==!1&&(0,Qr.jsx)("button",{onClick:oe=>V(q.value,oe),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,Qr.jsx)(Qt,{className:"h-3 w-3"})})]}),j===q.value&&t!=="none"&&(0,Qr.jsx)(Z.div,{layoutId:"active-tab",className:M("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}})]},q.value)),o&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",onClick:W,className:"h-8 w-8 p-0 ml-2",disabled:b?U.length>=b:!1,children:(0,Qr.jsx)(Wa,{className:"h-4 w-4"})})]})}),h&&r==="horizontal"&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute right-0 z-10",onClick:K,children:(0,Qr.jsx)(Rn,{className:"h-4 w-4"})}),U.length>5&&(0,Qr.jsxs)(br,{children:[(0,Qr.jsx)(xr,{asChild:!0,children:(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 ml-2",children:(0,Qr.jsx)(Ra,{className:"h-4 w-4"})})}),(0,Qr.jsx)(mr,{align:"end",children:U.slice(5).map(q=>(0,Qr.jsxs)(_e,{onClick:()=>H(q.value),children:[q.icon&&(0,Qr.jsx)("span",{className:"mr-2",children:q.icon}),q.label]},q.value))})]})]}),t!=="none"?(0,Qr.jsx)(Ct,{mode:"wait",children:U.map(q=>j!==q.value?null:(0,Qr.jsx)(ax,{value:q.value,forceMount:!0,className:"mt-4 focus-visible:outline-none",children:(0,Qr.jsx)(Z.div,{initial:"initial",animate:"animate",exit:"exit",variants:Eet[t],transition:{duration:.3},children:q.content||C})},q.value))}):U.map(q=>(0,Qr.jsx)(ax,{value:q.value,className:"mt-4 focus-visible:outline-none",children:q.content||C},q.value))]}):C})]})});VF.displayName="MoonUITabsPro";var s8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(i1,{ref:r,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));s8.displayName="MoonUITabsListPro";var l8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(s1,{ref:r,className:M("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}));l8.displayName="MoonUITabsTriggerPro";var c8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(ax,{ref:r,className:M("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));c8.displayName="MoonUITabsContentPro";var Uve=A(le(),1);var Vve=A(ae(),1),yc=Uve.default.forwardRef(({className:e,...t},r)=>(0,Vve.jsx)("textarea",{className:M("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}));yc.displayName="MoonUITextareaPro";var Cg=A(le(),1);var Br=A(le(),1),jve=A(nm(),1);var Jn=A(ae(),1),m8="ToastProvider",[h8,Tet,Met]=Xp("Toast"),[$ve,Ybr]=kn("Toast",[Met]),[Iet,jF]=$ve(m8),Aet=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Br.useState(null),[c,u]=Br.useState(0),d=Br.useRef(!1),f=Br.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${m8}\`. Expected non-empty \`string\`.`),(0,Jn.jsx)(h8.Provider,{scope:t,children:(0,Jn.jsx)(Iet,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Br.useCallback(()=>u(p=>p+1),[]),onToastRemove:Br.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Aet.displayName=m8;var Wve="ToastViewport",Det=["F8"],d8="toast.viewportPause",f8="toast.viewportResume",qve=Br.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=Det,label:o="Notifications ({hotkey})",...a}=e,i=jF(Wve,r),s=Tet(r),l=Br.useRef(null),c=Br.useRef(null),u=Br.useRef(null),d=Br.useRef(null),f=qt(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;Br.useEffect(()=>{let g=v=>{n.length!==0&&n.every(b=>v[b]||v.code===b)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),Br.useEffect(()=>{let g=l.current,v=d.current;if(m&&g&&v){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(d8);v.dispatchEvent(C),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(f8);v.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!g.contains(C.relatedTarget)&&b()},x=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",y),g.addEventListener("focusout",w),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",x),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",x),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[m,i.isClosePausedRef]);let h=Br.useCallback(({tabbingDirection:g})=>{let y=s().map(b=>{let w=b.ref.current,x=[w,...qet(w)];return g==="forwards"?x:x.reverse()});return(g==="forwards"?y.reverse():y).flat()},[s]);return Br.useEffect(()=>{let g=d.current;if(g){let v=y=>{let b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){let x=document.activeElement,C=y.shiftKey;if(y.target===g&&C){c.current?.focus();return}let D=h({tabbingDirection:C?"backwards":"forwards"}),_=D.findIndex(T=>T===x);u8(D.slice(_+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[s,h]),(0,Jn.jsxs)(gde,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Jn.jsx)(p8,{ref:c,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"forwards"});u8(g)}}),(0,Jn.jsx)(h8.Slot,{scope:r,children:(0,Jn.jsx)(nt.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Jn.jsx)(p8,{ref:u,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"backwards"});u8(g)}})]})});qve.displayName=Wve;var Gve="ToastFocusProxy",p8=Br.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=jF(Gve,r);return(0,Jn.jsx)(oT,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});p8.displayName=Gve;var TT="Toast",Let="toast.swipeStart",Oet="toast.swipeMove",_et="toast.swipeCancel",Fet="toast.swipeEnd",Kve=Br.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=Mo({prop:n,defaultProp:o??!0,onChange:a,caller:TT});return(0,Jn.jsx)(po,{present:r||s,children:(0,Jn.jsx)(Uet,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:Ln(e.onPause),onResume:Ln(e.onResume),onSwipeStart:Qe(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qe(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:Qe(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:Qe(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)})})})});Kve.displayName=TT;var[Bet,zet]=$ve(TT,{onClose(){}}),Uet=Br.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,...m}=e,h=jF(TT,r),[g,v]=Br.useState(null),y=qt(t,U=>v(U)),b=Br.useRef(null),w=Br.useRef(null),x=o||h.duration,C=Br.useRef(0),S=Br.useRef(x),R=Br.useRef(0),{onToastAdd:D,onToastRemove:_}=h,T=Ln(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),i()}),E=Br.useCallback(U=>{!U||U===1/0||(window.clearTimeout(R.current),C.current=new Date().getTime(),R.current=window.setTimeout(T,U))},[T]);Br.useEffect(()=>{let U=h.viewport;if(U){let N=()=>{E(S.current),c?.()},P=()=>{let k=new Date().getTime()-C.current;S.current=S.current-k,window.clearTimeout(R.current),l?.()};return U.addEventListener(d8,P),U.addEventListener(f8,N),()=>{U.removeEventListener(d8,P),U.removeEventListener(f8,N)}}},[h.viewport,x,l,c,E]),Br.useEffect(()=>{a&&!h.isClosePausedRef.current&&E(x)},[a,x,h.isClosePausedRef,E]),Br.useEffect(()=>(D(),()=>_()),[D,_]);let z=Br.useMemo(()=>g?tye(g):null,[g]);return h.viewport?(0,Jn.jsxs)(Jn.Fragment,{children:[z&&(0,Jn.jsx)(Vet,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),(0,Jn.jsx)(Bet,{scope:r,onClose:T,children:jve.createPortal((0,Jn.jsx)(h8.ItemSlot,{scope:r,children:(0,Jn.jsx)(hde,{asChild:!0,onEscapeKeyDown:Qe(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||T(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Jn.jsx)(nt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qe(e.onKeyDown,U=>{U.key==="Escape"&&(s?.(U.nativeEvent),U.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:Qe(e.onPointerDown,U=>{U.button===0&&(b.current={x:U.clientX,y:U.clientY})}),onPointerMove:Qe(e.onPointerMove,U=>{if(!b.current)return;let N=U.clientX-b.current.x,P=U.clientY-b.current.y,k=!!w.current,I=["left","right"].includes(h.swipeDirection),L=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,F=I?L(0,N):0,B=I?0:L(0,P),O=U.pointerType==="touch"?10:2,j={x:F,y:B},H={originalEvent:U,delta:j};k?(w.current=j,HF(Oet,d,H,{discrete:!1})):Hve(j,h.swipeDirection,O)?(w.current=j,HF(Let,u,H,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(N)>O||Math.abs(P)>O)&&(b.current=null)}),onPointerUp:Qe(e.onPointerUp,U=>{let N=w.current,P=U.target;if(P.hasPointerCapture(U.pointerId)&&P.releasePointerCapture(U.pointerId),w.current=null,b.current=null,N){let k=U.currentTarget,I={originalEvent:U,delta:N};Hve(N,h.swipeDirection,h.swipeThreshold)?HF(Fet,p,I,{discrete:!0}):HF(_et,f,I,{discrete:!0}),k.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Vet=e=>{let{__scopeToast:t,children:r,...n}=e,o=jF(TT,t),[a,i]=Br.useState(!1),[s,l]=Br.useState(!1);return $et(()=>i(!0)),Br.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Jn.jsx)(Xu,{asChild:!0,children:(0,Jn.jsx)(oT,{...n,children:a&&(0,Jn.jsxs)(Jn.Fragment,{children:[o.label," ",r]})})})},Het="ToastTitle",Yve=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Jn.jsx)(nt.div,{...n,ref:t})});Yve.displayName=Het;var jet="ToastDescription",Xve=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Jn.jsx)(nt.div,{...n,ref:t})});Xve.displayName=jet;var Jve="ToastAction",Qve=Br.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Jn.jsx)(eye,{altText:r,asChild:!0,children:(0,Jn.jsx)(g8,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jve}\`. Expected non-empty \`string\`.`),null)});Qve.displayName=Jve;var Zve="ToastClose",g8=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=zet(Zve,r);return(0,Jn.jsx)(eye,{asChild:!0,children:(0,Jn.jsx)(nt.button,{type:"button",...n,ref:t,onClick:Qe(e.onClick,o.onClose)})})});g8.displayName=Zve;var eye=Br.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Jn.jsx)(nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function tye(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Wet(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(...tye(n))}}),t}function HF(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?IC(o,a):o.dispatchEvent(a)}var Hve=(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 $et(e=()=>{}){let t=Ln(e);In(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Wet(e){return e.nodeType===e.ELEMENT_NODE}function qet(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 u8(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var v8=qve,y8=Kve,b8=Yve,x8=Xve,w8=Qve,C8=g8;var wg=A(ae(),1);var Ket=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(v8,{ref:r,className:M("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}));Ket.displayName=v8.displayName;var Yet=ot("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"}}),WF=Cg.forwardRef(({className:e,variant:t,...r},n)=>(0,wg.jsx)(y8,{ref:n,className:M(Yet({variant:t}),e),...r}));WF.displayName=y8.displayName;var Xet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(w8,{ref:r,className:M("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}));Xet.displayName=w8.displayName;var Jet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(C8,{ref:r,className:M("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,wg.jsx)(Qt,{className:"h-4 w-4"})}));Jet.displayName=C8.displayName;var Qet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(b8,{ref:r,className:M("text-sm font-semibold [&+div]:text-xs",e),...t}));Qet.displayName=b8.displayName;var Zet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(x8,{ref:r,className:M("text-sm opacity-90",e),...t}));Zet.displayName=x8.displayName;var ett=5,ttt=1e6,S8=new Map,rye=e=>{if(S8.has(e))return;let t=setTimeout(()=>{S8.delete(e),$F({type:"REMOVE_TOAST",toastId:e})},ttt);S8.set(e,t)},rtt=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ett)};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?rye(r):e.toasts.forEach(n=>{rye(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}},ntt=[],P8={toasts:[]},ott=0;function $F(e){P8=rtt(P8,e),ntt.forEach(t=>{t(P8)})}function td({...e}){let t=`toast-${Date.now()}-${++ott}`,r=o=>$F({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>$F({type:"DISMISS_TOAST",toastId:t});return $F({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}var lye=A(le(),1);var oye=A(lr(),1);var t0r=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lf=A(lr(),1);var nye=A(lr(),1),Vs=globalThis?.document?nye.useLayoutEffect:()=>{};var qF=A(lr(),1);var att=lf[" useInsertionEffect ".trim().toString()]||Vs;function Sg({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=itt({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lf.useRef(e!==void 0);lf.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=lf.useCallback(u=>{if(s){let d=stt(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function itt({defaultProp:e,onChange:t}){let[r,n]=lf.useState(e),o=lf.useRef(r),a=lf.useRef(t);return att(()=>{a.current=t},[t]),lf.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function stt(e){return typeof e=="function"}var a0r=Symbol("RADIX:SYNC_STATE");var aye=A(Jo(),1),iye="Toggle",sye=oye.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=Sg({prop:r,onChange:o,defaultProp:n??!1,caller:iye});return(0,aye.jsx)(cn.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Zr(e.onClick,()=>{e.disabled||s(!i)})})});sye.displayName=iye;var N8=sye;var bp=A(ae(),1),GF=ot("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"}}),KF=lye.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,...m},h)=>{let g=d?s:l;return(0,bp.jsx)(N8,{ref:h,className:M(GF({variant:t,size:r,shape:n}),e),pressed:d,onPressedChange:f,defaultPressed:p,disabled:o||m.disabled,...m,children:o?(0,bp.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,bp.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}),u&&(0,bp.jsx)("span",{className:"text-center",children:u})]}):(0,bp.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[g&&c==="left"&&(0,bp.jsx)("span",{className:"flex-shrink-0",children:g}),u&&(0,bp.jsx)("span",{className:"text-center",children:u}),g&&c==="right"&&(0,bp.jsx)("span",{className:"flex-shrink-0",children:g}),a!==void 0&&(0,bp.jsx)("span",{className:M("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})]})})});KF.displayName=N8.displayName;var Ube=A(le(),1);var ui=A(lr(),1);var uu=A(lr(),1);var dye=["top","right","bottom","left"];var _m=Math.min,bc=Math.max,IT=Math.round,AT=Math.floor,xp=e=>({x:e,y:e}),ctt={left:"right",right:"left",bottom:"top",top:"bottom"},utt={start:"end",end:"start"};function XF(e,t,r){return bc(e,_m(t,r))}function Fm(e,t){return typeof e=="function"?e(t):e}function Bm(e){return e.split("-")[0]}function ix(e){return e.split("-")[1]}function JF(e){return e==="x"?"y":"x"}function QF(e){return e==="y"?"height":"width"}var dtt=new Set(["top","bottom"]);function wp(e){return dtt.has(Bm(e))?"y":"x"}function ZF(e){return JF(wp(e))}function fye(e,t,r){r===void 0&&(r=!1);let n=ix(e),o=ZF(e),a=QF(o),i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=MT(i)),[i,MT(i)]}function pye(e){let t=MT(e);return[YF(e),t,YF(t)]}function YF(e){return e.replace(/start|end/g,t=>utt[t])}var cye=["left","right"],uye=["right","left"],ftt=["top","bottom"],ptt=["bottom","top"];function mtt(e,t,r){switch(e){case"top":case"bottom":return r?t?uye:cye:t?cye:uye;case"left":case"right":return t?ftt:ptt;default:return[]}}function mye(e,t,r,n){let o=ix(e),a=mtt(Bm(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(YF)))),a}function MT(e){return e.replace(/left|right|bottom|top/g,t=>ctt[t])}function htt(e){return{top:0,right:0,bottom:0,left:0,...e}}function k8(e){return typeof e!="number"?htt(e):{top:e,right:e,bottom:e,left:e}}function sx(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 hye(e,t,r){let{reference:n,floating:o}=e,a=wp(t),i=ZF(t),s=QF(i),l=Bm(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(ix(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}var yye=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}=hye(c,n,l),f=n,p={},m=0;for(let h=0;h<s.length;h++){let{name:g,fn:v}=s[h],{x:y,y:b,data:w,reset:x}=await v({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=b??d,p={...p,[g]:{...p[g],...w}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:d}=hye(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function l1(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}=Fm(t,e),m=k8(p),g=s[f?d==="floating"?"reference":"floating":d],v=sx(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.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,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},x=sx(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-x.top+m.top)/w.y,bottom:(x.bottom-v.bottom+m.bottom)/w.y,left:(v.left-x.left+m.left)/w.x,right:(x.right-v.right+m.right)/w.x}}var bye=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}=Fm(e,t)||{};if(c==null)return{};let d=k8(u),f={x:r,y:n},p=ZF(o),m=QF(p),h=await i.getDimensions(c),g=p==="y",v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),S=C?C[b]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[b]||a.floating[m]);let R=w/2-x/2,D=S/2-h[m]/2-1,_=_m(d[v],D),T=_m(d[y],D),E=_,z=S-h[m]-T,U=S/2-h[m]/2+R,N=XF(E,U,z),P=!l.arrow&&ix(o)!=null&&U!==N&&a.reference[m]/2-(U<E?_:T)-h[m]/2<0,k=P?U<E?U-E:U-z:0;return{[p]:f[p]+k,data:{[p]:N,centerOffset:U-N-k,...P&&{alignmentOffset:k}},reset:P}}});var xye=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:m="none",flipAlignment:h=!0,...g}=Fm(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let v=Bm(o),y=wp(s),b=Bm(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(b||!h?[MT(s)]:pye(s)),C=m!=="none";!f&&C&&x.push(...mye(s,h,m,w));let S=[s,...x],R=await l1(t,g),D=[],_=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&D.push(R[v]),d){let U=fye(o,i,w);D.push(R[U[0]],R[U[1]])}if(_=[..._,{placement:o,overflows:D}],!D.every(U=>U<=0)){var T,E;let U=(((T=a.flip)==null?void 0:T.index)||0)+1,N=S[U];if(N&&(!(d==="alignment"?y!==wp(N):!1)||_.every(I=>wp(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:U,overflows:_},reset:{placement:N}};let P=(E=_.filter(k=>k.overflows[0]<=0).sort((k,I)=>k.overflows[1]-I.overflows[1])[0])==null?void 0:E.placement;if(!P)switch(p){case"bestFit":{var z;let k=(z=_.filter(I=>{if(C){let L=wp(I.placement);return L===y||L==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(L=>L>0).reduce((L,F)=>L+F,0)]).sort((I,L)=>I[1]-L[1])[0])==null?void 0:z[0];k&&(P=k);break}case"initialPlacement":P=s;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function gye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vye(e){return dye.some(t=>e[t]>=0)}var wye=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=Fm(e,t);switch(n){case"referenceHidden":{let a=await l1(t,{...o,elementContext:"reference"}),i=gye(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:vye(i)}}}case"escaped":{let a=await l1(t,{...o,altBoundary:!0}),i=gye(a,r.floating);return{data:{escapedOffsets:i,escaped:vye(i)}}}default:return{}}}}};var Cye=new Set(["left","top"]);async function gtt(e,t){let{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Bm(r),s=ix(r),l=wp(r)==="y",c=Cye.has(i)?-1:1,u=a&&l?-1:1,d=Fm(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var Sye=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 gtt(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}}}}},Pye=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:g=>{let{x:v,y}=g;return{x:v,y}}},...l}=Fm(e,t),c={x:r,y:n},u=await l1(t,l),d=wp(Bm(o)),f=JF(d),p=c[f],m=c[d];if(a){let g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=p+u[g],b=p-u[v];p=XF(y,p,b)}if(i){let g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[g],b=m-u[v];m=XF(y,m,b)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:a,[d]:i}}}}}},Nye=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}=Fm(e,t),u={x:r,y:n},d=wp(o),f=JF(d),p=u[f],m=u[d],h=Fm(s,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let b=f==="y"?"height":"width",w=a.reference[f]-a.floating[b]+g.mainAxis,x=a.reference[f]+a.reference[b]-g.mainAxis;p<w?p=w:p>x&&(p=x)}if(c){var v,y;let b=f==="y"?"width":"height",w=Cye.has(Bm(o)),x=a.reference[d]-a.floating[b]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:g.crossAxis),C=a.reference[d]+a.reference[b]+(w?0:((y=i.offset)==null?void 0:y[d])||0)-(w?g.crossAxis:0);m<x?m=x:m>C&&(m=C)}return{[f]:p,[d]:m}}}},kye=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}=Fm(e,t),u=await l1(t,c),d=Bm(o),f=ix(o),p=wp(o)==="y",{width:m,height:h}=a.floating,g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");let y=h-u.top-u.bottom,b=m-u.left-u.right,w=_m(h-u[g],y),x=_m(m-u[v],b),C=!t.middlewareData.shift,S=w,R=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=y),C&&!f){let _=bc(u.left,0),T=bc(u.right,0),E=bc(u.top,0),z=bc(u.bottom,0);p?R=m-2*(_!==0||T!==0?_+T:bc(u.left,u.right)):S=h-2*(E!==0||z!==0?E+z:bc(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:S});let D=await i.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function eB(){return typeof window<"u"}function cx(e){return Eye(e)?(e.nodeName||"").toLowerCase():"#document"}function cu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cp(e){var t;return(t=(Eye(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Eye(e){return eB()?e instanceof Node||e instanceof cu(e).Node:!1}function cf(e){return eB()?e instanceof Element||e instanceof cu(e).Element:!1}function Sp(e){return eB()?e instanceof HTMLElement||e instanceof cu(e).HTMLElement:!1}function Rye(e){return!eB()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cu(e).ShadowRoot}var vtt=new Set(["inline","contents"]);function c1(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=uf(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vtt.has(o)}var ytt=new Set(["table","td","th"]);function Tye(e){return ytt.has(cx(e))}var btt=[":popover-open",":modal"];function DT(e){return btt.some(t=>{try{return e.matches(t)}catch{return!1}})}var xtt=["transform","translate","scale","rotate","perspective"],wtt=["transform","translate","scale","rotate","perspective","filter"],Ctt=["paint","layout","strict","content"];function tB(e){let t=rB(),r=cf(e)?uf(e):e;return xtt.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)||wtt.some(n=>(r.willChange||"").includes(n))||Ctt.some(n=>(r.contain||"").includes(n))}function Mye(e){let t=Pg(e);for(;Sp(t)&&!ux(t);){if(tB(t))return t;if(DT(t))return null;t=Pg(t)}return null}function rB(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Stt=new Set(["html","body","#document"]);function ux(e){return Stt.has(cx(e))}function uf(e){return cu(e).getComputedStyle(e)}function LT(e){return cf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pg(e){if(cx(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Rye(e)&&e.host||Cp(e);return Rye(t)?t.host:t}function Iye(e){let t=Pg(e);return ux(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sp(t)&&c1(t)?t:Iye(t)}function lx(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=Iye(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=cu(o);if(a){let s=nB(i);return t.concat(i,i.visualViewport||[],c1(o)?o:[],s&&r?lx(s):[])}return t.concat(o,lx(o,[],r))}function nB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oye(e){let t=uf(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Sp(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=IT(r)!==a||IT(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function E8(e){return cf(e)?e:e.contextElement}function u1(e){let t=E8(e);if(!Sp(t))return xp(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Oye(t),i=(a?IT(r.width):r.width)/n,s=(a?IT(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var Ptt=xp(0);function _ye(e){let t=cu(e);return!rB()||!t.visualViewport?Ptt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ntt(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==cu(e)?!1:t}function dx(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),a=E8(e),i=xp(1);t&&(n?cf(n)&&(i=u1(n)):i=u1(e));let s=Ntt(a,r,n)?_ye(a):xp(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=cu(a),p=n&&cf(n)?cu(n):n,m=f,h=nB(m);for(;h&&n&&p!==m;){let g=u1(h),v=h.getBoundingClientRect(),y=uf(h),b=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,w=v.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=b,c+=w,m=cu(h),h=nB(m)}}return sx({width:u,height:d,x:l,y:c})}function oB(e,t){let r=LT(e).scrollLeft;return t?t.left+r:dx(Cp(e)).left+r}function Fye(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-oB(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ktt(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a=o==="fixed",i=Cp(n),s=t?DT(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=xp(1),u=xp(0),d=Sp(n);if((d||!d&&!a)&&((cx(n)!=="body"||c1(i))&&(l=LT(n)),Sp(n))){let p=dx(n);c=u1(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=i&&!d&&!a?Fye(i,l):xp(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 Rtt(e){return Array.from(e.getClientRects())}function Ett(e){let t=Cp(e),r=LT(e),n=e.ownerDocument.body,o=bc(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=bc(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+oB(e),s=-r.scrollTop;return uf(n).direction==="rtl"&&(i+=bc(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var Aye=25;function Ttt(e,t){let r=cu(e),n=Cp(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let u=rB();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let c=oB(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,m=Math.abs(n.clientWidth-d.clientWidth-p);m<=Aye&&(a-=m)}else c<=Aye&&(a+=c);return{width:a,height:i,x:s,y:l}}var Mtt=new Set(["absolute","fixed"]);function Itt(e,t){let r=dx(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Sp(e)?u1(e):xp(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 Dye(e,t,r){let n;if(t==="viewport")n=Ttt(e,r);else if(t==="document")n=Ett(Cp(e));else if(cf(t))n=Itt(t,r);else{let o=_ye(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sx(n)}function Bye(e,t){let r=Pg(e);return r===t||!cf(r)||ux(r)?!1:uf(r).position==="fixed"||Bye(r,t)}function Att(e,t){let r=t.get(e);if(r)return r;let n=lx(e,[],!1).filter(s=>cf(s)&&cx(s)!=="body"),o=null,a=uf(e).position==="fixed",i=a?Pg(e):e;for(;cf(i)&&!ux(i);){let s=uf(i),l=tB(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Mtt.has(o.position)||c1(i)&&!l&&Bye(e,i))?n=n.filter(u=>u!==i):o=s,i=Pg(i)}return t.set(e,n),n}function Dtt(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[...r==="clippingAncestors"?DT(t)?[]:Att(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{let d=Dye(t,u,o);return c.top=bc(d.top,c.top),c.right=_m(d.right,c.right),c.bottom=_m(d.bottom,c.bottom),c.left=bc(d.left,c.left),c},Dye(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ltt(e){let{width:t,height:r}=Oye(e);return{width:t,height:r}}function Ott(e,t,r){let n=Sp(t),o=Cp(t),a=r==="fixed",i=dx(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=xp(0);function c(){l.x=oB(o)}if(n||!n&&!a)if((cx(t)!=="body"||c1(o))&&(s=LT(t)),n){let p=dx(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?Fye(o,s):xp(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 R8(e){return uf(e).position==="static"}function Lye(e,t){if(!Sp(e)||uf(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Cp(e)===r&&(r=r.ownerDocument.body),r}function zye(e,t){let r=cu(e);if(DT(e))return r;if(!Sp(e)){let o=Pg(e);for(;o&&!ux(o);){if(cf(o)&&!R8(o))return o;o=Pg(o)}return r}let n=Lye(e,t);for(;n&&Tye(n)&&R8(n);)n=Lye(n,t);return n&&ux(n)&&R8(n)&&!tB(n)?r:n||Mye(e)||r}var _tt=async function(e){let t=this.getOffsetParent||zye,r=this.getDimensions,n=await r(e.floating);return{reference:Ott(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ftt(e){return uf(e).direction==="rtl"}var Uye={convertOffsetParentRelativeRectToViewportRelativeRect:ktt,getDocumentElement:Cp,getClippingRect:Dtt,getOffsetParent:zye,getElementRects:_tt,getClientRects:Rtt,getDimensions:Ltt,getScale:u1,isElement:cf,isRTL:Ftt};function Vye(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Btt(e,t){let r=null,n,o=Cp(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 m=AT(d),h=AT(o.clientWidth-(u+f)),g=AT(o.clientHeight-(d+p)),v=AT(u),b={rootMargin:-m+"px "+-h+"px "+-g+"px "+-v+"px",threshold:bc(0,_m(1,l))||1},w=!0;function x(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&&!Vye(c,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(x,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,b)}r.observe(e)}return i(!0),a}function T8(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=E8(e),u=o||a?[...c?lx(c):[],...lx(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});let d=c&&s?Btt(c,r):null,f=-1,p=null;i&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,h=l?dx(e):null;l&&g();function g(){let v=dx(e);h&&!Vye(h,v)&&r(),h=v,m=requestAnimationFrame(g)}return r(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var Hye=Sye;var jye=Pye,$ye=xye,Wye=kye,qye=wye,M8=bye;var Gye=Nye,I8=(e,t,r)=>{let n=new Map,o={platform:Uye,...r},a={...o.platform,_c:n};return yye(e,t,{...o,platform:a})};var qi=A(lr(),1),Yye=A(lr(),1),Xye=A(tx(),1),ztt=typeof document<"u",Utt=function(){},aB=ztt?Yye.useLayoutEffect:Utt;function iB(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(!iB(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)&&!iB(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Jye(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kye(e,t){let r=Jye(e);return Math.round(t*r)/r}function A8(e){let t=qi.useRef(e);return aB(()=>{t.current=e}),t}function Qye(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]=qi.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=qi.useState(n);iB(f,n)||p(n);let[m,h]=qi.useState(null),[g,v]=qi.useState(null),y=qi.useCallback(I=>{I!==C.current&&(C.current=I,h(I))},[]),b=qi.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),w=a||m,x=i||g,C=qi.useRef(null),S=qi.useRef(null),R=qi.useRef(u),D=l!=null,_=A8(l),T=A8(o),E=A8(c),z=qi.useCallback(()=>{if(!C.current||!S.current)return;let I={placement:t,strategy:r,middleware:f};T.current&&(I.platform=T.current),I8(C.current,S.current,I).then(L=>{let F={...L,isPositioned:E.current!==!1};U.current&&!iB(R.current,F)&&(R.current=F,Xye.flushSync(()=>{d(F)}))})},[f,t,r,T,E]);aB(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[c]);let U=qi.useRef(!1);aB(()=>(U.current=!0,()=>{U.current=!1}),[]),aB(()=>{if(w&&(C.current=w),x&&(S.current=x),w&&x){if(_.current)return _.current(w,x,z);z()}},[w,x,z,_,D]);let N=qi.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:b}),[y,b]),P=qi.useMemo(()=>({reference:w,floating:x}),[w,x]),k=qi.useMemo(()=>{let I={position:r,left:0,top:0};if(!P.floating)return I;let L=Kye(P.floating,u.x),F=Kye(P.floating,u.y);return s?{...I,transform:"translate("+L+"px, "+F+"px)",...Jye(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:F}},[r,s,P.floating,u.x,u.y]);return qi.useMemo(()=>({...u,update:z,refs:N,elements:P,floatingStyles:k}),[u,z,N,P,k])}var Vtt=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?M8({element:n.current,padding:o}).fn(r):{}:n?M8({element:n,padding:o}).fn(r):{}}}},Zye=(e,t)=>({...Hye(e),options:[e,t]}),ebe=(e,t)=>({...jye(e),options:[e,t]}),tbe=(e,t)=>({...Gye(e),options:[e,t]}),rbe=(e,t)=>({...$ye(e),options:[e,t]}),nbe=(e,t)=>({...Wye(e),options:[e,t]});var obe=(e,t)=>({...qye(e),options:[e,t]});var abe=(e,t)=>({...Vtt(e),options:[e,t]});var ibe=A(lr(),1);var D8=A(Jo(),1),Htt="Arrow",sbe=ibe.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,D8.jsx)(cn.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,D8.jsx)("polygon",{points:"0,0 30,0 15,10"})})});sbe.displayName=Htt;var lbe=sbe;var d1=A(lr(),1);function Hs(e){let t=d1.useRef(e);return d1.useEffect(()=>{t.current=e}),d1.useMemo(()=>(...r)=>t.current?.(...r),[])}var cbe=A(lr(),1);function ube(e){let[t,r]=cbe.useState(void 0);return Vs(()=>{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 Hy=A(Jo(),1);var L8="Popper",[dbe,O8]=su(L8),[$tt,fbe]=dbe(L8),pbe=e=>{let{__scopePopper:t,children:r}=e,[n,o]=uu.useState(null);return(0,Hy.jsx)($tt,{scope:t,anchor:n,onAnchorChange:o,children:r})};pbe.displayName=L8;var mbe="PopperAnchor",hbe=uu.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=fbe(mbe,r),i=uu.useRef(null),s=So(t,i),l=uu.useRef(null);return uu.useEffect(()=>{let c=l.current;l.current=n?.current||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,Hy.jsx)(cn.div,{...o,ref:s})});hbe.displayName=mbe;var _8="PopperContent",[Wtt,qtt]=dbe(_8),gbe=uu.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:m,...h}=e,g=fbe(_8,r),[v,y]=uu.useState(null),b=So(t,$=>y($)),[w,x]=uu.useState(null),C=ube(w),S=C?.width??0,R=C?.height??0,D=n+(a!=="center"?"-"+a:""),_=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},T=Array.isArray(c)?c:[c],E=T.length>0,z={padding:_,boundary:T.filter(Ktt),altBoundary:E},{refs:U,floatingStyles:N,placement:P,isPositioned:k,middlewareData:I}=Qye({strategy:"fixed",placement:D,whileElementsMounted:(...$)=>T8(...$,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[Zye({mainAxis:o+R,alignmentAxis:i}),l&&ebe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tbe():void 0,...z}),l&&rbe({...z}),nbe({...z,apply:({elements:$,rects:K,availableWidth:q,availableHeight:te})=>{let{width:oe,height:ee}=K.reference,Ne=$.floating.style;Ne.setProperty("--radix-popper-available-width",`${q}px`),Ne.setProperty("--radix-popper-available-height",`${te}px`),Ne.setProperty("--radix-popper-anchor-width",`${oe}px`),Ne.setProperty("--radix-popper-anchor-height",`${ee}px`)}}),w&&abe({element:w,padding:s}),Ytt({arrowWidth:S,arrowHeight:R}),f&&obe({strategy:"referenceHidden",...z})]}),[L,F]=bbe(P),B=Hs(m);Vs(()=>{k&&B?.()},[k,B]);let O=I.arrow?.x,j=I.arrow?.y,H=I.arrow?.centerOffset!==0,[V,W]=uu.useState();return Vs(()=>{v&&W(window.getComputedStyle(v).zIndex)},[v]),(0,Hy.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:k?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,["--radix-popper-transform-origin"]:[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Hy.jsx)(Wtt,{scope:r,placedSide:L,onArrowChange:x,arrowX:O,arrowY:j,shouldHideArrow:H,children:(0,Hy.jsx)(cn.div,{"data-side":L,"data-align":F,...h,ref:b,style:{...h.style,animation:k?void 0:"none"}})})})});gbe.displayName=_8;var vbe="PopperArrow",Gtt={top:"bottom",right:"left",bottom:"top",left:"right"},ybe=uu.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,a=qtt(vbe,n),i=Gtt[a.placedSide];return(0,Hy.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,Hy.jsx)(lbe,{...o,ref:r,style:{...o.style,display:"block"}})})});ybe.displayName=vbe;function Ktt(e){return e!==null}var Ytt=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]=bbe(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2,m="",h="";return c==="bottom"?(m=i?d:`${f}px`,h=`${-l}px`):c==="top"?(m=i?d:`${f}px`,h=`${n.floating.height+l}px`):c==="right"?(m=`${-l}px`,h=i?d:`${p}px`):c==="left"&&(m=`${n.floating.width+l}px`,h=i?d:`${p}px`),{data:{x:m,y:h}}}});function bbe(e){let[t,r="center"]=e.split("-");return[t,r]}var xbe=pbe,wbe=hbe,Cbe=gbe,Sbe=ybe;var sB=A(lr(),1),Pbe=A(tx(),1);var Nbe=A(Jo(),1),Jtt="Portal",OT=sB.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=sB.useState(!1);Vs(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?Pbe.default.createPortal((0,Nbe.jsx)(cn.div,{...n,ref:t}),i):null});OT.displayName=Jtt;var du=A(lr(),1);var kbe=A(lr(),1);function Qtt(e,t){return kbe.useReducer((r,n)=>t[r][n]??r,e)}var rd=e=>{let{present:t,children:r}=e,n=Ztt(t),o=typeof r=="function"?r({present:n.isPresent}):du.Children.only(r),a=So(n.ref,ert(o));return typeof r=="function"||n.isPresent?du.cloneElement(o,{ref:a}):null};rd.displayName="Presence";function Ztt(e){let[t,r]=du.useState(),n=du.useRef(null),o=du.useRef(e),a=du.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Qtt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return du.useEffect(()=>{let c=lB(n.current);a.current=s==="mounted"?c:"none"},[s]),Vs(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=lB(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Vs(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=lB(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=lB(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:du.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function lB(e){return e?.animationName||"none"}function ert(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 Qa=A(lr(),1);var Rbe=A(lr(),1);function Ebe(e,t=globalThis?.document){let r=Hs(e);Rbe.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 B8=A(Jo(),1),trt="DismissableLayer",F8="dismissableLayer.update",rrt="dismissableLayer.pointerDownOutside",nrt="dismissableLayer.focusOutside",Tbe,Ibe=Qa.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fx=Qa.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=Qa.useContext(Ibe),[u,d]=Qa.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=Qa.useState({}),m=So(t,S=>d(S)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=irt(S=>{let R=S.target,D=[...c.branches].some(_=>_.contains(R));!w||D||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=srt(S=>{let R=S.target;[...c.branches].some(_=>_.contains(R))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return Ebe(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),Qa.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Tbe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Mbe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Tbe)}},[u,f,r,c]),Qa.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Mbe())},[u,c]),Qa.useEffect(()=>{let S=()=>p({});return document.addEventListener(F8,S),()=>document.removeEventListener(F8,S)},[]),(0,B8.jsx)(cn.div,{...l,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Zr(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Zr(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Zr(e.onPointerDownCapture,x.onPointerDownCapture)})});fx.displayName=trt;var ort="DismissableLayerBranch",art=Qa.forwardRef((e,t)=>{let r=Qa.useContext(Ibe),n=Qa.useRef(null),o=So(t,n);return Qa.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,B8.jsx)(cn.div,{...e,ref:o})});art.displayName=ort;function irt(e,t=globalThis?.document){let r=Hs(e),n=Qa.useRef(!1),o=Qa.useRef(()=>{});return Qa.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){Abe(rrt,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 srt(e,t=globalThis?.document){let r=Hs(e),n=Qa.useRef(!1);return Qa.useEffect(()=>{let o=a=>{a.target&&!n.current&&Abe(nrt,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 Mbe(){let e=new CustomEvent(F8);document.dispatchEvent(e)}function Abe(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?CT(o,a):o.dispatchEvent(a)}var nd=A(Jo(),1),z8,dB="HoverCard",[Dbe,dxr]=su(dB,[O8]),fB=O8(),[lrt,pB]=Dbe(dB),Lbe=e=>{let{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=fB(t),c=ui.useRef(0),u=ui.useRef(0),d=ui.useRef(!1),f=ui.useRef(!1),[p,m]=Sg({prop:n,defaultProp:o??!1,onChange:a,caller:dB}),h=ui.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>m(!0),i)},[i,m]),g=ui.useCallback(()=>{clearTimeout(c.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),v=ui.useCallback(()=>m(!1),[m]);return ui.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,nd.jsx)(lrt,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,nd.jsx)(xbe,{...l,children:r})})};Lbe.displayName=dB;var Obe="HoverCardTrigger",_be=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=pB(Obe,r),a=fB(r);return(0,nd.jsx)(wbe,{asChild:!0,...a,children:(0,nd.jsx)(cn.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:Zr(e.onPointerEnter,uB(o.onOpen)),onPointerLeave:Zr(e.onPointerLeave,uB(o.onClose)),onFocus:Zr(e.onFocus,o.onOpen),onBlur:Zr(e.onBlur,o.onClose),onTouchStart:Zr(e.onTouchStart,i=>i.preventDefault())})})});_be.displayName=Obe;var U8="HoverCardPortal",[crt,urt]=Dbe(U8,{forceMount:void 0}),drt=e=>{let{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,a=pB(U8,t);return(0,nd.jsx)(crt,{scope:t,forceMount:r,children:(0,nd.jsx)(rd,{present:r||a.open,children:(0,nd.jsx)(OT,{asChild:!0,container:o,children:n})})})};drt.displayName=U8;var cB="HoverCardContent",Fbe=ui.forwardRef((e,t)=>{let r=urt(cB,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,a=pB(cB,e.__scopeHoverCard);return(0,nd.jsx)(rd,{present:n||a.open,children:(0,nd.jsx)(frt,{"data-state":a.open?"open":"closed",...o,onPointerEnter:Zr(e.onPointerEnter,uB(a.onOpen)),onPointerLeave:Zr(e.onPointerLeave,uB(a.onClose)),ref:t})})});Fbe.displayName=cB;var frt=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=pB(cB,r),c=fB(r),u=ui.useRef(null),d=So(t,u),[f,p]=ui.useState(!1);return ui.useEffect(()=>{if(f){let m=document.body;return z8=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=z8,m.style.webkitUserSelect=z8}}},[f]),ui.useEffect(()=>{if(u.current){let m=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),ui.useEffect(()=>{u.current&&hrt(u.current).forEach(h=>h.setAttribute("tabindex","-1"))}),(0,nd.jsx)(fx,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:Zr(a,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:(0,nd.jsx)(Cbe,{...c,...s,onPointerDown:Zr(s.onPointerDown,m=>{m.currentTarget.contains(m.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)"}})})}),prt="HoverCardArrow",mrt=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=fB(r);return(0,nd.jsx)(Sbe,{...o,...n,ref:t})});mrt.displayName=prt;function uB(e){return t=>t.pointerType==="touch"?void 0:e()}function hrt(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 Bbe=Lbe,zbe=_be;var V8=Fbe;var Vbe=A(ae(),1),_T=Bbe,FT=zbe,f1=Ube.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,Vbe.jsx)(V8,{ref:o,align:t,sideOffset:r,className:M("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}));f1.displayName=V8.displayName;var hx=A(le(),1);var ir=A(lr(),1),Qbe=A(tx(),1);var mB=A(lr(),1),vrt=A(Jo(),1),yrt=mB.createContext(void 0);function Hbe(e){let t=mB.useContext(yrt);return e||t||"ltr"}var H8=A(lr(),1);var brt=H8[" useId ".trim().toString()]||(()=>{}),xrt=0;function px(e){let[t,r]=H8.useState(brt());return Vs(()=>{e||r(n=>n??String(xrt++))},[e]),e||(t?`radix-${t}`:"")}var jy=A(lr(),1);var hB=A(Jo(),1),wrt=A(lr(),1);var Srt=A(Jo(),1);function $8(e){let t=e+"CollectionProvider",[r,n]=su(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{let{scope:g,children:v}=h,y=jy.default.useRef(null),b=jy.default.useRef(new Map).current;return(0,hB.jsx)(o,{scope:g,itemMap:b,collectionRef:y,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=rx(s),c=jy.default.forwardRef((h,g)=>{let{scope:v,children:y}=h,b=a(s,v),w=So(g,b.collectionRef);return(0,hB.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=rx(u),p=jy.default.forwardRef((h,g)=>{let{scope:v,children:y,...b}=h,w=jy.default.useRef(null),x=So(g,w),C=a(u,v);return jy.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...b}),()=>void C.itemMap.delete(w))),(0,hB.jsx)(f,{[d]:"",ref:x,children:y})});p.displayName=u;function m(h){let g=a(e+"CollectionConsumer",h);return jy.default.useCallback(()=>{let y=g.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((C,S)=>b.indexOf(C.ref.current)-b.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},m,n]}var jbe=new WeakMap,Gi,Pp,xxr=(Pp=class extends Map{constructor(r){super(r);aD(this,Gi,void 0);Kw(this,Gi,[...super.keys()]),jbe.set(this,!0)}set(r,n){return jbe.get(this)&&(this.has(r)?Vn(this,Gi)[Vn(this,Gi).indexOf(r)]=r:Vn(this,Gi).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Vn(this,Gi).length,s=$be(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=[...Vn(this,Gi)],f,p=!1;for(let m=l;m<u;m++)if(l===m){let h=d[m];d[m]===n&&(h=d[m+1]),a&&this.delete(n),f=this.get(h),this.set(n,o)}else{!p&&d[m-1]===n&&(p=!0);let h=d[p?m:m-1],g=f;f=this.get(h),this.delete(h),this.set(h,g)}return this}with(r,n,o){let a=new Pp(this);return a.insert(r,n,o),a}before(r){let n=Vn(this,Gi).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Vn(this,Gi).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Vn(this,Gi).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=Vn(this,Gi).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Kw(this,Gi,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Vn(this,Gi).splice(Vn(this,Gi).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=j8(Vn(this,Gi),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=j8(Vn(this,Gi),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Vn(this,Gi).indexOf(r)}keyAt(r){return j8(Vn(this,Gi),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 Pp(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 Pp(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 Pp(n)}toReversed(){let r=new Pp;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 Pp(n)}slice(r,n){let o=new Pp,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}},Gi=new WeakMap,Pp);function j8(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=Crt(e,t);return r===-1?void 0:e[r]}function Crt(e,t){let r=e.length,n=$be(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function $be(e){return e!==e||e===0?0:Math.trunc(e)}var gB=A(lr(),1);function Wbe(e){let t=gB.useRef({value:e,previous:e});return gB.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var qbe=A(lr(),1);var Gbe=A(Jo(),1),Prt=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"}),Nrt="VisuallyHidden",Kbe=qbe.forwardRef((e,t)=>(0,Gbe.jsx)(cn.span,{...e,ref:t,style:{...Prt,...e.style}}));Kbe.displayName=Nrt;var Ybe=Kbe;var Dr=A(Jo(),1),mx="NavigationMenu",[X8,Zbe,Rrt]=$8(mx),[W8,Ert,Trt]=$8(mx),[J8,Bxr]=su(mx,[Rrt,Trt]),[Mrt,df]=J8(mx),[Irt,Art]=J8(mx),e0e=ir.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]=ir.useState(null),p=So(t,D=>f(D)),m=Hbe(c),h=ir.useRef(0),g=ir.useRef(0),v=ir.useRef(0),[y,b]=ir.useState(!0),[w,x]=Sg({prop:n,onChange:D=>{let _=D!=="",T=s>0;_?(window.clearTimeout(v.current),T&&b(!1)):(window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(!0),s)),o?.(D)},defaultProp:a??"",caller:mx}),C=ir.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(""),150)},[x]),S=ir.useCallback(D=>{window.clearTimeout(g.current),x(D)},[x]),R=ir.useCallback(D=>{w===D?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(D)},i)},[w,x,i]);return ir.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(v.current)},[]),(0,Dr.jsx)(t0e,{scope:r,isRootMenu:!0,value:w,dir:m,orientation:l,rootNavigationMenu:d,onTriggerEnter:D=>{window.clearTimeout(h.current),y?R(D):S(D)},onTriggerLeave:()=>{window.clearTimeout(h.current),C()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:C,onItemSelect:D=>{x(_=>_===D?"":D)},onItemDismiss:()=>x(""),children:(0,Dr.jsx)(cn.nav,{"aria-label":"Main","data-orientation":l,dir:m,...u,ref:p})})});e0e.displayName=mx;var q8="NavigationMenuSub",Drt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",...s}=e,l=df(q8,r),[c,u]=Sg({prop:n,onChange:o,defaultProp:a??"",caller:q8});return(0,Dr.jsx)(t0e,{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,Dr.jsx)(cn.div,{"data-orientation":i,...s,ref:t})})});Drt.displayName=q8;var t0e=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,[m,h]=ir.useState(null),[g,v]=ir.useState(new Map),[y,b]=ir.useState(null);return(0,Dr.jsx)(Mrt,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:Wbe(s),baseId:px(),dir:o,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:Hs(u),onTriggerLeave:Hs(d),onContentEnter:Hs(f),onContentLeave:Hs(p),onItemSelect:Hs(l),onItemDismiss:Hs(c),onViewportContentChange:ir.useCallback((w,x)=>{v(C=>(C.set(w,x),new Map(C)))},[]),onViewportContentRemove:ir.useCallback(w=>{v(x=>x.has(w)?(x.delete(w),new Map(x)):x)},[]),children:(0,Dr.jsx)(X8.Provider,{scope:t,children:(0,Dr.jsx)(Irt,{scope:t,items:g,children:i})})})},r0e="NavigationMenuList",n0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(r0e,r),a=(0,Dr.jsx)(cn.ul,{"data-orientation":o.orientation,...n,ref:t});return(0,Dr.jsx)(cn.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,Dr.jsx)(X8.Slot,{scope:r,children:o.isRootMenu?(0,Dr.jsx)(p0e,{asChild:!0,children:a}):a})})});n0e.displayName=r0e;var o0e="NavigationMenuItem",[Lrt,a0e]=J8(o0e),i0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,...o}=e,a=px(),i=n||a||"LEGACY_REACT_AUTO_VALUE",s=ir.useRef(null),l=ir.useRef(null),c=ir.useRef(null),u=ir.useRef(()=>{}),d=ir.useRef(!1),f=ir.useCallback((m="start")=>{if(s.current){u.current();let h=K8(s.current);h.length&&eG(m==="start"?h:h.reverse())}},[]),p=ir.useCallback(()=>{if(s.current){let m=K8(s.current);m.length&&(u.current=Vrt(m))}},[]);return(0,Dr.jsx)(Lrt,{scope:r,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,Dr.jsx)(cn.li,{...o,ref:t})})});i0e.displayName=o0e;var G8="NavigationMenuTrigger",s0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,disabled:n,...o}=e,a=df(G8,e.__scopeNavigationMenu),i=a0e(G8,e.__scopeNavigationMenu),s=ir.useRef(null),l=So(s,i.triggerRef,t),c=h0e(a.baseId,i.value),u=g0e(a.baseId,i.value),d=ir.useRef(!1),f=ir.useRef(!1),p=i.value===a.value;return(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(X8.ItemSlot,{scope:r,value:i.value,children:(0,Dr.jsx)(m0e,{asChild:!0,children:(0,Dr.jsx)(cn.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":tG(p),"aria-expanded":p,"aria-controls":u,...o,ref:l,onPointerEnter:Zr(e.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:Zr(e.onPointerMove,yB(()=>{n||f.current||i.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:Zr(e.onPointerLeave,yB(()=>{n||(a.onTriggerLeave(),d.current=!1)})),onClick:Zr(e.onClick,()=>{a.onItemSelect(i.value),f.current=p}),onKeyDown:Zr(e.onKeyDown,m=>{let g={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&m.key===g&&(i.onEntryKeyDown(),m.preventDefault())})})})}),p&&(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(Ybe,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:m=>{let h=i.contentRef.current,g=m.relatedTarget,v=g===s.current,y=h?.contains(g);(v||!y)&&i.onFocusProxyEnter(v?"start":"end")}}),a.viewport&&(0,Dr.jsx)("span",{"aria-owns":u})]})]})});s0e.displayName=G8;var Ort="NavigationMenuLink",Xbe="navigationMenu.linkSelect",l0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,active:n,onSelect:o,...a}=e;return(0,Dr.jsx)(m0e,{asChild:!0,children:(0,Dr.jsx)(cn.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...a,ref:t,onClick:Zr(e.onClick,i=>{let s=i.target,l=new CustomEvent(Xbe,{bubbles:!0,cancelable:!0});if(s.addEventListener(Xbe,c=>o?.(c),{once:!0}),CT(s,l),!l.defaultPrevented&&!i.metaKey){let c=new CustomEvent(vB,{bubbles:!0,cancelable:!0});CT(s,c)}},{checkForDefaultPrevented:!1})})})});l0e.displayName=Ort;var Q8="NavigationMenuIndicator",c0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=df(Q8,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Qbe.default.createPortal((0,Dr.jsx)(rd,{present:r||a,children:(0,Dr.jsx)(_rt,{...n,ref:t})}),o.indicatorTrack):null});c0e.displayName=Q8;var _rt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(Q8,r),a=Zbe(r),[i,s]=ir.useState(null),[l,c]=ir.useState(null),u=o.orientation==="horizontal",d=!!o.value;ir.useEffect(()=>{let m=a().find(h=>h.value===o.value)?.ref.current;m&&s(m)},[a,o.value]);let f=()=>{i&&c({size:u?i.offsetWidth:i.offsetHeight,offset:u?i.offsetLeft:i.offsetTop})};return Y8(i,f),Y8(o.indicatorTrack,f),l?(0,Dr.jsx)(cn.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}),p1="NavigationMenuContent",u0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=df(p1,e.__scopeNavigationMenu),a=a0e(p1,e.__scopeNavigationMenu),i=So(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,Dr.jsx)(Frt,{forceMount:r,...l,ref:i}):(0,Dr.jsx)(rd,{present:r||s,children:(0,Dr.jsx)(d0e,{"data-state":tG(s),...l,ref:i,onPointerEnter:Zr(e.onPointerEnter,o.onContentEnter),onPointerLeave:Zr(e.onPointerLeave,yB(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})})});u0e.displayName=p1;var Frt=ir.forwardRef((e,t)=>{let r=df(p1,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return Vs(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Vs(()=>()=>o(e.value),[e.value,o]),null}),vB="navigationMenu.rootContentDismiss",d0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,u=df(p1,r),d=ir.useRef(null),f=So(d,t),p=h0e(u.baseId,n),m=g0e(u.baseId,n),h=Zbe(r),g=ir.useRef(null),{onItemDismiss:v}=u;ir.useEffect(()=>{let b=d.current;if(u.isRootMenu&&b){let w=()=>{v(),s(),b.contains(document.activeElement)&&o.current?.focus()};return b.addEventListener(vB,w),()=>b.removeEventListener(vB,w)}},[u.isRootMenu,e.value,o,v,s]);let y=ir.useMemo(()=>{let w=h().map(_=>_.value);u.dir==="rtl"&&w.reverse();let x=w.indexOf(u.value),C=w.indexOf(u.previousValue),S=n===u.value,R=C===w.indexOf(n);if(!S&&!R)return g.current;let D=(()=>{if(x!==C){if(S&&C!==-1)return x>C?"from-end":"from-start";if(R&&x!==-1)return x>C?"to-start":"to-end"}return null})();return g.current=D,D},[u.previousValue,u.value,u.dir,h,n]);return(0,Dr.jsx)(p0e,{asChild:!0,children:(0,Dr.jsx)(fx,{id:m,"aria-labelledby":p,"data-motion":y,"data-orientation":u.orientation,...c,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let b=new Event(vB,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(b)},onFocusOutside:Zr(e.onFocusOutside,b=>{l();let w=b.target;u.rootNavigationMenu?.contains(w)&&b.preventDefault()}),onPointerDownOutside:Zr(e.onPointerDownOutside,b=>{let w=b.target,x=h().some(S=>S.ref.current?.contains(w)),C=u.isRootMenu&&u.viewport?.contains(w);(x||C||!u.isRootMenu)&&b.preventDefault()}),onKeyDown:Zr(e.onKeyDown,b=>{let w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){let C=K8(b.currentTarget),S=document.activeElement,R=C.findIndex(T=>T===S),_=b.shiftKey?C.slice(0,R).reverse():C.slice(R+1,C.length);eG(_)?b.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Zr(e.onEscapeKeyDown,b=>{i.current=!0})})})}),Z8="NavigationMenuViewport",f0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=!!df(Z8,e.__scopeNavigationMenu).value;return(0,Dr.jsx)(rd,{present:r||a,children:(0,Dr.jsx)(Brt,{...n,ref:t})})});f0e.displayName=Z8;var Brt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,children:n,...o}=e,a=df(Z8,r),i=So(t,a.onViewportChange),s=Art(p1,e.__scopeNavigationMenu),[l,c]=ir.useState(null),[u,d]=ir.useState(null),f=l?l?.width+"px":void 0,p=l?l?.height+"px":void 0,m=!!a.value,h=m?a.value:a.previousValue;return Y8(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,Dr.jsx)(cn.div,{"data-state":tG(m),"data-orientation":a.orientation,...o,ref:i,style:{pointerEvents:!m&&a.isRootMenu?"none":void 0,["--radix-navigation-menu-viewport-width"]:f,["--radix-navigation-menu-viewport-height"]:p,...o.style},onPointerEnter:Zr(e.onPointerEnter,a.onContentEnter),onPointerLeave:Zr(e.onPointerLeave,yB(a.onContentLeave)),children:Array.from(s.items).map(([v,{ref:y,forceMount:b,...w}])=>{let x=h===v;return(0,Dr.jsx)(rd,{present:b||x,children:(0,Dr.jsx)(d0e,{...w,ref:wT(y,C=>{x&&C&&d(C)})})},v)})})}),zrt="FocusGroup",p0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(zrt,r);return(0,Dr.jsx)(W8.Provider,{scope:r,children:(0,Dr.jsx)(W8.Slot,{scope:r,children:(0,Dr.jsx)(cn.div,{dir:o.dir,...n,ref:t})})})}),Jbe=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Urt="FocusGroupItem",m0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Ert(r),a=df(Urt,r);return(0,Dr.jsx)(W8.ItemSlot,{scope:r,children:(0,Dr.jsx)(cn.button,{...n,ref:t,onKeyDown:Zr(e.onKeyDown,i=>{if(["Home","End",...Jbe].includes(i.key)){let l=o().map(d=>d.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),Jbe.includes(i.key)){let d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>eG(l)),i.preventDefault()}})})})});function K8(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 eG(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function Vrt(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 Y8(e,t){let r=Hs(t);Vs(()=>{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 tG(e){return e?"open":"closed"}function h0e(e,t){return`${e}-trigger-${t}`}function g0e(e,t){return`${e}-content-${t}`}function yB(e){return t=>t.pointerType==="mouse"?e(t):void 0}var rG=e0e;var nG=n0e,v0e=i0e,oG=s0e,y0e=l0e,aG=c0e,iG=u0e,sG=f0e;var ff=A(ae(),1),BT=hx.forwardRef(({className:e,children:t,...r},n)=>(0,ff.jsxs)(rG,{ref:n,className:M("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,(0,ff.jsx)(bB,{})]}));BT.displayName=rG.displayName;var zT=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(nG,{ref:r,className:M("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));zT.displayName=nG.displayName;var UT=v0e,VT=ot("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"),HT=hx.forwardRef(({className:e,children:t,...r},n)=>(0,ff.jsxs)(oG,{ref:n,className:M(VT(),"group",e),...r,children:[t," ",(0,ff.jsx)(Io,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));HT.displayName=oG.displayName;var jT=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(iG,{ref:r,className:M("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}));jT.displayName=iG.displayName;var $T=y0e,bB=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)("div",{className:M("absolute left-0 top-full flex justify-center"),children:(0,ff.jsx)(sG,{className:M("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})}));bB.displayName=sG.displayName;var lG=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(aG,{ref:r,className:M("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,ff.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));lG.displayName=aG.displayName;var Ki=A(le(),1);ar();var Ni=A(ae(),1),cG=ot("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"}}),jrt=ot("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"}}),$rt=e=>{(0,Ki.useEffect)(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},Wrt=(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)},b0e=Ki.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:m,showBackdrop:h=!0,backdropClassName:g,backdropBlur:v=!0,closeOnBackdropClick:y=!0,animationDuration:b=.5,springConfig:w={stiffness:300,damping:30,mass:1},preventBodyScroll:x=!0,autoHeight:C=!1,nestedScrolling:S=!0,onSnapPointChange:R,className:D,asChild:_=!1,isProComponent:T=!0,...E},z)=>{let U=n==="bottom"||n==="top",N=DS(),P=DS(),k=ho(0),I=ho(0),L=U?I:k,[F,B]=(0,Ki.useState)(i||(a.length>0?a[0]:50)),[O,j]=(0,Ki.useState)(!1),H=(0,Ki.useRef)(null),[V,W]=(0,Ki.useState)(null);$rt(e&&x);let $=(0,Ki.useMemo)(()=>typeof window>"u"?1e3:U?window.innerHeight:window.innerWidth,[U]),K=(0,Ki.useCallback)(De=>0,[n,$]),q=e?.5:0,te=(0,Ki.useCallback)((De,pe)=>{j(!1);let ke=U?pe.offset.y:pe.offset.x,he=U?pe.velocity.y:pe.velocity.x;if(s&&(n==="bottom"&&ke>l&&he>-c||n==="top"&&ke<-l&&he<c||n==="right"&&ke>l&&he>-c||n==="left"&&ke<-l&&he<c)){t(!1);return}if(a.length>0){let Y=n==="bottom"?"down":n==="top"?"up":n==="left"?"left":"right",X=Wrt(Math.abs(L.get()),he,a,Y,$);B(X),R?.(X),Lo(L,K(X),{type:"spring",...w})}else Lo(L,K(F),{type:"spring",...w})},[U,n,s,l,c,a,L,$,K,F,w,t,R]),oe=(0,Ki.useCallback)((De,pe)=>{j(!0)},[]);(0,Ki.useEffect)(()=>{if(!C||!H.current||!e)return;let De=new ResizeObserver(pe=>{for(let ke of pe)W(ke.contentRect.height)});return De.observe(H.current),()=>{De.disconnect()}},[C,e]),(0,Ki.useEffect)(()=>{e?Lo(L,0,{type:"spring",...w}):Lo(L,0,{type:"spring",...w})},[e,L,w]),(0,Ki.useEffect)(()=>{if(!e)return;let De=pe=>{pe.key==="Escape"&&s&&t(!1)};return document.addEventListener("keydown",De),()=>document.removeEventListener("keydown",De)},[e,s,t]);let ee=()=>({x:0,y:0}),Ne=()=>{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,Ni.jsxs)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:b},className:"fixed inset-0 z-50",style:{pointerEvents:O?"none":"auto"},children:[h&&(0,Ni.jsx)(Z.div,{className:M("absolute inset-0 bg-black/50",v&&"backdrop-blur-sm",g),style:{opacity:q},onClick:y?()=>t(!1):void 0}),(0,Ni.jsxs)(Z.div,{ref:z,drag:s?U?"y":"x":!1,dragConstraints:Ne(),dragElastic:u,onDragStart:oe,onDragEnd:te,initial:ee(),style:{...O?{[U?"y":"x"]:L}:{},...C&&V&&U?{height:`${Math.min(V+60,$*.95)}px`}:{}},className:M(cG({position:n,size:o}),"will-change-transform",D),...E,children:[d&&(0,Ni.jsx)("div",{className:M(jrt({position:n}),"cursor-grab active:cursor-grabbing",O&&"bg-muted-foreground/40 scale-x-150",f)}),p&&(0,Ni.jsx)("button",{onClick:()=>t(!1),className:M("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",m),"aria-label":"Close drawer",children:(0,Ni.jsx)(Qt,{className:"h-4 w-4"})}),(0,Ni.jsx)("div",{ref:H,className:M("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});b0e.displayName="MoonUIGestureDrawerProComponent";var xB=Ki.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Ni.jsx)(Ve,{className:"w-fit mx-auto",children:(0,Ni.jsx)(He,{className:"py-6 text-center",children:(0,Ni.jsxs)("div",{className:"space-y-4",children:[(0,Ni.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ni.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ni.jsxs)("div",{children:[(0,Ni.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ni.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Gesture Drawer is available exclusively to MoonUI Pro subscribers."}),(0,Ni.jsx)("a",{href:"/pricing",children:(0,Ni.jsxs)(re,{size:"sm",children:[(0,Ni.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ni.jsx)(b0e,{...e,ref:t})});xB.displayName="MoonUIGestureDrawerPro";var x0e=xB;var Po=A(le(),1);ar();var er=A(ae(),1),qrt=ot("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"}}),w0e=Po.createContext(void 0);function C0e(){let e=Po.useContext(w0e);if(!e)throw new Error("useLightbox must be used within a LightboxProvider");return e}function m1({children:e,items:t=[],defaultIndex:r=0}){let{hasProAccess:n,isLoading:o}=Ye(),[a,i]=Po.useState(r),[s,l]=Po.useState(!1),[c,u]=Po.useState(1),d=Po.useMemo(()=>({items:t,currentIndex:a,setCurrentIndex:i,isOpen:s,setIsOpen:l,zoom:c,setZoom:u}),[t,a,s,c]);return!o&&!n?(0,er.jsx)(rr,{componentName:"Lightbox",compact:!0}):(0,er.jsx)(w0e.Provider,{value:d,children:e})}var gx=Po.forwardRef(({index:e=0,asChild:t,children:r,onClick:n,...o},a)=>{let{setCurrentIndex:i,setIsOpen:s,setZoom:l}=C0e(),c=g=>{i(e),s(!0),l(1),n?.(g)};if(t){let g=r,{onDrag:v,onDragStart:y,onDragEnd:b,onDragOver:w,onDrop:x,...C}=o;return Po.cloneElement(g,{...g.props,...C,onClick:c})}let{onDrag:u,onDragStart:d,onDragEnd:f,onDragOver:p,onDrop:m,...h}=o;return(0,er.jsx)("div",{ref:a,onClick:c,className:"cursor-pointer",...h,children:r})});gx.displayName="LightboxTrigger";var vx=Po.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:m,onDragStart:h,onDragEnd:g,onDragOver:v,onDrop:y,onAnimationStart:b,onAnimationEnd:w,onAnimationIteration:x,...C}=f,{items:S,currentIndex:R,setCurrentIndex:D,isOpen:_,setIsOpen:T,zoom:E,setZoom:z}=C0e(),[U,N]=Po.useState(!0),[P,k]=Po.useState(!1),[I,L]=Po.useState(!0),[F,B]=Po.useState(!1),[O,j]=Po.useState({x:0,y:0}),[H,V]=Po.useState(!1),W=Po.useRef(null),$=Po.useRef(null),K=S[R];Po.useEffect(()=>{K?.type==="video"&&u?(k(!0),L(!0)):k(!1)},[R,K,u]),Po.useEffect(()=>{if(!s||!_)return;let Ae=Y=>{switch(Y.key){case"ArrowLeft":te();break;case"ArrowRight":oe();break;case"Escape":q();break;case"+":case"=":ee();break;case"-":Ne();break;case" ":K?.type==="video"&&(Y.preventDefault(),k(!P));break}};return window.addEventListener("keydown",Ae),()=>window.removeEventListener("keydown",Ae)},[_,R,P,s]),Po.useEffect(()=>{$.current&&K?.type==="video"&&(P?$.current.play().catch(Ae=>{console.error("Video play error:",Ae),k(!1)}):$.current.pause())},[P,K]);let q=()=>{T(!1),z(1),j({x:0,y:0}),d?.()},te=()=>{D(R>0?R-1:S.length-1),z(1),j({x:0,y:0}),N(!0)},oe=()=>{D(R<S.length-1?R+1:0),z(1),j({x:0,y:0}),N(!0)},ee=()=>{z(Math.min(E+.5,3))},Ne=()=>{z(Math.max(E-.5,.5)),E-.5<=1&&j({x:0,y:0})},we=()=>{if(K){let Ae=document.createElement("a");Ae.href=K.src,Ae.download=K.alt||"download",Ae.click()}},De=()=>{F?document.exitFullscreen():W.current?.requestFullscreen(),B(!F)},pe=Ae=>{E>1&&V(!0)},ke=Ae=>{H&&E>1&&j({x:O.x+Ae.movementX,y:O.y+Ae.movementY})},he=()=>{V(!1)};return K?(0,er.jsx)(xy,{open:_,onOpenChange:T,children:(0,er.jsx)(Ct,{children:_&&(0,er.jsx)(wy,{forceMount:!0,children:(0,er.jsx)(Cm,{asChild:!0,children:(0,er.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c/1e3},className:M(qrt({backdrop:t}),e),ref:p,onClick:Ae=>{Ae.target===Ae.currentTarget&&q()},...C,children:(0,er.jsxs)("div",{ref:W,className:"relative w-full h-full flex items-center justify-center pointer-events-none",onMouseMove:ke,onMouseUp:he,onMouseLeave:he,children:[(0,er.jsx)("div",{className:"absolute inset-0 pointer-events-auto",onClick:q}),(0,er.jsx)("button",{onClick:q,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,er.jsx)(Qt,{className:"h-5 w-5"})}),r&&S.length>1&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:te,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,er.jsx)(ka,{className:"h-5 w-5"})}),(0,er.jsx)("button",{onClick:oe,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,er.jsx)(Rn,{className:"h-5 w-5"})})]}),(0,er.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,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:Ne,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(qu,{className:"h-4 w-4"})}),(0,er.jsxs)("span",{className:"px-3 py-1 rounded-full bg-black/50 text-white text-sm",children:[Math.round(E*100),"%"]}),(0,er.jsx)("button",{onClick:ee,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(Wu,{className:"h-4 w-4"})})]}),K.type==="video"&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:()=>{k(!P),!P&&$.current&&$.current.play().catch(Ae=>{console.error("Play failed:",Ae)})},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:P?(0,er.jsx)(Wv,{className:"h-4 w-4"}):(0,er.jsx)(op,{className:"h-4 w-4"})}),(0,er.jsx)("button",{onClick:()=>{L(!I),$.current&&($.current.muted=!I)},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:I?(0,er.jsx)(dE,{className:"h-4 w-4"}):(0,er.jsx)(uE,{className:"h-4 w-4"})})]}),o&&(0,er.jsx)("button",{onClick:we,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(on,{className:"h-4 w-4"})}),a&&(0,er.jsx)("button",{onClick:De,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(ol,{className:"h-4 w-4"})})]}),(0,er.jsxs)(Z.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(${E}) translate(${O.x/E}px, ${O.y/E}px)`,cursor:E>1?H?"grabbing":"grab":"auto"},onMouseDown:pe,children:[U&&(0,er.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,er.jsx)(yr,{className:"h-8 w-8 animate-spin text-white"})}),K.type==="image"?(0,er.jsx)("img",{src:K.src,alt:K.alt,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto object-contain select-none",onLoad:()=>N(!1),draggable:!1}):(0,er.jsx)("video",{ref:$,src:K.src,poster:K.poster,muted:I,controls:!0,autoPlay:u&&P,playsInline:!0,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto",onLoadedData:()=>{N(!1),u&&P&&$.current&&$.current.play().catch(Ae=>{console.error("Autoplay failed:",Ae)})},onError:Ae=>{console.error("Video error:",Ae),N(!1)}})]}),(K.title||K.description)&&(0,er.jsxs)(Z.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,er.jsx)("h3",{className:"text-white text-xl font-semibold mb-1",children:K.title}),K.description&&(0,er.jsx)("p",{className:"text-white/80 text-sm",children:K.description})]}),i&&S.length>1&&(0,er.jsx)(Z.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,er.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((Ae,Y)=>(0,er.jsx)("button",{onClick:()=>{D(Y),z(1),j({x:0,y:0})},className:M("w-16 h-16 rounded overflow-hidden transition-all",Y===R?"ring-2 ring-white scale-110":"opacity-60 hover:opacity-100"),children:Ae.type==="image"?(0,er.jsx)("img",{src:Ae.thumbnail||Ae.src,alt:Ae.alt,className:"w-full h-full object-cover"}):(0,er.jsx)("div",{className:"w-full h-full bg-black/50 flex items-center justify-center",children:(0,er.jsx)(op,{className:"h-4 w-4 text-white"})})},Y))})})]})})})})})}):null});vx.displayName="LightboxContent";function Grt({src:e,type:t="image",alt:r,poster:n,title:o,description:a,children:i,...s}){return(0,er.jsxs)(m1,{items:[{type:t,src:e,alt:r,poster:n,title:o,description:a}],children:[(0,er.jsx)(gx,{children:i}),(0,er.jsx)(vx,{...s})]})}var Yi=A(le(),1);ar();var _t=A(ae(),1),S0e=ot("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}}),wB=ot("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"}}),P0e=Yi.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:m=!0,showOverlay:h=!0,overlayContent:g,loadingState:v=!1,skeletonCount:y=6,emptyState:b,onItemClick:w,lazyLoad:x=!0,infiniteScroll:C=!1,onLoadMore:S,hasMore:R=!1,lightboxProps:D,..._},T)=>{let{hasProAccess:E,isLoading:z}=Ye(),[U,N]=Yi.useState(f),[P,k]=Yi.useState(p),[I,L]=Yi.useState(!1),[F,B]=Yi.useState(new Set),O=Yi.useRef(null),j=Yi.useRef(null),H=Yi.useMemo(()=>!l||U==="all"?t:t.filter(ee=>"category"in ee&&typeof ee.category=="string"?ee.category===U:U==="image"?ee.type==="image":U==="video"?ee.type==="video":!0),[t,U,l]),V=Yi.useMemo(()=>{if(!c||P==="default")return H;let ee=d.find(Ne=>Ne.id===P);return ee?[...H].sort(ee.compareFn):H},[H,P,c,d]),W=[{id:"all",label:"All"},{id:"image",label:"Images",icon:(0,_t.jsx)(As,{className:"h-4 w-4"})},{id:"video",label:"Videos",icon:(0,_t.jsx)(ap,{className:"h-4 w-4"})}],$=u.length>0?u:W;Yi.useEffect(()=>{if(x)return O.current=new IntersectionObserver(ee=>{ee.forEach(Ne=>{if(Ne.isIntersecting){let we=parseInt(Ne.target.getAttribute("data-index")||"0");B(De=>new Set(De).add(we))}})},{rootMargin:"50px"}),()=>{O.current?.disconnect()}},[x]),Yi.useEffect(()=>{if(!C||!S||!R)return;let ee=new IntersectionObserver(Ne=>{Ne[0].isIntersecting&&S()},{rootMargin:"100px"});return j.current&&ee.observe(j.current),()=>ee.disconnect()},[C,S,R]);let K=(ee,Ne)=>{w&&w(ee,Ne)},q=(ee,Ne)=>{let we=!x||F.has(Ne)||ee.thumbnail&&ee.thumbnail.endsWith(".svg"),De=(0,_t.jsxs)(Z.div,{className:M(wB({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:Ne*.05},"data-index":Ne,ref:pe=>{pe&&O.current&&!F.has(Ne)&&O.current.observe(pe)},onClick:()=>K(ee,Ne),children:[ee.type==="image"?(0,_t.jsxs)("div",{className:M("relative w-full",r==="masonry"||r==="justified"?"":"h-full"),children:[(0,_t.jsx)("img",{src:ee.thumbnail||ee.src,alt:ee.alt||`Gallery item ${Ne+1}`,className:M("w-full object-cover",r==="masonry"?"h-auto":"h-full",we?"opacity-100":"opacity-0","transition-opacity duration-300"),loading:x?"lazy":void 0,onLoad:()=>B(pe=>new Set(pe).add(Ne))}),!we&&(0,_t.jsx)("div",{className:M("absolute inset-0 w-full bg-muted animate-pulse",r==="masonry"?"h-64":"h-full",r==="masonry"&&"aspect-[3/4]")})]}):(0,_t.jsxs)("div",{className:M("relative w-full bg-black",r==="masonry"?"":"h-full"),children:[we&&(ee.thumbnail||ee.poster)&&(0,_t.jsx)("img",{src:ee.thumbnail||ee.poster,alt:ee.alt||`Video thumbnail ${Ne+1}`,className:M("w-full object-cover",r==="masonry"?"h-auto":"h-full"),loading:x?"lazy":void 0}),(0,_t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,_t.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,_t.jsx)(ap,{className:"h-6 w-6 text-white"})})})]}),h&&(0,_t.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:[g?g(ee,Ne):(0,_t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[ee.title&&(0,_t.jsx)("h3",{className:"text-sm font-semibold mb-1",children:ee.title}),ee.description&&(0,_t.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:ee.description})]}),m&&(0,_t.jsx)("div",{className:"absolute top-2 right-2",children:(0,_t.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:ee.type==="image"?(0,_t.jsx)(As,{className:"h-4 w-4 text-white"}):(0,_t.jsx)(ap,{className:"h-4 w-4 text-white"})})})]})]},Ne);return s?(0,_t.jsx)(gx,{index:Ne,children:De},Ne):De},te=()=>(0,_t.jsx)("div",{className:M(wB({variant:o,aspectRatio:a})),children:(0,_t.jsx)("div",{className:"w-full h-full bg-muted animate-pulse"})});if(!z&&!E)return(0,_t.jsx)(rr,{componentName:"Media Gallery",compact:!0});let oe=(0,_t.jsxs)(_t.Fragment,{children:[(l||c)&&(0,_t.jsxs)("div",{className:"mb-6",children:[(0,_t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,_t.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,_t.jsxs)("button",{onClick:()=>L(!I),className:M("flex items-center gap-2 px-4 py-2 rounded-lg border transition-colors",I?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-accent"),children:[(0,_t.jsx)(oi,{className:"h-4 w-4"}),"Filters"]}),c&&d.length>0&&(0,_t.jsxs)("select",{value:P,onChange:ee=>k(ee.target.value),className:"px-4 py-2 rounded-lg border bg-background",children:[(0,_t.jsx)("option",{value:"default",children:"Default order"}),d.map(ee=>(0,_t.jsx)("option",{value:ee.id,children:ee.label},ee.id))]})]}),(0,_t.jsxs)("div",{className:"text-sm text-muted-foreground",children:[V.length," items"]})]}),(0,_t.jsx)(Ct,{children:I&&l&&(0,_t.jsx)(Z.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,_t.jsx)("div",{className:"flex flex-wrap gap-2 pb-4",children:$.map(ee=>(0,_t.jsxs)("button",{onClick:()=>N(ee.id),className:M("flex items-center gap-2 px-3 py-1.5 rounded-full text-sm transition-colors",U===ee.id?"bg-primary text-primary-foreground":"bg-muted hover:bg-accent"),children:[ee.icon,ee.label]},ee.id))})})})]}),(0,_t.jsx)("div",{ref:T,className:M(r==="masonry"?"columns-1 sm:columns-2 md:columns-3 lg:columns-4 gap-4":S0e({layout:r,columns:n}),e),style:r==="masonry"?{columnGap:"1rem"}:void 0,children:v?(0,_t.jsx)(_t.Fragment,{children:Array.from({length:y}).map((ee,Ne)=>(0,_t.jsx)(Yi.Fragment,{children:te()},Ne))}):V.length>0?V.map((ee,Ne)=>q(ee,Ne)):b||(0,_t.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,_t.jsx)(As,{className:"h-12 w-12 text-muted-foreground mb-4"}),(0,_t.jsx)("p",{className:"text-muted-foreground",children:"No media items found"})]})}),C&&R&&(0,_t.jsx)("div",{ref:j,className:"flex justify-center py-8",children:(0,_t.jsx)(yr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});return s?(0,_t.jsxs)(m1,{items:V,children:[oe,(0,_t.jsx)(vx,{showThumbnails:!0,showNavigation:!0,backdrop:"blur",...D})]}):oe});P0e.displayName="MoonUIMediaGalleryPro";var N0e=Yi.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]=Yi.useState(!1),m=()=>{p(!0),c?.()};return(0,_t.jsxs)("div",{ref:d,className:M(wB({variant:n,aspectRatio:o,hover:a}),e),...u,children:[t.type==="image"?(0,_t.jsx)("img",{src:t.src,alt:t.alt||`Gallery item ${r+1}`,className:M("w-full h-full object-cover transition-opacity duration-300",f?"opacity-100":"opacity-0"),onLoad:m}):(0,_t.jsxs)("div",{className:"relative w-full h-full bg-black",children:[t.poster&&(0,_t.jsx)("img",{src:t.poster,alt:t.alt||`Video thumbnail ${r+1}`,className:"w-full h-full object-cover",onLoad:m}),(0,_t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,_t.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,_t.jsx)(ap,{className:"h-6 w-6 text-white"})})})]}),!f&&(0,_t.jsx)("div",{className:"absolute inset-0 bg-muted animate-pulse"}),s&&f&&(0,_t.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,_t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[t.title&&(0,_t.jsx)("h3",{className:"text-sm font-semibold mb-1",children:t.title}),t.description&&(0,_t.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:t.description})]}),i&&(0,_t.jsx)("div",{className:"absolute top-2 right-2",children:(0,_t.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,_t.jsx)(As,{className:"h-4 w-4 text-white"}):(0,_t.jsx)(ap,{className:"h-4 w-4 text-white"})})})]})]})});N0e.displayName="MoonUIGalleryItemPro";var zm=A(le(),1);ar();var Da=A(ae(),1);function h1({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:m=!0,dropIndicatorColor:h="primary",dropIndicatorStyle:g="glow",dragPreviewStyle:v="clone",hapticFeedback:y=!0}){let{hasProAccess:b,isLoading:w}=Ye(),[x,C]=(0,zm.useState)(null),[S,R]=(0,zm.useState)(null),[D,_]=(0,zm.useState)(!1),[T,E]=(0,zm.useState)({x:0,y:0}),[z,U]=(0,zm.useState)(!1),N=(0,zm.useRef)(null),P=(0,zm.useRef)(0),k=(0,zm.useRef)(new Map),I=(V,W)=>{if(c)return;let $=e[W];N.current=$,C(W),_(!0);let K=V.currentTarget.getBoundingClientRect();if(E({x:V.clientX-K.left,y:V.clientY-K.top}),V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/html",""),V.currentTarget instanceof HTMLElement){let q=V.currentTarget.cloneNode(!0);q.style.position="absolute",q.style.top="-1000px",q.style.width=`${K.width}px`,v==="ghost"?(q.style.opacity="0.5",q.style.filter="grayscale(100%)"):v==="clone"?(q.style.opacity="0.9",q.style.transform="scale(1.02) rotate(1deg)",q.style.boxShadow="0 10px 30px rgba(0,0,0,0.3)"):v==="compact"&&(q.style.transform="scale(0.95)",q.style.opacity="0.85"),q.style.pointerEvents="none",document.body.appendChild(q),V.dataTransfer.setDragImage(q,T.x,T.y),setTimeout(()=>document.body.removeChild(q),0)}y&&"vibrate"in navigator&&navigator.vibrate(10),u?.($,W)},L=V=>{V.preventDefault(),P.current++},F=V=>{P.current--,P.current===0&&R(null)},B=(V,W)=>{if(V.preventDefault(),V.dataTransfer.dropEffect="move",c||x===null)return;if(W===x){R(null),U(!1);return}let $=V.currentTarget.getBoundingClientRect(),K=V.clientY-$.top,q=$.height,te=K<q/2?"before":"after";R({index:W,position:te}),U(!0),y&&"vibrate"in navigator&&navigator.vibrate(5)},O=V=>{if(V.preventDefault(),c||x===null||!S||N.current===null){j();return}let W=[...e],$=W[x],K=S.index;S.position==="after"&&(K=K+1),W.splice(x,1),x<K&&(K=K-1),W.splice(K,0,$),t(W),j()},j=()=>{N.current&&x!==null&&d?.(N.current,x),setTimeout(()=>{C(null),R(null),_(!1),U(!1),N.current=null,P.current=0},50),y&&"vibrate"in navigator&&navigator.vibrate([10,50,10])},H=V=>{if(!m||!D)return null;let W=V==="before"?"-top-1":"-bottom-1";return g==="line"?(0,Da.jsx)(Z.div,{initial:{opacity:0,scaleX:0},animate:{opacity:1,scaleX:1},exit:{opacity:0,scaleX:0},className:M("absolute left-0 right-0 h-1 z-50 pointer-events-none",W),children:(0,Da.jsxs)("div",{className:"h-full bg-primary rounded-full relative",children:[(0,Da.jsx)(Z.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,Da.jsx)(Z.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"})]})}):g==="area"?(0,Da.jsx)(Z.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:24},exit:{opacity:0,height:0},className:M("absolute left-0 right-0 z-40 pointer-events-none",V==="before"?"-top-3":"-bottom-3"),children:(0,Da.jsx)("div",{className:"h-full bg-primary/10 rounded-lg border-2 border-dashed border-primary/50"})}):g==="glow"?(0,Da.jsx)(Z.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:M("absolute left-0 right-0 h-2 z-50 pointer-events-none",W),children:(0,Da.jsxs)("div",{className:"h-full relative",children:[(0,Da.jsx)("div",{className:"absolute inset-0 bg-primary/30 blur-xl animate-pulse"}),(0,Da.jsx)("div",{className:"absolute inset-0 bg-primary rounded-full animate-pulse"}),(0,Da.jsx)(Z.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&&!b?(0,Da.jsx)(rr,{componentName:"Draggable List",compact:!0}):(0,Da.jsxs)("div",{className:M("relative",D&&"select-none",o),onDragEnter:L,onDragLeave:F,onDrop:O,onDragOver:V=>V.preventDefault(),children:[(0,Da.jsx)(Ct,{children:e.map((V,W)=>{let $=r(V),K=x===W,q=S?.index===W&&S?.position==="before",te=S?.index===W&&S?.position==="after";return(0,Da.jsxs)(Z.div,{ref:oe=>{oe&&k.current.set($,oe)},layout:!0,layoutId:$,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:[q&&H("before"),(0,Da.jsx)("div",{draggable:!c,onDragStart:oe=>I(oe,W),onDragOver:oe=>B(oe,W),onDragEnd:j,className:M("relative bg-card rounded-lg border transition-all",K&&"cursor-grabbing shadow-2xl",!K&&D&&"hover:shadow-lg hover:border-primary/30",!K&&!D&&!c&&"hover:shadow-md hover:border-border/80",!c&&"cursor-grab active:cursor-grabbing",q&&"translate-y-3",te&&"-translate-y-3",a),children:(0,Da.jsxs)("div",{className:"flex items-center gap-3 p-2",children:[s&&(0,Da.jsx)(Z.div,{className:"pl-2",whileHover:{scale:1.1},whileTap:{scale:.95},children:(0,Da.jsx)(NR,{className:M("flex-shrink-0 text-muted-foreground/50",!c&&"hover:text-muted-foreground","transition-colors",i),size:l})}),(0,Da.jsx)("div",{className:"flex-1",children:n(V,W)})]})}),te&&H("after")]},$)})}),D&&(0,Da.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 pointer-events-none z-[100]",children:(0,Da.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"})})]})}var Np=A(le(),1);ar();var Qn=A(ae(),1),uG=ot("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"}}),k0e=Np.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:m="medium",showProgressBar:h=!1,autoResetDelay:g=2e3,onDrag:v,onDragEnd:y,onDragStart:b,onAnimationStart:w,onAnimationEnd:x,...C},S)=>{let[R,D]=(0,Np.useState)("idle"),[_,T]=(0,Np.useState)([]),[E,z]=(0,Np.useState)(0),[U,N]=(0,Np.useState)(!1),P=o!=="idle"?o:R,k=async H=>{if(P!=="loading"){if(d){let V=H.currentTarget.getBoundingClientRect(),W=H.clientX-V.left,$=H.clientY-V.top,K=Date.now();T([..._,{x:W,y:$,id:K}]),setTimeout(()=>{T(q=>q.filter(te=>te.id!==K))},600)}if(D("loading"),a?.("loading"),z(0),h){let V=setInterval(()=>{z(W=>W>=90?(clearInterval(V),90):W+10)},200)}if(s)try{await s(H),z(100),D("success"),a?.("success"),setTimeout(()=>{D("idle"),a?.("idle"),z(0)},g)}catch{z(0),D("error"),a?.("error"),setTimeout(()=>{D("idle"),a?.("idle")},g)}}},I=()=>{let H=M("h-4 w-4",{"animate-spin":P==="loading"||f&&P!=="idle"});switch(P){case"loading":return(0,Qn.jsx)(yr,{className:H});case"success":return(0,Qn.jsx)(Hr,{className:M(H,"animate-scale-in")});case"error":return(0,Qn.jsx)(Qt,{className:M(H,"animate-shake")});default:return null}},L=()=>{switch(P){case"success":return"bg-green-600";case"error":return"bg-red-600";default:return""}},F=()=>{switch(p){case"slow":return"duration-1500";case"fast":return"duration-500";default:return"duration-1000"}},B=()=>{switch(m){case"low":return"shadow-lg";case"high":return"shadow-2xl";default:return"shadow-xl"}},O,j;return n==="bounce"?O={y:[0,-10,0],transition:{duration:.6,repeat:1/0,repeatType:"loop"}}:n==="pulse"?O={scale:[1,1.1,1],transition:{duration:1,repeat:1/0,repeatType:"loop"}}:n==="shake"?O=void 0:n==="rotate"?O={rotate:10,transition:{type:"spring",stiffness:300}}:n==="scale"?(O={scale:1.05},j={scale:.95}):n==="slide"&&(O={y:-4}),(0,Qn.jsxs)(Z.button,{...C,className:M(uG({variant:t,size:r}),t==="glow"&&B(),n==="shake"&&U&&"animate-shake",e),ref:S,onClick:k,disabled:P==="loading"||C.disabled,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),whileHover:O,whileTap:j,children:[h&&P==="loading"&&(0,Qn.jsx)(Z.div,{className:"absolute bottom-0 left-0 h-1 bg-primary-foreground/20 rounded-full",initial:{width:0},animate:{width:`${E}%`},transition:{duration:.3}}),n==="shimmer"&&(0,Qn.jsx)(Z.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,Qn.jsx)("div",{className:"relative flex items-center justify-center gap-2 z-10",children:r==="icon"?P==="idle"?i:I():(0,Qn.jsx)(Qn.Fragment,{children:P==="idle"?(0,Qn.jsxs)(Qn.Fragment,{children:[Np.default.isValidElement(i)&&Np.default.cloneElement(i),typeof i=="string"&&i,Np.default.isValidElement(i)||typeof i=="string"?null:i]}):(0,Qn.jsxs)(Qn.Fragment,{children:[I(),(0,Qn.jsxs)("span",{className:"ml-2",children:[P==="loading"&&l,P==="success"&&c,P==="error"&&u]})]})})}),(0,Qn.jsx)(Z.div,{className:M("absolute inset-0 rounded-md",L()),initial:{scale:0,opacity:0},animate:{scale:P==="success"||P==="error"?1:0,opacity:P==="success"||P==="error"?.2:0},transition:{duration:.3},style:{zIndex:0}}),_.map(H=>(0,Qn.jsx)("span",{className:"absolute bg-primary/20 rounded-full animate-ripple pointer-events-none",style:{left:H.x-10,top:H.y-10,width:20,height:20}},H.id))]})});k0e.displayName="MoonUIAnimatedButtonProInternal";var dG=Np.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Qn.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Qn.jsx)(He,{className:"py-6 text-center",children:(0,Qn.jsxs)("div",{className:"space-y-4",children:[(0,Qn.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Qn.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Qn.jsxs)("div",{children:[(0,Qn.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Qn.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated Button is available exclusively to MoonUI Pro subscribers."}),(0,Qn.jsx)("a",{href:"/pricing",children:(0,Qn.jsxs)(re,{size:"sm",children:[(0,Qn.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Qn.jsx)(k0e,{...e,ref:t})});dG.displayName="MoonUIAnimatedButtonPro";var kp=A(le(),1);ar();var pa=A(ae(),1),Krt=({children:e,delay:t=0,index:r,onMouseEnter:n,onClick:o})=>{let a=(0,kp.useRef)(null),i=z0(a,{amount:.5,once:!1});return(0,pa.jsx)(Z.div,{ref:a,"data-index":r,onMouseEnter:n,onClick:o,initial:{scale:.7,opacity:0},animate:i?{scale:1,opacity:1}:{scale:.7,opacity:0},transition:{duration:.2,delay:t},className:"mb-4 cursor-pointer",children:e})},Yrt=({items:e=["Item 1","Item 2","Item 3","Item 4","Item 5","Item 6","Item 7","Item 8","Item 9","Item 10","Item 11","Item 12","Item 13","Item 14","Item 15"],onItemSelect:t,showGradients:r=!0,enableArrowNavigation:n=!0,className:o="",itemClassName:a="",displayScrollbar:i=!0,initialSelectedIndex:s=-1})=>{let l=(0,kp.useRef)(null),[c,u]=(0,kp.useState)(s),[d,f]=(0,kp.useState)(!1),[p,m]=(0,kp.useState)(0),[h,g]=(0,kp.useState)(1),v=y=>{let{scrollTop:b,scrollHeight:w,clientHeight:x}=y.target;m(Math.min(b/50,1));let C=w-(b+x);g(w<=x?0:Math.min(C/50,1))};return(0,kp.useEffect)(()=>{if(!n)return;let y=b=>{b.key==="ArrowDown"||b.key==="Tab"&&!b.shiftKey?(b.preventDefault(),f(!0),u(w=>Math.min(w+1,e.length-1))):b.key==="ArrowUp"||b.key==="Tab"&&b.shiftKey?(b.preventDefault(),f(!0),u(w=>Math.max(w-1,0))):b.key==="Enter"&&c>=0&&c<e.length&&(b.preventDefault(),t&&t(e[c],c))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e,c,t,n]),(0,kp.useEffect)(()=>{if(!d||c<0||!l.current)return;let y=l.current,b=y.querySelector(`[data-index="${c}"]`);if(b){let x=y.scrollTop,C=y.clientHeight,S=b.offsetTop,R=S+b.offsetHeight;S<x+50?y.scrollTo({top:S-50,behavior:"smooth"}):R>x+C-50&&y.scrollTo({top:R-C+50,behavior:"smooth"})}f(!1)},[c,d]),(0,pa.jsxs)("div",{className:M("relative w-[500px]",o),children:[(0,pa.jsx)("div",{ref:l,className:M("max-h-[400px] overflow-y-auto p-4",i?"[&::-webkit-scrollbar]:w-[8px] [&::-webkit-scrollbar-track]:bg-background [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-[4px] [&::-webkit-scrollbar-thumb]:hover:bg-muted-foreground/50":"scrollbar-hide"),onScroll:v,style:{scrollbarWidth:i?"thin":"none",scrollbarColor:i?"hsl(var(--border)) hsl(var(--background))":"transparent"},children:e.map((y,b)=>(0,pa.jsx)(Krt,{delay:.1,index:b,onMouseEnter:()=>u(b),onClick:()=>{u(b),t&&t(y,b)},children:(0,pa.jsx)("div",{className:M("p-4 bg-card border rounded-lg transition-colors duration-200 hover:bg-accent/50",c===b?"bg-accent border-accent-foreground/20":"border-border",a),children:(0,pa.jsx)("p",{className:"text-foreground m-0 text-sm",children:y})})},b))}),r&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[50px] bg-gradient-to-b from-background to-transparent pointer-events-none transition-opacity duration-300 ease",style:{opacity:p}}),(0,pa.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[100px] bg-gradient-to-t from-background to-transparent pointer-events-none transition-opacity duration-300 ease",style:{opacity:h}})]})]})},fG=e=>{let{hasProAccess:t,isLoading:r}=Ye();return!r&&!t?(0,pa.jsx)(Ve,{className:M("w-fit",e.className),children:(0,pa.jsx)(He,{className:"py-6 text-center",children:(0,pa.jsxs)("div",{className:"space-y-4",children:[(0,pa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,pa.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro \xD6zellik"}),(0,pa.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated List sadece MoonUI Pro abonelerine \xF6zeldir."}),(0,pa.jsx)("a",{href:"/pricing",children:(0,pa.jsxs)(re,{size:"sm",children:[(0,pa.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Pro'ya Y\xFCkselt"]})})]})]})})}):(0,pa.jsx)(Yrt,{...e})};fG.displayName="MoonUIAnimatedListPro";var Ol=A(le(),1);var yx=A(ae(),1);var WT={primary:"hsl(var(--primary) / 0.25)",secondary:"hsl(var(--secondary) / 0.25)",accent:"hsl(var(--accent) / 0.25)",destructive:"hsl(var(--destructive) / 0.25)",muted:"hsl(var(--muted-foreground) / 0.15)",white:"rgba(255, 255, 255, 0.25)",blue:"rgba(59, 130, 246, 0.25)",purple:"rgba(147, 51, 234, 0.25)",green:"rgba(34, 197, 94, 0.25)",orange:"rgba(249, 115, 22, 0.25)",red:"rgba(239, 68, 68, 0.25)",yellow:"rgba(234, 179, 8, 0.25)",pink:"rgba(236, 72, 153, 0.25)",cyan:"rgba(6, 182, 212, 0.25)"},R0e=Ol.default.forwardRef(({children:e,className:t,spotlightColor:r="primary",spotlightSize:n=200,intensity:o=.6,duration:a=500,rounded:i="lg",borderClass:s,backgroundClass:l,disabled:c=!1,locked:u=!1,...d},f)=>{let p=(0,Ol.useRef)(null),[m,h]=(0,Ol.useState)(!1),[g,v]=(0,Ol.useState)({x:0,y:0}),[y,b]=(0,Ol.useState)(0),w=Ol.default.useMemo(()=>typeof r=="string"&&r in WT?WT[r]:r,[r]),x=(0,Ol.useCallback)(T=>{if(!p.current||m||c)return;let E=p.current.getBoundingClientRect();v({x:T.clientX-E.left,y:T.clientY-E.top})},[m,c]),C=(0,Ol.useCallback)(()=>{c||(h(!0),b(o))},[c,o]),S=(0,Ol.useCallback)(()=>{h(!1),b(0)},[]),R=(0,Ol.useCallback)(()=>{c||b(o)},[c,o]),D=(0,Ol.useCallback)(()=>{b(0)},[]),_={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"};return u?(0,yx.jsx)(rr,{componentName:"SpotlightCard Pro",className:M("min-h-[200px]",t)}):(0,yx.jsxs)("div",{ref:T=>{p.current=T,typeof f=="function"?f(T):f&&(f.current=T)},onMouseMove:x,onFocus:C,onBlur:S,onMouseEnter:R,onMouseLeave:D,className:M("relative overflow-hidden",_[i],s||"border border-border",l||"bg-card","transition-all duration-200",c&&"cursor-not-allowed opacity-50",t),...d,children:[(0,yx.jsx)("div",{className:M("pointer-events-none absolute inset-0 opacity-0","transition-opacity ease-in-out",c&&"hidden"),style:{opacity:y,background:`radial-gradient(circle ${n}px at ${g.x}px ${g.y}px, ${w}, transparent 80%)`,transitionDuration:`${a}ms`}}),(0,yx.jsx)("div",{className:"relative z-10",children:e})]})});R0e.displayName="SpotlightCardInternal";var pG=Ol.default.forwardRef((e,t)=>(0,yx.jsx)(R0e,{...e,ref:t}));pG.displayName="MoonUISpotlightCardPro";var pf=A(le(),1);ar();var CB=A(ae(),1),Xrt=ot("font-mono tabular-nums",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},variant:{default:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",success:"text-green-600 dark:text-green-400",warning:"text-orange-600 dark:text-orange-400",destructive:"text-red-600 dark:text-red-400"}},defaultVariants:{size:"md",variant:"default"}}),E0e=pf.default.forwardRef(({className:e,value:t,from:r=0,duration:n=2,decimalPlaces:o=0,format:a="number",currency:i="TRY",locale:s="tr-TR",prefix:l="",suffix:c="",triggerOnView:u=!1,ease:d="easeOut",size:f,variant:p,onComplete:m,...h},g)=>{let[v,y]=(0,pf.useState)(!u),b=(0,pf.useRef)(null),w=z0(b,{once:!0}),x=ho(r),C=ru(x,{duration:n*1e3,bounce:d==="spring"?.4:0}),[S,R]=(0,pf.useState)(r),D=_=>{let T;switch(a){case"currency":T=new Intl.NumberFormat(s,{style:"currency",currency:i,minimumFractionDigits:o,maximumFractionDigits:o}).format(_);break;case"percent":T=new Intl.NumberFormat(s,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o}).format(_/100);break;default:T=new Intl.NumberFormat(s,{minimumFractionDigits:o,maximumFractionDigits:o}).format(_)}return`${l}${T}${c}`};return(0,pf.useEffect)(()=>{u&&w&&y(!0)},[u,w]),(0,pf.useEffect)(()=>{v&&x.set(t)},[v,t,x]),(0,pf.useEffect)(()=>{let _=C.on("change",E=>{R(E)}),T=C.on("animationComplete",()=>{m?.()});return()=>{_(),T()}},[C,m]),(0,CB.jsx)(Z.div,{ref:b,className:M(Xrt({size:f,variant:p,className:e})),initial:{opacity:0,scale:.5},animate:v?{opacity:1,scale:1}:{opacity:0,scale:.5},transition:{duration:.5,ease:d==="spring"?"easeOut":d},children:D(S)})});E0e.displayName="AnimatedNumberInternal";var SB=pf.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,CB.jsx)(rr,{componentName:"Animated Number",compact:!0,className:"inline-block"}):(0,CB.jsx)(E0e,{...e,ref:t})});SB.displayName="AnimatedNumber";var Vm=A(le(),1);ar();var Um=A(ae(),1),Jrt=ot("flex items-center gap-1 rounded-full border bg-background/95 backdrop-blur-md shadow-xl",{variants:{size:{sm:"p-1",md:"p-1.5",lg:"p-2"},position:{bottom:"flex-row",top:"flex-row",left:"flex-col",right:"flex-col"}},defaultVariants:{size:"md",position:"bottom"}}),QCr=ot("flex items-center justify-center rounded-full transition-all duration-200 cursor-pointer",{variants:{size:{sm:"w-9 h-9",md:"w-11 h-11",lg:"w-13 h-13"}},defaultVariants:{size:"md"}}),Qrt=Vm.default.memo(({item:e,size:t,magnification:r,showTooltip:n,position:o})=>{let a=(0,Vm.useRef)(null),[i,s]=(0,Vm.useState)(!1),c={sm:36,md:44,lg:52}[t],u=i?r:c,d=ho(c),f=ru(d,{stiffness:300,damping:30});return(0,Vm.useEffect)(()=>{d.set(u)},[u,d]),(0,Um.jsxs)(Z.div,{ref:a,className:"relative flex items-center justify-center",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,Um.jsx)(Z.button,{style:{width:f,height:f},className:M("flex items-center justify-center rounded-full transition-colors duration-200","bg-card/80 hover:bg-card border border-border/50 shadow-sm",e.active&&"bg-primary text-primary-foreground hover:bg-primary/90 border-primary",e.className),onClick:e.onClick,whileTap:{scale:.95},children:e.icon}),(0,Um.jsx)(Ct,{children:n&&e.label&&i&&(0,Um.jsx)(Z.div,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.15,ease:"easeOut"},style:{position:"absolute",...o==="bottom"&&{bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)"},...o==="top"&&{top:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)"},...o==="left"&&{left:"calc(100% + 8px)",top:"50%",transform:"translateY(-50%)"},...o==="right"&&{right:"calc(100% + 8px)",top:"50%",transform:"translateY(-50%)"}},className:"px-2.5 py-1 text-xs font-medium whitespace-nowrap pointer-events-none z-50 bg-foreground text-background rounded-md shadow-lg",children:e.label})})]})}),T0e=Vm.default.forwardRef(({className:e,items:t,magnification:r=64,distance:n=120,showTooltip:o=!0,animationDuration:a=500,size:i="md",position:s="bottom",containerMode:l=!1,...c},u)=>{let d=()=>{if(l)switch(s){case"bottom":return"absolute bottom-2 left-1/2 -translate-x-1/2";case"top":return"absolute top-2 left-1/2 -translate-x-1/2";case"left":return"absolute left-2 top-1/2 -translate-y-1/2";case"right":return"absolute right-2 top-1/2 -translate-y-1/2";default:return"absolute bottom-2 left-1/2 -translate-x-1/2"}else switch(s){case"bottom":return"fixed bottom-4 left-1/2 -translate-x-1/2";case"top":return"fixed top-4 left-1/2 -translate-x-1/2";case"left":return"fixed left-4 top-1/2 -translate-y-1/2";case"right":return"fixed right-4 top-1/2 -translate-y-1/2";default:return"fixed bottom-4 left-1/2 -translate-x-1/2"}};return(0,Um.jsx)(Z.div,{ref:u,className:M(Jrt({size:i,position:s}),d(),e),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.4,ease:"easeOut"},children:t.map(f=>(0,Um.jsx)(Qrt,{item:f,size:i||"md",magnification:r,showTooltip:o,position:s||"bottom"},f.id))})});T0e.displayName="FloatingDockInternal";var PB=Vm.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Um.jsx)(rr,{componentName:"Floating Dock",compact:!0,className:"inline-block"}):(0,Um.jsx)(T0e,{...e,ref:t})});PB.displayName="FloatingDock";var ws=A(le(),1);ar();var Ng=A(ae(),1),Zrt=ot("relative overflow-hidden cursor-pointer",{variants:{size:{sm:"w-32 h-32",md:"w-48 h-48",lg:"w-64 h-64",xl:"w-80 h-80"},shape:{square:"rounded-none",rounded:"rounded-lg",circle:"rounded-full"},effect:{explode:"",dissolve:"",spiral:"",wave:""}},defaultVariants:{size:"md",shape:"rounded",effect:"explode"}}),NB=ws.default.forwardRef(({className:e,src:t,alt:r="",particleCount:n=100,duration:o=3,particleSize:a=2,triggerOnHover:i=!0,autoTrigger:s=!1,autoTriggerInterval:l=5,size:c,shape:u,effect:d,onComplete:f,onStart:p,...m},h)=>{let g=(0,ws.useRef)(null),v=(0,ws.useRef)(null),y=(0,ws.useRef)(null),[b,w]=(0,ws.useState)([]),[x,C]=(0,ws.useState)(!1),[S,R]=(0,ws.useState)(!1),D=(0,ws.useCallback)(()=>{let P=g.current,k=v.current;if(!P||!k||!S)return;let I=P.getContext("2d");if(!I)return;P.width=k.width,P.height=k.height,I.drawImage(k,0,0);let F=I.getImageData(0,0,P.width,P.height).data,B=[],O=Math.ceil(Math.sqrt(P.width*P.height/n)),j=0;for(let H=0;H<P.height;H+=O)for(let V=0;V<P.width;V+=O){let W=(H*P.width+V)*4,$=F[W],K=F[W+1],q=F[W+2],te=F[W+3];if(te>0){let oe=`rgba(${$}, ${K}, ${q}, ${te/255})`,ee=0,Ne=0,we=o*60;switch(d){case"explode":let De=Math.random()*Math.PI*2,pe=Math.random()*5+2;ee=Math.cos(De)*pe,Ne=Math.sin(De)*pe;break;case"dissolve":ee=(Math.random()-.5)*2,Ne=Math.random()*3;break;case"spiral":let ke=Math.atan2(H-P.height/2,V-P.width/2);ee=Math.cos(ke+Math.PI/2)*3,Ne=Math.sin(ke+Math.PI/2)*3;break;case"wave":ee=Math.sin(H*.02)*3,Ne=Math.random()*2+1;break}B.push({id:j++,x:V,y:H,vx:ee,vy:Ne,life:we,maxLife:we,color:oe,size:a,originalX:V,originalY:H,alpha:1})}}w(B)},[S,n,o,a,d]),_=(0,ws.useCallback)(()=>{w(P=>{let k=P.map(I=>{let L={...I};return L.x+=L.vx,L.y+=L.vy,L.life-=1,L.alpha=L.life/L.maxLife,d==="dissolve"&&(L.vy+=.1),L}).filter(I=>I.life>0);return k.length===0&&(C(!1),f?.(),y.current&&cancelAnimationFrame(y.current)),k}),x&&(y.current=requestAnimationFrame(_))},[x,d,f]),T=(0,ws.useCallback)(()=>{x||(p?.(),C(!0),D())},[x,D,p]),E=(0,ws.useCallback)(()=>{y.current&&cancelAnimationFrame(y.current),C(!1),w([])},[]);(0,ws.useEffect)(()=>{S&&D()},[S,D]),(0,ws.useEffect)(()=>(x&&(y.current=requestAnimationFrame(_)),()=>{y.current&&cancelAnimationFrame(y.current)}),[x,_]),(0,ws.useEffect)(()=>{if(s&&S){let P=setInterval(()=>{T()},l*1e3);return()=>clearInterval(P)}},[s,l,S,T]);let z=()=>{i&&(x?E():T())},{hasProAccess:U,isLoading:N}=Ye();return!N&&!U?(0,Ng.jsx)(rr,{componentName:"Particle Image",compact:!0,className:"inline-block"}):(0,Ng.jsxs)(Z.div,{ref:h,className:M(Zrt({size:c,shape:u,className:e})),onMouseEnter:z,onClick:z,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.5},children:[(0,Ng.jsx)("img",{ref:v,src:t,alt:r,className:M("absolute inset-0 w-full h-full object-cover transition-opacity duration-300",x?"opacity-0":"opacity-100"),onLoad:()=>R(!0),style:{display:S&&!x?"block":"none"}}),(0,Ng.jsx)("canvas",{ref:g,className:M("absolute inset-0 w-full h-full object-cover",!x&&S?"opacity-100":"opacity-0"),style:{display:S?"block":"none"}}),x&&b.map(P=>(0,Ng.jsx)(Z.div,{className:"absolute pointer-events-none",style:{left:P.x,top:P.y,width:P.size,height:P.size,backgroundColor:P.color,opacity:P.alpha,borderRadius:u==="circle"?"50%":"0"},initial:!1},P.id)),!S&&(0,Ng.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/50",children:(0,Ng.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-primary border-t-transparent rounded-full"})})]})});NB.displayName="ParticleImage";var mf=A(le(),1);ar();var $y=A(ae(),1),ent=ot("fixed pointer-events-none z-[9999]",{variants:{size:{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},variant:{default:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",destructive:"bg-destructive",rainbow:"bg-gradient-to-r from-red-500 via-yellow-500 via-green-500 via-blue-500 to-purple-500"}},defaultVariants:{size:"md",variant:"default"}}),kB=({size:e="md",variant:t="default",duration:r=600,maxSplashes:n=10,threshold:o=1,targetSelector:a,colors:i,showParticles:s=!1,particleCount:l=8,animationType:c="scale",soundUrl:u,enabled:d=!0})=>{let[f,p]=(0,mf.useState)([]),[m,h]=(0,mf.useState)({x:0,y:0}),g=(0,mf.useRef)(Date.now()),v=(0,mf.useRef)({x:0,y:0}),y=(0,mf.useRef)(null);(0,mf.useEffect)(()=>{u&&(y.current=new Audio(u),y.current.volume=.3)},[u]);let b=(_,T,E,z)=>Math.sqrt(Math.pow(E-_,2)+Math.pow(z-T,2)),w=(_,T)=>{let E={id:Date.now()+Math.random(),x:_,y:T,timestamp:Date.now()};p(z=>{let U=[...z,E];return U.length>n?U.slice(-n):U}),y.current&&(y.current.currentTime=0,y.current.play().catch(()=>{})),setTimeout(()=>{p(z=>z.filter(U=>U.id!==E.id))},r)};(0,mf.useEffect)(()=>{if(!d)return;let _=E=>{let z=Date.now(),U=z-g.current,N=b(v.current.x,v.current.y,E.clientX,E.clientY);if(h({x:E.clientX,y:E.clientY}),U>0&&N/U>o)if(a){let k=E.target;k&&k.closest(a)&&w(E.clientX,E.clientY)}else w(E.clientX,E.clientY);v.current={x:E.clientX,y:E.clientY},g.current=z},T=E=>{if(a){let z=E.target;z&&z.closest(a)&&w(E.clientX,E.clientY)}else w(E.clientX,E.clientY)};return document.addEventListener("mousemove",_),document.addEventListener("click",T),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("click",T)}},[d,o,a,r,n]);let C=(()=>{switch(c){case"ripple":return{initial:{scale:0,opacity:1},animate:{scale:4,opacity:0},exit:{scale:5,opacity:0}};case"burst":return{initial:{scale:0,rotate:0,opacity:1},animate:{scale:3,rotate:180,opacity:0},exit:{scale:4,opacity:0}};case"fade":return{initial:{scale:1,opacity:1},animate:{scale:1.5,opacity:0},exit:{opacity:0}};default:return{initial:{scale:0,opacity:1},animate:{scale:2,opacity:0},exit:{scale:3,opacity:0}}}})(),S=_=>i&&i.length>0?i[_%i.length]:"",{hasProAccess:R,isLoading:D}=Ye();return!D&&!R?(0,$y.jsx)(rr,{componentName:"Splash Cursor",compact:!0,className:"inline-block"}):d?(0,$y.jsx)("div",{className:"fixed inset-0 pointer-events-none z-[9999]",children:(0,$y.jsx)(Ct,{children:f.map((_,T)=>(0,$y.jsxs)(mf.default.Fragment,{children:[(0,$y.jsx)(Z.div,{className:M(ent({size:e,variant:t}),"rounded-full"),style:{left:_.x-12,top:_.y-12,backgroundColor:S(T)||void 0},variants:C,initial:"initial",animate:"animate",exit:"exit",transition:{duration:r/1e3,ease:"easeOut"}}),s&&Array.from({length:l}).map((E,z)=>{let N=360/l*z*Math.PI/180,P=30;return(0,$y.jsx)(Z.div,{className:"absolute w-1 h-1 bg-current rounded-full",style:{left:_.x,top:_.y,color:S(T+z)||"currentColor"},initial:{x:0,y:0,opacity:1,scale:1},animate:{x:Math.cos(N)*P,y:Math.sin(N)*P,opacity:0,scale:0},transition:{duration:r/1e3,ease:"easeOut"}},`${_.id}-particle-${z}`)})]},_.id))})}):null};kB.displayName="SplashCursor";var g1=A(le(),1);ar();var Zo=A(ae(),1),mG=class extends g1.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,Zo.jsx)(r,{error:a,resetErrorBoundary:this.resetErrorBoundary,errorInfo:i}):r:(0,Zo.jsx)("div",{className:M("flex items-center justify-center min-h-[200px] p-4",n),children:(0,Zo.jsxs)(Ve,{className:"w-full max-w-md",children:[(0,Zo.jsxs)(cr,{className:"text-center",children:[(0,Zo.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,Zo.jsx)(Go,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),(0,Zo.jsx)(Rr,{children:"Something went wrong"}),(0,Zo.jsx)(Ci,{children:"An error occurred while rendering this component"})]}),(0,Zo.jsxs)(He,{className:"text-center",children:[o&&!1,(0,Zo.jsxs)(re,{onClick:this.resetErrorBoundary,className:"mt-4",children:[(0,Zo.jsx)(no,{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,Zo.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 tnt(e){let{hasProAccess:t,isLoading:r}=Ye(),n=(0,g1.useRef)(e.resetKeys);return(0,g1.useEffect)(()=>{n.current=e.resetKeys},[e.resetKeys]),!r&&!t?(0,Zo.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Zo.jsx)(He,{className:"py-6 text-center",children:(0,Zo.jsxs)("div",{className:"space-y-4",children:[(0,Zo.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Zo.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Zo.jsxs)("div",{children:[(0,Zo.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Zo.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Error Boundary is available exclusively to MoonUI Pro subscribers."}),(0,Zo.jsx)("a",{href:"/pricing",children:(0,Zo.jsxs)(re,{size:"sm",children:[(0,Zo.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Zo.jsx)(mG,{...e})}var rnt=tnt;var qT=A(le(),1);ar();var ma=A(ae(),1),M0e=qT.default.forwardRef(({actions:e=[],position:t="bottom-right",size:r="default",className:n,children:o,onClick:a,...i},s)=>{let[l,c]=(0,qT.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=m=>{e.length>0?c(!l):a&&a(m)};return(0,ma.jsxs)("div",{className:M("fixed z-50",d[t]),children:[(0,ma.jsx)(Ct,{children:l&&e.length>0&&(0,ma.jsx)("div",{className:"absolute",children:e.map((m,h)=>(0,ma.jsxs)(Z.div,{initial:{scale:0,opacity:0,x:0,y:0},animate:{scale:1,opacity:1,x:f[t].x,y:f[t].y*(h+1)-10},exit:{scale:0,opacity:0,x:0,y:0},transition:{delay:h*.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,ma.jsx)(Z.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{delay:(h+1)*.05},className:M("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:m.label}),(0,ma.jsx)("button",{onClick:()=>{m.onClick(),c(!1)},className:M("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:m.icon})]},h))})}),(0,ma.jsx)(Z.button,{ref:s,className:M("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,ma.jsx)(Wa,{className:"h-5 w-5"}):(0,ma.jsx)(Wa,{className:"h-5 w-5"}))}),(0,ma.jsx)(Ct,{children:l&&(0,ma.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[-1]",onClick:()=>c(!1)})})]})});M0e.displayName="FloatingActionButtonInternal";var I0e=qT.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,ma.jsx)(Ve,{className:M("w-fit",e),children:(0,ma.jsx)(He,{className:"py-6 text-center",children:(0,ma.jsxs)("div",{className:"space-y-4",children:[(0,ma.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ma.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ma.jsxs)("div",{children:[(0,ma.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ma.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Floating Action Button is available exclusively to MoonUI Pro subscribers."}),(0,ma.jsx)("a",{href:"/pricing",children:(0,ma.jsxs)(re,{size:"sm",children:[(0,ma.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ma.jsx)(M0e,{className:e,ref:r,...t})});I0e.displayName="FloatingActionButton";var js=A(le(),1);ar();var Xi=A(ae(),1),A0e=ot("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"}}),D0e=js.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:m=20,glowSpread:h=1.2,enableTouch:g=!0,enableKeyboard:v=!0,onHoverStart:y,onHoverEnd:b,onRotationChange:w,animationDelay:x=0,ariaLabel:C,autoFocus:S=!1,rotateAxes:R={x:!0,y:!0},...D},_)=>{let{onDrag:T,onDragStart:E,onDragEnd:z,onDragOver:U,onDrop:N,onAnimationStart:P,onAnimationEnd:k,onAnimationIteration:I,...L}=D,F=(0,js.useRef)(null),[B,O]=(0,js.useState)(!1),[j,H]=(0,js.useState)(!1),V=i||s||15,W=ho(0),$=ho(0),K=ru(W,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),q=ru($,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),te=Il(q,[-1,1],R.x?[V,-V]:[0,0]),oe=Il(K,[-1,1],R.y?[-V,V]:[0,0]),ee=(0,js.useCallback)(he=>{if(!F.current)return;let Ae=F.current.getBoundingClientRect(),Y=Ae.left+Ae.width/2,X=Ae.top+Ae.height/2,de,Pe;if("touches"in he&&g)de=he.touches[0].clientX,Pe=he.touches[0].clientY;else if("clientX"in he)de=he.clientX,Pe=he.clientY;else return;let ue=(Pe-X)/(Ae.height/2),be=(de-Y)/(Ae.width/2);W.set(be),$.set(ue),w&&w(te.get(),oe.get())},[g,W,$,te,oe,w]),Ne=(0,js.useCallback)(()=>{O(!0),y?.()},[y]),we=(0,js.useCallback)(()=>{O(!1),W.set(0),$.set(0),b?.()},[W,$,b]),De=(0,js.useCallback)(he=>{if(!v||!j)return;let Ae=.1,Y=W.get(),X=$.get();switch(he.key){case"ArrowUp":X=Math.max(-.5,X-Ae),$.set(X),he.preventDefault();break;case"ArrowDown":X=Math.min(.5,X+Ae),$.set(X),he.preventDefault();break;case"ArrowLeft":Y=Math.max(-.5,Y-Ae),W.set(Y),he.preventDefault();break;case"ArrowRight":Y=Math.min(.5,Y+Ae),W.set(Y),he.preventDefault();break;case"Enter":case" ":O(!B),B?b?.():y?.(),he.preventDefault();break;case"Escape":W.set(0),$.set(0),O(!1),b?.(),he.preventDefault();break}w&&w(te.get(),oe.get())},[v,j,W,$,B,y,b,te,oe,w]);(0,js.useEffect)(()=>{S&&F.current&&F.current.focus()},[S]);let pe=(0,js.useMemo)(()=>d?typeof d=="function"?d({isHovered:B,rotateX:te.get(),rotateY:oe.get()}):d:null,[d,B,te,oe]),ke=(0,js.useMemo)(()=>{if(o==="none")return{};let he=0,Ae=m,Y=h;switch(o){case"subtle":he=B?.3:0;break;case"vibrant":he=B?.6:0,Ae=m*1.5;break;case"neon":he=B?.8:0,Ae=m*2,Y=h*1.3;break}return{opacity:he,filter:`blur(${Ae}px)`,scale:Y,backgroundColor:p}},[o,B,m,h,p]);return(0,Xi.jsx)("div",{style:{perspective:`${a}px`},children:(0,Xi.jsxs)(Z.div,{ref:he=>{F.current=he,typeof _=="function"?_(he):_&&(_.current=he)},className:M(A0e({variant:r,shadowIntensity:n,glowEffect:o}),"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),onMouseMove:ee,onMouseEnter:Ne,onMouseLeave:we,onTouchMove:g?ee:void 0,onTouchStart:g?Ne:void 0,onTouchEnd:g?we:void 0,onKeyDown:De,onFocus:()=>H(!0),onBlur:()=>H(!1),style:{transformStyle:"preserve-3d",transformOrigin:"center center",rotateX:B||j?te:0,rotateY:B||j?oe:0,scale:B||j?l:1},transition:{type:"spring",stiffness:c.stiffness,damping:c.damping,duration:.15*(1/u),delay:x/1e3},tabIndex:v?0:void 0,role:v?"button":void 0,"aria-label":C,...L,children:[(0,Xi.jsx)(Z.div,{className:"relative z-10",animate:{z:B||j?20:0},transition:{duration:.2*(1/u)},children:e}),pe&&(0,Xi.jsx)(Z.div,{className:"absolute inset-0 rounded-lg pointer-events-none z-20",animate:{opacity:f||B||j?1:0},transition:{duration:.3*(1/u)},children:pe}),r!=="subtle"&&(0,Xi.jsx)(Z.div,{className:M("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:B||j?1:0},transition:{duration:.3*(1/u)}}),o!=="none"&&(0,Xi.jsx)(Z.div,{className:"absolute inset-0 rounded-lg pointer-events-none -z-10",animate:ke,transition:{duration:.3*(1/u)}})]})})});D0e.displayName="HoverCard3DInternal";var L0e=js.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Xi.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Xi.jsx)(He,{className:"py-6 text-center",children:(0,Xi.jsxs)("div",{className:"space-y-4",children:[(0,Xi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Xi.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Xi.jsxs)("div",{children:[(0,Xi.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Xi.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"3D Hover Card is available exclusively to MoonUI Pro subscribers."}),(0,Xi.jsx)("a",{href:"/pricing",children:(0,Xi.jsxs)(re,{size:"sm",children:[(0,Xi.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Xi.jsx)(D0e,{...e,ref:t})});L0e.displayName="HoverCard3D";var xx=A(le(),1);ar();var bx=A(ae(),1),nnt=ot("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"}}),O0e=xx.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,xx.useRef)(null),[d,f]=(0,xx.useState)(!1),p=ho(0),m=ho(0),h=ru(p,s),g=ru(m,s),v=Il(g,[-i,i],[5,-5]),y=Il(h,[-i,i],[-5,5]),b=C=>{if(!u.current)return;let S=u.current.getBoundingClientRect(),R=S.left+S.width/2,D=S.top+S.height/2,_=C.clientX-R,T=C.clientY-D;Math.sqrt(_*_+T*T)<i&&(p.set(_*a),m.set(T*a))},w=()=>{f(!1),p.set(0),m.set(0)},x=()=>{f(!0)};return(0,bx.jsxs)(Z.button,{ref:C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},className:M(nnt({variant:r,size:n,radius:o}),t),onMouseMove:b,onMouseLeave:w,onMouseEnter:x,style:{x:h,y:g,rotateX:v,rotateY:y,transformPerspective:1e3},whileHover:{scale:1.05},whileTap:{scale:.95},animate:{rotateX:d?v.get():0,rotateY:d?y.get():0},transition:{duration:.3},children:[(0,bx.jsx)(Z.div,{className:"relative z-10 flex items-center justify-center",animate:{scale:d?1.02:1},transition:{duration:.2},children:e}),(0,bx.jsx)(Z.div,{className:M("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}})]})});O0e.displayName="MagneticButtonInternal";var _0e=xx.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,bx.jsx)(rr,{componentName:"Magnetic Button",compact:!0,className:"inline-block"}):(0,bx.jsx)(O0e,{className:e,ref:r,...t})});_0e.displayName="MagneticButton";var Fo=A(le(),1);ar();var On=A(ae(),1),F0e=Fo.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:m=!0,...h},g)=>{let v=(0,Fo.useRef)(null),y=(0,Fo.useRef)(null),[b,w]=(0,Fo.useState)(!1),[x,C]=(0,Fo.useState)(!1),[S,R]=(0,Fo.useState)(0),[D,_]=(0,Fo.useState)(!1),[T,E]=(0,Fo.useState)(!1),z=ho(n),U=ho(0),N=ho(0),P=Il(z,$=>Math.min(Math.max($,t),r)),k=Il(z,$=>Math.round($*100)),I=(0,Fo.useCallback)(()=>{if(!v.current||!y.current||!m)return{left:0,right:0,top:0,bottom:0};let $=v.current.getBoundingClientRect(),K=z.get(),q=$.width*K,te=$.height*K,oe=Math.max(0,(q-$.width)/2),ee=Math.max(0,(te-$.height)/2);return{left:-oe,right:oe,top:-ee,bottom:ee}},[z,m]);(0,Fo.useEffect)(()=>{if(!v.current||!u)return;let $=v.current,K=q=>{D&&u&&(q.ctrlKey||q.metaKey)&&q.preventDefault()};return $.addEventListener("wheel",K,{passive:!1}),()=>{$.removeEventListener("wheel",K)}},[D,u]);let L=(0,Fo.useCallback)($=>{if(!u||!$.ctrlKey&&!$.metaKey)return;$.preventDefault();let K=-$.deltaY/1e3,q=z.get(),te=Math.min(Math.max(q+K,t),r);if(v.current){let oe=v.current.getBoundingClientRect(),ee=($.clientX-oe.left)/oe.width-.5,Ne=($.clientY-oe.top)/oe.height-.5,we=te-q,De=U.get(),pe=N.get(),ke=De-ee*oe.width*we,he=pe-Ne*oe.height*we;p?(Lo(U,ke,{duration:.2}),Lo(N,he,{duration:.2})):(U.set(ke),N.set(he))}p?Lo(z,te,{duration:.2}):z.set(te),i?.(te),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,U,N,t,r,i,u,p,l]),F=(0,Fo.useCallback)($=>{$.preventDefault();let K=z.get(),q;if(c==="reset")q=n;else if(q=K>1?1:2,q>1&&v.current){let te=v.current.getBoundingClientRect(),oe=($.clientX-te.left)/te.width-.5,ee=($.clientY-te.top)/te.height-.5,Ne=-oe*te.width*(q-1),we=-ee*te.height*(q-1);Lo(U,Ne,{duration:.3,type:"spring",stiffness:300}),Lo(N,we,{duration:.3,type:"spring",stiffness:300})}Lo(z,Math.min(Math.max(q,t),r),{duration:.3,type:"spring",stiffness:300}),(q===1||c==="reset")&&(Lo(U,0,{duration:.3}),Lo(N,0,{duration:.3})),i?.(q),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,U,N,t,r,n,i,c,l]),B=(0,Fo.useCallback)($=>{let K=Date.now(),q=K-S;if(q<300&&q>0){let te=$.changedTouches[0],oe={clientX:te.clientX,clientY:te.clientY,preventDefault:()=>{}};F(oe)}R(K)},[S,F]),O=(0,Fo.useCallback)(()=>{Lo(z,n,{duration:.3,type:"spring",stiffness:300}),Lo(U,0,{duration:.3,type:"spring",stiffness:300}),Lo(N,0,{duration:.3,type:"spring",stiffness:300}),i?.(n)},[z,U,N,n,i]),j=(0,Fo.useCallback)(()=>{let $=z.get(),K=Math.min($+f,r);Lo(z,K,{duration:.3,type:"spring",stiffness:300}),i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,r,f,i,l]),H=(0,Fo.useCallback)(()=>{let $=z.get(),K=Math.max($-f,t);if(Lo(z,K,{duration:.3,type:"spring",stiffness:300}),K<z.get()){let q=I(),te=U.get(),oe=N.get();(te<q.left||te>q.right)&&Lo(U,0,{duration:.3}),(oe<q.top||oe>q.bottom)&&Lo(N,0,{duration:.3})}i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,t,f,U,N,I,i,l]),V=(0,Fo.useCallback)(()=>{O()},[O]),W=(0,Fo.useCallback)(()=>{v.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{E(!1)}).catch($=>{console.error("Exit fullscreen error:",$)}):(v.current.parentElement||v.current).requestFullscreen().then(()=>{E(!0)}).catch(K=>{console.error("Fullscreen error:",K)}))},[]);return(0,Fo.useEffect)(()=>{let $=()=>{E(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",$),document.addEventListener("webkitfullscreenchange",$),document.addEventListener("mozfullscreenchange",$),document.addEventListener("MSFullscreenChange",$),()=>{document.removeEventListener("fullscreenchange",$),document.removeEventListener("webkitfullscreenchange",$),document.removeEventListener("mozfullscreenchange",$),document.removeEventListener("MSFullscreenChange",$)}},[]),(0,Fo.useEffect)(()=>{if(!D||!u)return;let $=K=>{!K.ctrlKey&&!K.metaKey||(K.key==="+"||K.key==="="?(K.preventDefault(),j()):K.key==="-"||K.key==="_"?(K.preventDefault(),H()):K.key==="0"&&(K.preventDefault(),O()))};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[D,u,j,H,O]),(0,Fo.useEffect)(()=>z.onChange(()=>{let K=I(),q=U.get(),te=N.get();m&&((q<K.left||q>K.right)&&Lo(U,Math.max(K.left,Math.min(K.right,q)),{duration:.2}),(te<K.top||te>K.bottom)&&Lo(N,Math.max(K.top,Math.min(K.bottom,te)),{duration:.2}))}),[z,U,N,I,m]),(0,On.jsxs)("div",{ref:g,className:M("relative overflow-hidden touch-none select-none",d&&"cursor-grab active:cursor-grabbing",T&&"fixed inset-0 z-50 bg-background",o),onWheel:L,onDoubleClick:F,onTouchEnd:B,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),...h,children:[(0,On.jsx)("div",{ref:v,className:"w-full h-full",children:(0,On.jsx)(Z.div,{ref:y,drag:d,dragElastic:.1,dragMomentum:!1,dragConstraints:m?I():!1,onDragStart:()=>w(!0),onDragEnd:()=>w(!1),style:{scale:P,x:U,y:N},className:M("w-full h-full flex items-center justify-center",b&&"cursor-grabbing",a),children:e})}),(0,On.jsx)(Ct,{children:l&&x&&(0,On.jsxs)(Z.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:[k.get(),"%"]})}),s&&(0,On.jsxs)("div",{className:"absolute bottom-4 right-4 flex gap-2",children:[(0,On.jsx)("button",{onClick:H,disabled:z.get()<=t,className:M("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,On.jsx)(qu,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:j,disabled:z.get()>=r,className:M("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,On.jsx)(Wu,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:O,className:M("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,On.jsx)(d0,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:W,className:M("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":T?"Exit fullscreen":"Enter fullscreen",children:T?(0,On.jsx)(c0,{className:"w-4 h-4"}):(0,On.jsx)(ol,{className:"w-4 h-4"})})]}),s&&(0,On.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,On.jsxs)("div",{className:"flex items-center gap-2",children:[(0,On.jsxs)("span",{children:[Math.round(z.get()*100),"%"]}),u&&!x&&(0,On.jsx)("span",{className:"text-xs text-muted-foreground",children:"(Ctrl+Scroll to zoom)"})]})})]})});F0e.displayName="PinchZoomInternal";var B0e=Fo.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,On.jsx)(Ve,{className:M("w-fit",e),children:(0,On.jsx)(He,{className:"py-6 text-center",children:(0,On.jsxs)("div",{className:"space-y-4",children:[(0,On.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,On.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,On.jsxs)("div",{children:[(0,On.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,On.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Pinch Zoom is available exclusively to MoonUI Pro subscribers."}),(0,On.jsx)("a",{href:"/pricing",children:(0,On.jsxs)(re,{size:"sm",children:[(0,On.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,On.jsx)(F0e,{className:e,ref:r,...t})});B0e.displayName="PinchZoom";var Wy=A(le(),1);ar();var ki=A(ae(),1),z0e=Wy.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,Wy.useRef)(null),[c,u]=(0,Wy.useState)({x:0,y:0}),[d,f]=(0,Wy.useState)(!1),p=g=>{if(!l.current)return;let v=l.current.getBoundingClientRect(),y=g.clientX-v.left,b=g.clientY-v.top;u({x:y,y:b})},m=()=>{f(!0)},h=()=>{f(!1)};return(0,ki.jsxs)(Z.div,{ref:g=>{l.current=g,typeof s=="function"?s(g):s&&(s.current=g)},className:M("relative overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm",t),onMouseMove:p,onMouseEnter:m,onMouseLeave:h,whileHover:{scale:1.02},transition:{duration:.2},children:[(0,ki.jsx)(Z.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,ki.jsx)(Z.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,ki.jsx)(Z.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,ki.jsx)("div",{className:"relative z-10",children:e}),(0,ki.jsx)(Z.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?.3:0},transition:{duration:.5},children:[...Array(3)].map((g,v)=>(0,ki.jsx)(Z.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:v*.2,repeat:d?1/0:0,ease:"easeOut"},style:{left:c.x,top:c.y}},v))})]})});z0e.displayName="SpotlightCardInternal";var U0e=Wy.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,ki.jsx)(Ve,{className:M("w-fit",e),children:(0,ki.jsx)(He,{className:"py-6 text-center",children:(0,ki.jsxs)("div",{className:"space-y-4",children:[(0,ki.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ki.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ki.jsxs)("div",{children:[(0,ki.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ki.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Spotlight Card is available exclusively to MoonUI Pro subscribers."}),(0,ki.jsx)("a",{href:"/pricing",children:(0,ki.jsxs)(re,{size:"sm",children:[(0,ki.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ki.jsx)(z0e,{className:e,ref:r,...t})});U0e.displayName="SpotlightCard";var Cs=A(le(),1);ar();var v1=A(le(),1);var Jt=A(ae(),1),V0e=[{value:"meeting",label:"Meeting",color:"#3b82f6"},{value:"task",label:"Task",color:"#10b981"},{value:"reminder",label:"Reminder",color:"#f59e0b"},{value:"event",label:"Event",color:"#8b5cf6"}],ont=["#3b82f6","#10b981","#f59e0b","#8b5cf6","#ef4444","#06b6d4","#84cc16","#f97316","#ec4899","#6366f1","#14b8a6","#eab308","#f43f5e","#a855f7","#22c55e","#64748b"];function H0e({open:e,onOpenChange:t,event:r,selectedDate:n,onSave:o,onDelete:a,mode:i="create"}){let[s,l]=(0,v1.useState)({title:"",description:"",date:"",startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""}),[c,u]=(0,v1.useState)({}),[d,f]=(0,v1.useState)(!1);(0,v1.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 v=n?n.toISOString().split("T")[0]:new Date().toISOString().split("T")[0];l({title:"",description:"",date:v,startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""})}u({})},[r,n,i,e]);let p=()=>{let v={};return s.title.trim()||(v.title="Title is required"),s.date||(v.date="Date is required"),s.startTime&&s.endTime&&s.startTime>=s.endTime&&(v.endTime="End time must be after start time"),u(v),Object.keys(v).length===0},m=async v=>{if(v.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(b=>b.trim()).filter(Boolean):void 0};await o(y),t(!1)}catch(y){console.error("Error saving event:",y)}finally{f(!1)}}},h=()=>{r&&a&&(a(r.id),t(!1))},g=v=>{let y=V0e.find(b=>b.value===v);l(b=>({...b,type:v,color:y?.color||b.color}))};return(0,Jt.jsx)(Yo,{open:e,onOpenChange:t,children:(0,Jt.jsxs)(Oo,{className:"sm:max-w-[500px]",children:[(0,Jt.jsxs)(fa,{children:[(0,Jt.jsxs)(Xo,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(Na,{className:"w-5 h-5"}),i==="create"?"Create Event":"Edit Event"]}),(0,Jt.jsx)(Fs,{children:i==="create"?"Add a new event to your calendar.":"Edit the event details."})]}),(0,Jt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"title",children:"Title *"}),(0,Jt.jsx)(jt,{id:"title",value:s.title,onChange:v=>l(y=>({...y,title:v.target.value})),placeholder:"Event title",className:M(c.title&&"border-red-500")}),c.title&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.title})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"description",children:"Description"}),(0,Jt.jsx)(yc,{id:"description",value:s.description,onChange:v=>l(y=>({...y,description:v.target.value})),placeholder:"Event description (optional)",rows:3})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"date",children:"Date *"}),(0,Jt.jsx)(jt,{id:"date",type:"date",value:s.date,onChange:v=>l(y=>({...y,date:v.target.value})),className:M(c.date&&"border-red-500")}),c.date&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.date})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"startTime",children:"Start Time"}),(0,Jt.jsx)(jt,{id:"startTime",type:"time",value:s.startTime,onChange:v=>l(y=>({...y,startTime:v.target.value})),placeholder:"09:00"})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"endTime",children:"End Time"}),(0,Jt.jsx)(jt,{id:"endTime",type:"time",value:s.endTime,onChange:v=>l(y=>({...y,endTime:v.target.value})),placeholder:"10:00",className:M(c.endTime&&"border-red-500")}),c.endTime&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.endTime})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{htmlFor:"location",className:"flex items-center gap-2",children:[(0,Jt.jsx)(zd,{className:"w-4 h-4"}),"Location"]}),(0,Jt.jsx)(jt,{id:"location",value:s.location,onChange:v=>l(y=>({...y,location:v.target.value})),placeholder:"Meeting room, address, or link"})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(h0,{className:"w-4 h-4"}),"Type"]}),(0,Jt.jsxs)(xo,{value:s.type,onValueChange:g,children:[(0,Jt.jsx)(wo,{children:(0,Jt.jsx)(_o,{})}),(0,Jt.jsx)(Co,{children:V0e.map(v=>(0,Jt.jsx)(Tt,{value:v.value,children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v.color}}),v.label]})},v.value))})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(ac,{className:"w-4 h-4"}),"Color"]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("input",{type:"color",value:s.color,onChange:v=>l(y=>({...y,color:v.target.value})),className:"w-8 h-8 rounded border cursor-pointer flex-shrink-0"}),(0,Jt.jsx)("span",{className:"text-sm text-muted-foreground",children:"Custom color"})]}),(0,Jt.jsx)("div",{className:"grid grid-cols-8 gap-1",children:ont.map(v=>(0,Jt.jsx)("button",{type:"button",onClick:()=>l(y=>({...y,color:v})),className:M("w-full aspect-square rounded border-2 hover:scale-110 transition-transform",s.color===v?"border-foreground shadow-sm":"border-transparent"),style:{backgroundColor:v},"aria-label":`Select color ${v}`},v))})]})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"attendees",children:"Attendees"}),(0,Jt.jsx)(jt,{id:"attendees",value:s.attendees,onChange:v=>l(y=>({...y,attendees:v.target.value})),placeholder:"John Doe, Jane Smith (comma-separated)"})]}),(0,Jt.jsxs)(fp,{className:"gap-2",children:[i==="edit"&&a&&(0,Jt.jsx)(re,{type:"button",variant:"destructive",onClick:h,className:"mr-auto",children:"Delete Event"}),(0,Jt.jsx)(re,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:d,children:"Cancel"}),(0,Jt.jsx)(re,{type:"submit",disabled:d,children:d?i==="create"?"Creating...":"Saving...":i==="create"?"Create Event":"Save Changes"})]})]})]})})}var Ce=A(ae(),1),hG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],j0e=["January","February","March","April","May","June","July","August","September","October","November","December"],y1={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"},ant={low:"border-l-4 border-l-muted-foreground",medium:"border-l-4 border-l-yellow-500",high:"border-l-4 border-l-red-500"},int={confirmed:"",tentative:"opacity-70 border-dashed",cancelled:"opacity-50 line-through"};function snt({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:m=!0,height:h,defaultView:g="month",enableDragDrop:v=!0,enableSearch:y=!0,enableFilters:b=!0,enableExport:w=!0,enableImport:x=!1,enableRecurringEvents:C=!0,enableReminders:S=!0,eventCategories:R,workingHours:D={start:"09:00",end:"18:00"},holidays:_=[],locale:T="en-US",timeFormat:E="12h",firstDayOfWeek:z=0,theme:U="auto",customTheme:N,compactMode:P=!1,showProUpgrade:k=!1}){if(k)return(0,Ce.jsx)(Ve,{className:M("w-full",l),children:(0,Ce.jsx)(He,{className:"py-12 text-center",children:(0,Ce.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Ce.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ce.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ce.jsxs)("div",{children:[(0,Ce.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Ce.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Calendar is available exclusively to MoonUI Pro subscribers."}),(0,Ce.jsx)("div",{className:"flex gap-3 justify-center",children:(0,Ce.jsx)("a",{href:"/pricing",children:(0,Ce.jsxs)(re,{size:"sm",children:[(0,Ce.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[I,L]=Cs.default.useState(new Date),[F,B]=Cs.default.useState(null),[O,j]=Cs.default.useState(g),[H,V]=Cs.default.useState(!1),[W,$]=Cs.default.useState("create"),[K,q]=Cs.default.useState(null),[te,oe]=Cs.default.useState(null),[ee,Ne]=Cs.default.useState(null),[we,De]=Cs.default.useState(""),[pe,ke]=Cs.default.useState("all"),[he,Ae]=Cs.default.useState("all"),[Y,X]=Cs.default.useState(!1),[de,Pe]=Cs.default.useState([]),[ue,be]=Cs.default.useState(new Date),[Q,ge]=Cs.default.useState(!1),[ie,ne]=Cs.default.useState(!1),Le=new Date,Nt=I.getMonth(),Tn=I.getFullYear(),We=new Date(Tn,Nt,1),Je=new Date(Tn,Nt+1,0),xe=new Date(We),dt=(xe.getDay()-z+7)%7;xe.setDate(xe.getDate()-dt);let wt=new Date(Je),Ie=(6-wt.getDay()+z)%7;wt.setDate(wt.getDate()+Ie);let ft=[],$e=new Date(xe);for(;$e<=wt;)ft.push(new Date($e)),$e.setDate($e.getDate()+1);let It=Cs.default.useMemo(()=>{let Oe=new Set;return e.forEach(et=>{et.tags?.forEach(ht=>Oe.add(ht))}),Array.from(Oe)},[e]),Ft=Cs.default.useMemo(()=>e.filter(Oe=>!(we&&!Oe.title.toLowerCase().includes(we.toLowerCase())&&!Oe.description?.toLowerCase().includes(we.toLowerCase())||pe!=="all"&&Oe.type!==pe||he!=="all"&&Oe.priority!==he||de.length>0&&(!Oe.tags||!Oe.tags.some(et=>de.includes(et))))),[e,we,pe,he,de]),Tr=Oe=>Ft.filter(et=>{let ht=new Date(et.date);return et.recurring?Xr(Oe,et):ht.toDateString()===Oe.toDateString()}),Xr=(Oe,et)=>{if(!et.recurring)return!1;let ht=new Date(et.date),Cr=Math.floor((Oe.getTime()-ht.getTime())/(1e3*60*60*24));if(Cr<0||et.recurring.endDate&&Oe>et.recurring.endDate)return!1;switch(et.recurring.pattern){case"daily":return Cr%et.recurring.interval===0;case"weekly":return Cr%(et.recurring.interval*7)!==0?!1:et.recurring.daysOfWeek?et.recurring.daysOfWeek.includes(Oe.getDay()):Oe.getDay()===ht.getDay();case"monthly":return((Oe.getFullYear()-ht.getFullYear())*12+(Oe.getMonth()-ht.getMonth()))%et.recurring.interval!==0?!1:et.recurring.dayOfMonth?Oe.getDate()===et.recurring.dayOfMonth:Oe.getDate()===ht.getDate();case"yearly":return(Oe.getFullYear()-ht.getFullYear())%et.recurring.interval!==0?!1:Oe.getMonth()===ht.getMonth()&&Oe.getDate()===ht.getDate();default:return!1}},Va=Oe=>Oe.toDateString()===Le.toDateString(),ro=Oe=>Oe.getMonth()===Nt,aa=Oe=>F&&Oe.toDateString()===F.toDateString(),kr=Oe=>!!(d||f&&Oe<f||p&&Oe>p),rn=Oe=>{let et=new Date(I);Oe==="prev"?et.setMonth(Nt-1):et.setMonth(Nt+1),L(et),a?.(et)},ls=Oe=>{j(Oe),i?.(Oe)},Fc=()=>{let Oe=Zs(Ft),et=new Blob([Oe],{type:"text/calendar"}),ht=URL.createObjectURL(et),Cr=document.createElement("a");Cr.href=ht,Cr.download="calendar.ics",Cr.click(),URL.revokeObjectURL(ht)},Zs=Oe=>{let et=`BEGIN:VCALENDAR\r
|
|
120
|
+
Defaulting to \`null\`.`}var Kq=Gge,Jge=Yge;var Yq=A(ae(),1),oo=Qge.forwardRef(({className:e,value:t,...r},n)=>(0,Yq.jsx)(Kq,{ref:n,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...r,children:(0,Yq.jsx)(Jge,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));oo.displayName=Kq.displayName;var af=A(le(),1);var Zu=A(ae(),1),gF=ot("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"}}),ST=af.createContext({}),nx=af.forwardRef(({className:e,value:t,onValueChange:r,disabled:n,name:o,...a},i)=>(0,Zu.jsx)(ST.Provider,{value:{value:t,onValueChange:r,disabled:n,name:o},children:(0,Zu.jsx)("div",{ref:i,role:"radiogroup",className:M("grid gap-2",e),...a})}));nx.displayName="RadioGroupPro";var vg=af.forwardRef(({className:e,variant:t,size:r,indicator:n,id:o,value:a,disabled:i,...s},l)=>{let c=af.useContext(ST),u=af.useId(),d=o||u,f=c.value===a,p=m=>{c.onValueChange&&c.onValueChange(m.target.value),s.onChange&&s.onChange(m)};return(0,Zu.jsxs)("div",{className:"relative flex items-center",children:[(0,Zu.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,Zu.jsx)("label",{htmlFor:d,className:M(gF({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,Zu.jsx)("span",{className:M("absolute inset-0 pointer-events-none",f&&"flex items-center justify-center"),children:f&&(n||(0,Zu.jsx)(Gc,{className:"h-[60%] w-[60%] fill-current text-current"}))})})]})});vg.displayName="RadioGroupItemPro";var PT=af.forwardRef(({className:e,htmlFor:t,children:r,disabled:n=!1,...o},a)=>(0,Zu.jsx)("label",{ref:a,htmlFor:t,className:M("text-sm font-medium leading-none ml-2 text-foreground",n&&"cursor-not-allowed opacity-70",e),...o,children:r}));PT.displayName="RadioLabelPro";var vF=af.forwardRef(({id:e,label:t,labelClassName:r,...n},o)=>{let a=af.useId(),i=e||a;return(0,Zu.jsxs)("div",{className:"flex items-center",children:[(0,Zu.jsx)(vg,{ref:o,id:i,...n}),(0,Zu.jsx)(PT,{htmlFor:i,disabled:n.disabled,className:r,children:t})]})});vF.displayName="RadioItemWithLabelPro";var t8=A(le(),1);var nr=A(le(),1);var eve=A(le(),1),Xn=A(ae(),1);function QZe(e,t){return eve.useReducer((r,n)=>t[r][n]??r,e)}var Xq="ScrollArea",[tve,Hyr]=kn(Xq),[ZZe,sf]=tve(Xq),rve=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:a=600,...i}=e,[s,l]=nr.useState(null),[c,u]=nr.useState(null),[d,f]=nr.useState(null),[p,m]=nr.useState(null),[h,g]=nr.useState(null),[v,y]=nr.useState(0),[b,w]=nr.useState(0),[x,C]=nr.useState(!1),[S,R]=nr.useState(!1),D=qt(t,T=>l(T)),_=_d(o);return(0,Xn.jsx)(ZZe,{scope:r,type:n,dir:_,scrollHideDelay:a,scrollArea:s,viewport:c,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:C,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:S,onScrollbarYEnabledChange:R,onCornerWidthChange:y,onCornerHeightChange:w,children:(0,Xn.jsx)(nt.div,{dir:_,...i,ref:D,style:{position:"relative",["--radix-scroll-area-corner-width"]:v+"px",["--radix-scroll-area-corner-height"]:b+"px",...e.style}})})});rve.displayName=Xq;var nve="ScrollAreaViewport",ove=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,children:n,nonce:o,...a}=e,i=sf(nve,r),s=nr.useRef(null),l=qt(t,s,i.onViewportChange);return(0,Xn.jsxs)(Xn.Fragment,{children:[(0,Xn.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,Xn.jsx)(nt.div,{"data-radix-scroll-area-viewport":"",...a,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:(0,Xn.jsx)("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:n})})]})});ove.displayName=nve;var Am="ScrollAreaScrollbar",xF=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:i}=o,s=e.orientation==="horizontal";return nr.useEffect(()=>(s?a(!0):i(!0),()=>{s?a(!1):i(!1)}),[s,a,i]),o.type==="hover"?(0,Xn.jsx)(eet,{...n,ref:t,forceMount:r}):o.type==="scroll"?(0,Xn.jsx)(tet,{...n,ref:t,forceMount:r}):o.type==="auto"?(0,Xn.jsx)(ave,{...n,ref:t,forceMount:r}):o.type==="always"?(0,Xn.jsx)(Jq,{...n,ref:t}):null});xF.displayName=Am;var eet=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),[a,i]=nr.useState(!1);return nr.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,Xn.jsx)(po,{present:r||a,children:(0,Xn.jsx)(ave,{"data-state":a?"visible":"hidden",...n,ref:t})})}),tet=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=sf(Am,e.__scopeScrollArea),a=e.orientation==="horizontal",i=CF(()=>l("SCROLL_END"),100),[s,l]=QZe("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 nr.useEffect(()=>{if(s==="idle"){let c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[s,o.scrollHideDelay,l]),nr.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,Xn.jsx)(po,{present:r||s!=="hidden",children:(0,Xn.jsx)(Jq,{"data-state":s==="hidden"?"hidden":"visible",...n,ref:t,onPointerEnter:Qe(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:Qe(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ave=nr.forwardRef((e,t)=>{let r=sf(Am,e.__scopeScrollArea),{forceMount:n,...o}=e,[a,i]=nr.useState(!1),s=e.orientation==="horizontal",l=CF(()=>{if(r.viewport){let c=r.viewport.offsetWidth<r.viewport.scrollWidth,u=r.viewport.offsetHeight<r.viewport.scrollHeight;i(s?c:u)}},10);return a1(r.viewport,l),a1(r.content,l),(0,Xn.jsx)(po,{present:n||a,children:(0,Xn.jsx)(Jq,{"data-state":a?"visible":"hidden",...o,ref:t})})}),Jq=nr.forwardRef((e,t)=>{let{orientation:r="vertical",...n}=e,o=sf(Am,e.__scopeScrollArea),a=nr.useRef(null),i=nr.useRef(0),[s,l]=nr.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=cve(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 set(f,i.current,s,p)}return r==="horizontal"?(0,Xn.jsx)(ret,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollLeft,p=Zge(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,Xn.jsx)(net,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&a.current){let f=o.viewport.scrollTop,p=Zge(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}),ret=nr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=sf(Am,e.__scopeScrollArea),[i,s]=nr.useState(),l=nr.useRef(null),c=qt(t,l,a.onScrollbarXChange);return nr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Xn.jsx)(sve,{"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"]:wF(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),dve(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:bF(i.paddingLeft),paddingEnd:bF(i.paddingRight)}})}})}),net=nr.forwardRef((e,t)=>{let{sizes:r,onSizesChange:n,...o}=e,a=sf(Am,e.__scopeScrollArea),[i,s]=nr.useState(),l=nr.useRef(null),c=qt(t,l,a.onScrollbarYChange);return nr.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),(0,Xn.jsx)(sve,{"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"]:wF(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),dve(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:bF(i.paddingTop),paddingEnd:bF(i.paddingBottom)}})}})}),[oet,ive]=tve(Am),sve=nr.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=sf(Am,r),[m,h]=nr.useState(null),g=qt(t,D=>h(D)),v=nr.useRef(null),y=nr.useRef(""),b=p.viewport,w=n.content-n.viewport,x=Ln(u),C=Ln(l),S=CF(d,10);function R(D){if(v.current){let _=D.clientX-v.current.left,T=D.clientY-v.current.top;c({x:_,y:T})}}return nr.useEffect(()=>{let D=_=>{let T=_.target;m?.contains(T)&&x(_,w)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[b,m,w,x]),nr.useEffect(C,[n,C]),a1(m,S),a1(p.content,S),(0,Xn.jsx)(oet,{scope:r,scrollbar:m,hasThumb:o,onThumbChange:Ln(a),onThumbPointerUp:Ln(i),onThumbPositionChange:C,onThumbPointerDown:Ln(s),children:(0,Xn.jsx)(nt.div,{...f,ref:g,style:{position:"absolute",...f.style},onPointerDown:Qe(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),v.current=m.getBoundingClientRect(),y.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),R(D))}),onPointerMove:Qe(e.onPointerMove,R),onPointerUp:Qe(e.onPointerUp,D=>{let _=D.target;_.hasPointerCapture(D.pointerId)&&_.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=y.current,p.viewport&&(p.viewport.style.scrollBehavior=""),v.current=null})})})}),yF="ScrollAreaThumb",Qq=nr.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=ive(yF,e.__scopeScrollArea);return(0,Xn.jsx)(po,{present:r||o.hasThumb,children:(0,Xn.jsx)(aet,{ref:t,...n})})}),aet=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,style:n,...o}=e,a=sf(yF,r),i=ive(yF,r),{onThumbPositionChange:s}=i,l=qt(t,d=>i.onThumbChange(d)),c=nr.useRef(void 0),u=CF(()=>{c.current&&(c.current(),c.current=void 0)},100);return nr.useEffect(()=>{let d=a.viewport;if(d){let f=()=>{if(u(),!c.current){let p=cet(d,s);c.current=p,s()}};return s(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[a.viewport,u,s]),(0,Xn.jsx)(nt.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:Qe(e.onPointerDownCapture,d=>{let p=d.target.getBoundingClientRect(),m=d.clientX-p.left,h=d.clientY-p.top;i.onThumbPointerDown({x:m,y:h})}),onPointerUp:Qe(e.onPointerUp,i.onThumbPointerUp)})});Qq.displayName=yF;var Zq="ScrollAreaCorner",lve=nr.forwardRef((e,t)=>{let r=sf(Zq,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?(0,Xn.jsx)(iet,{...e,ref:t}):null});lve.displayName=Zq;var iet=nr.forwardRef((e,t)=>{let{__scopeScrollArea:r,...n}=e,o=sf(Zq,r),[a,i]=nr.useState(0),[s,l]=nr.useState(0),c=!!(a&&s);return a1(o.scrollbarX,()=>{let u=o.scrollbarX?.offsetHeight||0;o.onCornerHeightChange(u),l(u)}),a1(o.scrollbarY,()=>{let u=o.scrollbarY?.offsetWidth||0;o.onCornerWidthChange(u),i(u)}),c?(0,Xn.jsx)(nt.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 bF(e){return e?parseInt(e,10):0}function cve(e,t){let r=e/t;return isNaN(r)?0:r}function wF(e){let t=cve(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function set(e,t,r,n="ltr"){let o=wF(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 uve([l,c],d)(e)}function Zge(e,t,r="ltr"){let n=wF(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=sT(e,l);return uve([0,i],[0,s])(c)}function uve(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 dve(e,t){return e>0&&e<t}var cet=(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 CF(e,t){let r=Ln(e),n=nr.useRef(0);return nr.useEffect(()=>()=>window.clearTimeout(n.current),[]),nr.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function a1(e,t){let r=Ln(t);In(()=>{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 e8=rve,fve=ove;var pve=lve;var By=A(ae(),1),lu=t8.forwardRef(({className:e,children:t,...r},n)=>(0,By.jsxs)(e8,{ref:n,className:M("relative overflow-hidden",e),...r,children:[(0,By.jsx)(fve,{className:"h-full w-full rounded-[inherit]",children:t}),(0,By.jsx)(SF,{}),(0,By.jsx)(pve,{})]}));lu.displayName=e8.displayName;var SF=t8.forwardRef(({className:e,orientation:t="vertical",...r},n)=>(0,By.jsx)(xF,{ref:n,orientation:t,className:M("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,By.jsx)(Qq,{className:"relative flex-1 rounded-full bg-border"})}));SF.displayName=xF.displayName;var yve=A(le(),1);var hve=A(le(),1);var gve=A(ae(),1),det="Separator",mve="horizontal",fet=["horizontal","vertical"],vve=hve.forwardRef((e,t)=>{let{decorative:r,orientation:n=mve,...o}=e,a=pet(n)?n:mve,s=r?{role:"none"}:{"aria-orientation":a==="vertical"?a:void 0,role:"separator"};return(0,gve.jsx)(nt.div,{"data-orientation":a,...s,...o,ref:t})});vve.displayName=det;function pet(e){return fet.includes(e)}var r8=vve;var bve=A(ae(),1),PF=ot("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"}}),Wi=yve.forwardRef(({className:e,orientation:t="horizontal",variant:r="default",size:n="md",decorative:o=!0,...a},i)=>(0,bve.jsx)(r8,{ref:i,decorative:o,orientation:t,className:M(PF({orientation:t,variant:r,size:n}),e),...a}));Wi.displayName=r8.displayName;var NT=A(le(),1);var ed=A(ae(),1),zy=xy,NF=y2,xve=$S,n8=wy,kF=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(Cm,{className:M("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}));kF.displayName=Cm.displayName;var het=ot("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"}}),yg=NT.forwardRef(({side:e="right",className:t,children:r,...n},o)=>(0,ed.jsxs)(n8,{children:[(0,ed.jsx)(kF,{}),(0,ed.jsxs)(Cy,{ref:o,className:M(het({side:e}),t),...n,children:[r,(0,ed.jsxs)($S,{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,ed.jsx)(Qt,{className:"h-4 w-4"}),(0,ed.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));yg.displayName=Cy.displayName;var kT=({className:e,...t})=>(0,ed.jsx)("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});kT.displayName="SheetHeader";var o8=({className:e,...t})=>(0,ed.jsx)("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});o8.displayName="SheetFooter";var RT=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(HS,{ref:r,className:M("text-lg font-semibold text-foreground",e),...t}));RT.displayName=HS.displayName;var ET=NT.forwardRef(({className:e,...t},r)=>(0,ed.jsx)(jS,{ref:r,className:M("text-sm text-muted-foreground",e),...t}));ET.displayName=jS.displayName;var wve=A(ae(),1);function Qo({className:e,...t}){return(0,wve.jsx)("div",{className:M("animate-pulse rounded-md bg-muted",e),...t})}var Uy=A(le(),1);var Dm=A(ae(),1),get=ot("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"}}),vet=ot("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"}}),yet=ot("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"}}),bet=ot("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"}}),Vy=Uy.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},m)=>{let[h,g]=Uy.useState(c||u||[0]);Uy.useEffect(()=>{c!==void 0&&g(c)},[c]);let v=_=>s?s(_):`${Math.round(_*100)/100}`,y=(_,T,E)=>(_-T)/(E-T)*100,b=Uy.useRef(null),w=p.min||0,x=p.max||100,C=p.step||1,S=_=>{let T=_.map(E=>{if(C<1){let z=C.toString().split(".")[1]?.length||0;return Math.round(E*Math.pow(10,z))/Math.pow(10,z)}return Math.round(E)});g(T),d&&d(T)},R=_=>{if(f)return;let T=b.current;if(!T)return;let E=T.getBoundingClientRect(),z=(_.clientX-E.left)/E.width,U=w+z*(x-w),N=Math.round(U/C)*C,P=Math.max(w,Math.min(x,N)),k=[...h];k[0]=P,S(k)},D=_=>T=>{if(f)return;T.preventDefault();let E=U=>{let N=b.current;if(!N)return;let P=N.getBoundingClientRect(),k=(U.clientX-P.left)/P.width,I=w+k*(x-w),L=Math.round(I/C)*C,F=Math.max(w,Math.min(x,L)),B=[...h];B[_]=F,S(B)},z=()=>{document.removeEventListener("mousemove",E),document.removeEventListener("mouseup",z)};document.addEventListener("mousemove",E),document.addEventListener("mouseup",z)};return(0,Dm.jsxs)("div",{className:"w-full",ref:m,...p,children:[i&&(0,Dm.jsx)("div",{className:M("flex justify-end mb-1 text-sm text-muted-foreground",l),children:h.length===1?(0,Dm.jsx)("span",{children:v(h[0])}):(0,Dm.jsxs)("span",{children:[v(h[0])," - ",v(h[h.length-1])]})}),(0,Dm.jsxs)("div",{className:M(get({size:t}),e),"data-disabled":f?!0:void 0,children:[(0,Dm.jsx)("div",{ref:b,className:M(vet({variant:r||o||"default"})),onClick:R,children:(0,Dm.jsx)("div",{className:M(yet({variant:n||o||"primary"})),style:{left:"0%",width:`${y(h[0],w,x)}%`}})}),h.map((_,T)=>(0,Dm.jsx)("div",{className:M(bet({variant:o||"primary",size:a})),style:{left:`${y(_,w,x)}%`,transform:"translateX(-50%)",position:"absolute",top:"50%",marginTop:a==="sm"?"-6px":a==="lg"?"-12px":"-8px",cursor:f?"not-allowed":"pointer"},onMouseDown:D(T),"aria-label":`Thumb ${T+1}`,tabIndex:f?-1:0,role:"slider","aria-valuemin":w,"aria-valuemax":x,"aria-valuenow":_,"aria-disabled":f},T))]})]})});Vy.displayName="MoonUISliderPro";var Eve=A(le(),1);var yp=A(le(),1);var ox=A(ae(),1),RF="Switch",[xet,dbr]=kn(RF),[wet,Cet]=xet(RF),Cve=yp.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]=yp.useState(null),m=qt(t,b=>p(b)),h=yp.useRef(!1),g=f?u||!!f.closest("form"):!0,[v,y]=Mo({prop:o,defaultProp:a??!1,onChange:c,caller:RF});return(0,ox.jsxs)(wet,{scope:r,checked:v,disabled:s,children:[(0,ox.jsx)(nt.button,{type:"button",role:"switch","aria-checked":v,"aria-required":i,"data-state":kve(v),"data-disabled":s?"":void 0,disabled:s,value:l,...d,ref:m,onClick:Qe(e.onClick,b=>{y(w=>!w),g&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),g&&(0,ox.jsx)(Nve,{control:f,bubbles:!h.current,name:n,value:l,checked:v,required:i,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Cve.displayName=RF;var Sve="SwitchThumb",Pve=yp.forwardRef((e,t)=>{let{__scopeSwitch:r,...n}=e,o=Cet(Sve,r);return(0,ox.jsx)(nt.span,{"data-state":kve(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Pve.displayName=Sve;var Pet="SwitchBubbleInput",Nve=yp.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{let i=yp.useRef(null),s=qt(i,a),l=OS(r),c=_S(t);return yp.useEffect(()=>{let u=i.current;if(!u)return;let d=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(d,"checked").set;if(l!==r&&p){let m=new Event("click",{bubbles:n});p.call(u,r),u.dispatchEvent(m)}},[l,r,n]),(0,ox.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}})});Nve.displayName=Pet;function kve(e){return e?"checked":"unchecked"}var a8=Cve,Rve=Pve;var Lm=A(ae(),1),Om=Eve.forwardRef(({className:e,size:t="md",variant:r="primary",loading:n,leftIcon:o,rightIcon:a,description:i,...s},l)=>(0,Lm.jsxs)("div",{className:"inline-flex items-center gap-2",children:[o&&(0,Lm.jsx)("span",{className:"text-muted-foreground",children:o}),(0,Lm.jsxs)(a8,{className:M("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,Lm.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,Lm.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-gray-300 border-t-primary"})}):null,(0,Lm.jsx)(Rve,{className:M("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,Lm.jsx)("span",{className:"text-muted-foreground",children:a}),i&&(0,Lm.jsx)("span",{className:"text-sm text-muted-foreground",children:i})]}));Om.displayName=a8.displayName;var Ll=A(le(),1);var Aa=A(ae(),1),EF=ot("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"}}),TF=Ll.forwardRef(({className:e,variant:t,size:r,loading:n,emptyContent:o,...a},i)=>{let s=t==="striped",l=Ll.Children.map(a.children,c=>{if(Ll.isValidElement(c)&&c.type==="tbody"){let u=c.props;return Ll.cloneElement(c,{className:M(u.className,s&&"even:[&>tr]:bg-muted/50")})}return c});return(0,Aa.jsxs)("div",{className:"relative w-full overflow-auto",children:[n&&(0,Aa.jsx)("div",{className:"absolute inset-0 bg-background/60 flex items-center justify-center z-10",children:(0,Aa.jsx)("div",{className:"h-8 w-8 animate-spin rounded-full border-2 border-primary border-t-transparent"})}),(0,Aa.jsx)("table",{ref:i,className:M(EF({variant:t,size:r}),n&&"opacity-70",e),...a,children:l})]})});TF.displayName="TablePro";var MF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("thead",{ref:r,className:M("[&_tr]:border-b",e),...t}));MF.displayName="TableHeaderPro";var IF=Ll.forwardRef(({className:e,emptyContent:t,emptyMessage:r="No data available",children:n,...o},a)=>{let i=Ll.Children.count(n)>0;return(0,Aa.jsx)("tbody",{ref:a,className:M("[&_tr:last-child]:border-0",e),...o,children:i?n:(0,Aa.jsx)("tr",{children:(0,Aa.jsx)("td",{colSpan:100,className:"h-24 text-center",children:t||(0,Aa.jsx)("div",{className:"py-6 text-muted-foreground",children:(0,Aa.jsx)("div",{className:"text-sm",children:r})})})})})});IF.displayName="TableBodyPro";var AF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("tfoot",{ref:r,className:M("bg-primary text-primary-foreground font-medium",e),...t}));AF.displayName="TableFooterPro";var DF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("tr",{ref:r,className:M("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));DF.displayName="TableRowPro";var LF=Ll.forwardRef(({className:e,sortable:t,sorted:r,onSort:n,children:o,...a},i)=>{let s=()=>t?r==="asc"?(0,Aa.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,Aa.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,Aa.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,Aa.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,Aa.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,Aa.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,Aa.jsx)("th",{ref:i,className:M("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,Aa.jsxs)("div",{className:"flex items-center",children:[o,t&&s()]})})});LF.displayName="TableHeadPro";var OF=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("td",{ref:r,className:M("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));OF.displayName="TableCellPro";var _F=Ll.forwardRef(({className:e,...t},r)=>(0,Aa.jsx)("caption",{ref:r,className:M("mt-4 text-sm text-muted-foreground",e),...t}));_F.displayName="TableCaptionPro";var zF=A(le(),1);var xg=A(le(),1);var bg=A(ae(),1),FF="Tabs",[ket,Nbr]=kn(FF,[ZS]),Tve=ZS(),[Ret,i8]=ket(FF),Mve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...c}=e,u=_d(s),[d,f]=Mo({prop:n,onChange:o,defaultProp:a??"",caller:FF});return(0,bg.jsx)(Ret,{scope:r,baseId:Dn(),value:d,onValueChange:f,orientation:i,dir:u,activationMode:l,children:(0,bg.jsx)(nt.div,{dir:u,"data-orientation":i,...c,ref:t})})});Mve.displayName=FF;var Ive="TabsList",Ave=xg.forwardRef((e,t)=>{let{__scopeTabs:r,loop:n=!0,...o}=e,a=i8(Ive,r),i=Tve(r);return(0,bg.jsx)(Y2,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:(0,bg.jsx)(nt.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Ave.displayName=Ive;var Dve="TabsTrigger",Lve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=i8(Dve,r),s=Tve(r),l=Fve(i.baseId,n),c=Bve(i.baseId,n),u=n===i.value;return(0,bg.jsx)(X2,{asChild:!0,...s,focusable:!o,active:u,children:(0,bg.jsx)(nt.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:Qe(e.onMouseDown,d=>{!o&&d.button===0&&d.ctrlKey===!1?i.onValueChange(n):d.preventDefault()}),onKeyDown:Qe(e.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&i.onValueChange(n)}),onFocus:Qe(e.onFocus,()=>{let d=i.activationMode!=="manual";!u&&!o&&d&&i.onValueChange(n)})})})});Lve.displayName=Dve;var Ove="TabsContent",_ve=xg.forwardRef((e,t)=>{let{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,s=i8(Ove,r),l=Fve(s.baseId,n),c=Bve(s.baseId,n),u=n===s.value,d=xg.useRef(u);return xg.useEffect(()=>{let f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),(0,bg.jsx)(po,{present:o||u,children:({present:f})=>(0,bg.jsx)(nt.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})})});_ve.displayName=Ove;function Fve(e,t){return`${e}-trigger-${t}`}function Bve(e,t){return`${e}-content-${t}`}var BF=Mve,i1=Ave,s1=Lve,ax=_ve;var UF=A(ae(),1),zs=BF,xs=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(i1,{ref:r,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));xs.displayName=i1.displayName;var bn=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(s1,{ref:r,className:M("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}));bn.displayName=s1.displayName;var En=zF.forwardRef(({className:e,...t},r)=>(0,UF.jsx)(ax,{ref:r,className:M("mt-6 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));En.displayName=ax.displayName;var Us=A(le(),1);ar();var Qr=A(ae(),1),Eet={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)"}}},VF=Us.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:m=!1,scrollable:h=!1,onAnalytics:g,onBeforeChange:v,shortcuts:y=!1,maxTabs:b,groups:w,className:x,children:C,value:S,defaultValue:R,onValueChange:D,..._},T)=>{let{hasProAccess:E,isLoading:z}=Ye(),[U,N]=Us.useState(c),[P,k]=Us.useState(()=>{if(i&&typeof window<"u"){let q=localStorage.getItem(`tabs-${i}`);if(q)return JSON.parse(q).activeTab||R||U[0]?.value}if(s&&typeof window<"u"){let te=new URLSearchParams(window.location.search).get("tab");if(te)return te}return R||U[0]?.value}),[I,L]=Us.useState(new Set),[F,B]=Us.useState(!1),O=Us.useRef(null),j=S!==void 0?S:P,H=Us.useCallback(async q=>{if(!(p||F)){if(v){B(!0);let te=await v(j||"",q);if(B(!1),!te)return}if(k(q),D?.(q),l&&!I.has(q)&&L(te=>new Set([...te,q])),g?.("tab_switch",{from:j,to:q}),i&&typeof window<"u"&&localStorage.setItem(`tabs-${i}`,JSON.stringify({activeTab:q,tabs:U})),s&&typeof window<"u"){let te=new URLSearchParams(window.location.search);te.set("tab",q),window.history.replaceState({},"",`${window.location.pathname}?${te}`)}}},[j,p,F,v,D,l,I,g,i,U,s]),V=Us.useCallback((q,te)=>{te.stopPropagation();let oe=U.filter(ee=>ee.value!==q);N(oe),u?.(oe),d?.(q),g?.("tab_close",{value:q}),j===q&&oe.length>0&&H(oe[0].value)},[U,j,u,d,g,H]),W=Us.useCallback(()=>{if(b&&U.length>=b){g?.("tab_add_blocked",{reason:"max_tabs"});return}f?.(),g?.("tab_add",{count:U.length+1})},[U.length,b,f,g]);Us.useEffect(()=>{if(!y)return;let q=te=>{if((te.metaKey||te.ctrlKey)&&te.key>="1"&&te.key<="9"){te.preventDefault();let oe=parseInt(te.key)-1;U[oe]&&H(U[oe].value)}(te.metaKey||te.ctrlKey)&&te.key==="w"&&n&&(te.preventDefault(),U.find(ee=>ee.value===j)?.closeable!==!1&&V(j||"",new MouseEvent("click"))),(te.metaKey||te.ctrlKey)&&te.key==="t"&&o&&(te.preventDefault(),W())};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[y,U,j,n,o,H,V,W]);let $=()=>{O.current&&O.current.scrollBy({left:-200,behavior:"smooth"})},K=()=>{O.current&&O.current.scrollBy({left:200,behavior:"smooth"})};return!z&&!E?(0,Qr.jsx)(rr,{componentName:"Tabs Pro",compact:!0}):(0,Qr.jsxs)("div",{className:M("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)]",x),children:[p&&(0,Qr.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm rounded-lg",children:(0,Qr.jsx)(yr,{className:"h-6 w-6 animate-spin text-primary"})}),(0,Qr.jsx)(BF,{ref:T,value:j,onValueChange:H,orientation:r,..._,children:U.length>0?(0,Qr.jsxs)(Qr.Fragment,{children:[(0,Qr.jsxs)("div",{className:M("relative flex items-center",r==="vertical"&&"flex-col items-start"),children:[h&&r==="horizontal"&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute left-0 z-10",onClick:$,children:(0,Qr.jsx)(ka,{className:"h-4 w-4"})}),(0,Qr.jsx)("div",{ref:O,className:M("flex-1 overflow-x-auto scrollbar-hide",h&&r==="horizontal"&&"mx-10"),children:(0,Qr.jsxs)(i1,{className:M("flex items-center gap-1",r==="vertical"&&"flex-col items-start w-full",e==="underline"&&"border-b border-border"),children:[U.map((q,te)=>(0,Qr.jsxs)(Z.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,Qr.jsxs)(s1,{value:q.value,disabled:q.disabled,className:M("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:[q.icon&&(0,Qr.jsx)("span",{className:"mr-2",children:q.icon}),q.label,q.badge&&(0,Qr.jsx)("span",{className:"ml-2",children:q.badge}),n&&q.closeable!==!1&&(0,Qr.jsx)("button",{onClick:oe=>V(q.value,oe),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,Qr.jsx)(Qt,{className:"h-3 w-3"})})]}),j===q.value&&t!=="none"&&(0,Qr.jsx)(Z.div,{layoutId:"active-tab",className:M("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}})]},q.value)),o&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",onClick:W,className:"h-8 w-8 p-0 ml-2",disabled:b?U.length>=b:!1,children:(0,Qr.jsx)(Wa,{className:"h-4 w-4"})})]})}),h&&r==="horizontal"&&(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 absolute right-0 z-10",onClick:K,children:(0,Qr.jsx)(Rn,{className:"h-4 w-4"})}),U.length>5&&(0,Qr.jsxs)(br,{children:[(0,Qr.jsx)(xr,{asChild:!0,children:(0,Qr.jsx)(re,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 ml-2",children:(0,Qr.jsx)(Ra,{className:"h-4 w-4"})})}),(0,Qr.jsx)(mr,{align:"end",children:U.slice(5).map(q=>(0,Qr.jsxs)(_e,{onClick:()=>H(q.value),children:[q.icon&&(0,Qr.jsx)("span",{className:"mr-2",children:q.icon}),q.label]},q.value))})]})]}),t!=="none"?(0,Qr.jsx)(Ct,{mode:"wait",children:U.map(q=>j!==q.value?null:(0,Qr.jsx)(ax,{value:q.value,forceMount:!0,className:"mt-4 focus-visible:outline-none",children:(0,Qr.jsx)(Z.div,{initial:"initial",animate:"animate",exit:"exit",variants:Eet[t],transition:{duration:.3},children:q.content||C})},q.value))}):U.map(q=>(0,Qr.jsx)(ax,{value:q.value,className:"mt-4 focus-visible:outline-none",children:q.content||C},q.value))]}):C})]})});VF.displayName="MoonUITabsPro";var s8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(i1,{ref:r,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));s8.displayName="MoonUITabsListPro";var l8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(s1,{ref:r,className:M("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}));l8.displayName="MoonUITabsTriggerPro";var c8=Us.forwardRef(({className:e,...t},r)=>(0,Qr.jsx)(ax,{ref:r,className:M("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));c8.displayName="MoonUITabsContentPro";var Uve=A(le(),1);var Vve=A(ae(),1),yc=Uve.default.forwardRef(({className:e,...t},r)=>(0,Vve.jsx)("textarea",{className:M("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}));yc.displayName="MoonUITextareaPro";var Cg=A(le(),1);var Br=A(le(),1),jve=A(nm(),1);var Jn=A(ae(),1),m8="ToastProvider",[h8,Tet,Met]=Xp("Toast"),[$ve,Ybr]=kn("Toast",[Met]),[Iet,jF]=$ve(m8),Aet=e=>{let{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:o="right",swipeThreshold:a=50,children:i}=e,[s,l]=Br.useState(null),[c,u]=Br.useState(0),d=Br.useRef(!1),f=Br.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${m8}\`. Expected non-empty \`string\`.`),(0,Jn.jsx)(h8.Provider,{scope:t,children:(0,Jn.jsx)(Iet,{scope:t,label:r,duration:n,swipeDirection:o,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:Br.useCallback(()=>u(p=>p+1),[]),onToastRemove:Br.useCallback(()=>u(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:i})})};Aet.displayName=m8;var Wve="ToastViewport",Det=["F8"],d8="toast.viewportPause",f8="toast.viewportResume",qve=Br.forwardRef((e,t)=>{let{__scopeToast:r,hotkey:n=Det,label:o="Notifications ({hotkey})",...a}=e,i=jF(Wve,r),s=Tet(r),l=Br.useRef(null),c=Br.useRef(null),u=Br.useRef(null),d=Br.useRef(null),f=qt(t,d,i.onViewportChange),p=n.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;Br.useEffect(()=>{let g=v=>{n.length!==0&&n.every(b=>v[b]||v.code===b)&&d.current?.focus()};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[n]),Br.useEffect(()=>{let g=l.current,v=d.current;if(m&&g&&v){let y=()=>{if(!i.isClosePausedRef.current){let C=new CustomEvent(d8);v.dispatchEvent(C),i.isClosePausedRef.current=!0}},b=()=>{if(i.isClosePausedRef.current){let C=new CustomEvent(f8);v.dispatchEvent(C),i.isClosePausedRef.current=!1}},w=C=>{!g.contains(C.relatedTarget)&&b()},x=()=>{g.contains(document.activeElement)||b()};return g.addEventListener("focusin",y),g.addEventListener("focusout",w),g.addEventListener("pointermove",y),g.addEventListener("pointerleave",x),window.addEventListener("blur",y),window.addEventListener("focus",b),()=>{g.removeEventListener("focusin",y),g.removeEventListener("focusout",w),g.removeEventListener("pointermove",y),g.removeEventListener("pointerleave",x),window.removeEventListener("blur",y),window.removeEventListener("focus",b)}}},[m,i.isClosePausedRef]);let h=Br.useCallback(({tabbingDirection:g})=>{let y=s().map(b=>{let w=b.ref.current,x=[w,...qet(w)];return g==="forwards"?x:x.reverse()});return(g==="forwards"?y.reverse():y).flat()},[s]);return Br.useEffect(()=>{let g=d.current;if(g){let v=y=>{let b=y.altKey||y.ctrlKey||y.metaKey;if(y.key==="Tab"&&!b){let x=document.activeElement,C=y.shiftKey;if(y.target===g&&C){c.current?.focus();return}let D=h({tabbingDirection:C?"backwards":"forwards"}),_=D.findIndex(T=>T===x);u8(D.slice(_+1))?y.preventDefault():C?c.current?.focus():u.current?.focus()}};return g.addEventListener("keydown",v),()=>g.removeEventListener("keydown",v)}},[s,h]),(0,Jn.jsxs)(gde,{ref:l,role:"region","aria-label":o.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&(0,Jn.jsx)(p8,{ref:c,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"forwards"});u8(g)}}),(0,Jn.jsx)(h8.Slot,{scope:r,children:(0,Jn.jsx)(nt.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,Jn.jsx)(p8,{ref:u,onFocusFromOutsideViewport:()=>{let g=h({tabbingDirection:"backwards"});u8(g)}})]})});qve.displayName=Wve;var Gve="ToastFocusProxy",p8=Br.forwardRef((e,t)=>{let{__scopeToast:r,onFocusFromOutsideViewport:n,...o}=e,a=jF(Gve,r);return(0,Jn.jsx)(oT,{"aria-hidden":!0,tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{let s=i.relatedTarget;!a.viewport?.contains(s)&&n()}})});p8.displayName=Gve;var TT="Toast",Let="toast.swipeStart",Oet="toast.swipeMove",_et="toast.swipeCancel",Fet="toast.swipeEnd",Kve=Br.forwardRef((e,t)=>{let{forceMount:r,open:n,defaultOpen:o,onOpenChange:a,...i}=e,[s,l]=Mo({prop:n,defaultProp:o??!0,onChange:a,caller:TT});return(0,Jn.jsx)(po,{present:r||s,children:(0,Jn.jsx)(Uet,{open:s,...i,ref:t,onClose:()=>l(!1),onPause:Ln(e.onPause),onResume:Ln(e.onResume),onSwipeStart:Qe(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Qe(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:Qe(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:Qe(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)})})})});Kve.displayName=TT;var[Bet,zet]=$ve(TT,{onClose(){}}),Uet=Br.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,...m}=e,h=jF(TT,r),[g,v]=Br.useState(null),y=qt(t,U=>v(U)),b=Br.useRef(null),w=Br.useRef(null),x=o||h.duration,C=Br.useRef(0),S=Br.useRef(x),R=Br.useRef(0),{onToastAdd:D,onToastRemove:_}=h,T=Ln(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),i()}),E=Br.useCallback(U=>{!U||U===1/0||(window.clearTimeout(R.current),C.current=new Date().getTime(),R.current=window.setTimeout(T,U))},[T]);Br.useEffect(()=>{let U=h.viewport;if(U){let N=()=>{E(S.current),c?.()},P=()=>{let k=new Date().getTime()-C.current;S.current=S.current-k,window.clearTimeout(R.current),l?.()};return U.addEventListener(d8,P),U.addEventListener(f8,N),()=>{U.removeEventListener(d8,P),U.removeEventListener(f8,N)}}},[h.viewport,x,l,c,E]),Br.useEffect(()=>{a&&!h.isClosePausedRef.current&&E(x)},[a,x,h.isClosePausedRef,E]),Br.useEffect(()=>(D(),()=>_()),[D,_]);let z=Br.useMemo(()=>g?tye(g):null,[g]);return h.viewport?(0,Jn.jsxs)(Jn.Fragment,{children:[z&&(0,Jn.jsx)(Vet,{__scopeToast:r,role:"status","aria-live":n==="foreground"?"assertive":"polite","aria-atomic":!0,children:z}),(0,Jn.jsx)(Bet,{scope:r,onClose:T,children:jve.createPortal((0,Jn.jsx)(h8.ItemSlot,{scope:r,children:(0,Jn.jsx)(hde,{asChild:!0,onEscapeKeyDown:Qe(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||T(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,Jn.jsx)(nt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":h.swipeDirection,...m,ref:y,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Qe(e.onKeyDown,U=>{U.key==="Escape"&&(s?.(U.nativeEvent),U.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:Qe(e.onPointerDown,U=>{U.button===0&&(b.current={x:U.clientX,y:U.clientY})}),onPointerMove:Qe(e.onPointerMove,U=>{if(!b.current)return;let N=U.clientX-b.current.x,P=U.clientY-b.current.y,k=!!w.current,I=["left","right"].includes(h.swipeDirection),L=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,F=I?L(0,N):0,B=I?0:L(0,P),O=U.pointerType==="touch"?10:2,j={x:F,y:B},H={originalEvent:U,delta:j};k?(w.current=j,HF(Oet,d,H,{discrete:!1})):Hve(j,h.swipeDirection,O)?(w.current=j,HF(Let,u,H,{discrete:!1}),U.target.setPointerCapture(U.pointerId)):(Math.abs(N)>O||Math.abs(P)>O)&&(b.current=null)}),onPointerUp:Qe(e.onPointerUp,U=>{let N=w.current,P=U.target;if(P.hasPointerCapture(U.pointerId)&&P.releasePointerCapture(U.pointerId),w.current=null,b.current=null,N){let k=U.currentTarget,I={originalEvent:U,delta:N};Hve(N,h.swipeDirection,h.swipeThreshold)?HF(Fet,p,I,{discrete:!0}):HF(_et,f,I,{discrete:!0}),k.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),Vet=e=>{let{__scopeToast:t,children:r,...n}=e,o=jF(TT,t),[a,i]=Br.useState(!1),[s,l]=Br.useState(!1);return $et(()=>i(!0)),Br.useEffect(()=>{let c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:(0,Jn.jsx)(Xu,{asChild:!0,children:(0,Jn.jsx)(oT,{...n,children:a&&(0,Jn.jsxs)(Jn.Fragment,{children:[o.label," ",r]})})})},Het="ToastTitle",Yve=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Jn.jsx)(nt.div,{...n,ref:t})});Yve.displayName=Het;var jet="ToastDescription",Xve=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e;return(0,Jn.jsx)(nt.div,{...n,ref:t})});Xve.displayName=jet;var Jve="ToastAction",Qve=Br.forwardRef((e,t)=>{let{altText:r,...n}=e;return r.trim()?(0,Jn.jsx)(eye,{altText:r,asChild:!0,children:(0,Jn.jsx)(g8,{...n,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Jve}\`. Expected non-empty \`string\`.`),null)});Qve.displayName=Jve;var Zve="ToastClose",g8=Br.forwardRef((e,t)=>{let{__scopeToast:r,...n}=e,o=zet(Zve,r);return(0,Jn.jsx)(eye,{asChild:!0,children:(0,Jn.jsx)(nt.button,{type:"button",...n,ref:t,onClick:Qe(e.onClick,o.onClose)})})});g8.displayName=Zve;var eye=Br.forwardRef((e,t)=>{let{__scopeToast:r,altText:n,...o}=e;return(0,Jn.jsx)(nt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":n||void 0,...o,ref:t})});function tye(e){let t=[];return Array.from(e.childNodes).forEach(n=>{if(n.nodeType===n.TEXT_NODE&&n.textContent&&t.push(n.textContent),Wet(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(...tye(n))}}),t}function HF(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?IC(o,a):o.dispatchEvent(a)}var Hve=(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 $et(e=()=>{}){let t=Ln(e);In(()=>{let r=0,n=0;return r=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(n)}},[t])}function Wet(e){return e.nodeType===e.ELEMENT_NODE}function qet(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 u8(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var v8=qve,y8=Kve,b8=Yve,x8=Xve,w8=Qve,C8=g8;var wg=A(ae(),1);var Ket=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(v8,{ref:r,className:M("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}));Ket.displayName=v8.displayName;var Yet=ot("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"}}),WF=Cg.forwardRef(({className:e,variant:t,...r},n)=>(0,wg.jsx)(y8,{ref:n,className:M(Yet({variant:t}),e),...r}));WF.displayName=y8.displayName;var Xet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(w8,{ref:r,className:M("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}));Xet.displayName=w8.displayName;var Jet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(C8,{ref:r,className:M("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,wg.jsx)(Qt,{className:"h-4 w-4"})}));Jet.displayName=C8.displayName;var Qet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(b8,{ref:r,className:M("text-sm font-semibold [&+div]:text-xs",e),...t}));Qet.displayName=b8.displayName;var Zet=Cg.forwardRef(({className:e,...t},r)=>(0,wg.jsx)(x8,{ref:r,className:M("text-sm opacity-90",e),...t}));Zet.displayName=x8.displayName;var ett=5,ttt=1e6,S8=new Map,rye=e=>{if(S8.has(e))return;let t=setTimeout(()=>{S8.delete(e),$F({type:"REMOVE_TOAST",toastId:e})},ttt);S8.set(e,t)},rtt=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,ett)};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?rye(r):e.toasts.forEach(n=>{rye(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}},ntt=[],P8={toasts:[]},ott=0;function $F(e){P8=rtt(P8,e),ntt.forEach(t=>{t(P8)})}function td({...e}){let t=`toast-${Date.now()}-${++ott}`,r=o=>$F({type:"UPDATE_TOAST",toast:{...o,id:t}}),n=()=>$F({type:"DISMISS_TOAST",toastId:t});return $F({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||n()}}}),{id:t,dismiss:n,update:r}}var lye=A(le(),1);var oye=A(lr(),1);var t0r=!!(typeof window<"u"&&window.document&&window.document.createElement);function Zr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}var lf=A(lr(),1);var nye=A(lr(),1),Vs=globalThis?.document?nye.useLayoutEffect:()=>{};var qF=A(lr(),1);var att=lf[" useInsertionEffect ".trim().toString()]||Vs;function Sg({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){let[o,a,i]=itt({defaultProp:t,onChange:r}),s=e!==void 0,l=s?e:o;{let u=lf.useRef(e!==void 0);lf.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=lf.useCallback(u=>{if(s){let d=stt(u)?u(e):u;d!==e&&i.current?.(d)}else a(u)},[s,e,a,i]);return[l,c]}function itt({defaultProp:e,onChange:t}){let[r,n]=lf.useState(e),o=lf.useRef(r),a=lf.useRef(t);return att(()=>{a.current=t},[t]),lf.useEffect(()=>{o.current!==r&&(a.current?.(r),o.current=r)},[r,o]),[r,n,a]}function stt(e){return typeof e=="function"}var a0r=Symbol("RADIX:SYNC_STATE");var aye=A(Jo(),1),iye="Toggle",sye=oye.forwardRef((e,t)=>{let{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,s]=Sg({prop:r,onChange:o,defaultProp:n??!1,caller:iye});return(0,aye.jsx)(cn.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:Zr(e.onClick,()=>{e.disabled||s(!i)})})});sye.displayName=iye;var N8=sye;var bp=A(ae(),1),GF=ot("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"}}),KF=lye.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,...m},h)=>{let g=d?s:l;return(0,bp.jsx)(N8,{ref:h,className:M(GF({variant:t,size:r,shape:n}),e),pressed:d,onPressedChange:f,defaultPressed:p,disabled:o||m.disabled,...m,children:o?(0,bp.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,bp.jsx)("div",{className:"h-3 w-3 animate-spin rounded-full border-2 border-current border-t-transparent"}),u&&(0,bp.jsx)("span",{className:"text-center",children:u})]}):(0,bp.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[g&&c==="left"&&(0,bp.jsx)("span",{className:"flex-shrink-0",children:g}),u&&(0,bp.jsx)("span",{className:"text-center",children:u}),g&&c==="right"&&(0,bp.jsx)("span",{className:"flex-shrink-0",children:g}),a!==void 0&&(0,bp.jsx)("span",{className:M("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})]})})});KF.displayName=N8.displayName;var Ube=A(le(),1);var ui=A(lr(),1);var uu=A(lr(),1);var dye=["top","right","bottom","left"];var _m=Math.min,bc=Math.max,IT=Math.round,AT=Math.floor,xp=e=>({x:e,y:e}),ctt={left:"right",right:"left",bottom:"top",top:"bottom"},utt={start:"end",end:"start"};function XF(e,t,r){return bc(e,_m(t,r))}function Fm(e,t){return typeof e=="function"?e(t):e}function Bm(e){return e.split("-")[0]}function ix(e){return e.split("-")[1]}function JF(e){return e==="x"?"y":"x"}function QF(e){return e==="y"?"height":"width"}var dtt=new Set(["top","bottom"]);function wp(e){return dtt.has(Bm(e))?"y":"x"}function ZF(e){return JF(wp(e))}function fye(e,t,r){r===void 0&&(r=!1);let n=ix(e),o=ZF(e),a=QF(o),i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=MT(i)),[i,MT(i)]}function pye(e){let t=MT(e);return[YF(e),t,YF(t)]}function YF(e){return e.replace(/start|end/g,t=>utt[t])}var cye=["left","right"],uye=["right","left"],ftt=["top","bottom"],ptt=["bottom","top"];function mtt(e,t,r){switch(e){case"top":case"bottom":return r?t?uye:cye:t?cye:uye;case"left":case"right":return t?ftt:ptt;default:return[]}}function mye(e,t,r,n){let o=ix(e),a=mtt(Bm(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(YF)))),a}function MT(e){return e.replace(/left|right|bottom|top/g,t=>ctt[t])}function htt(e){return{top:0,right:0,bottom:0,left:0,...e}}function k8(e){return typeof e!="number"?htt(e):{top:e,right:e,bottom:e,left:e}}function sx(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 hye(e,t,r){let{reference:n,floating:o}=e,a=wp(t),i=ZF(t),s=QF(i),l=Bm(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(ix(t)){case"start":p[i]-=f*(r&&c?-1:1);break;case"end":p[i]+=f*(r&&c?-1:1);break}return p}var yye=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}=hye(c,n,l),f=n,p={},m=0;for(let h=0;h<s.length;h++){let{name:g,fn:v}=s[h],{x:y,y:b,data:w,reset:x}=await v({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=b??d,p={...p,[g]:{...p[g],...w}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(f=x.placement),x.rects&&(c=x.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:d}=hye(c,f,l)),h=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}};async function l1(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}=Fm(t,e),m=k8(p),g=s[f?d==="floating"?"reference":"floating":d],v=sx(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(g)))==null||r?g:g.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,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),w=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},x=sx(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(v.top-x.top+m.top)/w.y,bottom:(x.bottom-v.bottom+m.bottom)/w.y,left:(v.left-x.left+m.left)/w.x,right:(x.right-v.right+m.right)/w.x}}var bye=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}=Fm(e,t)||{};if(c==null)return{};let d=k8(u),f={x:r,y:n},p=ZF(o),m=QF(p),h=await i.getDimensions(c),g=p==="y",v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c)),S=C?C[b]:0;(!S||!await(i.isElement==null?void 0:i.isElement(C)))&&(S=s.floating[b]||a.floating[m]);let R=w/2-x/2,D=S/2-h[m]/2-1,_=_m(d[v],D),T=_m(d[y],D),E=_,z=S-h[m]-T,U=S/2-h[m]/2+R,N=XF(E,U,z),P=!l.arrow&&ix(o)!=null&&U!==N&&a.reference[m]/2-(U<E?_:T)-h[m]/2<0,k=P?U<E?U-E:U-z:0;return{[p]:f[p]+k,data:{[p]:N,centerOffset:U-N-k,...P&&{alignmentOffset:k}},reset:P}}});var xye=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:m="none",flipAlignment:h=!0,...g}=Fm(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let v=Bm(o),y=wp(s),b=Bm(s)===s,w=await(l.isRTL==null?void 0:l.isRTL(c.floating)),x=f||(b||!h?[MT(s)]:pye(s)),C=m!=="none";!f&&C&&x.push(...mye(s,h,m,w));let S=[s,...x],R=await l1(t,g),D=[],_=((n=a.flip)==null?void 0:n.overflows)||[];if(u&&D.push(R[v]),d){let U=fye(o,i,w);D.push(R[U[0]],R[U[1]])}if(_=[..._,{placement:o,overflows:D}],!D.every(U=>U<=0)){var T,E;let U=(((T=a.flip)==null?void 0:T.index)||0)+1,N=S[U];if(N&&(!(d==="alignment"?y!==wp(N):!1)||_.every(I=>wp(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:U,overflows:_},reset:{placement:N}};let P=(E=_.filter(k=>k.overflows[0]<=0).sort((k,I)=>k.overflows[1]-I.overflows[1])[0])==null?void 0:E.placement;if(!P)switch(p){case"bestFit":{var z;let k=(z=_.filter(I=>{if(C){let L=wp(I.placement);return L===y||L==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(L=>L>0).reduce((L,F)=>L+F,0)]).sort((I,L)=>I[1]-L[1])[0])==null?void 0:z[0];k&&(P=k);break}case"initialPlacement":P=s;break}if(o!==P)return{reset:{placement:P}}}return{}}}};function gye(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vye(e){return dye.some(t=>e[t]>=0)}var wye=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){let{rects:r}=t,{strategy:n="referenceHidden",...o}=Fm(e,t);switch(n){case"referenceHidden":{let a=await l1(t,{...o,elementContext:"reference"}),i=gye(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:vye(i)}}}case"escaped":{let a=await l1(t,{...o,altBoundary:!0}),i=gye(a,r.floating);return{data:{escapedOffsets:i,escaped:vye(i)}}}default:return{}}}}};var Cye=new Set(["left","top"]);async function gtt(e,t){let{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=Bm(r),s=ix(r),l=wp(r)==="y",c=Cye.has(i)?-1:1,u=a&&l?-1:1,d=Fm(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}var Sye=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 gtt(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}}}}},Pye=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:g=>{let{x:v,y}=g;return{x:v,y}}},...l}=Fm(e,t),c={x:r,y:n},u=await l1(t,l),d=wp(Bm(o)),f=JF(d),p=c[f],m=c[d];if(a){let g=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=p+u[g],b=p-u[v];p=XF(y,p,b)}if(i){let g=d==="y"?"top":"left",v=d==="y"?"bottom":"right",y=m+u[g],b=m-u[v];m=XF(y,m,b)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-r,y:h.y-n,enabled:{[f]:a,[d]:i}}}}}},Nye=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}=Fm(e,t),u={x:r,y:n},d=wp(o),f=JF(d),p=u[f],m=u[d],h=Fm(s,t),g=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(l){let b=f==="y"?"height":"width",w=a.reference[f]-a.floating[b]+g.mainAxis,x=a.reference[f]+a.reference[b]-g.mainAxis;p<w?p=w:p>x&&(p=x)}if(c){var v,y;let b=f==="y"?"width":"height",w=Cye.has(Bm(o)),x=a.reference[d]-a.floating[b]+(w&&((v=i.offset)==null?void 0:v[d])||0)+(w?0:g.crossAxis),C=a.reference[d]+a.reference[b]+(w?0:((y=i.offset)==null?void 0:y[d])||0)-(w?g.crossAxis:0);m<x?m=x:m>C&&(m=C)}return{[f]:p,[d]:m}}}},kye=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}=Fm(e,t),u=await l1(t,c),d=Bm(o),f=ix(o),p=wp(o)==="y",{width:m,height:h}=a.floating,g,v;d==="top"||d==="bottom"?(g=d,v=f===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(v=d,g=f==="end"?"top":"bottom");let y=h-u.top-u.bottom,b=m-u.left-u.right,w=_m(h-u[g],y),x=_m(m-u[v],b),C=!t.middlewareData.shift,S=w,R=x;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(R=b),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(S=y),C&&!f){let _=bc(u.left,0),T=bc(u.right,0),E=bc(u.top,0),z=bc(u.bottom,0);p?R=m-2*(_!==0||T!==0?_+T:bc(u.left,u.right)):S=h-2*(E!==0||z!==0?E+z:bc(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:S});let D=await i.getDimensions(s.floating);return m!==D.width||h!==D.height?{reset:{rects:!0}}:{}}}};function eB(){return typeof window<"u"}function cx(e){return Eye(e)?(e.nodeName||"").toLowerCase():"#document"}function cu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Cp(e){var t;return(t=(Eye(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Eye(e){return eB()?e instanceof Node||e instanceof cu(e).Node:!1}function cf(e){return eB()?e instanceof Element||e instanceof cu(e).Element:!1}function Sp(e){return eB()?e instanceof HTMLElement||e instanceof cu(e).HTMLElement:!1}function Rye(e){return!eB()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof cu(e).ShadowRoot}var vtt=new Set(["inline","contents"]);function c1(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=uf(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!vtt.has(o)}var ytt=new Set(["table","td","th"]);function Tye(e){return ytt.has(cx(e))}var btt=[":popover-open",":modal"];function DT(e){return btt.some(t=>{try{return e.matches(t)}catch{return!1}})}var xtt=["transform","translate","scale","rotate","perspective"],wtt=["transform","translate","scale","rotate","perspective","filter"],Ctt=["paint","layout","strict","content"];function tB(e){let t=rB(),r=cf(e)?uf(e):e;return xtt.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)||wtt.some(n=>(r.willChange||"").includes(n))||Ctt.some(n=>(r.contain||"").includes(n))}function Mye(e){let t=Pg(e);for(;Sp(t)&&!ux(t);){if(tB(t))return t;if(DT(t))return null;t=Pg(t)}return null}function rB(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Stt=new Set(["html","body","#document"]);function ux(e){return Stt.has(cx(e))}function uf(e){return cu(e).getComputedStyle(e)}function LT(e){return cf(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Pg(e){if(cx(e)==="html")return e;let t=e.assignedSlot||e.parentNode||Rye(e)&&e.host||Cp(e);return Rye(t)?t.host:t}function Iye(e){let t=Pg(e);return ux(t)?e.ownerDocument?e.ownerDocument.body:e.body:Sp(t)&&c1(t)?t:Iye(t)}function lx(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);let o=Iye(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=cu(o);if(a){let s=nB(i);return t.concat(i,i.visualViewport||[],c1(o)?o:[],s&&r?lx(s):[])}return t.concat(o,lx(o,[],r))}function nB(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Oye(e){let t=uf(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=Sp(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,s=IT(r)!==a||IT(n)!==i;return s&&(r=a,n=i),{width:r,height:n,$:s}}function E8(e){return cf(e)?e:e.contextElement}function u1(e){let t=E8(e);if(!Sp(t))return xp(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:a}=Oye(t),i=(a?IT(r.width):r.width)/n,s=(a?IT(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}var Ptt=xp(0);function _ye(e){let t=cu(e);return!rB()||!t.visualViewport?Ptt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ntt(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==cu(e)?!1:t}function dx(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);let o=e.getBoundingClientRect(),a=E8(e),i=xp(1);t&&(n?cf(n)&&(i=u1(n)):i=u1(e));let s=Ntt(a,r,n)?_ye(a):xp(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=cu(a),p=n&&cf(n)?cu(n):n,m=f,h=nB(m);for(;h&&n&&p!==m;){let g=u1(h),v=h.getBoundingClientRect(),y=uf(h),b=v.left+(h.clientLeft+parseFloat(y.paddingLeft))*g.x,w=v.top+(h.clientTop+parseFloat(y.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,d*=g.y,l+=b,c+=w,m=cu(h),h=nB(m)}}return sx({width:u,height:d,x:l,y:c})}function oB(e,t){let r=LT(e).scrollLeft;return t?t.left+r:dx(Cp(e)).left+r}function Fye(e,t){let r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-oB(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ktt(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,a=o==="fixed",i=Cp(n),s=t?DT(t.floating):!1;if(n===i||s&&a)return r;let l={scrollLeft:0,scrollTop:0},c=xp(1),u=xp(0),d=Sp(n);if((d||!d&&!a)&&((cx(n)!=="body"||c1(i))&&(l=LT(n)),Sp(n))){let p=dx(n);c=u1(n),u.x=p.x+n.clientLeft,u.y=p.y+n.clientTop}let f=i&&!d&&!a?Fye(i,l):xp(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 Rtt(e){return Array.from(e.getClientRects())}function Ett(e){let t=Cp(e),r=LT(e),n=e.ownerDocument.body,o=bc(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=bc(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),i=-r.scrollLeft+oB(e),s=-r.scrollTop;return uf(n).direction==="rtl"&&(i+=bc(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:s}}var Aye=25;function Ttt(e,t){let r=cu(e),n=Cp(e),o=r.visualViewport,a=n.clientWidth,i=n.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;let u=rB();(!u||u&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}let c=oB(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,m=Math.abs(n.clientWidth-d.clientWidth-p);m<=Aye&&(a-=m)}else c<=Aye&&(a+=c);return{width:a,height:i,x:s,y:l}}var Mtt=new Set(["absolute","fixed"]);function Itt(e,t){let r=dx(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Sp(e)?u1(e):xp(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 Dye(e,t,r){let n;if(t==="viewport")n=Ttt(e,r);else if(t==="document")n=Ett(Cp(e));else if(cf(t))n=Itt(t,r);else{let o=_ye(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sx(n)}function Bye(e,t){let r=Pg(e);return r===t||!cf(r)||ux(r)?!1:uf(r).position==="fixed"||Bye(r,t)}function Att(e,t){let r=t.get(e);if(r)return r;let n=lx(e,[],!1).filter(s=>cf(s)&&cx(s)!=="body"),o=null,a=uf(e).position==="fixed",i=a?Pg(e):e;for(;cf(i)&&!ux(i);){let s=uf(i),l=tB(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&Mtt.has(o.position)||c1(i)&&!l&&Bye(e,i))?n=n.filter(u=>u!==i):o=s,i=Pg(i)}return t.set(e,n),n}function Dtt(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[...r==="clippingAncestors"?DT(t)?[]:Att(t,this._c):[].concat(r),n],s=i[0],l=i.reduce((c,u)=>{let d=Dye(t,u,o);return c.top=bc(d.top,c.top),c.right=_m(d.right,c.right),c.bottom=_m(d.bottom,c.bottom),c.left=bc(d.left,c.left),c},Dye(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ltt(e){let{width:t,height:r}=Oye(e);return{width:t,height:r}}function Ott(e,t,r){let n=Sp(t),o=Cp(t),a=r==="fixed",i=dx(e,!0,a,t),s={scrollLeft:0,scrollTop:0},l=xp(0);function c(){l.x=oB(o)}if(n||!n&&!a)if((cx(t)!=="body"||c1(o))&&(s=LT(t)),n){let p=dx(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?Fye(o,s):xp(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 R8(e){return uf(e).position==="static"}function Lye(e,t){if(!Sp(e)||uf(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Cp(e)===r&&(r=r.ownerDocument.body),r}function zye(e,t){let r=cu(e);if(DT(e))return r;if(!Sp(e)){let o=Pg(e);for(;o&&!ux(o);){if(cf(o)&&!R8(o))return o;o=Pg(o)}return r}let n=Lye(e,t);for(;n&&Tye(n)&&R8(n);)n=Lye(n,t);return n&&ux(n)&&R8(n)&&!tB(n)?r:n||Mye(e)||r}var _tt=async function(e){let t=this.getOffsetParent||zye,r=this.getDimensions,n=await r(e.floating);return{reference:Ott(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function Ftt(e){return uf(e).direction==="rtl"}var Uye={convertOffsetParentRelativeRectToViewportRelativeRect:ktt,getDocumentElement:Cp,getClippingRect:Dtt,getOffsetParent:zye,getElementRects:_tt,getClientRects:Rtt,getDimensions:Ltt,getScale:u1,isElement:cf,isRTL:Ftt};function Vye(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Btt(e,t){let r=null,n,o=Cp(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 m=AT(d),h=AT(o.clientWidth-(u+f)),g=AT(o.clientHeight-(d+p)),v=AT(u),b={rootMargin:-m+"px "+-h+"px "+-g+"px "+-v+"px",threshold:bc(0,_m(1,l))||1},w=!0;function x(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&&!Vye(c,e.getBoundingClientRect())&&i(),w=!1}try{r=new IntersectionObserver(x,{...b,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,b)}r.observe(e)}return i(!0),a}function T8(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=E8(e),u=o||a?[...c?lx(c):[],...lx(t)]:[];u.forEach(v=>{o&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});let d=c&&s?Btt(c,r):null,f=-1,p=null;i&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),r()}),c&&!l&&p.observe(c),p.observe(t));let m,h=l?dx(e):null;l&&g();function g(){let v=dx(e);h&&!Vye(h,v)&&r(),h=v,m=requestAnimationFrame(g)}return r(),()=>{var v;u.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(m)}}var Hye=Sye;var jye=Pye,$ye=xye,Wye=kye,qye=wye,M8=bye;var Gye=Nye,I8=(e,t,r)=>{let n=new Map,o={platform:Uye,...r},a={...o.platform,_c:n};return yye(e,t,{...o,platform:a})};var qi=A(lr(),1),Yye=A(lr(),1),Xye=A(tx(),1),ztt=typeof document<"u",Utt=function(){},aB=ztt?Yye.useLayoutEffect:Utt;function iB(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(!iB(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)&&!iB(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Jye(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kye(e,t){let r=Jye(e);return Math.round(t*r)/r}function A8(e){let t=qi.useRef(e);return aB(()=>{t.current=e}),t}function Qye(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]=qi.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=qi.useState(n);iB(f,n)||p(n);let[m,h]=qi.useState(null),[g,v]=qi.useState(null),y=qi.useCallback(I=>{I!==C.current&&(C.current=I,h(I))},[]),b=qi.useCallback(I=>{I!==S.current&&(S.current=I,v(I))},[]),w=a||m,x=i||g,C=qi.useRef(null),S=qi.useRef(null),R=qi.useRef(u),D=l!=null,_=A8(l),T=A8(o),E=A8(c),z=qi.useCallback(()=>{if(!C.current||!S.current)return;let I={placement:t,strategy:r,middleware:f};T.current&&(I.platform=T.current),I8(C.current,S.current,I).then(L=>{let F={...L,isPositioned:E.current!==!1};U.current&&!iB(R.current,F)&&(R.current=F,Xye.flushSync(()=>{d(F)}))})},[f,t,r,T,E]);aB(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(I=>({...I,isPositioned:!1})))},[c]);let U=qi.useRef(!1);aB(()=>(U.current=!0,()=>{U.current=!1}),[]),aB(()=>{if(w&&(C.current=w),x&&(S.current=x),w&&x){if(_.current)return _.current(w,x,z);z()}},[w,x,z,_,D]);let N=qi.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:b}),[y,b]),P=qi.useMemo(()=>({reference:w,floating:x}),[w,x]),k=qi.useMemo(()=>{let I={position:r,left:0,top:0};if(!P.floating)return I;let L=Kye(P.floating,u.x),F=Kye(P.floating,u.y);return s?{...I,transform:"translate("+L+"px, "+F+"px)",...Jye(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:L,top:F}},[r,s,P.floating,u.x,u.y]);return qi.useMemo(()=>({...u,update:z,refs:N,elements:P,floatingStyles:k}),[u,z,N,P,k])}var Vtt=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?M8({element:n.current,padding:o}).fn(r):{}:n?M8({element:n,padding:o}).fn(r):{}}}},Zye=(e,t)=>({...Hye(e),options:[e,t]}),ebe=(e,t)=>({...jye(e),options:[e,t]}),tbe=(e,t)=>({...Gye(e),options:[e,t]}),rbe=(e,t)=>({...$ye(e),options:[e,t]}),nbe=(e,t)=>({...Wye(e),options:[e,t]});var obe=(e,t)=>({...qye(e),options:[e,t]});var abe=(e,t)=>({...Vtt(e),options:[e,t]});var ibe=A(lr(),1);var D8=A(Jo(),1),Htt="Arrow",sbe=ibe.forwardRef((e,t)=>{let{children:r,width:n=10,height:o=5,...a}=e;return(0,D8.jsx)(cn.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,D8.jsx)("polygon",{points:"0,0 30,0 15,10"})})});sbe.displayName=Htt;var lbe=sbe;var d1=A(lr(),1);function Hs(e){let t=d1.useRef(e);return d1.useEffect(()=>{t.current=e}),d1.useMemo(()=>(...r)=>t.current?.(...r),[])}var cbe=A(lr(),1);function ube(e){let[t,r]=cbe.useState(void 0);return Vs(()=>{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 Hy=A(Jo(),1);var L8="Popper",[dbe,O8]=su(L8),[$tt,fbe]=dbe(L8),pbe=e=>{let{__scopePopper:t,children:r}=e,[n,o]=uu.useState(null);return(0,Hy.jsx)($tt,{scope:t,anchor:n,onAnchorChange:o,children:r})};pbe.displayName=L8;var mbe="PopperAnchor",hbe=uu.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:n,...o}=e,a=fbe(mbe,r),i=uu.useRef(null),s=So(t,i),l=uu.useRef(null);return uu.useEffect(()=>{let c=l.current;l.current=n?.current||i.current,c!==l.current&&a.onAnchorChange(l.current)}),n?null:(0,Hy.jsx)(cn.div,{...o,ref:s})});hbe.displayName=mbe;var _8="PopperContent",[Wtt,qtt]=dbe(_8),gbe=uu.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:m,...h}=e,g=fbe(_8,r),[v,y]=uu.useState(null),b=So(t,$=>y($)),[w,x]=uu.useState(null),C=ube(w),S=C?.width??0,R=C?.height??0,D=n+(a!=="center"?"-"+a:""),_=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},T=Array.isArray(c)?c:[c],E=T.length>0,z={padding:_,boundary:T.filter(Ktt),altBoundary:E},{refs:U,floatingStyles:N,placement:P,isPositioned:k,middlewareData:I}=Qye({strategy:"fixed",placement:D,whileElementsMounted:(...$)=>T8(...$,{animationFrame:p==="always"}),elements:{reference:g.anchor},middleware:[Zye({mainAxis:o+R,alignmentAxis:i}),l&&ebe({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?tbe():void 0,...z}),l&&rbe({...z}),nbe({...z,apply:({elements:$,rects:K,availableWidth:q,availableHeight:te})=>{let{width:oe,height:ee}=K.reference,Ne=$.floating.style;Ne.setProperty("--radix-popper-available-width",`${q}px`),Ne.setProperty("--radix-popper-available-height",`${te}px`),Ne.setProperty("--radix-popper-anchor-width",`${oe}px`),Ne.setProperty("--radix-popper-anchor-height",`${ee}px`)}}),w&&abe({element:w,padding:s}),Ytt({arrowWidth:S,arrowHeight:R}),f&&obe({strategy:"referenceHidden",...z})]}),[L,F]=bbe(P),B=Hs(m);Vs(()=>{k&&B?.()},[k,B]);let O=I.arrow?.x,j=I.arrow?.y,H=I.arrow?.centerOffset!==0,[V,W]=uu.useState();return Vs(()=>{v&&W(window.getComputedStyle(v).zIndex)},[v]),(0,Hy.jsx)("div",{ref:U.setFloating,"data-radix-popper-content-wrapper":"",style:{...N,transform:k?N.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:V,["--radix-popper-transform-origin"]:[I.transformOrigin?.x,I.transformOrigin?.y].join(" "),...I.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,Hy.jsx)(Wtt,{scope:r,placedSide:L,onArrowChange:x,arrowX:O,arrowY:j,shouldHideArrow:H,children:(0,Hy.jsx)(cn.div,{"data-side":L,"data-align":F,...h,ref:b,style:{...h.style,animation:k?void 0:"none"}})})})});gbe.displayName=_8;var vbe="PopperArrow",Gtt={top:"bottom",right:"left",bottom:"top",left:"right"},ybe=uu.forwardRef(function(t,r){let{__scopePopper:n,...o}=t,a=qtt(vbe,n),i=Gtt[a.placedSide];return(0,Hy.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,Hy.jsx)(lbe,{...o,ref:r,style:{...o.style,display:"block"}})})});ybe.displayName=vbe;function Ktt(e){return e!==null}var Ytt=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]=bbe(r),d={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+s/2,p=(o.arrow?.y??0)+l/2,m="",h="";return c==="bottom"?(m=i?d:`${f}px`,h=`${-l}px`):c==="top"?(m=i?d:`${f}px`,h=`${n.floating.height+l}px`):c==="right"?(m=`${-l}px`,h=i?d:`${p}px`):c==="left"&&(m=`${n.floating.width+l}px`,h=i?d:`${p}px`),{data:{x:m,y:h}}}});function bbe(e){let[t,r="center"]=e.split("-");return[t,r]}var xbe=pbe,wbe=hbe,Cbe=gbe,Sbe=ybe;var sB=A(lr(),1),Pbe=A(tx(),1);var Nbe=A(Jo(),1),Jtt="Portal",OT=sB.forwardRef((e,t)=>{let{container:r,...n}=e,[o,a]=sB.useState(!1);Vs(()=>a(!0),[]);let i=r||o&&globalThis?.document?.body;return i?Pbe.default.createPortal((0,Nbe.jsx)(cn.div,{...n,ref:t}),i):null});OT.displayName=Jtt;var du=A(lr(),1);var kbe=A(lr(),1);function Qtt(e,t){return kbe.useReducer((r,n)=>t[r][n]??r,e)}var rd=e=>{let{present:t,children:r}=e,n=Ztt(t),o=typeof r=="function"?r({present:n.isPresent}):du.Children.only(r),a=So(n.ref,ert(o));return typeof r=="function"||n.isPresent?du.cloneElement(o,{ref:a}):null};rd.displayName="Presence";function Ztt(e){let[t,r]=du.useState(),n=du.useRef(null),o=du.useRef(e),a=du.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Qtt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return du.useEffect(()=>{let c=lB(n.current);a.current=s==="mounted"?c:"none"},[s]),Vs(()=>{let c=n.current,u=o.current;if(u!==e){let f=a.current,p=lB(c);e?l("MOUNT"):p==="none"||c?.display==="none"?l("UNMOUNT"):l(u&&f!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Vs(()=>{if(t){let c,u=t.ownerDocument.defaultView??window,d=p=>{let h=lB(n.current).includes(CSS.escape(p.animationName));if(p.target===t&&h&&(l("ANIMATION_END"),!o.current)){let g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},f=p=>{p.target===t&&(a.current=lB(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:du.useCallback(c=>{n.current=c?getComputedStyle(c):null,r(c)},[])}}function lB(e){return e?.animationName||"none"}function ert(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 Qa=A(lr(),1);var Rbe=A(lr(),1);function Ebe(e,t=globalThis?.document){let r=Hs(e);Rbe.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 B8=A(Jo(),1),trt="DismissableLayer",F8="dismissableLayer.update",rrt="dismissableLayer.pointerDownOutside",nrt="dismissableLayer.focusOutside",Tbe,Ibe=Qa.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),fx=Qa.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,c=Qa.useContext(Ibe),[u,d]=Qa.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=Qa.useState({}),m=So(t,S=>d(S)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(g),y=u?h.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,w=y>=v,x=irt(S=>{let R=S.target,D=[...c.branches].some(_=>_.contains(R));!w||D||(o?.(S),i?.(S),S.defaultPrevented||s?.())},f),C=srt(S=>{let R=S.target;[...c.branches].some(_=>_.contains(R))||(a?.(S),i?.(S),S.defaultPrevented||s?.())},f);return Ebe(S=>{y===c.layers.size-1&&(n?.(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},f),Qa.useEffect(()=>{if(u)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Tbe=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Mbe(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=Tbe)}},[u,f,r,c]),Qa.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Mbe())},[u,c]),Qa.useEffect(()=>{let S=()=>p({});return document.addEventListener(F8,S),()=>document.removeEventListener(F8,S)},[]),(0,B8.jsx)(cn.div,{...l,ref:m,style:{pointerEvents:b?w?"auto":"none":void 0,...e.style},onFocusCapture:Zr(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Zr(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Zr(e.onPointerDownCapture,x.onPointerDownCapture)})});fx.displayName=trt;var ort="DismissableLayerBranch",art=Qa.forwardRef((e,t)=>{let r=Qa.useContext(Ibe),n=Qa.useRef(null),o=So(t,n);return Qa.useEffect(()=>{let a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),(0,B8.jsx)(cn.div,{...e,ref:o})});art.displayName=ort;function irt(e,t=globalThis?.document){let r=Hs(e),n=Qa.useRef(!1),o=Qa.useRef(()=>{});return Qa.useEffect(()=>{let a=s=>{if(s.target&&!n.current){let c=function(){Abe(rrt,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 srt(e,t=globalThis?.document){let r=Hs(e),n=Qa.useRef(!1);return Qa.useEffect(()=>{let o=a=>{a.target&&!n.current&&Abe(nrt,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 Mbe(){let e=new CustomEvent(F8);document.dispatchEvent(e)}function Abe(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?CT(o,a):o.dispatchEvent(a)}var nd=A(Jo(),1),z8,dB="HoverCard",[Dbe,dxr]=su(dB,[O8]),fB=O8(),[lrt,pB]=Dbe(dB),Lbe=e=>{let{__scopeHoverCard:t,children:r,open:n,defaultOpen:o,onOpenChange:a,openDelay:i=700,closeDelay:s=300}=e,l=fB(t),c=ui.useRef(0),u=ui.useRef(0),d=ui.useRef(!1),f=ui.useRef(!1),[p,m]=Sg({prop:n,defaultProp:o??!1,onChange:a,caller:dB}),h=ui.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>m(!0),i)},[i,m]),g=ui.useCallback(()=>{clearTimeout(c.current),!d.current&&!f.current&&(u.current=window.setTimeout(()=>m(!1),s))},[s,m]),v=ui.useCallback(()=>m(!1),[m]);return ui.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),(0,nd.jsx)(lrt,{scope:t,open:p,onOpenChange:m,onOpen:h,onClose:g,onDismiss:v,hasSelectionRef:d,isPointerDownOnContentRef:f,children:(0,nd.jsx)(xbe,{...l,children:r})})};Lbe.displayName=dB;var Obe="HoverCardTrigger",_be=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=pB(Obe,r),a=fB(r);return(0,nd.jsx)(wbe,{asChild:!0,...a,children:(0,nd.jsx)(cn.a,{"data-state":o.open?"open":"closed",...n,ref:t,onPointerEnter:Zr(e.onPointerEnter,uB(o.onOpen)),onPointerLeave:Zr(e.onPointerLeave,uB(o.onClose)),onFocus:Zr(e.onFocus,o.onOpen),onBlur:Zr(e.onBlur,o.onClose),onTouchStart:Zr(e.onTouchStart,i=>i.preventDefault())})})});_be.displayName=Obe;var U8="HoverCardPortal",[crt,urt]=Dbe(U8,{forceMount:void 0}),drt=e=>{let{__scopeHoverCard:t,forceMount:r,children:n,container:o}=e,a=pB(U8,t);return(0,nd.jsx)(crt,{scope:t,forceMount:r,children:(0,nd.jsx)(rd,{present:r||a.open,children:(0,nd.jsx)(OT,{asChild:!0,container:o,children:n})})})};drt.displayName=U8;var cB="HoverCardContent",Fbe=ui.forwardRef((e,t)=>{let r=urt(cB,e.__scopeHoverCard),{forceMount:n=r.forceMount,...o}=e,a=pB(cB,e.__scopeHoverCard);return(0,nd.jsx)(rd,{present:n||a.open,children:(0,nd.jsx)(frt,{"data-state":a.open?"open":"closed",...o,onPointerEnter:Zr(e.onPointerEnter,uB(a.onOpen)),onPointerLeave:Zr(e.onPointerLeave,uB(a.onClose)),ref:t})})});Fbe.displayName=cB;var frt=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,...s}=e,l=pB(cB,r),c=fB(r),u=ui.useRef(null),d=So(t,u),[f,p]=ui.useState(!1);return ui.useEffect(()=>{if(f){let m=document.body;return z8=m.style.userSelect||m.style.webkitUserSelect,m.style.userSelect="none",m.style.webkitUserSelect="none",()=>{m.style.userSelect=z8,m.style.webkitUserSelect=z8}}},[f]),ui.useEffect(()=>{if(u.current){let m=()=>{p(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{document.getSelection()?.toString()!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",m),()=>{document.removeEventListener("pointerup",m),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),ui.useEffect(()=>{u.current&&hrt(u.current).forEach(h=>h.setAttribute("tabindex","-1"))}),(0,nd.jsx)(fx,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:Zr(a,m=>{m.preventDefault()}),onDismiss:l.onDismiss,children:(0,nd.jsx)(Cbe,{...c,...s,onPointerDown:Zr(s.onPointerDown,m=>{m.currentTarget.contains(m.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)"}})})}),prt="HoverCardArrow",mrt=ui.forwardRef((e,t)=>{let{__scopeHoverCard:r,...n}=e,o=fB(r);return(0,nd.jsx)(Sbe,{...o,...n,ref:t})});mrt.displayName=prt;function uB(e){return t=>t.pointerType==="touch"?void 0:e()}function hrt(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 Bbe=Lbe,zbe=_be;var V8=Fbe;var Vbe=A(ae(),1),_T=Bbe,FT=zbe,f1=Ube.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},o)=>(0,Vbe.jsx)(V8,{ref:o,align:t,sideOffset:r,className:M("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}));f1.displayName=V8.displayName;var hx=A(le(),1);var ir=A(lr(),1),Qbe=A(tx(),1);var mB=A(lr(),1),vrt=A(Jo(),1),yrt=mB.createContext(void 0);function Hbe(e){let t=mB.useContext(yrt);return e||t||"ltr"}var H8=A(lr(),1);var brt=H8[" useId ".trim().toString()]||(()=>{}),xrt=0;function px(e){let[t,r]=H8.useState(brt());return Vs(()=>{e||r(n=>n??String(xrt++))},[e]),e||(t?`radix-${t}`:"")}var jy=A(lr(),1);var hB=A(Jo(),1),wrt=A(lr(),1);var Srt=A(Jo(),1);function $8(e){let t=e+"CollectionProvider",[r,n]=su(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{let{scope:g,children:v}=h,y=jy.default.useRef(null),b=jy.default.useRef(new Map).current;return(0,hB.jsx)(o,{scope:g,itemMap:b,collectionRef:y,children:v})};i.displayName=t;let s=e+"CollectionSlot",l=rx(s),c=jy.default.forwardRef((h,g)=>{let{scope:v,children:y}=h,b=a(s,v),w=So(g,b.collectionRef);return(0,hB.jsx)(l,{ref:w,children:y})});c.displayName=s;let u=e+"CollectionItemSlot",d="data-radix-collection-item",f=rx(u),p=jy.default.forwardRef((h,g)=>{let{scope:v,children:y,...b}=h,w=jy.default.useRef(null),x=So(g,w),C=a(u,v);return jy.default.useEffect(()=>(C.itemMap.set(w,{ref:w,...b}),()=>void C.itemMap.delete(w))),(0,hB.jsx)(f,{[d]:"",ref:x,children:y})});p.displayName=u;function m(h){let g=a(e+"CollectionConsumer",h);return jy.default.useCallback(()=>{let y=g.collectionRef.current;if(!y)return[];let b=Array.from(y.querySelectorAll(`[${d}]`));return Array.from(g.itemMap.values()).sort((C,S)=>b.indexOf(C.ref.current)-b.indexOf(S.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:i,Slot:c,ItemSlot:p},m,n]}var jbe=new WeakMap,Gi,Pp,xxr=(Pp=class extends Map{constructor(r){super(r);aD(this,Gi,void 0);Kw(this,Gi,[...super.keys()]),jbe.set(this,!0)}set(r,n){return jbe.get(this)&&(this.has(r)?Vn(this,Gi)[Vn(this,Gi).indexOf(r)]=r:Vn(this,Gi).push(r)),super.set(r,n),this}insert(r,n,o){let a=this.has(n),i=Vn(this,Gi).length,s=$be(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=[...Vn(this,Gi)],f,p=!1;for(let m=l;m<u;m++)if(l===m){let h=d[m];d[m]===n&&(h=d[m+1]),a&&this.delete(n),f=this.get(h),this.set(n,o)}else{!p&&d[m-1]===n&&(p=!0);let h=d[p?m:m-1],g=f;f=this.get(h),this.delete(h),this.set(h,g)}return this}with(r,n,o){let a=new Pp(this);return a.insert(r,n,o),a}before(r){let n=Vn(this,Gi).indexOf(r)-1;if(!(n<0))return this.entryAt(n)}setBefore(r,n,o){let a=Vn(this,Gi).indexOf(r);return a===-1?this:this.insert(a,n,o)}after(r){let n=Vn(this,Gi).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=Vn(this,Gi).indexOf(r);return a===-1?this:this.insert(a+1,n,o)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Kw(this,Gi,[]),super.clear()}delete(r){let n=super.delete(r);return n&&Vn(this,Gi).splice(Vn(this,Gi).indexOf(r),1),n}deleteAt(r){let n=this.keyAt(r);return n!==void 0?this.delete(n):!1}at(r){let n=j8(Vn(this,Gi),r);if(n!==void 0)return this.get(n)}entryAt(r){let n=j8(Vn(this,Gi),r);if(n!==void 0)return[n,this.get(n)]}indexOf(r){return Vn(this,Gi).indexOf(r)}keyAt(r){return j8(Vn(this,Gi),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 Pp(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 Pp(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 Pp(n)}toReversed(){let r=new Pp;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 Pp(n)}slice(r,n){let o=new Pp,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}},Gi=new WeakMap,Pp);function j8(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=Crt(e,t);return r===-1?void 0:e[r]}function Crt(e,t){let r=e.length,n=$be(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function $be(e){return e!==e||e===0?0:Math.trunc(e)}var gB=A(lr(),1);function Wbe(e){let t=gB.useRef({value:e,previous:e});return gB.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var qbe=A(lr(),1);var Gbe=A(Jo(),1),Prt=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"}),Nrt="VisuallyHidden",Kbe=qbe.forwardRef((e,t)=>(0,Gbe.jsx)(cn.span,{...e,ref:t,style:{...Prt,...e.style}}));Kbe.displayName=Nrt;var Ybe=Kbe;var Dr=A(Jo(),1),mx="NavigationMenu",[X8,Zbe,Rrt]=$8(mx),[W8,Ert,Trt]=$8(mx),[J8,Bxr]=su(mx,[Rrt,Trt]),[Mrt,df]=J8(mx),[Irt,Art]=J8(mx),e0e=ir.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]=ir.useState(null),p=So(t,D=>f(D)),m=Hbe(c),h=ir.useRef(0),g=ir.useRef(0),v=ir.useRef(0),[y,b]=ir.useState(!0),[w,x]=Sg({prop:n,onChange:D=>{let _=D!=="",T=s>0;_?(window.clearTimeout(v.current),T&&b(!1)):(window.clearTimeout(v.current),v.current=window.setTimeout(()=>b(!0),s)),o?.(D)},defaultProp:a??"",caller:mx}),C=ir.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>x(""),150)},[x]),S=ir.useCallback(D=>{window.clearTimeout(g.current),x(D)},[x]),R=ir.useCallback(D=>{w===D?window.clearTimeout(g.current):h.current=window.setTimeout(()=>{window.clearTimeout(g.current),x(D)},i)},[w,x,i]);return ir.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(g.current),window.clearTimeout(v.current)},[]),(0,Dr.jsx)(t0e,{scope:r,isRootMenu:!0,value:w,dir:m,orientation:l,rootNavigationMenu:d,onTriggerEnter:D=>{window.clearTimeout(h.current),y?R(D):S(D)},onTriggerLeave:()=>{window.clearTimeout(h.current),C()},onContentEnter:()=>window.clearTimeout(g.current),onContentLeave:C,onItemSelect:D=>{x(_=>_===D?"":D)},onItemDismiss:()=>x(""),children:(0,Dr.jsx)(cn.nav,{"aria-label":"Main","data-orientation":l,dir:m,...u,ref:p})})});e0e.displayName=mx;var q8="NavigationMenuSub",Drt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",...s}=e,l=df(q8,r),[c,u]=Sg({prop:n,onChange:o,defaultProp:a??"",caller:q8});return(0,Dr.jsx)(t0e,{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,Dr.jsx)(cn.div,{"data-orientation":i,...s,ref:t})})});Drt.displayName=q8;var t0e=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,[m,h]=ir.useState(null),[g,v]=ir.useState(new Map),[y,b]=ir.useState(null);return(0,Dr.jsx)(Mrt,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:s,previousValue:Wbe(s),baseId:px(),dir:o,orientation:a,viewport:m,onViewportChange:h,indicatorTrack:y,onIndicatorTrackChange:b,onTriggerEnter:Hs(u),onTriggerLeave:Hs(d),onContentEnter:Hs(f),onContentLeave:Hs(p),onItemSelect:Hs(l),onItemDismiss:Hs(c),onViewportContentChange:ir.useCallback((w,x)=>{v(C=>(C.set(w,x),new Map(C)))},[]),onViewportContentRemove:ir.useCallback(w=>{v(x=>x.has(w)?(x.delete(w),new Map(x)):x)},[]),children:(0,Dr.jsx)(X8.Provider,{scope:t,children:(0,Dr.jsx)(Irt,{scope:t,items:g,children:i})})})},r0e="NavigationMenuList",n0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(r0e,r),a=(0,Dr.jsx)(cn.ul,{"data-orientation":o.orientation,...n,ref:t});return(0,Dr.jsx)(cn.div,{style:{position:"relative"},ref:o.onIndicatorTrackChange,children:(0,Dr.jsx)(X8.Slot,{scope:r,children:o.isRootMenu?(0,Dr.jsx)(p0e,{asChild:!0,children:a}):a})})});n0e.displayName=r0e;var o0e="NavigationMenuItem",[Lrt,a0e]=J8(o0e),i0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,...o}=e,a=px(),i=n||a||"LEGACY_REACT_AUTO_VALUE",s=ir.useRef(null),l=ir.useRef(null),c=ir.useRef(null),u=ir.useRef(()=>{}),d=ir.useRef(!1),f=ir.useCallback((m="start")=>{if(s.current){u.current();let h=K8(s.current);h.length&&eG(m==="start"?h:h.reverse())}},[]),p=ir.useCallback(()=>{if(s.current){let m=K8(s.current);m.length&&(u.current=Vrt(m))}},[]);return(0,Dr.jsx)(Lrt,{scope:r,value:i,triggerRef:l,contentRef:s,focusProxyRef:c,wasEscapeCloseRef:d,onEntryKeyDown:f,onFocusProxyEnter:f,onRootContentClose:p,onContentFocusOutside:p,children:(0,Dr.jsx)(cn.li,{...o,ref:t})})});i0e.displayName=o0e;var G8="NavigationMenuTrigger",s0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,disabled:n,...o}=e,a=df(G8,e.__scopeNavigationMenu),i=a0e(G8,e.__scopeNavigationMenu),s=ir.useRef(null),l=So(s,i.triggerRef,t),c=h0e(a.baseId,i.value),u=g0e(a.baseId,i.value),d=ir.useRef(!1),f=ir.useRef(!1),p=i.value===a.value;return(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(X8.ItemSlot,{scope:r,value:i.value,children:(0,Dr.jsx)(m0e,{asChild:!0,children:(0,Dr.jsx)(cn.button,{id:c,disabled:n,"data-disabled":n?"":void 0,"data-state":tG(p),"aria-expanded":p,"aria-controls":u,...o,ref:l,onPointerEnter:Zr(e.onPointerEnter,()=>{f.current=!1,i.wasEscapeCloseRef.current=!1}),onPointerMove:Zr(e.onPointerMove,yB(()=>{n||f.current||i.wasEscapeCloseRef.current||d.current||(a.onTriggerEnter(i.value),d.current=!0)})),onPointerLeave:Zr(e.onPointerLeave,yB(()=>{n||(a.onTriggerLeave(),d.current=!1)})),onClick:Zr(e.onClick,()=>{a.onItemSelect(i.value),f.current=p}),onKeyDown:Zr(e.onKeyDown,m=>{let g={horizontal:"ArrowDown",vertical:a.dir==="rtl"?"ArrowLeft":"ArrowRight"}[a.orientation];p&&m.key===g&&(i.onEntryKeyDown(),m.preventDefault())})})})}),p&&(0,Dr.jsxs)(Dr.Fragment,{children:[(0,Dr.jsx)(Ybe,{"aria-hidden":!0,tabIndex:0,ref:i.focusProxyRef,onFocus:m=>{let h=i.contentRef.current,g=m.relatedTarget,v=g===s.current,y=h?.contains(g);(v||!y)&&i.onFocusProxyEnter(v?"start":"end")}}),a.viewport&&(0,Dr.jsx)("span",{"aria-owns":u})]})]})});s0e.displayName=G8;var Ort="NavigationMenuLink",Xbe="navigationMenu.linkSelect",l0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,active:n,onSelect:o,...a}=e;return(0,Dr.jsx)(m0e,{asChild:!0,children:(0,Dr.jsx)(cn.a,{"data-active":n?"":void 0,"aria-current":n?"page":void 0,...a,ref:t,onClick:Zr(e.onClick,i=>{let s=i.target,l=new CustomEvent(Xbe,{bubbles:!0,cancelable:!0});if(s.addEventListener(Xbe,c=>o?.(c),{once:!0}),CT(s,l),!l.defaultPrevented&&!i.metaKey){let c=new CustomEvent(vB,{bubbles:!0,cancelable:!0});CT(s,c)}},{checkForDefaultPrevented:!1})})})});l0e.displayName=Ort;var Q8="NavigationMenuIndicator",c0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=df(Q8,e.__scopeNavigationMenu),a=!!o.value;return o.indicatorTrack?Qbe.default.createPortal((0,Dr.jsx)(rd,{present:r||a,children:(0,Dr.jsx)(_rt,{...n,ref:t})}),o.indicatorTrack):null});c0e.displayName=Q8;var _rt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(Q8,r),a=Zbe(r),[i,s]=ir.useState(null),[l,c]=ir.useState(null),u=o.orientation==="horizontal",d=!!o.value;ir.useEffect(()=>{let m=a().find(h=>h.value===o.value)?.ref.current;m&&s(m)},[a,o.value]);let f=()=>{i&&c({size:u?i.offsetWidth:i.offsetHeight,offset:u?i.offsetLeft:i.offsetTop})};return Y8(i,f),Y8(o.indicatorTrack,f),l?(0,Dr.jsx)(cn.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}),p1="NavigationMenuContent",u0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,o=df(p1,e.__scopeNavigationMenu),a=a0e(p1,e.__scopeNavigationMenu),i=So(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,Dr.jsx)(Frt,{forceMount:r,...l,ref:i}):(0,Dr.jsx)(rd,{present:r||s,children:(0,Dr.jsx)(d0e,{"data-state":tG(s),...l,ref:i,onPointerEnter:Zr(e.onPointerEnter,o.onContentEnter),onPointerLeave:Zr(e.onPointerLeave,yB(o.onContentLeave)),style:{pointerEvents:!s&&o.isRootMenu?"none":void 0,...l.style}})})});u0e.displayName=p1;var Frt=ir.forwardRef((e,t)=>{let r=df(p1,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return Vs(()=>{n(e.value,{ref:t,...e})},[e,t,n]),Vs(()=>()=>o(e.value),[e.value,o]),null}),vB="navigationMenu.rootContentDismiss",d0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,value:n,triggerRef:o,focusProxyRef:a,wasEscapeCloseRef:i,onRootContentClose:s,onContentFocusOutside:l,...c}=e,u=df(p1,r),d=ir.useRef(null),f=So(d,t),p=h0e(u.baseId,n),m=g0e(u.baseId,n),h=Zbe(r),g=ir.useRef(null),{onItemDismiss:v}=u;ir.useEffect(()=>{let b=d.current;if(u.isRootMenu&&b){let w=()=>{v(),s(),b.contains(document.activeElement)&&o.current?.focus()};return b.addEventListener(vB,w),()=>b.removeEventListener(vB,w)}},[u.isRootMenu,e.value,o,v,s]);let y=ir.useMemo(()=>{let w=h().map(_=>_.value);u.dir==="rtl"&&w.reverse();let x=w.indexOf(u.value),C=w.indexOf(u.previousValue),S=n===u.value,R=C===w.indexOf(n);if(!S&&!R)return g.current;let D=(()=>{if(x!==C){if(S&&C!==-1)return x>C?"from-end":"from-start";if(R&&x!==-1)return x>C?"to-start":"to-end"}return null})();return g.current=D,D},[u.previousValue,u.value,u.dir,h,n]);return(0,Dr.jsx)(p0e,{asChild:!0,children:(0,Dr.jsx)(fx,{id:m,"aria-labelledby":p,"data-motion":y,"data-orientation":u.orientation,...c,ref:f,disableOutsidePointerEvents:!1,onDismiss:()=>{let b=new Event(vB,{bubbles:!0,cancelable:!0});d.current?.dispatchEvent(b)},onFocusOutside:Zr(e.onFocusOutside,b=>{l();let w=b.target;u.rootNavigationMenu?.contains(w)&&b.preventDefault()}),onPointerDownOutside:Zr(e.onPointerDownOutside,b=>{let w=b.target,x=h().some(S=>S.ref.current?.contains(w)),C=u.isRootMenu&&u.viewport?.contains(w);(x||C||!u.isRootMenu)&&b.preventDefault()}),onKeyDown:Zr(e.onKeyDown,b=>{let w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){let C=K8(b.currentTarget),S=document.activeElement,R=C.findIndex(T=>T===S),_=b.shiftKey?C.slice(0,R).reverse():C.slice(R+1,C.length);eG(_)?b.preventDefault():a.current?.focus()}}),onEscapeKeyDown:Zr(e.onEscapeKeyDown,b=>{i.current=!0})})})}),Z8="NavigationMenuViewport",f0e=ir.forwardRef((e,t)=>{let{forceMount:r,...n}=e,a=!!df(Z8,e.__scopeNavigationMenu).value;return(0,Dr.jsx)(rd,{present:r||a,children:(0,Dr.jsx)(Brt,{...n,ref:t})})});f0e.displayName=Z8;var Brt=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,children:n,...o}=e,a=df(Z8,r),i=So(t,a.onViewportChange),s=Art(p1,e.__scopeNavigationMenu),[l,c]=ir.useState(null),[u,d]=ir.useState(null),f=l?l?.width+"px":void 0,p=l?l?.height+"px":void 0,m=!!a.value,h=m?a.value:a.previousValue;return Y8(u,()=>{u&&c({width:u.offsetWidth,height:u.offsetHeight})}),(0,Dr.jsx)(cn.div,{"data-state":tG(m),"data-orientation":a.orientation,...o,ref:i,style:{pointerEvents:!m&&a.isRootMenu?"none":void 0,["--radix-navigation-menu-viewport-width"]:f,["--radix-navigation-menu-viewport-height"]:p,...o.style},onPointerEnter:Zr(e.onPointerEnter,a.onContentEnter),onPointerLeave:Zr(e.onPointerLeave,yB(a.onContentLeave)),children:Array.from(s.items).map(([v,{ref:y,forceMount:b,...w}])=>{let x=h===v;return(0,Dr.jsx)(rd,{present:b||x,children:(0,Dr.jsx)(d0e,{...w,ref:wT(y,C=>{x&&C&&d(C)})})},v)})})}),zrt="FocusGroup",p0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=df(zrt,r);return(0,Dr.jsx)(W8.Provider,{scope:r,children:(0,Dr.jsx)(W8.Slot,{scope:r,children:(0,Dr.jsx)(cn.div,{dir:o.dir,...n,ref:t})})})}),Jbe=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],Urt="FocusGroupItem",m0e=ir.forwardRef((e,t)=>{let{__scopeNavigationMenu:r,...n}=e,o=Ert(r),a=df(Urt,r);return(0,Dr.jsx)(W8.ItemSlot,{scope:r,children:(0,Dr.jsx)(cn.button,{...n,ref:t,onKeyDown:Zr(e.onKeyDown,i=>{if(["Home","End",...Jbe].includes(i.key)){let l=o().map(d=>d.ref.current);if([a.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(i.key)&&l.reverse(),Jbe.includes(i.key)){let d=l.indexOf(i.currentTarget);l=l.slice(d+1)}setTimeout(()=>eG(l)),i.preventDefault()}})})})});function K8(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 eG(e){let t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}function Vrt(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 Y8(e,t){let r=Hs(t);Vs(()=>{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 tG(e){return e?"open":"closed"}function h0e(e,t){return`${e}-trigger-${t}`}function g0e(e,t){return`${e}-content-${t}`}function yB(e){return t=>t.pointerType==="mouse"?e(t):void 0}var rG=e0e;var nG=n0e,v0e=i0e,oG=s0e,y0e=l0e,aG=c0e,iG=u0e,sG=f0e;var ff=A(ae(),1),BT=hx.forwardRef(({className:e,children:t,...r},n)=>(0,ff.jsxs)(rG,{ref:n,className:M("relative z-10 flex max-w-max flex-1 items-center justify-center",e),...r,children:[t,(0,ff.jsx)(bB,{})]}));BT.displayName=rG.displayName;var zT=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(nG,{ref:r,className:M("group flex flex-1 list-none items-center justify-center space-x-1",e),...t}));zT.displayName=nG.displayName;var UT=v0e,VT=ot("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"),HT=hx.forwardRef(({className:e,children:t,...r},n)=>(0,ff.jsxs)(oG,{ref:n,className:M(VT(),"group",e),...r,children:[t," ",(0,ff.jsx)(Io,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));HT.displayName=oG.displayName;var jT=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(iG,{ref:r,className:M("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}));jT.displayName=iG.displayName;var $T=y0e,bB=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)("div",{className:M("absolute left-0 top-full flex justify-center"),children:(0,ff.jsx)(sG,{className:M("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})}));bB.displayName=sG.displayName;var lG=hx.forwardRef(({className:e,...t},r)=>(0,ff.jsx)(aG,{ref:r,className:M("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,ff.jsx)("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));lG.displayName=aG.displayName;var Ki=A(le(),1);ar();var Ni=A(ae(),1),cG=ot("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"}}),jrt=ot("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"}}),$rt=e=>{(0,Ki.useEffect)(()=>{if(!e)return;let t=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e])},Wrt=(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)},b0e=Ki.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:m,showBackdrop:h=!0,backdropClassName:g,backdropBlur:v=!0,closeOnBackdropClick:y=!0,animationDuration:b=.5,springConfig:w={stiffness:300,damping:30,mass:1},preventBodyScroll:x=!0,autoHeight:C=!1,nestedScrolling:S=!0,onSnapPointChange:R,className:D,asChild:_=!1,isProComponent:T=!0,...E},z)=>{let U=n==="bottom"||n==="top",N=DS(),P=DS(),k=ho(0),I=ho(0),L=U?I:k,[F,B]=(0,Ki.useState)(i||(a.length>0?a[0]:50)),[O,j]=(0,Ki.useState)(!1),H=(0,Ki.useRef)(null),[V,W]=(0,Ki.useState)(null);$rt(e&&x);let $=(0,Ki.useMemo)(()=>typeof window>"u"?1e3:U?window.innerHeight:window.innerWidth,[U]),K=(0,Ki.useCallback)(De=>0,[n,$]),q=e?.5:0,te=(0,Ki.useCallback)((De,pe)=>{j(!1);let ke=U?pe.offset.y:pe.offset.x,he=U?pe.velocity.y:pe.velocity.x;if(s&&(n==="bottom"&&ke>l&&he>-c||n==="top"&&ke<-l&&he<c||n==="right"&&ke>l&&he>-c||n==="left"&&ke<-l&&he<c)){t(!1);return}if(a.length>0){let Y=n==="bottom"?"down":n==="top"?"up":n==="left"?"left":"right",X=Wrt(Math.abs(L.get()),he,a,Y,$);B(X),R?.(X),Lo(L,K(X),{type:"spring",...w})}else Lo(L,K(F),{type:"spring",...w})},[U,n,s,l,c,a,L,$,K,F,w,t,R]),oe=(0,Ki.useCallback)((De,pe)=>{j(!0)},[]);(0,Ki.useEffect)(()=>{if(!C||!H.current||!e)return;let De=new ResizeObserver(pe=>{for(let ke of pe)W(ke.contentRect.height)});return De.observe(H.current),()=>{De.disconnect()}},[C,e]),(0,Ki.useEffect)(()=>{e?Lo(L,0,{type:"spring",...w}):Lo(L,0,{type:"spring",...w})},[e,L,w]),(0,Ki.useEffect)(()=>{if(!e)return;let De=pe=>{pe.key==="Escape"&&s&&t(!1)};return document.addEventListener("keydown",De),()=>document.removeEventListener("keydown",De)},[e,s,t]);let ee=()=>({x:0,y:0}),Ne=()=>{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,Ni.jsxs)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:b},className:"fixed inset-0 z-50",style:{pointerEvents:O?"none":"auto"},children:[h&&(0,Ni.jsx)(Z.div,{className:M("absolute inset-0 bg-black/50",v&&"backdrop-blur-sm",g),style:{opacity:q},onClick:y?()=>t(!1):void 0}),(0,Ni.jsxs)(Z.div,{ref:z,drag:s?U?"y":"x":!1,dragConstraints:Ne(),dragElastic:u,onDragStart:oe,onDragEnd:te,initial:ee(),style:{...O?{[U?"y":"x"]:L}:{},...C&&V&&U?{height:`${Math.min(V+60,$*.95)}px`}:{}},className:M(cG({position:n,size:o}),"will-change-transform",D),...E,children:[d&&(0,Ni.jsx)("div",{className:M(jrt({position:n}),"cursor-grab active:cursor-grabbing",O&&"bg-muted-foreground/40 scale-x-150",f)}),p&&(0,Ni.jsx)("button",{onClick:()=>t(!1),className:M("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",m),"aria-label":"Close drawer",children:(0,Ni.jsx)(Qt,{className:"h-4 w-4"})}),(0,Ni.jsx)("div",{ref:H,className:M("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});b0e.displayName="MoonUIGestureDrawerProComponent";var xB=Ki.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Ni.jsx)(Ve,{className:"w-fit mx-auto",children:(0,Ni.jsx)(He,{className:"py-6 text-center",children:(0,Ni.jsxs)("div",{className:"space-y-4",children:[(0,Ni.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ni.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ni.jsxs)("div",{children:[(0,Ni.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Ni.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Gesture Drawer is available exclusively to MoonUI Pro subscribers."}),(0,Ni.jsx)("a",{href:"/pricing",children:(0,Ni.jsxs)(re,{size:"sm",children:[(0,Ni.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Ni.jsx)(b0e,{...e,ref:t})});xB.displayName="MoonUIGestureDrawerPro";var x0e=xB;var Po=A(le(),1);ar();var er=A(ae(),1),qrt=ot("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"}}),w0e=Po.createContext(void 0);function C0e(){let e=Po.useContext(w0e);if(!e)throw new Error("useLightbox must be used within a LightboxProvider");return e}function m1({children:e,items:t=[],defaultIndex:r=0}){let{hasProAccess:n,isLoading:o}=Ye(),[a,i]=Po.useState(r),[s,l]=Po.useState(!1),[c,u]=Po.useState(1),d=Po.useMemo(()=>({items:t,currentIndex:a,setCurrentIndex:i,isOpen:s,setIsOpen:l,zoom:c,setZoom:u}),[t,a,s,c]);return!o&&!n?(0,er.jsx)(rr,{componentName:"Lightbox",compact:!0}):(0,er.jsx)(w0e.Provider,{value:d,children:e})}var gx=Po.forwardRef(({index:e=0,asChild:t,children:r,onClick:n,...o},a)=>{let{setCurrentIndex:i,setIsOpen:s,setZoom:l}=C0e(),c=g=>{i(e),s(!0),l(1),n?.(g)};if(t){let g=r,{onDrag:v,onDragStart:y,onDragEnd:b,onDragOver:w,onDrop:x,...C}=o;return Po.cloneElement(g,{...g.props,...C,onClick:c})}let{onDrag:u,onDragStart:d,onDragEnd:f,onDragOver:p,onDrop:m,...h}=o;return(0,er.jsx)("div",{ref:a,onClick:c,className:"cursor-pointer",...h,children:r})});gx.displayName="LightboxTrigger";var vx=Po.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:m,onDragStart:h,onDragEnd:g,onDragOver:v,onDrop:y,onAnimationStart:b,onAnimationEnd:w,onAnimationIteration:x,...C}=f,{items:S,currentIndex:R,setCurrentIndex:D,isOpen:_,setIsOpen:T,zoom:E,setZoom:z}=C0e(),[U,N]=Po.useState(!0),[P,k]=Po.useState(!1),[I,L]=Po.useState(!0),[F,B]=Po.useState(!1),[O,j]=Po.useState({x:0,y:0}),[H,V]=Po.useState(!1),W=Po.useRef(null),$=Po.useRef(null),K=S[R];Po.useEffect(()=>{K?.type==="video"&&u?(k(!0),L(!0)):k(!1)},[R,K,u]),Po.useEffect(()=>{if(!s||!_)return;let Ae=Y=>{switch(Y.key){case"ArrowLeft":te();break;case"ArrowRight":oe();break;case"Escape":q();break;case"+":case"=":ee();break;case"-":Ne();break;case" ":K?.type==="video"&&(Y.preventDefault(),k(!P));break}};return window.addEventListener("keydown",Ae),()=>window.removeEventListener("keydown",Ae)},[_,R,P,s]),Po.useEffect(()=>{$.current&&K?.type==="video"&&(P?$.current.play().catch(Ae=>{console.error("Video play error:",Ae),k(!1)}):$.current.pause())},[P,K]);let q=()=>{T(!1),z(1),j({x:0,y:0}),d?.()},te=()=>{D(R>0?R-1:S.length-1),z(1),j({x:0,y:0}),N(!0)},oe=()=>{D(R<S.length-1?R+1:0),z(1),j({x:0,y:0}),N(!0)},ee=()=>{z(Math.min(E+.5,3))},Ne=()=>{z(Math.max(E-.5,.5)),E-.5<=1&&j({x:0,y:0})},we=()=>{if(K){let Ae=document.createElement("a");Ae.href=K.src,Ae.download=K.alt||"download",Ae.click()}},De=()=>{F?document.exitFullscreen():W.current?.requestFullscreen(),B(!F)},pe=Ae=>{E>1&&V(!0)},ke=Ae=>{H&&E>1&&j({x:O.x+Ae.movementX,y:O.y+Ae.movementY})},he=()=>{V(!1)};return K?(0,er.jsx)(xy,{open:_,onOpenChange:T,children:(0,er.jsx)(Ct,{children:_&&(0,er.jsx)(wy,{forceMount:!0,children:(0,er.jsx)(Cm,{asChild:!0,children:(0,er.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:c/1e3},className:M(qrt({backdrop:t}),e),ref:p,onClick:Ae=>{Ae.target===Ae.currentTarget&&q()},...C,children:(0,er.jsxs)("div",{ref:W,className:"relative w-full h-full flex items-center justify-center pointer-events-none",onMouseMove:ke,onMouseUp:he,onMouseLeave:he,children:[(0,er.jsx)("div",{className:"absolute inset-0 pointer-events-auto",onClick:q}),(0,er.jsx)("button",{onClick:q,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,er.jsx)(Qt,{className:"h-5 w-5"})}),r&&S.length>1&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:te,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,er.jsx)(ka,{className:"h-5 w-5"})}),(0,er.jsx)("button",{onClick:oe,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,er.jsx)(Rn,{className:"h-5 w-5"})})]}),(0,er.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,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:Ne,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(qu,{className:"h-4 w-4"})}),(0,er.jsxs)("span",{className:"px-3 py-1 rounded-full bg-black/50 text-white text-sm",children:[Math.round(E*100),"%"]}),(0,er.jsx)("button",{onClick:ee,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(Wu,{className:"h-4 w-4"})})]}),K.type==="video"&&(0,er.jsxs)(er.Fragment,{children:[(0,er.jsx)("button",{onClick:()=>{k(!P),!P&&$.current&&$.current.play().catch(Ae=>{console.error("Play failed:",Ae)})},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:P?(0,er.jsx)(Wv,{className:"h-4 w-4"}):(0,er.jsx)(op,{className:"h-4 w-4"})}),(0,er.jsx)("button",{onClick:()=>{L(!I),$.current&&($.current.muted=!I)},className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:I?(0,er.jsx)(dE,{className:"h-4 w-4"}):(0,er.jsx)(uE,{className:"h-4 w-4"})})]}),o&&(0,er.jsx)("button",{onClick:we,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(on,{className:"h-4 w-4"})}),a&&(0,er.jsx)("button",{onClick:De,className:"p-2 rounded-full bg-black/50 text-white hover:bg-black/70 transition-colors",children:(0,er.jsx)(ol,{className:"h-4 w-4"})})]}),(0,er.jsxs)(Z.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(${E}) translate(${O.x/E}px, ${O.y/E}px)`,cursor:E>1?H?"grabbing":"grab":"auto"},onMouseDown:pe,children:[U&&(0,er.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,er.jsx)(yr,{className:"h-8 w-8 animate-spin text-white"})}),K.type==="image"?(0,er.jsx)("img",{src:K.src,alt:K.alt,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto object-contain select-none",onLoad:()=>N(!1),draggable:!1}):(0,er.jsx)("video",{ref:$,src:K.src,poster:K.poster,muted:I,controls:!0,autoPlay:u&&P,playsInline:!0,className:"max-w-[90vw] max-h-[90vh] w-auto h-auto",onLoadedData:()=>{N(!1),u&&P&&$.current&&$.current.play().catch(Ae=>{console.error("Autoplay failed:",Ae)})},onError:Ae=>{console.error("Video error:",Ae),N(!1)}})]}),(K.title||K.description)&&(0,er.jsxs)(Z.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,er.jsx)("h3",{className:"text-white text-xl font-semibold mb-1",children:K.title}),K.description&&(0,er.jsx)("p",{className:"text-white/80 text-sm",children:K.description})]}),i&&S.length>1&&(0,er.jsx)(Z.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,er.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((Ae,Y)=>(0,er.jsx)("button",{onClick:()=>{D(Y),z(1),j({x:0,y:0})},className:M("w-16 h-16 rounded overflow-hidden transition-all",Y===R?"ring-2 ring-white scale-110":"opacity-60 hover:opacity-100"),children:Ae.type==="image"?(0,er.jsx)("img",{src:Ae.thumbnail||Ae.src,alt:Ae.alt,className:"w-full h-full object-cover"}):(0,er.jsx)("div",{className:"w-full h-full bg-black/50 flex items-center justify-center",children:(0,er.jsx)(op,{className:"h-4 w-4 text-white"})})},Y))})})]})})})})})}):null});vx.displayName="LightboxContent";function Grt({src:e,type:t="image",alt:r,poster:n,title:o,description:a,children:i,...s}){return(0,er.jsxs)(m1,{items:[{type:t,src:e,alt:r,poster:n,title:o,description:a}],children:[(0,er.jsx)(gx,{children:i}),(0,er.jsx)(vx,{...s})]})}var Yi=A(le(),1);ar();var _t=A(ae(),1),S0e=ot("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}}),wB=ot("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"}}),P0e=Yi.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:m=!0,showOverlay:h=!0,overlayContent:g,loadingState:v=!1,skeletonCount:y=6,emptyState:b,onItemClick:w,lazyLoad:x=!0,infiniteScroll:C=!1,onLoadMore:S,hasMore:R=!1,lightboxProps:D,..._},T)=>{let{hasProAccess:E,isLoading:z}=Ye(),[U,N]=Yi.useState(f),[P,k]=Yi.useState(p),[I,L]=Yi.useState(!1),[F,B]=Yi.useState(new Set),O=Yi.useRef(null),j=Yi.useRef(null),H=Yi.useMemo(()=>!l||U==="all"?t:t.filter(ee=>"category"in ee&&typeof ee.category=="string"?ee.category===U:U==="image"?ee.type==="image":U==="video"?ee.type==="video":!0),[t,U,l]),V=Yi.useMemo(()=>{if(!c||P==="default")return H;let ee=d.find(Ne=>Ne.id===P);return ee?[...H].sort(ee.compareFn):H},[H,P,c,d]),W=[{id:"all",label:"All"},{id:"image",label:"Images",icon:(0,_t.jsx)(As,{className:"h-4 w-4"})},{id:"video",label:"Videos",icon:(0,_t.jsx)(ap,{className:"h-4 w-4"})}],$=u.length>0?u:W;Yi.useEffect(()=>{if(x)return O.current=new IntersectionObserver(ee=>{ee.forEach(Ne=>{if(Ne.isIntersecting){let we=parseInt(Ne.target.getAttribute("data-index")||"0");B(De=>new Set(De).add(we))}})},{rootMargin:"50px"}),()=>{O.current?.disconnect()}},[x]),Yi.useEffect(()=>{if(!C||!S||!R)return;let ee=new IntersectionObserver(Ne=>{Ne[0].isIntersecting&&S()},{rootMargin:"100px"});return j.current&&ee.observe(j.current),()=>ee.disconnect()},[C,S,R]);let K=(ee,Ne)=>{w&&w(ee,Ne)},q=(ee,Ne)=>{let we=!x||F.has(Ne)||ee.thumbnail&&ee.thumbnail.endsWith(".svg"),De=(0,_t.jsxs)(Z.div,{className:M(wB({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:Ne*.05},"data-index":Ne,ref:pe=>{pe&&O.current&&!F.has(Ne)&&O.current.observe(pe)},onClick:()=>K(ee,Ne),children:[ee.type==="image"?(0,_t.jsxs)("div",{className:M("relative w-full",r==="masonry"||r==="justified"?"":"h-full"),children:[(0,_t.jsx)("img",{src:ee.thumbnail||ee.src,alt:ee.alt||`Gallery item ${Ne+1}`,className:M("w-full object-cover",r==="masonry"?"h-auto":"h-full",we?"opacity-100":"opacity-0","transition-opacity duration-300"),loading:x?"lazy":void 0,onLoad:()=>B(pe=>new Set(pe).add(Ne))}),!we&&(0,_t.jsx)("div",{className:M("absolute inset-0 w-full bg-muted animate-pulse",r==="masonry"?"h-64":"h-full",r==="masonry"&&"aspect-[3/4]")})]}):(0,_t.jsxs)("div",{className:M("relative w-full bg-black",r==="masonry"?"":"h-full"),children:[we&&(ee.thumbnail||ee.poster)&&(0,_t.jsx)("img",{src:ee.thumbnail||ee.poster,alt:ee.alt||`Video thumbnail ${Ne+1}`,className:M("w-full object-cover",r==="masonry"?"h-auto":"h-full"),loading:x?"lazy":void 0}),(0,_t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,_t.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,_t.jsx)(ap,{className:"h-6 w-6 text-white"})})})]}),h&&(0,_t.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:[g?g(ee,Ne):(0,_t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[ee.title&&(0,_t.jsx)("h3",{className:"text-sm font-semibold mb-1",children:ee.title}),ee.description&&(0,_t.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:ee.description})]}),m&&(0,_t.jsx)("div",{className:"absolute top-2 right-2",children:(0,_t.jsx)("div",{className:"w-8 h-8 bg-white/20 backdrop-blur-sm rounded-full flex items-center justify-center",children:ee.type==="image"?(0,_t.jsx)(As,{className:"h-4 w-4 text-white"}):(0,_t.jsx)(ap,{className:"h-4 w-4 text-white"})})})]})]},Ne);return s?(0,_t.jsx)(gx,{index:Ne,children:De},Ne):De},te=()=>(0,_t.jsx)("div",{className:M(wB({variant:o,aspectRatio:a})),children:(0,_t.jsx)("div",{className:"w-full h-full bg-muted animate-pulse"})});if(!z&&!E)return(0,_t.jsx)(rr,{componentName:"Media Gallery",compact:!0});let oe=(0,_t.jsxs)(_t.Fragment,{children:[(l||c)&&(0,_t.jsxs)("div",{className:"mb-6",children:[(0,_t.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,_t.jsxs)("div",{className:"flex items-center gap-4",children:[l&&(0,_t.jsxs)("button",{onClick:()=>L(!I),className:M("flex items-center gap-2 px-4 py-2 rounded-lg border transition-colors",I?"bg-primary text-primary-foreground border-primary":"bg-background border-border hover:bg-accent"),children:[(0,_t.jsx)(oi,{className:"h-4 w-4"}),"Filters"]}),c&&d.length>0&&(0,_t.jsxs)("select",{value:P,onChange:ee=>k(ee.target.value),className:"px-4 py-2 rounded-lg border bg-background",children:[(0,_t.jsx)("option",{value:"default",children:"Default order"}),d.map(ee=>(0,_t.jsx)("option",{value:ee.id,children:ee.label},ee.id))]})]}),(0,_t.jsxs)("div",{className:"text-sm text-muted-foreground",children:[V.length," items"]})]}),(0,_t.jsx)(Ct,{children:I&&l&&(0,_t.jsx)(Z.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:(0,_t.jsx)("div",{className:"flex flex-wrap gap-2 pb-4",children:$.map(ee=>(0,_t.jsxs)("button",{onClick:()=>N(ee.id),className:M("flex items-center gap-2 px-3 py-1.5 rounded-full text-sm transition-colors",U===ee.id?"bg-primary text-primary-foreground":"bg-muted hover:bg-accent"),children:[ee.icon,ee.label]},ee.id))})})})]}),(0,_t.jsx)("div",{ref:T,className:M(r==="masonry"?"columns-1 sm:columns-2 md:columns-3 lg:columns-4 gap-4":S0e({layout:r,columns:n}),e),style:r==="masonry"?{columnGap:"1rem"}:void 0,children:v?(0,_t.jsx)(_t.Fragment,{children:Array.from({length:y}).map((ee,Ne)=>(0,_t.jsx)(Yi.Fragment,{children:te()},Ne))}):V.length>0?V.map((ee,Ne)=>q(ee,Ne)):b||(0,_t.jsxs)("div",{className:"col-span-full flex flex-col items-center justify-center py-12 text-center",children:[(0,_t.jsx)(As,{className:"h-12 w-12 text-muted-foreground mb-4"}),(0,_t.jsx)("p",{className:"text-muted-foreground",children:"No media items found"})]})}),C&&R&&(0,_t.jsx)("div",{ref:j,className:"flex justify-center py-8",children:(0,_t.jsx)(yr,{className:"h-6 w-6 animate-spin text-muted-foreground"})})]});return s?(0,_t.jsxs)(m1,{items:V,children:[oe,(0,_t.jsx)(vx,{showThumbnails:!0,showNavigation:!0,backdrop:"blur",...D})]}):oe});P0e.displayName="MoonUIMediaGalleryPro";var N0e=Yi.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]=Yi.useState(!1),m=()=>{p(!0),c?.()};return(0,_t.jsxs)("div",{ref:d,className:M(wB({variant:n,aspectRatio:o,hover:a}),e),...u,children:[t.type==="image"?(0,_t.jsx)("img",{src:t.src,alt:t.alt||`Gallery item ${r+1}`,className:M("w-full h-full object-cover transition-opacity duration-300",f?"opacity-100":"opacity-0"),onLoad:m}):(0,_t.jsxs)("div",{className:"relative w-full h-full bg-black",children:[t.poster&&(0,_t.jsx)("img",{src:t.poster,alt:t.alt||`Video thumbnail ${r+1}`,className:"w-full h-full object-cover",onLoad:m}),(0,_t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,_t.jsx)("div",{className:"w-12 h-12 bg-black/70 rounded-full flex items-center justify-center",children:(0,_t.jsx)(ap,{className:"h-6 w-6 text-white"})})})]}),!f&&(0,_t.jsx)("div",{className:"absolute inset-0 bg-muted animate-pulse"}),s&&f&&(0,_t.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,_t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 p-4 text-white",children:[t.title&&(0,_t.jsx)("h3",{className:"text-sm font-semibold mb-1",children:t.title}),t.description&&(0,_t.jsx)("p",{className:"text-xs opacity-90 line-clamp-2",children:t.description})]}),i&&(0,_t.jsx)("div",{className:"absolute top-2 right-2",children:(0,_t.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,_t.jsx)(As,{className:"h-4 w-4 text-white"}):(0,_t.jsx)(ap,{className:"h-4 w-4 text-white"})})})]})]})});N0e.displayName="MoonUIGalleryItemPro";var zm=A(le(),1);ar();var Da=A(ae(),1);function h1({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:m=!0,dropIndicatorColor:h="primary",dropIndicatorStyle:g="glow",dragPreviewStyle:v="clone",hapticFeedback:y=!0}){let{hasProAccess:b,isLoading:w}=Ye(),[x,C]=(0,zm.useState)(null),[S,R]=(0,zm.useState)(null),[D,_]=(0,zm.useState)(!1),[T,E]=(0,zm.useState)({x:0,y:0}),[z,U]=(0,zm.useState)(!1),N=(0,zm.useRef)(null),P=(0,zm.useRef)(0),k=(0,zm.useRef)(new Map),I=(V,W)=>{if(c)return;let $=e[W];N.current=$,C(W),_(!0);let K=V.currentTarget.getBoundingClientRect();if(E({x:V.clientX-K.left,y:V.clientY-K.top}),V.dataTransfer.effectAllowed="move",V.dataTransfer.setData("text/html",""),V.currentTarget instanceof HTMLElement){let q=V.currentTarget.cloneNode(!0);q.style.position="absolute",q.style.top="-1000px",q.style.width=`${K.width}px`,v==="ghost"?(q.style.opacity="0.5",q.style.filter="grayscale(100%)"):v==="clone"?(q.style.opacity="0.9",q.style.transform="scale(1.02) rotate(1deg)",q.style.boxShadow="0 10px 30px rgba(0,0,0,0.3)"):v==="compact"&&(q.style.transform="scale(0.95)",q.style.opacity="0.85"),q.style.pointerEvents="none",document.body.appendChild(q),V.dataTransfer.setDragImage(q,T.x,T.y),setTimeout(()=>document.body.removeChild(q),0)}y&&"vibrate"in navigator&&navigator.vibrate(10),u?.($,W)},L=V=>{V.preventDefault(),P.current++},F=V=>{P.current--,P.current===0&&R(null)},B=(V,W)=>{if(V.preventDefault(),V.dataTransfer.dropEffect="move",c||x===null)return;if(W===x){R(null),U(!1);return}let $=V.currentTarget.getBoundingClientRect(),K=V.clientY-$.top,q=$.height,te=K<q/2?"before":"after";R({index:W,position:te}),U(!0),y&&"vibrate"in navigator&&navigator.vibrate(5)},O=V=>{if(V.preventDefault(),c||x===null||!S||N.current===null){j();return}let W=[...e],$=W[x],K=S.index;S.position==="after"&&(K=K+1),W.splice(x,1),x<K&&(K=K-1),W.splice(K,0,$),t(W),j()},j=()=>{N.current&&x!==null&&d?.(N.current,x),setTimeout(()=>{C(null),R(null),_(!1),U(!1),N.current=null,P.current=0},50),y&&"vibrate"in navigator&&navigator.vibrate([10,50,10])},H=V=>{if(!m||!D)return null;let W=V==="before"?"-top-1":"-bottom-1";return g==="line"?(0,Da.jsx)(Z.div,{initial:{opacity:0,scaleX:0},animate:{opacity:1,scaleX:1},exit:{opacity:0,scaleX:0},className:M("absolute left-0 right-0 h-1 z-50 pointer-events-none",W),children:(0,Da.jsxs)("div",{className:"h-full bg-primary rounded-full relative",children:[(0,Da.jsx)(Z.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,Da.jsx)(Z.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"})]})}):g==="area"?(0,Da.jsx)(Z.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:24},exit:{opacity:0,height:0},className:M("absolute left-0 right-0 z-40 pointer-events-none",V==="before"?"-top-3":"-bottom-3"),children:(0,Da.jsx)("div",{className:"h-full bg-primary/10 rounded-lg border-2 border-dashed border-primary/50"})}):g==="glow"?(0,Da.jsx)(Z.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},className:M("absolute left-0 right-0 h-2 z-50 pointer-events-none",W),children:(0,Da.jsxs)("div",{className:"h-full relative",children:[(0,Da.jsx)("div",{className:"absolute inset-0 bg-primary/30 blur-xl animate-pulse"}),(0,Da.jsx)("div",{className:"absolute inset-0 bg-primary rounded-full animate-pulse"}),(0,Da.jsx)(Z.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&&!b?(0,Da.jsx)(rr,{componentName:"Draggable List",compact:!0}):(0,Da.jsxs)("div",{className:M("relative",D&&"select-none",o),onDragEnter:L,onDragLeave:F,onDrop:O,onDragOver:V=>V.preventDefault(),children:[(0,Da.jsx)(Ct,{children:e.map((V,W)=>{let $=r(V),K=x===W,q=S?.index===W&&S?.position==="before",te=S?.index===W&&S?.position==="after";return(0,Da.jsxs)(Z.div,{ref:oe=>{oe&&k.current.set($,oe)},layout:!0,layoutId:$,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:[q&&H("before"),(0,Da.jsx)("div",{draggable:!c,onDragStart:oe=>I(oe,W),onDragOver:oe=>B(oe,W),onDragEnd:j,className:M("relative bg-card rounded-lg border transition-all",K&&"cursor-grabbing shadow-2xl",!K&&D&&"hover:shadow-lg hover:border-primary/30",!K&&!D&&!c&&"hover:shadow-md hover:border-border/80",!c&&"cursor-grab active:cursor-grabbing",q&&"translate-y-3",te&&"-translate-y-3",a),children:(0,Da.jsxs)("div",{className:"flex items-center gap-3 p-2",children:[s&&(0,Da.jsx)(Z.div,{className:"pl-2",whileHover:{scale:1.1},whileTap:{scale:.95},children:(0,Da.jsx)(NR,{className:M("flex-shrink-0 text-muted-foreground/50",!c&&"hover:text-muted-foreground","transition-colors",i),size:l})}),(0,Da.jsx)("div",{className:"flex-1",children:n(V,W)})]})}),te&&H("after")]},$)})}),D&&(0,Da.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 pointer-events-none z-[100]",children:(0,Da.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-transparent via-primary/5 to-transparent"})})]})}var Np=A(le(),1);ar();var Qn=A(ae(),1),uG=ot("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"}}),k0e=Np.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:m="medium",showProgressBar:h=!1,autoResetDelay:g=2e3,onDrag:v,onDragEnd:y,onDragStart:b,onAnimationStart:w,onAnimationEnd:x,...C},S)=>{let[R,D]=(0,Np.useState)("idle"),[_,T]=(0,Np.useState)([]),[E,z]=(0,Np.useState)(0),[U,N]=(0,Np.useState)(!1),P=o!=="idle"?o:R,k=async H=>{if(P!=="loading"){if(d){let V=H.currentTarget.getBoundingClientRect(),W=H.clientX-V.left,$=H.clientY-V.top,K=Date.now();T([..._,{x:W,y:$,id:K}]),setTimeout(()=>{T(q=>q.filter(te=>te.id!==K))},600)}if(D("loading"),a?.("loading"),z(0),h){let V=setInterval(()=>{z(W=>W>=90?(clearInterval(V),90):W+10)},200)}if(s)try{await s(H),z(100),D("success"),a?.("success"),setTimeout(()=>{D("idle"),a?.("idle"),z(0)},g)}catch{z(0),D("error"),a?.("error"),setTimeout(()=>{D("idle"),a?.("idle")},g)}}},I=()=>{let H=M("h-4 w-4",{"animate-spin":P==="loading"||f&&P!=="idle"});switch(P){case"loading":return(0,Qn.jsx)(yr,{className:H});case"success":return(0,Qn.jsx)(Hr,{className:M(H,"animate-scale-in")});case"error":return(0,Qn.jsx)(Qt,{className:M(H,"animate-shake")});default:return null}},L=()=>{switch(P){case"success":return"bg-green-600";case"error":return"bg-red-600";default:return""}},F=()=>{switch(p){case"slow":return"duration-1500";case"fast":return"duration-500";default:return"duration-1000"}},B=()=>{switch(m){case"low":return"shadow-lg";case"high":return"shadow-2xl";default:return"shadow-xl"}},O,j;return n==="bounce"?O={y:[0,-10,0],transition:{duration:.6,repeat:1/0,repeatType:"loop"}}:n==="pulse"?O={scale:[1,1.1,1],transition:{duration:1,repeat:1/0,repeatType:"loop"}}:n==="shake"?O=void 0:n==="rotate"?O={rotate:10,transition:{type:"spring",stiffness:300}}:n==="scale"?(O={scale:1.05},j={scale:.95}):n==="slide"&&(O={y:-4}),(0,Qn.jsxs)(Z.button,{...C,className:M(uG({variant:t,size:r}),t==="glow"&&B(),n==="shake"&&U&&"animate-shake",e),ref:S,onClick:k,disabled:P==="loading"||C.disabled,onMouseEnter:()=>N(!0),onMouseLeave:()=>N(!1),whileHover:O,whileTap:j,children:[h&&P==="loading"&&(0,Qn.jsx)(Z.div,{className:"absolute bottom-0 left-0 h-1 bg-primary-foreground/20 rounded-full",initial:{width:0},animate:{width:`${E}%`},transition:{duration:.3}}),n==="shimmer"&&(0,Qn.jsx)(Z.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,Qn.jsx)("div",{className:"relative flex items-center justify-center gap-2 z-10",children:r==="icon"?P==="idle"?i:I():(0,Qn.jsx)(Qn.Fragment,{children:P==="idle"?(0,Qn.jsxs)(Qn.Fragment,{children:[Np.default.isValidElement(i)&&Np.default.cloneElement(i),typeof i=="string"&&i,Np.default.isValidElement(i)||typeof i=="string"?null:i]}):(0,Qn.jsxs)(Qn.Fragment,{children:[I(),(0,Qn.jsxs)("span",{className:"ml-2",children:[P==="loading"&&l,P==="success"&&c,P==="error"&&u]})]})})}),(0,Qn.jsx)(Z.div,{className:M("absolute inset-0 rounded-md",L()),initial:{scale:0,opacity:0},animate:{scale:P==="success"||P==="error"?1:0,opacity:P==="success"||P==="error"?.2:0},transition:{duration:.3},style:{zIndex:0}}),_.map(H=>(0,Qn.jsx)("span",{className:"absolute bg-primary/20 rounded-full animate-ripple pointer-events-none",style:{left:H.x-10,top:H.y-10,width:20,height:20}},H.id))]})});k0e.displayName="MoonUIAnimatedButtonProInternal";var dG=Np.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Qn.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Qn.jsx)(He,{className:"py-6 text-center",children:(0,Qn.jsxs)("div",{className:"space-y-4",children:[(0,Qn.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Qn.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Qn.jsxs)("div",{children:[(0,Qn.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Qn.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated Button is available exclusively to MoonUI Pro subscribers."}),(0,Qn.jsx)("a",{href:"/pricing",children:(0,Qn.jsxs)(re,{size:"sm",children:[(0,Qn.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Qn.jsx)(k0e,{...e,ref:t})});dG.displayName="MoonUIAnimatedButtonPro";var kp=A(le(),1);ar();var pa=A(ae(),1),Krt=({children:e,delay:t=0,index:r,onMouseEnter:n,onClick:o})=>{let a=(0,kp.useRef)(null),i=z0(a,{amount:.5,once:!1});return(0,pa.jsx)(Z.div,{ref:a,"data-index":r,onMouseEnter:n,onClick:o,initial:{scale:.7,opacity:0},animate:i?{scale:1,opacity:1}:{scale:.7,opacity:0},transition:{duration:.2,delay:t},className:"mb-4 cursor-pointer",children:e})},Yrt=({items:e=["Item 1","Item 2","Item 3","Item 4","Item 5","Item 6","Item 7","Item 8","Item 9","Item 10","Item 11","Item 12","Item 13","Item 14","Item 15"],onItemSelect:t,showGradients:r=!0,enableArrowNavigation:n=!0,className:o="",itemClassName:a="",displayScrollbar:i=!0,initialSelectedIndex:s=-1})=>{let l=(0,kp.useRef)(null),[c,u]=(0,kp.useState)(s),[d,f]=(0,kp.useState)(!1),[p,m]=(0,kp.useState)(0),[h,g]=(0,kp.useState)(1),v=y=>{let{scrollTop:b,scrollHeight:w,clientHeight:x}=y.target;m(Math.min(b/50,1));let C=w-(b+x);g(w<=x?0:Math.min(C/50,1))};return(0,kp.useEffect)(()=>{if(!n)return;let y=b=>{b.key==="ArrowDown"||b.key==="Tab"&&!b.shiftKey?(b.preventDefault(),f(!0),u(w=>Math.min(w+1,e.length-1))):b.key==="ArrowUp"||b.key==="Tab"&&b.shiftKey?(b.preventDefault(),f(!0),u(w=>Math.max(w-1,0))):b.key==="Enter"&&c>=0&&c<e.length&&(b.preventDefault(),t&&t(e[c],c))};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[e,c,t,n]),(0,kp.useEffect)(()=>{if(!d||c<0||!l.current)return;let y=l.current,b=y.querySelector(`[data-index="${c}"]`);if(b){let x=y.scrollTop,C=y.clientHeight,S=b.offsetTop,R=S+b.offsetHeight;S<x+50?y.scrollTo({top:S-50,behavior:"smooth"}):R>x+C-50&&y.scrollTo({top:R-C+50,behavior:"smooth"})}f(!1)},[c,d]),(0,pa.jsxs)("div",{className:M("relative w-[500px]",o),children:[(0,pa.jsx)("div",{ref:l,className:M("max-h-[400px] overflow-y-auto p-4",i?"[&::-webkit-scrollbar]:w-[8px] [&::-webkit-scrollbar-track]:bg-background [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-[4px] [&::-webkit-scrollbar-thumb]:hover:bg-muted-foreground/50":"scrollbar-hide"),onScroll:v,style:{scrollbarWidth:i?"thin":"none",scrollbarColor:i?"hsl(var(--border)) hsl(var(--background))":"transparent"},children:e.map((y,b)=>(0,pa.jsx)(Krt,{delay:.1,index:b,onMouseEnter:()=>u(b),onClick:()=>{u(b),t&&t(y,b)},children:(0,pa.jsx)("div",{className:M("p-4 bg-card border rounded-lg transition-colors duration-200 hover:bg-accent/50",c===b?"bg-accent border-accent-foreground/20":"border-border",a),children:(0,pa.jsx)("p",{className:"text-foreground m-0 text-sm",children:y})})},b))}),r&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)("div",{className:"absolute top-0 left-0 right-0 h-[50px] bg-gradient-to-b from-background to-transparent pointer-events-none transition-opacity duration-300 ease",style:{opacity:p}}),(0,pa.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-[100px] bg-gradient-to-t from-background to-transparent pointer-events-none transition-opacity duration-300 ease",style:{opacity:h}})]})]})},fG=e=>{let{hasProAccess:t,isLoading:r}=Ye();return!r&&!t?(0,pa.jsx)(Ve,{className:M("w-fit",e.className),children:(0,pa.jsx)(He,{className:"py-6 text-center",children:(0,pa.jsxs)("div",{className:"space-y-4",children:[(0,pa.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,pa.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro \xD6zellik"}),(0,pa.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Animated List sadece MoonUI Pro abonelerine \xF6zeldir."}),(0,pa.jsx)("a",{href:"/pricing",children:(0,pa.jsxs)(re,{size:"sm",children:[(0,pa.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Pro'ya Y\xFCkselt"]})})]})]})})}):(0,pa.jsx)(Yrt,{...e})};fG.displayName="MoonUIAnimatedListPro";var Ol=A(le(),1);var yx=A(ae(),1);var WT={primary:"hsl(var(--primary) / 0.25)",secondary:"hsl(var(--secondary) / 0.25)",accent:"hsl(var(--accent) / 0.25)",destructive:"hsl(var(--destructive) / 0.25)",muted:"hsl(var(--muted-foreground) / 0.15)",white:"rgba(255, 255, 255, 0.25)",blue:"rgba(59, 130, 246, 0.25)",purple:"rgba(147, 51, 234, 0.25)",green:"rgba(34, 197, 94, 0.25)",orange:"rgba(249, 115, 22, 0.25)",red:"rgba(239, 68, 68, 0.25)",yellow:"rgba(234, 179, 8, 0.25)",pink:"rgba(236, 72, 153, 0.25)",cyan:"rgba(6, 182, 212, 0.25)"},R0e=Ol.default.forwardRef(({children:e,className:t,spotlightColor:r="primary",spotlightSize:n=200,intensity:o=.6,duration:a=500,rounded:i="lg",borderClass:s,backgroundClass:l,disabled:c=!1,locked:u=!1,...d},f)=>{let p=(0,Ol.useRef)(null),[m,h]=(0,Ol.useState)(!1),[g,v]=(0,Ol.useState)({x:0,y:0}),[y,b]=(0,Ol.useState)(0),w=Ol.default.useMemo(()=>typeof r=="string"&&r in WT?WT[r]:r,[r]),x=(0,Ol.useCallback)(T=>{if(!p.current||m||c)return;let E=p.current.getBoundingClientRect();v({x:T.clientX-E.left,y:T.clientY-E.top})},[m,c]),C=(0,Ol.useCallback)(()=>{c||(h(!0),b(o))},[c,o]),S=(0,Ol.useCallback)(()=>{h(!1),b(0)},[]),R=(0,Ol.useCallback)(()=>{c||b(o)},[c,o]),D=(0,Ol.useCallback)(()=>{b(0)},[]),_={none:"",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",xl:"rounded-xl","2xl":"rounded-2xl","3xl":"rounded-3xl",full:"rounded-full"};return u?(0,yx.jsx)(rr,{componentName:"SpotlightCard Pro",className:M("min-h-[200px]",t)}):(0,yx.jsxs)("div",{ref:T=>{p.current=T,typeof f=="function"?f(T):f&&(f.current=T)},onMouseMove:x,onFocus:C,onBlur:S,onMouseEnter:R,onMouseLeave:D,className:M("relative overflow-hidden",_[i],s||"border border-border",l||"bg-card","transition-all duration-200",c&&"cursor-not-allowed opacity-50",t),...d,children:[(0,yx.jsx)("div",{className:M("pointer-events-none absolute inset-0 opacity-0","transition-opacity ease-in-out",c&&"hidden"),style:{opacity:y,background:`radial-gradient(circle ${n}px at ${g.x}px ${g.y}px, ${w}, transparent 80%)`,transitionDuration:`${a}ms`}}),(0,yx.jsx)("div",{className:"relative z-10",children:e})]})});R0e.displayName="SpotlightCardInternal";var pG=Ol.default.forwardRef((e,t)=>(0,yx.jsx)(R0e,{...e,ref:t}));pG.displayName="MoonUISpotlightCardPro";var pf=A(le(),1);ar();var CB=A(ae(),1),Xrt=ot("font-mono tabular-nums",{variants:{size:{sm:"text-sm",md:"text-base",lg:"text-lg",xl:"text-xl","2xl":"text-2xl","3xl":"text-3xl","4xl":"text-4xl"},variant:{default:"text-foreground",primary:"text-primary",secondary:"text-muted-foreground",success:"text-green-600 dark:text-green-400",warning:"text-orange-600 dark:text-orange-400",destructive:"text-red-600 dark:text-red-400"}},defaultVariants:{size:"md",variant:"default"}}),E0e=pf.default.forwardRef(({className:e,value:t,from:r=0,duration:n=2,decimalPlaces:o=0,format:a="number",currency:i="TRY",locale:s="tr-TR",prefix:l="",suffix:c="",triggerOnView:u=!1,ease:d="easeOut",size:f,variant:p,onComplete:m,...h},g)=>{let[v,y]=(0,pf.useState)(!u),b=(0,pf.useRef)(null),w=z0(b,{once:!0}),x=ho(r),C=ru(x,{duration:n*1e3,bounce:d==="spring"?.4:0}),[S,R]=(0,pf.useState)(r),D=_=>{let T;switch(a){case"currency":T=new Intl.NumberFormat(s,{style:"currency",currency:i,minimumFractionDigits:o,maximumFractionDigits:o}).format(_);break;case"percent":T=new Intl.NumberFormat(s,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o}).format(_/100);break;default:T=new Intl.NumberFormat(s,{minimumFractionDigits:o,maximumFractionDigits:o}).format(_)}return`${l}${T}${c}`};return(0,pf.useEffect)(()=>{u&&w&&y(!0)},[u,w]),(0,pf.useEffect)(()=>{v&&x.set(t)},[v,t,x]),(0,pf.useEffect)(()=>{let _=C.on("change",E=>{R(E)}),T=C.on("animationComplete",()=>{m?.()});return()=>{_(),T()}},[C,m]),(0,CB.jsx)(Z.div,{ref:b,className:M(Xrt({size:f,variant:p,className:e})),initial:{opacity:0,scale:.5},animate:v?{opacity:1,scale:1}:{opacity:0,scale:.5},transition:{duration:.5,ease:d==="spring"?"easeOut":d},children:D(S)})});E0e.displayName="AnimatedNumberInternal";var SB=pf.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,CB.jsx)(rr,{componentName:"Animated Number",compact:!0,className:"inline-block"}):(0,CB.jsx)(E0e,{...e,ref:t})});SB.displayName="AnimatedNumber";var Vm=A(le(),1);ar();var Um=A(ae(),1),Jrt=ot("flex items-center gap-1 rounded-full border bg-background/95 backdrop-blur-md shadow-xl",{variants:{size:{sm:"p-1",md:"p-1.5",lg:"p-2"},position:{bottom:"flex-row",top:"flex-row",left:"flex-col",right:"flex-col"}},defaultVariants:{size:"md",position:"bottom"}}),QCr=ot("flex items-center justify-center rounded-full transition-all duration-200 cursor-pointer",{variants:{size:{sm:"w-9 h-9",md:"w-11 h-11",lg:"w-13 h-13"}},defaultVariants:{size:"md"}}),Qrt=Vm.default.memo(({item:e,size:t,magnification:r,showTooltip:n,position:o})=>{let a=(0,Vm.useRef)(null),[i,s]=(0,Vm.useState)(!1),c={sm:36,md:44,lg:52}[t],u=i?r:c,d=ho(c),f=ru(d,{stiffness:300,damping:30});return(0,Vm.useEffect)(()=>{d.set(u)},[u,d]),(0,Um.jsxs)(Z.div,{ref:a,className:"relative flex items-center justify-center",onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),children:[(0,Um.jsx)(Z.button,{style:{width:f,height:f},className:M("flex items-center justify-center rounded-full transition-colors duration-200","bg-card/80 hover:bg-card border border-border/50 shadow-sm",e.active&&"bg-primary text-primary-foreground hover:bg-primary/90 border-primary",e.className),onClick:e.onClick,whileTap:{scale:.95},children:e.icon}),(0,Um.jsx)(Ct,{children:n&&e.label&&i&&(0,Um.jsx)(Z.div,{initial:{opacity:0,scale:.6},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.6},transition:{duration:.15,ease:"easeOut"},style:{position:"absolute",...o==="bottom"&&{bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)"},...o==="top"&&{top:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)"},...o==="left"&&{left:"calc(100% + 8px)",top:"50%",transform:"translateY(-50%)"},...o==="right"&&{right:"calc(100% + 8px)",top:"50%",transform:"translateY(-50%)"}},className:"px-2.5 py-1 text-xs font-medium whitespace-nowrap pointer-events-none z-50 bg-foreground text-background rounded-md shadow-lg",children:e.label})})]})}),T0e=Vm.default.forwardRef(({className:e,items:t,magnification:r=64,distance:n=120,showTooltip:o=!0,animationDuration:a=500,size:i="md",position:s="bottom",containerMode:l=!1,...c},u)=>{let d=()=>{if(l)switch(s){case"bottom":return"absolute bottom-2 left-1/2 -translate-x-1/2";case"top":return"absolute top-2 left-1/2 -translate-x-1/2";case"left":return"absolute left-2 top-1/2 -translate-y-1/2";case"right":return"absolute right-2 top-1/2 -translate-y-1/2";default:return"absolute bottom-2 left-1/2 -translate-x-1/2"}else switch(s){case"bottom":return"fixed bottom-4 left-1/2 -translate-x-1/2";case"top":return"fixed top-4 left-1/2 -translate-x-1/2";case"left":return"fixed left-4 top-1/2 -translate-y-1/2";case"right":return"fixed right-4 top-1/2 -translate-y-1/2";default:return"fixed bottom-4 left-1/2 -translate-x-1/2"}};return(0,Um.jsx)(Z.div,{ref:u,className:M(Jrt({size:i,position:s}),d(),e),initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},transition:{duration:.4,ease:"easeOut"},children:t.map(f=>(0,Um.jsx)(Qrt,{item:f,size:i||"md",magnification:r,showTooltip:o,position:s||"bottom"},f.id))})});T0e.displayName="FloatingDockInternal";var PB=Vm.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Um.jsx)(rr,{componentName:"Floating Dock",compact:!0,className:"inline-block"}):(0,Um.jsx)(T0e,{...e,ref:t})});PB.displayName="FloatingDock";var ws=A(le(),1);ar();var Ng=A(ae(),1),Zrt=ot("relative overflow-hidden cursor-pointer",{variants:{size:{sm:"w-32 h-32",md:"w-48 h-48",lg:"w-64 h-64",xl:"w-80 h-80"},shape:{square:"rounded-none",rounded:"rounded-lg",circle:"rounded-full"},effect:{explode:"",dissolve:"",spiral:"",wave:""}},defaultVariants:{size:"md",shape:"rounded",effect:"explode"}}),NB=ws.default.forwardRef(({className:e,src:t,alt:r="",particleCount:n=100,duration:o=3,particleSize:a=2,triggerOnHover:i=!0,autoTrigger:s=!1,autoTriggerInterval:l=5,size:c,shape:u,effect:d,onComplete:f,onStart:p,...m},h)=>{let g=(0,ws.useRef)(null),v=(0,ws.useRef)(null),y=(0,ws.useRef)(null),[b,w]=(0,ws.useState)([]),[x,C]=(0,ws.useState)(!1),[S,R]=(0,ws.useState)(!1),D=(0,ws.useCallback)(()=>{let P=g.current,k=v.current;if(!P||!k||!S)return;let I=P.getContext("2d");if(!I)return;P.width=k.width,P.height=k.height,I.drawImage(k,0,0);let F=I.getImageData(0,0,P.width,P.height).data,B=[],O=Math.ceil(Math.sqrt(P.width*P.height/n)),j=0;for(let H=0;H<P.height;H+=O)for(let V=0;V<P.width;V+=O){let W=(H*P.width+V)*4,$=F[W],K=F[W+1],q=F[W+2],te=F[W+3];if(te>0){let oe=`rgba(${$}, ${K}, ${q}, ${te/255})`,ee=0,Ne=0,we=o*60;switch(d){case"explode":let De=Math.random()*Math.PI*2,pe=Math.random()*5+2;ee=Math.cos(De)*pe,Ne=Math.sin(De)*pe;break;case"dissolve":ee=(Math.random()-.5)*2,Ne=Math.random()*3;break;case"spiral":let ke=Math.atan2(H-P.height/2,V-P.width/2);ee=Math.cos(ke+Math.PI/2)*3,Ne=Math.sin(ke+Math.PI/2)*3;break;case"wave":ee=Math.sin(H*.02)*3,Ne=Math.random()*2+1;break}B.push({id:j++,x:V,y:H,vx:ee,vy:Ne,life:we,maxLife:we,color:oe,size:a,originalX:V,originalY:H,alpha:1})}}w(B)},[S,n,o,a,d]),_=(0,ws.useCallback)(()=>{w(P=>{let k=P.map(I=>{let L={...I};return L.x+=L.vx,L.y+=L.vy,L.life-=1,L.alpha=L.life/L.maxLife,d==="dissolve"&&(L.vy+=.1),L}).filter(I=>I.life>0);return k.length===0&&(C(!1),f?.(),y.current&&cancelAnimationFrame(y.current)),k}),x&&(y.current=requestAnimationFrame(_))},[x,d,f]),T=(0,ws.useCallback)(()=>{x||(p?.(),C(!0),D())},[x,D,p]),E=(0,ws.useCallback)(()=>{y.current&&cancelAnimationFrame(y.current),C(!1),w([])},[]);(0,ws.useEffect)(()=>{S&&D()},[S,D]),(0,ws.useEffect)(()=>(x&&(y.current=requestAnimationFrame(_)),()=>{y.current&&cancelAnimationFrame(y.current)}),[x,_]),(0,ws.useEffect)(()=>{if(s&&S){let P=setInterval(()=>{T()},l*1e3);return()=>clearInterval(P)}},[s,l,S,T]);let z=()=>{i&&(x?E():T())},{hasProAccess:U,isLoading:N}=Ye();return!N&&!U?(0,Ng.jsx)(rr,{componentName:"Particle Image",compact:!0,className:"inline-block"}):(0,Ng.jsxs)(Z.div,{ref:h,className:M(Zrt({size:c,shape:u,className:e})),onMouseEnter:z,onClick:z,initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.5},children:[(0,Ng.jsx)("img",{ref:v,src:t,alt:r,className:M("w-full h-full object-cover transition-opacity duration-300",x?"opacity-0":"opacity-100"),onLoad:()=>R(!0),crossOrigin:"anonymous"}),(0,Ng.jsx)("canvas",{ref:g,className:"absolute inset-0 w-full h-full pointer-events-none",style:{opacity:0,position:"absolute"}}),x&&b.map(P=>(0,Ng.jsx)(Z.div,{className:"absolute pointer-events-none",style:{left:P.x,top:P.y,width:P.size,height:P.size,backgroundColor:P.color,opacity:P.alpha,borderRadius:u==="circle"?"50%":"0"},initial:!1},P.id)),!S&&(0,Ng.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-muted/50",children:(0,Ng.jsx)("div",{className:"animate-spin w-8 h-8 border-2 border-primary border-t-transparent rounded-full"})})]})});NB.displayName="ParticleImage";var mf=A(le(),1);ar();var $y=A(ae(),1),ent=ot("fixed pointer-events-none z-[9999]",{variants:{size:{sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8",xl:"w-12 h-12"},variant:{default:"bg-primary",secondary:"bg-secondary",accent:"bg-accent",destructive:"bg-destructive",rainbow:"bg-gradient-to-r from-red-500 via-yellow-500 via-green-500 via-blue-500 to-purple-500"}},defaultVariants:{size:"md",variant:"default"}}),kB=({size:e="md",variant:t="default",duration:r=600,maxSplashes:n=10,threshold:o=1,targetSelector:a,colors:i,showParticles:s=!1,particleCount:l=8,animationType:c="scale",soundUrl:u,enabled:d=!0})=>{let[f,p]=(0,mf.useState)([]),[m,h]=(0,mf.useState)({x:0,y:0}),g=(0,mf.useRef)(Date.now()),v=(0,mf.useRef)({x:0,y:0}),y=(0,mf.useRef)(null);(0,mf.useEffect)(()=>{u&&(y.current=new Audio(u),y.current.volume=.3)},[u]);let b=(_,T,E,z)=>Math.sqrt(Math.pow(E-_,2)+Math.pow(z-T,2)),w=(_,T)=>{let E={id:Date.now()+Math.random(),x:_,y:T,timestamp:Date.now()};p(z=>{let U=[...z,E];return U.length>n?U.slice(-n):U}),y.current&&(y.current.currentTime=0,y.current.play().catch(()=>{})),setTimeout(()=>{p(z=>z.filter(U=>U.id!==E.id))},r)};(0,mf.useEffect)(()=>{if(!d)return;let _=E=>{let z=Date.now(),U=z-g.current,N=b(v.current.x,v.current.y,E.clientX,E.clientY);if(h({x:E.clientX,y:E.clientY}),U>0&&N/U>o)if(a){let k=E.target;k&&k.closest(a)&&w(E.clientX,E.clientY)}else w(E.clientX,E.clientY);v.current={x:E.clientX,y:E.clientY},g.current=z},T=E=>{if(a){let z=E.target;z&&z.closest(a)&&w(E.clientX,E.clientY)}else w(E.clientX,E.clientY)};return document.addEventListener("mousemove",_),document.addEventListener("click",T),()=>{document.removeEventListener("mousemove",_),document.removeEventListener("click",T)}},[d,o,a,r,n]);let C=(()=>{switch(c){case"ripple":return{initial:{scale:0,opacity:1},animate:{scale:4,opacity:0},exit:{scale:5,opacity:0}};case"burst":return{initial:{scale:0,rotate:0,opacity:1},animate:{scale:3,rotate:180,opacity:0},exit:{scale:4,opacity:0}};case"fade":return{initial:{scale:1,opacity:1},animate:{scale:1.5,opacity:0},exit:{opacity:0}};default:return{initial:{scale:0,opacity:1},animate:{scale:2,opacity:0},exit:{scale:3,opacity:0}}}})(),S=_=>i&&i.length>0?i[_%i.length]:"",{hasProAccess:R,isLoading:D}=Ye();return!D&&!R?(0,$y.jsx)(rr,{componentName:"Splash Cursor",compact:!0,className:"inline-block"}):d?(0,$y.jsx)("div",{className:"fixed inset-0 pointer-events-none z-[9999]",children:(0,$y.jsx)(Ct,{children:f.map((_,T)=>(0,$y.jsxs)(mf.default.Fragment,{children:[(0,$y.jsx)(Z.div,{className:M(ent({size:e,variant:t}),"rounded-full"),style:{left:_.x-12,top:_.y-12,backgroundColor:S(T)||void 0},variants:C,initial:"initial",animate:"animate",exit:"exit",transition:{duration:r/1e3,ease:"easeOut"}}),s&&Array.from({length:l}).map((E,z)=>{let N=360/l*z*Math.PI/180,P=30;return(0,$y.jsx)(Z.div,{className:"absolute w-1 h-1 bg-current rounded-full",style:{left:_.x,top:_.y,color:S(T+z)||"currentColor"},initial:{x:0,y:0,opacity:1,scale:1},animate:{x:Math.cos(N)*P,y:Math.sin(N)*P,opacity:0,scale:0},transition:{duration:r/1e3,ease:"easeOut"}},`${_.id}-particle-${z}`)})]},_.id))})}):null};kB.displayName="SplashCursor";var g1=A(le(),1);ar();var Zo=A(ae(),1),mG=class extends g1.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,Zo.jsx)(r,{error:a,resetErrorBoundary:this.resetErrorBoundary,errorInfo:i}):r:(0,Zo.jsx)("div",{className:M("flex items-center justify-center min-h-[200px] p-4",n),children:(0,Zo.jsxs)(Ve,{className:"w-full max-w-md",children:[(0,Zo.jsxs)(cr,{className:"text-center",children:[(0,Zo.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,Zo.jsx)(Go,{className:"h-6 w-6 text-red-600 dark:text-red-400"})}),(0,Zo.jsx)(Rr,{children:"Something went wrong"}),(0,Zo.jsx)(Ci,{children:"An error occurred while rendering this component"})]}),(0,Zo.jsxs)(He,{className:"text-center",children:[o&&!1,(0,Zo.jsxs)(re,{onClick:this.resetErrorBoundary,className:"mt-4",children:[(0,Zo.jsx)(no,{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,Zo.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 tnt(e){let{hasProAccess:t,isLoading:r}=Ye(),n=(0,g1.useRef)(e.resetKeys);return(0,g1.useEffect)(()=>{n.current=e.resetKeys},[e.resetKeys]),!r&&!t?(0,Zo.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Zo.jsx)(He,{className:"py-6 text-center",children:(0,Zo.jsxs)("div",{className:"space-y-4",children:[(0,Zo.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Zo.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Zo.jsxs)("div",{children:[(0,Zo.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Zo.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Error Boundary is available exclusively to MoonUI Pro subscribers."}),(0,Zo.jsx)("a",{href:"/pricing",children:(0,Zo.jsxs)(re,{size:"sm",children:[(0,Zo.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Zo.jsx)(mG,{...e})}var rnt=tnt;var qT=A(le(),1);ar();var ma=A(ae(),1),M0e=qT.default.forwardRef(({actions:e=[],position:t="bottom-right",size:r="default",className:n,children:o,onClick:a,...i},s)=>{let[l,c]=(0,qT.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=m=>{e.length>0?c(!l):a&&a(m)};return(0,ma.jsxs)("div",{className:M("fixed z-50",d[t]),children:[(0,ma.jsx)(Ct,{children:l&&e.length>0&&(0,ma.jsx)("div",{className:"absolute",children:e.map((m,h)=>(0,ma.jsxs)(Z.div,{initial:{scale:0,opacity:0,x:0,y:0},animate:{scale:1,opacity:1,x:f[t].x,y:f[t].y*(h+1)-10},exit:{scale:0,opacity:0,x:0,y:0},transition:{delay:h*.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,ma.jsx)(Z.div,{initial:{opacity:0,scale:.8},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{delay:(h+1)*.05},className:M("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:m.label}),(0,ma.jsx)("button",{onClick:()=>{m.onClick(),c(!1)},className:M("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:m.icon})]},h))})}),(0,ma.jsx)(Z.button,{ref:s,className:M("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,ma.jsx)(Wa,{className:"h-5 w-5"}):(0,ma.jsx)(Wa,{className:"h-5 w-5"}))}),(0,ma.jsx)(Ct,{children:l&&(0,ma.jsx)(Z.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[-1]",onClick:()=>c(!1)})})]})});M0e.displayName="FloatingActionButtonInternal";var I0e=qT.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,ma.jsx)(Ve,{className:M("w-fit",e),children:(0,ma.jsx)(He,{className:"py-6 text-center",children:(0,ma.jsxs)("div",{className:"space-y-4",children:[(0,ma.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ma.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ma.jsxs)("div",{children:[(0,ma.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ma.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Floating Action Button is available exclusively to MoonUI Pro subscribers."}),(0,ma.jsx)("a",{href:"/pricing",children:(0,ma.jsxs)(re,{size:"sm",children:[(0,ma.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ma.jsx)(M0e,{className:e,ref:r,...t})});I0e.displayName="FloatingActionButton";var js=A(le(),1);ar();var Xi=A(ae(),1),A0e=ot("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"}}),D0e=js.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:m=20,glowSpread:h=1.2,enableTouch:g=!0,enableKeyboard:v=!0,onHoverStart:y,onHoverEnd:b,onRotationChange:w,animationDelay:x=0,ariaLabel:C,autoFocus:S=!1,rotateAxes:R={x:!0,y:!0},...D},_)=>{let{onDrag:T,onDragStart:E,onDragEnd:z,onDragOver:U,onDrop:N,onAnimationStart:P,onAnimationEnd:k,onAnimationIteration:I,...L}=D,F=(0,js.useRef)(null),[B,O]=(0,js.useState)(!1),[j,H]=(0,js.useState)(!1),V=i||s||15,W=ho(0),$=ho(0),K=ru(W,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),q=ru($,{...c,stiffness:c.stiffness*u,damping:c.damping/u}),te=Il(q,[-1,1],R.x?[V,-V]:[0,0]),oe=Il(K,[-1,1],R.y?[-V,V]:[0,0]),ee=(0,js.useCallback)(he=>{if(!F.current)return;let Ae=F.current.getBoundingClientRect(),Y=Ae.left+Ae.width/2,X=Ae.top+Ae.height/2,de,Pe;if("touches"in he&&g)de=he.touches[0].clientX,Pe=he.touches[0].clientY;else if("clientX"in he)de=he.clientX,Pe=he.clientY;else return;let ue=(Pe-X)/(Ae.height/2),be=(de-Y)/(Ae.width/2);W.set(be),$.set(ue),w&&w(te.get(),oe.get())},[g,W,$,te,oe,w]),Ne=(0,js.useCallback)(()=>{O(!0),y?.()},[y]),we=(0,js.useCallback)(()=>{O(!1),W.set(0),$.set(0),b?.()},[W,$,b]),De=(0,js.useCallback)(he=>{if(!v||!j)return;let Ae=.1,Y=W.get(),X=$.get();switch(he.key){case"ArrowUp":X=Math.max(-.5,X-Ae),$.set(X),he.preventDefault();break;case"ArrowDown":X=Math.min(.5,X+Ae),$.set(X),he.preventDefault();break;case"ArrowLeft":Y=Math.max(-.5,Y-Ae),W.set(Y),he.preventDefault();break;case"ArrowRight":Y=Math.min(.5,Y+Ae),W.set(Y),he.preventDefault();break;case"Enter":case" ":O(!B),B?b?.():y?.(),he.preventDefault();break;case"Escape":W.set(0),$.set(0),O(!1),b?.(),he.preventDefault();break}w&&w(te.get(),oe.get())},[v,j,W,$,B,y,b,te,oe,w]);(0,js.useEffect)(()=>{S&&F.current&&F.current.focus()},[S]);let pe=(0,js.useMemo)(()=>d?typeof d=="function"?d({isHovered:B,rotateX:te.get(),rotateY:oe.get()}):d:null,[d,B,te,oe]),ke=(0,js.useMemo)(()=>{if(o==="none")return{};let he=0,Ae=m,Y=h;switch(o){case"subtle":he=B?.3:0;break;case"vibrant":he=B?.6:0,Ae=m*1.5;break;case"neon":he=B?.8:0,Ae=m*2,Y=h*1.3;break}return{opacity:he,filter:`blur(${Ae}px)`,scale:Y,backgroundColor:p}},[o,B,m,h,p]);return(0,Xi.jsx)("div",{style:{perspective:`${a}px`},children:(0,Xi.jsxs)(Z.div,{ref:he=>{F.current=he,typeof _=="function"?_(he):_&&(_.current=he)},className:M(A0e({variant:r,shadowIntensity:n,glowEffect:o}),"focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),onMouseMove:ee,onMouseEnter:Ne,onMouseLeave:we,onTouchMove:g?ee:void 0,onTouchStart:g?Ne:void 0,onTouchEnd:g?we:void 0,onKeyDown:De,onFocus:()=>H(!0),onBlur:()=>H(!1),style:{transformStyle:"preserve-3d",transformOrigin:"center center",rotateX:B||j?te:0,rotateY:B||j?oe:0,scale:B||j?l:1},transition:{type:"spring",stiffness:c.stiffness,damping:c.damping,duration:.15*(1/u),delay:x/1e3},tabIndex:v?0:void 0,role:v?"button":void 0,"aria-label":C,...L,children:[(0,Xi.jsx)(Z.div,{className:"relative z-10",animate:{z:B||j?20:0},transition:{duration:.2*(1/u)},children:e}),pe&&(0,Xi.jsx)(Z.div,{className:"absolute inset-0 rounded-lg pointer-events-none z-20",animate:{opacity:f||B||j?1:0},transition:{duration:.3*(1/u)},children:pe}),r!=="subtle"&&(0,Xi.jsx)(Z.div,{className:M("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:B||j?1:0},transition:{duration:.3*(1/u)}}),o!=="none"&&(0,Xi.jsx)(Z.div,{className:"absolute inset-0 rounded-lg pointer-events-none -z-10",animate:ke,transition:{duration:.3*(1/u)}})]})})});D0e.displayName="HoverCard3DInternal";var L0e=js.default.forwardRef((e,t)=>{let{hasProAccess:r,isLoading:n}=Ye();return!n&&!r?(0,Xi.jsx)(Ve,{className:M("w-fit",e.className),children:(0,Xi.jsx)(He,{className:"py-6 text-center",children:(0,Xi.jsxs)("div",{className:"space-y-4",children:[(0,Xi.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Xi.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Xi.jsxs)("div",{children:[(0,Xi.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,Xi.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"3D Hover Card is available exclusively to MoonUI Pro subscribers."}),(0,Xi.jsx)("a",{href:"/pricing",children:(0,Xi.jsxs)(re,{size:"sm",children:[(0,Xi.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,Xi.jsx)(D0e,{...e,ref:t})});L0e.displayName="HoverCard3D";var xx=A(le(),1);ar();var bx=A(ae(),1),nnt=ot("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"}}),O0e=xx.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,xx.useRef)(null),[d,f]=(0,xx.useState)(!1),p=ho(0),m=ho(0),h=ru(p,s),g=ru(m,s),v=Il(g,[-i,i],[5,-5]),y=Il(h,[-i,i],[-5,5]),b=C=>{if(!u.current)return;let S=u.current.getBoundingClientRect(),R=S.left+S.width/2,D=S.top+S.height/2,_=C.clientX-R,T=C.clientY-D;Math.sqrt(_*_+T*T)<i&&(p.set(_*a),m.set(T*a))},w=()=>{f(!1),p.set(0),m.set(0)},x=()=>{f(!0)};return(0,bx.jsxs)(Z.button,{ref:C=>{u.current=C,typeof c=="function"?c(C):c&&(c.current=C)},className:M(nnt({variant:r,size:n,radius:o}),t),onMouseMove:b,onMouseLeave:w,onMouseEnter:x,style:{x:h,y:g,rotateX:v,rotateY:y,transformPerspective:1e3},whileHover:{scale:1.05},whileTap:{scale:.95},animate:{rotateX:d?v.get():0,rotateY:d?y.get():0},transition:{duration:.3},children:[(0,bx.jsx)(Z.div,{className:"relative z-10 flex items-center justify-center",animate:{scale:d?1.02:1},transition:{duration:.2},children:e}),(0,bx.jsx)(Z.div,{className:M("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}})]})});O0e.displayName="MagneticButtonInternal";var _0e=xx.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,bx.jsx)(rr,{componentName:"Magnetic Button",compact:!0,className:"inline-block"}):(0,bx.jsx)(O0e,{className:e,ref:r,...t})});_0e.displayName="MagneticButton";var Fo=A(le(),1);ar();var On=A(ae(),1),F0e=Fo.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:m=!0,...h},g)=>{let v=(0,Fo.useRef)(null),y=(0,Fo.useRef)(null),[b,w]=(0,Fo.useState)(!1),[x,C]=(0,Fo.useState)(!1),[S,R]=(0,Fo.useState)(0),[D,_]=(0,Fo.useState)(!1),[T,E]=(0,Fo.useState)(!1),z=ho(n),U=ho(0),N=ho(0),P=Il(z,$=>Math.min(Math.max($,t),r)),k=Il(z,$=>Math.round($*100)),I=(0,Fo.useCallback)(()=>{if(!v.current||!y.current||!m)return{left:0,right:0,top:0,bottom:0};let $=v.current.getBoundingClientRect(),K=z.get(),q=$.width*K,te=$.height*K,oe=Math.max(0,(q-$.width)/2),ee=Math.max(0,(te-$.height)/2);return{left:-oe,right:oe,top:-ee,bottom:ee}},[z,m]);(0,Fo.useEffect)(()=>{if(!v.current||!u)return;let $=v.current,K=q=>{D&&u&&(q.ctrlKey||q.metaKey)&&q.preventDefault()};return $.addEventListener("wheel",K,{passive:!1}),()=>{$.removeEventListener("wheel",K)}},[D,u]);let L=(0,Fo.useCallback)($=>{if(!u||!$.ctrlKey&&!$.metaKey)return;$.preventDefault();let K=-$.deltaY/1e3,q=z.get(),te=Math.min(Math.max(q+K,t),r);if(v.current){let oe=v.current.getBoundingClientRect(),ee=($.clientX-oe.left)/oe.width-.5,Ne=($.clientY-oe.top)/oe.height-.5,we=te-q,De=U.get(),pe=N.get(),ke=De-ee*oe.width*we,he=pe-Ne*oe.height*we;p?(Lo(U,ke,{duration:.2}),Lo(N,he,{duration:.2})):(U.set(ke),N.set(he))}p?Lo(z,te,{duration:.2}):z.set(te),i?.(te),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,U,N,t,r,i,u,p,l]),F=(0,Fo.useCallback)($=>{$.preventDefault();let K=z.get(),q;if(c==="reset")q=n;else if(q=K>1?1:2,q>1&&v.current){let te=v.current.getBoundingClientRect(),oe=($.clientX-te.left)/te.width-.5,ee=($.clientY-te.top)/te.height-.5,Ne=-oe*te.width*(q-1),we=-ee*te.height*(q-1);Lo(U,Ne,{duration:.3,type:"spring",stiffness:300}),Lo(N,we,{duration:.3,type:"spring",stiffness:300})}Lo(z,Math.min(Math.max(q,t),r),{duration:.3,type:"spring",stiffness:300}),(q===1||c==="reset")&&(Lo(U,0,{duration:.3}),Lo(N,0,{duration:.3})),i?.(q),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,U,N,t,r,n,i,c,l]),B=(0,Fo.useCallback)($=>{let K=Date.now(),q=K-S;if(q<300&&q>0){let te=$.changedTouches[0],oe={clientX:te.clientX,clientY:te.clientY,preventDefault:()=>{}};F(oe)}R(K)},[S,F]),O=(0,Fo.useCallback)(()=>{Lo(z,n,{duration:.3,type:"spring",stiffness:300}),Lo(U,0,{duration:.3,type:"spring",stiffness:300}),Lo(N,0,{duration:.3,type:"spring",stiffness:300}),i?.(n)},[z,U,N,n,i]),j=(0,Fo.useCallback)(()=>{let $=z.get(),K=Math.min($+f,r);Lo(z,K,{duration:.3,type:"spring",stiffness:300}),i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,r,f,i,l]),H=(0,Fo.useCallback)(()=>{let $=z.get(),K=Math.max($-f,t);if(Lo(z,K,{duration:.3,type:"spring",stiffness:300}),K<z.get()){let q=I(),te=U.get(),oe=N.get();(te<q.left||te>q.right)&&Lo(U,0,{duration:.3}),(oe<q.top||oe>q.bottom)&&Lo(N,0,{duration:.3})}i?.(K),l&&(C(!0),setTimeout(()=>C(!1),1500))},[z,t,f,U,N,I,i,l]),V=(0,Fo.useCallback)(()=>{O()},[O]),W=(0,Fo.useCallback)(()=>{v.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{E(!1)}).catch($=>{console.error("Exit fullscreen error:",$)}):(v.current.parentElement||v.current).requestFullscreen().then(()=>{E(!0)}).catch(K=>{console.error("Fullscreen error:",K)}))},[]);return(0,Fo.useEffect)(()=>{let $=()=>{E(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",$),document.addEventListener("webkitfullscreenchange",$),document.addEventListener("mozfullscreenchange",$),document.addEventListener("MSFullscreenChange",$),()=>{document.removeEventListener("fullscreenchange",$),document.removeEventListener("webkitfullscreenchange",$),document.removeEventListener("mozfullscreenchange",$),document.removeEventListener("MSFullscreenChange",$)}},[]),(0,Fo.useEffect)(()=>{if(!D||!u)return;let $=K=>{!K.ctrlKey&&!K.metaKey||(K.key==="+"||K.key==="="?(K.preventDefault(),j()):K.key==="-"||K.key==="_"?(K.preventDefault(),H()):K.key==="0"&&(K.preventDefault(),O()))};return document.addEventListener("keydown",$),()=>{document.removeEventListener("keydown",$)}},[D,u,j,H,O]),(0,Fo.useEffect)(()=>z.onChange(()=>{let K=I(),q=U.get(),te=N.get();m&&((q<K.left||q>K.right)&&Lo(U,Math.max(K.left,Math.min(K.right,q)),{duration:.2}),(te<K.top||te>K.bottom)&&Lo(N,Math.max(K.top,Math.min(K.bottom,te)),{duration:.2}))}),[z,U,N,I,m]),(0,On.jsxs)("div",{ref:g,className:M("relative overflow-hidden touch-none select-none",d&&"cursor-grab active:cursor-grabbing",T&&"fixed inset-0 z-50 bg-background",o),onWheel:L,onDoubleClick:F,onTouchEnd:B,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),...h,children:[(0,On.jsx)("div",{ref:v,className:"w-full h-full",children:(0,On.jsx)(Z.div,{ref:y,drag:d,dragElastic:.1,dragMomentum:!1,dragConstraints:m?I():!1,onDragStart:()=>w(!0),onDragEnd:()=>w(!1),style:{scale:P,x:U,y:N},className:M("w-full h-full flex items-center justify-center",b&&"cursor-grabbing",a),children:e})}),(0,On.jsx)(Ct,{children:l&&x&&(0,On.jsxs)(Z.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:[k.get(),"%"]})}),s&&(0,On.jsxs)("div",{className:"absolute bottom-4 right-4 flex gap-2",children:[(0,On.jsx)("button",{onClick:H,disabled:z.get()<=t,className:M("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,On.jsx)(qu,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:j,disabled:z.get()>=r,className:M("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,On.jsx)(Wu,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:O,className:M("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,On.jsx)(d0,{className:"w-4 h-4"})}),(0,On.jsx)("button",{onClick:W,className:M("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":T?"Exit fullscreen":"Enter fullscreen",children:T?(0,On.jsx)(c0,{className:"w-4 h-4"}):(0,On.jsx)(ol,{className:"w-4 h-4"})})]}),s&&(0,On.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,On.jsxs)("div",{className:"flex items-center gap-2",children:[(0,On.jsxs)("span",{children:[Math.round(z.get()*100),"%"]}),u&&!x&&(0,On.jsx)("span",{className:"text-xs text-muted-foreground",children:"(Ctrl+Scroll to zoom)"})]})})]})});F0e.displayName="PinchZoomInternal";var B0e=Fo.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,On.jsx)(Ve,{className:M("w-fit",e),children:(0,On.jsx)(He,{className:"py-6 text-center",children:(0,On.jsxs)("div",{className:"space-y-4",children:[(0,On.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,On.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,On.jsxs)("div",{children:[(0,On.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,On.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Pinch Zoom is available exclusively to MoonUI Pro subscribers."}),(0,On.jsx)("a",{href:"/pricing",children:(0,On.jsxs)(re,{size:"sm",children:[(0,On.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,On.jsx)(F0e,{className:e,ref:r,...t})});B0e.displayName="PinchZoom";var Wy=A(le(),1);ar();var ki=A(ae(),1),z0e=Wy.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,Wy.useRef)(null),[c,u]=(0,Wy.useState)({x:0,y:0}),[d,f]=(0,Wy.useState)(!1),p=g=>{if(!l.current)return;let v=l.current.getBoundingClientRect(),y=g.clientX-v.left,b=g.clientY-v.top;u({x:y,y:b})},m=()=>{f(!0)},h=()=>{f(!1)};return(0,ki.jsxs)(Z.div,{ref:g=>{l.current=g,typeof s=="function"?s(g):s&&(s.current=g)},className:M("relative overflow-hidden rounded-lg border bg-card text-card-foreground shadow-sm",t),onMouseMove:p,onMouseEnter:m,onMouseLeave:h,whileHover:{scale:1.02},transition:{duration:.2},children:[(0,ki.jsx)(Z.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,ki.jsx)(Z.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,ki.jsx)(Z.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,ki.jsx)("div",{className:"relative z-10",children:e}),(0,ki.jsx)(Z.div,{className:"absolute inset-0 pointer-events-none",animate:{opacity:d?.3:0},transition:{duration:.5},children:[...Array(3)].map((g,v)=>(0,ki.jsx)(Z.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:v*.2,repeat:d?1/0:0,ease:"easeOut"},style:{left:c.x,top:c.y}},v))})]})});z0e.displayName="SpotlightCardInternal";var U0e=Wy.default.forwardRef(({className:e,...t},r)=>{let{hasProAccess:n,isLoading:o}=Ye();return!o&&!n?(0,ki.jsx)(Ve,{className:M("w-fit",e),children:(0,ki.jsx)(He,{className:"py-6 text-center",children:(0,ki.jsxs)("div",{className:"space-y-4",children:[(0,ki.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,ki.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,ki.jsxs)("div",{children:[(0,ki.jsx)("h3",{className:"font-semibold text-sm mb-2",children:"Pro Feature"}),(0,ki.jsx)("p",{className:"text-muted-foreground text-xs mb-4",children:"Spotlight Card is available exclusively to MoonUI Pro subscribers."}),(0,ki.jsx)("a",{href:"/pricing",children:(0,ki.jsxs)(re,{size:"sm",children:[(0,ki.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})]})]})})}):(0,ki.jsx)(z0e,{className:e,ref:r,...t})});U0e.displayName="SpotlightCard";var Cs=A(le(),1);ar();var v1=A(le(),1);var Jt=A(ae(),1),V0e=[{value:"meeting",label:"Meeting",color:"#3b82f6"},{value:"task",label:"Task",color:"#10b981"},{value:"reminder",label:"Reminder",color:"#f59e0b"},{value:"event",label:"Event",color:"#8b5cf6"}],ont=["#3b82f6","#10b981","#f59e0b","#8b5cf6","#ef4444","#06b6d4","#84cc16","#f97316","#ec4899","#6366f1","#14b8a6","#eab308","#f43f5e","#a855f7","#22c55e","#64748b"];function H0e({open:e,onOpenChange:t,event:r,selectedDate:n,onSave:o,onDelete:a,mode:i="create"}){let[s,l]=(0,v1.useState)({title:"",description:"",date:"",startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""}),[c,u]=(0,v1.useState)({}),[d,f]=(0,v1.useState)(!1);(0,v1.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 v=n?n.toISOString().split("T")[0]:new Date().toISOString().split("T")[0];l({title:"",description:"",date:v,startTime:"",endTime:"",location:"",type:"meeting",color:"#3b82f6",attendees:""})}u({})},[r,n,i,e]);let p=()=>{let v={};return s.title.trim()||(v.title="Title is required"),s.date||(v.date="Date is required"),s.startTime&&s.endTime&&s.startTime>=s.endTime&&(v.endTime="End time must be after start time"),u(v),Object.keys(v).length===0},m=async v=>{if(v.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(b=>b.trim()).filter(Boolean):void 0};await o(y),t(!1)}catch(y){console.error("Error saving event:",y)}finally{f(!1)}}},h=()=>{r&&a&&(a(r.id),t(!1))},g=v=>{let y=V0e.find(b=>b.value===v);l(b=>({...b,type:v,color:y?.color||b.color}))};return(0,Jt.jsx)(Yo,{open:e,onOpenChange:t,children:(0,Jt.jsxs)(Oo,{className:"sm:max-w-[500px]",children:[(0,Jt.jsxs)(fa,{children:[(0,Jt.jsxs)(Xo,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(Na,{className:"w-5 h-5"}),i==="create"?"Create Event":"Edit Event"]}),(0,Jt.jsx)(Fs,{children:i==="create"?"Add a new event to your calendar.":"Edit the event details."})]}),(0,Jt.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"title",children:"Title *"}),(0,Jt.jsx)(jt,{id:"title",value:s.title,onChange:v=>l(y=>({...y,title:v.target.value})),placeholder:"Event title",className:M(c.title&&"border-red-500")}),c.title&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.title})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"description",children:"Description"}),(0,Jt.jsx)(yc,{id:"description",value:s.description,onChange:v=>l(y=>({...y,description:v.target.value})),placeholder:"Event description (optional)",rows:3})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"date",children:"Date *"}),(0,Jt.jsx)(jt,{id:"date",type:"date",value:s.date,onChange:v=>l(y=>({...y,date:v.target.value})),className:M(c.date&&"border-red-500")}),c.date&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.date})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"startTime",children:"Start Time"}),(0,Jt.jsx)(jt,{id:"startTime",type:"time",value:s.startTime,onChange:v=>l(y=>({...y,startTime:v.target.value})),placeholder:"09:00"})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"endTime",children:"End Time"}),(0,Jt.jsx)(jt,{id:"endTime",type:"time",value:s.endTime,onChange:v=>l(y=>({...y,endTime:v.target.value})),placeholder:"10:00",className:M(c.endTime&&"border-red-500")}),c.endTime&&(0,Jt.jsx)("p",{className:"text-sm text-red-500",children:c.endTime})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{htmlFor:"location",className:"flex items-center gap-2",children:[(0,Jt.jsx)(zd,{className:"w-4 h-4"}),"Location"]}),(0,Jt.jsx)(jt,{id:"location",value:s.location,onChange:v=>l(y=>({...y,location:v.target.value})),placeholder:"Meeting room, address, or link"})]}),(0,Jt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(h0,{className:"w-4 h-4"}),"Type"]}),(0,Jt.jsxs)(xo,{value:s.type,onValueChange:g,children:[(0,Jt.jsx)(wo,{children:(0,Jt.jsx)(_o,{})}),(0,Jt.jsx)(Co,{children:V0e.map(v=>(0,Jt.jsx)(Tt,{value:v.value,children:(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:v.color}}),v.label]})},v.value))})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)(bt,{className:"flex items-center gap-2",children:[(0,Jt.jsx)(ac,{className:"w-4 h-4"}),"Color"]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Jt.jsx)("input",{type:"color",value:s.color,onChange:v=>l(y=>({...y,color:v.target.value})),className:"w-8 h-8 rounded border cursor-pointer flex-shrink-0"}),(0,Jt.jsx)("span",{className:"text-sm text-muted-foreground",children:"Custom color"})]}),(0,Jt.jsx)("div",{className:"grid grid-cols-8 gap-1",children:ont.map(v=>(0,Jt.jsx)("button",{type:"button",onClick:()=>l(y=>({...y,color:v})),className:M("w-full aspect-square rounded border-2 hover:scale-110 transition-transform",s.color===v?"border-foreground shadow-sm":"border-transparent"),style:{backgroundColor:v},"aria-label":`Select color ${v}`},v))})]})]})]}),(0,Jt.jsxs)("div",{className:"space-y-2",children:[(0,Jt.jsx)(bt,{htmlFor:"attendees",children:"Attendees"}),(0,Jt.jsx)(jt,{id:"attendees",value:s.attendees,onChange:v=>l(y=>({...y,attendees:v.target.value})),placeholder:"John Doe, Jane Smith (comma-separated)"})]}),(0,Jt.jsxs)(fp,{className:"gap-2",children:[i==="edit"&&a&&(0,Jt.jsx)(re,{type:"button",variant:"destructive",onClick:h,className:"mr-auto",children:"Delete Event"}),(0,Jt.jsx)(re,{type:"button",variant:"outline",onClick:()=>t(!1),disabled:d,children:"Cancel"}),(0,Jt.jsx)(re,{type:"submit",disabled:d,children:d?i==="create"?"Creating...":"Saving...":i==="create"?"Create Event":"Save Changes"})]})]})]})})}var Ce=A(ae(),1),hG=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],j0e=["January","February","March","April","May","June","July","August","September","October","November","December"],y1={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"},ant={low:"border-l-4 border-l-muted-foreground",medium:"border-l-4 border-l-yellow-500",high:"border-l-4 border-l-red-500"},int={confirmed:"",tentative:"opacity-70 border-dashed",cancelled:"opacity-50 line-through"};function snt({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:m=!0,height:h,defaultView:g="month",enableDragDrop:v=!0,enableSearch:y=!0,enableFilters:b=!0,enableExport:w=!0,enableImport:x=!1,enableRecurringEvents:C=!0,enableReminders:S=!0,eventCategories:R,workingHours:D={start:"09:00",end:"18:00"},holidays:_=[],locale:T="en-US",timeFormat:E="12h",firstDayOfWeek:z=0,theme:U="auto",customTheme:N,compactMode:P=!1,showProUpgrade:k=!1}){if(k)return(0,Ce.jsx)(Ve,{className:M("w-full",l),children:(0,Ce.jsx)(He,{className:"py-12 text-center",children:(0,Ce.jsxs)("div",{className:"max-w-md mx-auto space-y-4",children:[(0,Ce.jsx)("div",{className:"rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto",children:(0,Ce.jsx)(Ot,{className:"h-6 w-6 text-purple-600 dark:text-purple-400"})}),(0,Ce.jsxs)("div",{children:[(0,Ce.jsx)("h3",{className:"font-semibold text-lg mb-2",children:"Pro Feature"}),(0,Ce.jsx)("p",{className:"text-muted-foreground text-sm mb-4",children:"Calendar is available exclusively to MoonUI Pro subscribers."}),(0,Ce.jsx)("div",{className:"flex gap-3 justify-center",children:(0,Ce.jsx)("a",{href:"/pricing",children:(0,Ce.jsxs)(re,{size:"sm",children:[(0,Ce.jsx)(Et,{className:"mr-2 h-4 w-4"}),"Upgrade to Pro"]})})})]})]})})});let[I,L]=Cs.default.useState(new Date),[F,B]=Cs.default.useState(null),[O,j]=Cs.default.useState(g),[H,V]=Cs.default.useState(!1),[W,$]=Cs.default.useState("create"),[K,q]=Cs.default.useState(null),[te,oe]=Cs.default.useState(null),[ee,Ne]=Cs.default.useState(null),[we,De]=Cs.default.useState(""),[pe,ke]=Cs.default.useState("all"),[he,Ae]=Cs.default.useState("all"),[Y,X]=Cs.default.useState(!1),[de,Pe]=Cs.default.useState([]),[ue,be]=Cs.default.useState(new Date),[Q,ge]=Cs.default.useState(!1),[ie,ne]=Cs.default.useState(!1),Le=new Date,Nt=I.getMonth(),Tn=I.getFullYear(),We=new Date(Tn,Nt,1),Je=new Date(Tn,Nt+1,0),xe=new Date(We),dt=(xe.getDay()-z+7)%7;xe.setDate(xe.getDate()-dt);let wt=new Date(Je),Ie=(6-wt.getDay()+z)%7;wt.setDate(wt.getDate()+Ie);let ft=[],$e=new Date(xe);for(;$e<=wt;)ft.push(new Date($e)),$e.setDate($e.getDate()+1);let It=Cs.default.useMemo(()=>{let Oe=new Set;return e.forEach(et=>{et.tags?.forEach(ht=>Oe.add(ht))}),Array.from(Oe)},[e]),Ft=Cs.default.useMemo(()=>e.filter(Oe=>!(we&&!Oe.title.toLowerCase().includes(we.toLowerCase())&&!Oe.description?.toLowerCase().includes(we.toLowerCase())||pe!=="all"&&Oe.type!==pe||he!=="all"&&Oe.priority!==he||de.length>0&&(!Oe.tags||!Oe.tags.some(et=>de.includes(et))))),[e,we,pe,he,de]),Tr=Oe=>Ft.filter(et=>{let ht=new Date(et.date);return et.recurring?Xr(Oe,et):ht.toDateString()===Oe.toDateString()}),Xr=(Oe,et)=>{if(!et.recurring)return!1;let ht=new Date(et.date),Cr=Math.floor((Oe.getTime()-ht.getTime())/(1e3*60*60*24));if(Cr<0||et.recurring.endDate&&Oe>et.recurring.endDate)return!1;switch(et.recurring.pattern){case"daily":return Cr%et.recurring.interval===0;case"weekly":return Cr%(et.recurring.interval*7)!==0?!1:et.recurring.daysOfWeek?et.recurring.daysOfWeek.includes(Oe.getDay()):Oe.getDay()===ht.getDay();case"monthly":return((Oe.getFullYear()-ht.getFullYear())*12+(Oe.getMonth()-ht.getMonth()))%et.recurring.interval!==0?!1:et.recurring.dayOfMonth?Oe.getDate()===et.recurring.dayOfMonth:Oe.getDate()===ht.getDate();case"yearly":return(Oe.getFullYear()-ht.getFullYear())%et.recurring.interval!==0?!1:Oe.getMonth()===ht.getMonth()&&Oe.getDate()===ht.getDate();default:return!1}},Va=Oe=>Oe.toDateString()===Le.toDateString(),ro=Oe=>Oe.getMonth()===Nt,aa=Oe=>F&&Oe.toDateString()===F.toDateString(),kr=Oe=>!!(d||f&&Oe<f||p&&Oe>p),rn=Oe=>{let et=new Date(I);Oe==="prev"?et.setMonth(Nt-1):et.setMonth(Nt+1),L(et),a?.(et)},ls=Oe=>{j(Oe),i?.(Oe)},Fc=()=>{let Oe=Zs(Ft),et=new Blob([Oe],{type:"text/calendar"}),ht=URL.createObjectURL(et),Cr=document.createElement("a");Cr.href=ht,Cr.download="calendar.ics",Cr.click(),URL.revokeObjectURL(ht)},Zs=Oe=>{let et=`BEGIN:VCALENDAR\r
|
|
121
121
|
VERSION:2.0\r
|
|
122
122
|
PRODID:-//MoonUI//Calendar//EN\r
|
|
123
123
|
`;return Oe.forEach(ht=>{et+=`BEGIN:VEVENT\r
|