@hanzo/ui 5.3.19 → 5.3.22

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.
Files changed (229) hide show
  1. package/dist/3d/button.js +298 -1
  2. package/dist/3d/button.mjs +273 -1
  3. package/dist/3d/card.js +234 -1
  4. package/dist/3d/card.mjs +207 -1
  5. package/dist/3d/carousel.js +371 -1
  6. package/dist/3d/carousel.mjs +344 -1
  7. package/dist/3d/grid.js +362 -1
  8. package/dist/3d/grid.mjs +337 -1
  9. package/dist/3d/index.js +1518 -1
  10. package/dist/3d/index.mjs +1472 -1
  11. package/dist/3d/marquee.js +352 -1
  12. package/dist/3d/marquee.mjs +327 -1
  13. package/dist/3d/pin.js +46 -1
  14. package/dist/3d/pin.mjs +24 -1
  15. package/dist/accordion.js +80 -1
  16. package/dist/accordion.mjs +55 -1
  17. package/dist/alert-dialog.js +220 -1
  18. package/dist/alert-dialog.mjs +187 -1
  19. package/dist/alert.js +68 -1
  20. package/dist/alert.mjs +64 -1
  21. package/dist/animation/animated-background.js +424 -1
  22. package/dist/animation/animated-background.mjs +418 -1
  23. package/dist/animation/animated-beam.js +119 -1
  24. package/dist/animation/animated-beam.mjs +97 -1
  25. package/dist/animation/animated-cursor.js +275 -1
  26. package/dist/animation/animated-cursor.mjs +270 -1
  27. package/dist/animation/animated-icon.js +357 -2
  28. package/dist/animation/animated-icon.mjs +351 -2
  29. package/dist/animation/animated-list.js +339 -1
  30. package/dist/animation/animated-list.mjs +333 -1
  31. package/dist/animation/animated-number.js +283 -1
  32. package/dist/animation/animated-number.mjs +277 -1
  33. package/dist/animation/animated-testimonials.js +97 -1
  34. package/dist/animation/animated-testimonials.mjs +75 -1
  35. package/dist/animation/animated-tooltip.js +67 -1
  36. package/dist/animation/animated-tooltip.mjs +45 -1
  37. package/dist/animation/apple-cards-carousel.js +308 -1
  38. package/dist/animation/apple-cards-carousel.mjs +285 -1
  39. package/dist/animation/apple-hello-effect.js +60 -1
  40. package/dist/animation/apple-hello-effect.mjs +38 -1
  41. package/dist/animation/index.js +1952 -2
  42. package/dist/animation/index.mjs +1921 -2
  43. package/dist/avatar.js +71 -1
  44. package/dist/avatar.mjs +47 -1
  45. package/dist/badge.js +66 -1
  46. package/dist/badge.mjs +40 -1
  47. package/dist/blocks/index.js +1665 -2
  48. package/dist/blocks/index.mjs +1626 -2
  49. package/dist/breadcrumb.js +107 -1
  50. package/dist/breadcrumb.mjs +99 -1
  51. package/dist/calendar.js +189 -1
  52. package/dist/calendar.mjs +164 -1
  53. package/dist/carousel.js +278 -1
  54. package/dist/carousel.mjs +249 -1
  55. package/dist/checkbox.js +60 -1
  56. package/dist/checkbox.mjs +35 -1
  57. package/dist/code/block.js +226 -2
  58. package/dist/code/block.mjs +203 -2
  59. package/dist/code/compare.js +445 -5
  60. package/dist/code/compare.mjs +422 -5
  61. package/dist/code/diff.js +430 -12
  62. package/dist/code/diff.mjs +406 -11
  63. package/dist/code/editor.js +243 -1
  64. package/dist/code/editor.mjs +218 -1
  65. package/dist/code/explorer.js +291 -1
  66. package/dist/code/explorer.mjs +268 -1
  67. package/dist/code/index.js +2515 -26
  68. package/dist/code/index.mjs +2472 -24
  69. package/dist/code/preview.js +364 -6
  70. package/dist/code/preview.mjs +341 -6
  71. package/dist/code/snippet.js +274 -2
  72. package/dist/code/snippet.mjs +250 -2
  73. package/dist/code/tabs.js +75 -1
  74. package/dist/code/tabs.mjs +53 -1
  75. package/dist/code/terminal.js +437 -3
  76. package/dist/code/terminal.mjs +414 -3
  77. package/dist/collapsible.js +33 -1
  78. package/dist/collapsible.mjs +9 -1
  79. package/dist/command.js +262 -1
  80. package/dist/command.mjs +232 -1
  81. package/dist/context-menu.js +207 -1
  82. package/dist/context-menu.mjs +171 -1
  83. package/dist/device/index.js +3 -1
  84. package/dist/device/index.mjs +2 -0
  85. package/dist/dialog.js +151 -1
  86. package/dist/dialog.mjs +121 -1
  87. package/dist/dock/basic.js +174 -1
  88. package/dist/dock/basic.mjs +151 -1
  89. package/dist/dock/index.js +628 -1
  90. package/dist/dock/index.mjs +601 -1
  91. package/dist/dock/limelight-nav.js +295 -1
  92. package/dist/dock/limelight-nav.mjs +274 -1
  93. package/dist/dock/macos.js +141 -1
  94. package/dist/dock/macos.mjs +118 -1
  95. package/dist/dock/menu.js +70 -1
  96. package/dist/dock/menu.mjs +48 -1
  97. package/dist/dock/message.js +144 -1
  98. package/dist/dock/message.mjs +122 -1
  99. package/dist/drawer.js +115 -1
  100. package/dist/drawer.mjs +103 -1
  101. package/dist/dropdown-menu.js +202 -1
  102. package/dist/dropdown-menu.mjs +166 -1
  103. package/dist/finance/AdvancedChart.js +48 -2
  104. package/dist/finance/AdvancedChart.mjs +46 -2
  105. package/dist/finance/CompanyProfile.js +48 -2
  106. package/dist/finance/CompanyProfile.mjs +46 -2
  107. package/dist/finance/CryptoScreener.js +45 -2
  108. package/dist/finance/CryptoScreener.mjs +43 -2
  109. package/dist/finance/Financials.js +52 -2
  110. package/dist/finance/Financials.mjs +50 -2
  111. package/dist/finance/ForexScreener.js +46 -2
  112. package/dist/finance/ForexScreener.mjs +44 -2
  113. package/dist/finance/MarketOverview.js +104 -2
  114. package/dist/finance/MarketOverview.mjs +102 -2
  115. package/dist/finance/NewsTimeline.js +44 -2
  116. package/dist/finance/NewsTimeline.mjs +42 -2
  117. package/dist/finance/OrderEntry.js +131 -1
  118. package/dist/finance/OrderEntry.mjs +129 -1
  119. package/dist/finance/OrdersHistory.js +64 -1
  120. package/dist/finance/OrdersHistory.mjs +62 -1
  121. package/dist/finance/PositionsList.js +80 -1
  122. package/dist/finance/PositionsList.mjs +78 -1
  123. package/dist/finance/StockScreener.js +46 -2
  124. package/dist/finance/StockScreener.mjs +44 -2
  125. package/dist/finance/SymbolInfo.js +46 -2
  126. package/dist/finance/SymbolInfo.mjs +44 -2
  127. package/dist/finance/TechnicalAnalysis.js +54 -2
  128. package/dist/finance/TechnicalAnalysis.mjs +52 -2
  129. package/dist/finance/TickerTape.js +56 -2
  130. package/dist/finance/TickerTape.mjs +54 -2
  131. package/dist/finance/TradingPanel.js +191 -1
  132. package/dist/finance/TradingPanel.mjs +189 -1
  133. package/dist/finance/index.js +930 -2
  134. package/dist/finance/index.mjs +914 -2
  135. package/dist/form/index.js +155 -1
  136. package/dist/form/index.mjs +125 -1
  137. package/dist/form.js +172 -1
  138. package/dist/form.mjs +142 -1
  139. package/dist/hover-card.js +58 -1
  140. package/dist/hover-card.mjs +34 -1
  141. package/dist/index.js +8467 -192
  142. package/dist/index.mjs +8087 -192
  143. package/dist/input-otp.js +79 -1
  144. package/dist/input-otp.mjs +54 -1
  145. package/dist/lib/utils.js +28 -1
  146. package/dist/lib/utils.mjs +24 -1
  147. package/dist/navigation/index.js +98 -1
  148. package/dist/navigation/index.mjs +79 -1
  149. package/dist/navigation-menu.js +149 -1
  150. package/dist/navigation-menu.mjs +116 -1
  151. package/dist/pattern/grid-pattern.js +326 -3
  152. package/dist/pattern/grid-pattern.mjs +303 -3
  153. package/dist/pattern/index.js +326 -3
  154. package/dist/pattern/index.mjs +303 -3
  155. package/dist/popover.js +63 -1
  156. package/dist/popover.mjs +37 -1
  157. package/dist/primitives/index.js +8467 -192
  158. package/dist/primitives/index.mjs +8087 -192
  159. package/dist/primitives-export.js +8467 -192
  160. package/dist/primitives-export.mjs +8087 -192
  161. package/dist/progress.js +62 -1
  162. package/dist/progress.mjs +37 -1
  163. package/dist/project/gantt.js +65 -1
  164. package/dist/project/gantt.mjs +43 -1
  165. package/dist/project/index.js +636 -1
  166. package/dist/project/index.mjs +611 -1
  167. package/dist/project/kanban.js +597 -1
  168. package/dist/project/kanban.mjs +572 -1
  169. package/dist/project/list.js +35 -1
  170. package/dist/project/list.mjs +12 -1
  171. package/dist/radio-group.js +68 -1
  172. package/dist/radio-group.mjs +45 -1
  173. package/dist/resizable.js +72 -1
  174. package/dist/resizable.mjs +48 -1
  175. package/dist/scroll-area.js +89 -1
  176. package/dist/scroll-area.mjs +66 -1
  177. package/dist/select.js +140 -1
  178. package/dist/select.mjs +111 -1
  179. package/dist/separator.js +59 -1
  180. package/dist/separator.mjs +34 -1
  181. package/dist/sheet.js +148 -1
  182. package/dist/sheet.mjs +117 -1
  183. package/dist/skeleton.js +32 -1
  184. package/dist/skeleton.mjs +27 -1
  185. package/dist/slider.js +99 -1
  186. package/dist/slider.mjs +73 -1
  187. package/dist/sonner.js +34 -1
  188. package/dist/sonner.mjs +29 -1
  189. package/dist/switch.js +62 -1
  190. package/dist/switch.mjs +37 -1
  191. package/dist/table.js +110 -1
  192. package/dist/table.mjs +101 -1
  193. package/dist/tabs.js +82 -1
  194. package/dist/tabs.mjs +57 -1
  195. package/dist/tailwind/index.js +2023 -1
  196. package/dist/tailwind/index.mjs +2011 -1
  197. package/dist/textarea.js +78 -1
  198. package/dist/textarea.mjs +56 -1
  199. package/dist/toggle-group.js +118 -1
  200. package/dist/toggle-group.mjs +93 -1
  201. package/dist/toggle.js +71 -1
  202. package/dist/toggle.mjs +48 -1
  203. package/dist/tooltip.js +67 -1
  204. package/dist/tooltip.mjs +40 -1
  205. package/dist/types/index.js +57 -1
  206. package/dist/types/index.mjs +51 -1
  207. package/dist/ui/announcement.js +129 -1
  208. package/dist/ui/announcement.mjs +107 -1
  209. package/dist/ui/avatar-group.js +88 -1
  210. package/dist/ui/avatar-group.mjs +65 -1
  211. package/dist/ui/banner.js +85 -1
  212. package/dist/ui/banner.mjs +62 -1
  213. package/dist/ui/cursor.js +78 -1
  214. package/dist/ui/cursor.mjs +56 -1
  215. package/dist/ui/index.js +475 -1
  216. package/dist/ui/index.mjs +442 -1
  217. package/dist/ui/marquee.js +74 -1
  218. package/dist/ui/marquee.mjs +52 -1
  219. package/dist/ui/pill.js +85 -1
  220. package/dist/ui/pill.mjs +62 -1
  221. package/dist/ui/spinner.js +28 -1
  222. package/dist/ui/spinner.mjs +26 -1
  223. package/dist/ui/tags.js +101 -1
  224. package/dist/ui/tags.mjs +79 -1
  225. package/dist/ui/ticker.js +73 -1
  226. package/dist/ui/ticker.mjs +51 -1
  227. package/dist/util/index.js +457 -1
  228. package/dist/util/index.mjs +399 -1
  229. package/package.json +1 -1
@@ -1,2 +1,1921 @@
1
- import*as T from'react';import {useMemo,useState,useEffect,useCallback,useRef}from'react';import {motion,AnimatePresence,Reorder,useMotionValue as useMotionValue$1,useTransform as useTransform$1,useSpring}from'motion/react';import {cn as cn$1}from'@/lib/utils';import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {cn}from'@hanzo/ui/lib/utils';import {Avatar,AvatarImage,AvatarFallback}from'@hanzo/ui/primitives/avatar';import {Card,CardContent,Button}from'@hanzo/ui';import {AnimatePresence as AnimatePresence$1,motion as motion$1,useMotionValue,useTransform}from'framer-motion';import {ChevronLeft,ChevronRight}from'lucide-react';var Se=Object.defineProperty;var i=(e,n)=>Se(e,"name",{value:n,configurable:true});function $e(){let[e,n]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=i(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}i($e,"usePrefersReducedMotion");function Be({colors:e,speed:n,intensity:a,paused:o}){let s=e.length>=2?e:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx(motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${s.join(", ")})`,backgroundSize:"400% 400%"},animate:o?{}:{x:["0%","100%","0%"]},transition:{duration:10/n,repeat:1/0,ease:"linear"}})}i(Be,"GradientBackground");function De({colors:e,speed:n,elementCount:a,intensity:o,paused:s}){let r=useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/n})),[a,e,n]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:r.map(t=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${t.color}40, transparent)`,width:t.size*o,height:t.size*o,filter:"blur(40px)"},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{x:[`${t.x}%`,`${(t.x+50)%100}%`,`${t.x}%`],y:[`${t.y}%`,`${(t.y+30)%100}%`,`${t.y}%`],scale:[1,1.2,1]},transition:{duration:t.duration,repeat:1/0,ease:"easeInOut"}},t.id))})}i(De,"BlobBackground");function He({colors:e,speed:n,intensity:a,paused:o}){let s=e[0]||"#4ecdc4";return jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(r=>jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+r*20}%, ${s}${Math.round(30*a).toString(16).padStart(2,"0")}, transparent)`},animate:o?{}:{y:[r*10,r*10+20*a,r*10]},transition:{duration:(3+r)/n,repeat:1/0,ease:"easeInOut"}},r))})}i(He,"WaveBackground");function Fe({colors:e,speed:n,intensity:a,paused:o}){let s=e.length>=4?e.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx("div",{className:"absolute inset-0 overflow-hidden",children:s.map((r,t)=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${r}60, transparent)`,width:`${60+t*20}%`,height:`${60+t*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+t*15}%`,y:`${25+t*15}%`},animate:o?{}:{x:[`${25+t*15}%`,`${35+t*15}%`,`${25+t*15}%`],y:[`${25+t*15}%`,`${15+t*15}%`,`${25+t*15}%`],rotate:[0,180,360]},transition:{duration:(8+t*2)/n,repeat:1/0,ease:"easeInOut"}},t))})}i(Fe,"MeshBackground");function ze({layers:e,speed:n,paused:a}){let o=useMotionValue$1(0),s=useMotionValue$1(0);return useEffect(()=>{let r=i(t=>{let{clientX:l,clientY:d}=t,{innerWidth:c,innerHeight:y}=window;o.set((l/c-.5)*100),s.set((d/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",r),()=>window.removeEventListener("mousemove",r)},[o,s]),jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.map((r,t)=>{let l=useTransform$1(o,[-50,50],[-r.speed*10,r.speed*10]),d=useTransform$1(s,[-50,50],[-r.speed*10,r.speed*10]);return jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${r.color}, transparent)`,opacity:r.opacity,x:a?0:l,y:a?0:d}},t)})})}i(ze,"ParallaxBackground");function Ge({colors:e,speed:n,elementCount:a,intensity:o,paused:s}){let r=useMemo(()=>Array.from({length:a},(t,l)=>({id:l,color:e[l%e.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/n,delay:Math.random()*5})),[a,e,n]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:r.map(t=>jsx(motion.div,{className:"absolute rounded-full",style:{backgroundColor:t.color,width:t.size*o,height:t.size*o,opacity:.6},initial:{x:`${t.x}%`,y:`${t.y}%`},animate:s?{}:{y:[`${t.y}%`,`${t.y-100}%`],opacity:[0,.6,0]},transition:{duration:t.duration,repeat:1/0,delay:t.delay,ease:"linear"}},t.id))})}i(Ge,"ParticlesBackground");function We({animation:e="gradient",speed:n=1,colors:a=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:o=false,className:s,style:r,children:t,intensity:l=1,blur:d=false,blurAmount:c=20,opacity:y=1,elementCount:k=5,width:g="100%",height:f="100%",fullscreen:M=false,parallaxLayers:v=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let A=$e(),h=o||A,b=useMemo(()=>({width:M?"100vw":g,height:M?"100vh":f,opacity:y,filter:d?`blur(${c}px)`:void 0,...r}),[M,g,f,y,d,c,r]),R=i(()=>{let x={colors:a,speed:n,intensity:l,paused:h};switch(e){case "blob":return jsx(De,{...x,elementCount:k});case "wave":return jsx(He,{...x});case "mesh":return jsx(Fe,{...x});case "parallax":return jsx(ze,{layers:v,speed:n,paused:h});case "particles":return jsx(Ge,{...x,elementCount:k});default:return jsx(Be,{...x})}},"renderAnimation");return jsxs("div",{className:cn$1("relative overflow-hidden",M&&"fixed inset-0 z-0",s),style:b,children:[R(),t&&jsx("div",{className:"relative z-10 h-full w-full",children:t})]})}i(We,"AnimatedBackground");var be=T.forwardRef(({className:e,duration:n=3,delay:a=0,pathColor:o="gray",pathWidth:s=2,gradientStartColor:r="#18CCFC",gradientStopColor:t="#6344F5",containerRef:l,fromRef:d,toRef:c,...y},k)=>{let[g,f]=T.useState("");return T.useEffect(()=>{if(!l?.current||!d?.current||!c?.current)return;let M=i(()=>{let v=l.current.getBoundingClientRect(),A=d.current.getBoundingClientRect(),h=c.current.getBoundingClientRect(),b=A.left-v.left+A.width/2,R=A.top-v.top+A.height/2,x=h.left-v.left+h.width/2,P=h.top-v.top+h.height/2,D=(b+x)/2,L=Math.min(R,P)-50;f(`M ${b} ${R} Q ${D} ${L} ${x} ${P}`);},"updatePath");return M(),window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[l,d,c]),jsxs("svg",{ref:k,className:cn("pointer-events-none absolute inset-0",e),...y,children:[jsx("path",{d:g,stroke:o,strokeWidth:s,fill:"none",strokeOpacity:.2}),jsx(motion.path,{d:g,stroke:`url(#gradient-${r}-${t})`,strokeWidth:s,fill:"none",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:n,delay:a,ease:"easeInOut",repeat:1/0}}),jsx("defs",{children:jsxs("linearGradient",{id:`gradient-${r}-${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsx("stop",{offset:"0%",stopColor:r}),jsx("stop",{offset:"100%",stopColor:t})]})})]})});be.displayName="AnimatedBeam";var _e=["a","button","input","textarea","select",'[role="button"]','[role="link"]','[tabindex]:not([tabindex="-1"])',".cursor-pointer",'[data-cursor="pointer"]'].join(", "),Ke=['input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]',"textarea",'[contenteditable="true"]','[data-cursor="text"]'].join(", "),Ye=['[data-cursor="grab"]',".cursor-grab"].join(", "),qe=['[data-cursor="grabbing"]',".cursor-grabbing"].join(", ");function Ze(){return typeof window>"u"?false:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}i(Ze,"isTouchDevice");function Je(){let[e,n]=useState({position:{x:0,y:0},isHovering:false,isClicking:false,cursorType:"default"}),a=useCallback((r,t)=>{n(l=>({...l,position:{x:r,y:t}}));},[]),o=useCallback((r,t="default")=>{n(l=>({...l,isHovering:r,cursorType:t}));},[]),s=useCallback(r=>{n(t=>({...t,isClicking:r}));},[]);return {cursorState:e,updatePosition:a,updateHoverState:o,updateClickState:s}}i(Je,"useCursorState");function et(e,n){let[a,o]=useState([]),s=useRef([]);return useEffect(()=>{s.current.push(n),s.current.length>e&&s.current.shift(),o([...s.current]);},[n,e]),a}i(et,"useCursorTrail");function tt({isVisible:e=true,size:n=20,color:a="#000000",trailColor:o="#00000050",animationDuration:s=200,showTrail:r=true,trailLength:t=8,blendMode:l="normal",hoverScale:d=1.5,hideOnTouch:c=true,className:y,clickAnimationDuration:k=100,zIndex:g=9999}){let{cursorState:f,updatePosition:M,updateHoverState:v,updateClickState:A}=Je(),h=et(t,f.position),[b,R]=useState(false),[x,P]=useState(false);if(useEffect(()=>{R(Ze()),P(true);},[]),useEffect(()=>{if(!x||c&&b)return;let m=i(H=>{try{requestAnimationFrame(()=>{M(H.clientX,H.clientY);});}catch(O){console.warn("AnimatedCursor: Error updating position",O);}},"handleMouseMove"),w=i(H=>{try{let O=H.target;O?.closest?.(_e)?v(!0,"pointer"):O?.closest?.(Ke)?v(!0,"text"):O?.closest?.(Ye)?v(!0,"grab"):O?.closest?.(qe)?v(!0,"grabbing"):v(!1,"default");}catch(O){console.warn("AnimatedCursor: Error handling mouse over",O),v(false,"default");}},"handleMouseOver"),I=i(()=>{A(true);},"handleMouseDown"),S=i(()=>{A(false);},"handleMouseUp"),V=i(()=>{v(false,"default");},"handleMouseLeave");return document.addEventListener("mousemove",m),document.addEventListener("mouseover",w),document.addEventListener("mousedown",I),document.addEventListener("mouseup",S),document.addEventListener("mouseleave",V),()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseover",w),document.removeEventListener("mousedown",I),document.removeEventListener("mouseup",S),document.removeEventListener("mouseleave",V);}},[x,c,b,M,v,A]),useEffect(()=>{if(!(!x||c&&b))try{let m=document.body.style.cursor;return document.body.style.cursor="none",()=>{try{document.body.style.cursor=m;}catch(w){console.warn("AnimatedCursor: Error restoring cursor style",w);}}}catch(m){console.warn("AnimatedCursor: Error hiding cursor",m);}},[x,c,b]),!x||!e||c&&b)return null;let D=f.isHovering?d:1,L=f.isClicking?.8:1,u=D*L,p=i(()=>{switch(f.cursorType){case "text":return "h-6 w-0.5";case "grab":case "grabbing":return "rounded-md";default:return "rounded-full"}},"getCursorShape");return jsxs("div",{className:cn("pointer-events-none fixed inset-0",y),children:[r&&h.map((m,w)=>{let I=(w+1)/h.length*.5,S=(w+1)/h.length*.8;return jsx("div",{className:"absolute",style:{left:m.x-n/2,top:m.y-n/2,width:n,height:n,backgroundColor:o,borderRadius:"50%",opacity:I,transform:`scale(${S})`,zIndex:g-w-1,mixBlendMode:l}},w)}),jsx("div",{className:cn("absolute transition-transform duration-100 ease-out",p()),style:{left:f.position.x-n/2,top:f.position.y-n/2,width:f.cursorType==="text"?2:n,height:f.cursorType==="text"?24:n,backgroundColor:a,transform:`scale(${u})`,transitionDuration:`${s}ms`,zIndex:g,mixBlendMode:l}}),f.isHovering&&f.cursorType!=="text"&&jsx("div",{className:"absolute rounded-full border-2 transition-all duration-200 ease-out",style:{left:f.position.x-n*d/2,top:f.position.y-n*d/2,width:n*d,height:n*d,borderColor:a,opacity:.3,zIndex:g-1,mixBlendMode:l}})]})}i(tt,"AnimatedCursor");function it(){let[e,n]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=i(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}i(it,"usePrefersReducedMotion");var st={loading:"M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",heart:["M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z","M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"],star:"m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",hamburger:["M3 12h18M3 6h18M3 18h18","m6 6 12 12M6 18 18 6"],arrow:"M5 12l14 0m-7 -7l7 7l-7 7",check:"m9 12 2 2 4-4",x:"m18 6-12 12M6 6l12 12"},lt={spin:{animate:{rotate:360,transition:{duration:1,repeat:1/0,ease:"linear"}}},pulse:{animate:{scale:[1,1.2,1],transition:{duration:1,repeat:1/0,ease:"easeInOut"}}},bounce:{animate:{y:[0,-10,0],transition:{duration:.6,repeat:1/0,ease:"easeInOut"}}},draw:{initial:{pathLength:0,opacity:0},animate:{pathLength:1,opacity:1,transition:{duration:2,ease:"easeInOut"}}},hover:{whileHover:{scale:1.1,transition:{duration:.2}}}},ct={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},ut={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function dt({paths:e,duration:n,strokeWidth:a=2,autoAnimate:o,repeat:s,onComplete:r}){let[t,l]=useState(0);return useEffect(()=>{if(!o||e.length<2)return;let d=setInterval(()=>{l(c=>{let y=(c+1)%e.length;return y===0&&!s&&(clearInterval(d),r?.()),y});},n);return ()=>clearInterval(d)},[o,e.length,n,s,r]),jsx(motion.path,{d:e[t],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[t]},transition:{duration:n/1e3,ease:"easeInOut"}})}i(dt,"MorphingPath");function mt({path:e,duration:n,strokeWidth:a=2,progress:o,autoAnimate:s}){let r=useRef(null),[t,l]=useState(0);useEffect(()=>{if(r.current){let c=r.current.getTotalLength();l(c);}},[e]);let d=o!==void 0?t*o:t;return jsx(motion.path,{ref:r,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:s?{pathLength:1}:{pathLength:d/t},transition:{duration:n/1e3,ease:"easeInOut"},style:{strokeDasharray:t,strokeDashoffset:t-d}})}i(mt,"DrawingPath");function pt({size:e,strokeWidth:n=2}){return jsx(motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}i(pt,"LoadingSpinner");function ft({icon:e="loading",paths:n,animation:a="spin",size:o=24,color:s="currentColor",duration:r=1e3,autoAnimate:t=true,repeat:l=true,className:d,style:c,onAnimationComplete:y,onClick:k,interactive:g=true,hoverAnimation:f="scale",clickAnimation:M="scale",customVariants:v,viewBox:A="0 0 24 24",strokeWidth:h=2,loading:b=false,progress:R}){let[x,P]=useState(false),[D,L]=useState(false),u=it(),p=v||lt[a]||{},m=t&&!u,I=i(()=>{if(n)return Array.isArray(n)?n:[n];let C=st[e];return Array.isArray(C)?C:[C]},"getIconPaths")(),S=i(()=>{g&&(L(true),setTimeout(()=>L(false),200),k?.());},"handleClick"),V=i(()=>!g||!x?{}:ct[f]||{},"getHoverVariant"),H=i(()=>!g||!D?{}:ut[M]||{},"getClickVariant");if(b)return jsx(pt,{size:o,strokeWidth:h});let O=i(()=>a==="morph"&&I.length>1?jsx(dt,{paths:I,duration:r,strokeWidth:h,autoAnimate:m,repeat:l,onComplete:y}):a==="draw"?jsx(mt,{path:I[0],duration:r,strokeWidth:h,progress:R,autoAnimate:m}):I.map((C,$)=>jsx(motion.path,{d:C,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:h,strokeLinecap:"round",strokeLinejoin:"round"},$)),"renderIcon");return jsx(motion.div,{className:cn$1("inline-flex items-center justify-center",g&&"cursor-pointer",d),style:{width:o,height:o,color:s,...c},onClick:S,onMouseEnter:()=>P(true),onMouseLeave:()=>P(false),variants:p,animate:m?"animate":"initial",whileHover:u?{}:V(),whileTap:u?{}:H(),onAnimationComplete:y,children:jsx("svg",{width:"100%",height:"100%",viewBox:A,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx(AnimatePresence,{mode:"wait",children:O()})})})}i(ft,"AnimatedIcon");function gt(){let[e,n]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=i(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}i(gt,"usePrefersReducedMotion");var ht={hidden:{opacity:0,x:-50},visible:i(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},yt={hidden:{opacity:0},visible:i(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},vt={hidden:{opacity:0,scale:.8},visible:i(e=>({opacity:1,scale:1,transition:{delay:e*.1,duration:.5,ease:"easeOut",type:"spring",stiffness:100}}),"visible"),exit:{opacity:0,scale:.8,transition:{duration:.3}}},xt={hidden:{opacity:0,y:50},visible:i(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},wt={hidden:{opacity:0,y:-50},visible:i(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},At={hidden:{opacity:0,x:50},visible:i(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},Ct={hidden:{opacity:0,x:-50},visible:i(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},kt={slide:ht,fade:yt,scale:vt,slideUp:xt,slideDown:wt,slideLeft:At,slideRight:Ct};function Mt(e,n,a,o){let[s,r]=useState(0),t=useMemo(()=>{if(!o)return e;let c=Math.floor(s/a),y=Math.min(c+Math.ceil(n/a)+1,e.length);return e.slice(c,y).map((k,g)=>({...k,virtualIndex:c+g,style:{position:"absolute",top:(c+g)*a,height:a,width:"100%"}}))},[e,s,a,n,o]),l=e.length*a,d=useCallback(c=>{r(c.currentTarget.scrollTop);},[]);return {visibleItems:t,totalHeight:l,handleScroll:d}}i(Mt,"useVirtualizedList");function Lt({items:e,animation:n="slideUp",staggerDelay:a=100,duration:o=500,reorderable:s=false,enableAddRemove:r=true,layout:t="vertical",gridColumns:l=3,className:d,itemClassName:c,style:y,onReorder:k,onItemClick:g,showHoverEffects:f=true,customVariants:M,virtualized:v=false,itemHeight:A=60,containerHeight:h=400,autoStart:b=true,onAnimationComplete:R}){let[x,P]=useState(e),[D,L]=useState(0),u=gt(),p=M||kt[n],m=!u&&b,{visibleItems:w,totalHeight:I,handleScroll:S}=Mt(e,h,A,v);useEffect(()=>{P(e);},[e]);let V=useMemo(()=>!p.visible||typeof p.visible!="function"?p:{...p,visible:i(C=>{let $=p.visible,te=$(C);return {...te,transition:{...te.transition,delay:C*(a/1e3),duration:o/1e3}}},"visible")},[p,a,o]),H=i(()=>{switch(t){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${l}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),O=i((C,$,te)=>jsx(motion.div,{custom:$,variants:V,initial:m?"hidden":"visible",animate:"visible",exit:"exit",layout:r,className:cn$1("cursor-pointer select-none",f&&"hover:scale-105 transition-transform",c),style:te,onClick:()=>g?.(C,$),whileHover:f?{scale:1.02}:void 0,whileTap:f?{scale:.98}:void 0,onAnimationComplete:()=>{$===x.length-1&&R?.();},children:C.content},C.id),"renderListItem");return s&&!v?jsx(Reorder.Group,{axis:t==="horizontal"?"x":"y",values:x,onReorder:C=>{P(C),k?.(C);},className:cn$1(H(),d),style:y,children:jsx(AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>jsx(Reorder.Item,{value:C,className:cn$1("cursor-grab active:cursor-grabbing",c),whileDrag:{scale:1.05,zIndex:10},children:C.content},C.id))})}):v?jsx("div",{className:cn$1("overflow-auto",d),style:{height:h,...y},onScroll:S,children:jsx("div",{style:{height:I,position:"relative"},children:jsx(AnimatePresence,{mode:"popLayout",children:w.map((C,$)=>O(C,C.virtualIndex||$,C.style))})})}):jsx(motion.div,{className:cn$1(H(),d),style:y,initial:"hidden",animate:"visible",children:jsx(AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>O(C,$))})},D)}i(Lt,"AnimatedList");function Ae(){let[e,n]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=i(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}i(Ae,"usePrefersReducedMotion");function Tt(e,n,a,o,s,r,t,l,d,c,y,k){let[g,f]=useState(n),[M,v]=useState(false),A=useRef(null),h=Ae(),b=useSpring(n,{stiffness:y.tension||100,damping:y.friction||10,mass:y.mass||1}),[R,x]=useState(n),P=useCallback(()=>{if(h){f(e);return}if(v(true),c)b.set(e);else {let L=Date.now(),u=g,p=e-u,m=i(()=>{let w=Date.now()-L,I=Math.min(w/a,1),V=u+p*I;f(V),x(V),I<1?A.current=requestAnimationFrame(m):(v(false),A.current=null);},"animate");A.current=requestAnimationFrame(m);}},[e,g,a,c,b,h]);return useEffect(()=>()=>{A.current&&cancelAnimationFrame(A.current);},[]),useEffect(()=>{if(c){let L=b.onChange(u=>{f(u),Math.abs(u-e)<.01&&v(false);});return ()=>{L();}}},[b,c,e]),useEffect(()=>{d&&P();},[d,P]),{formattedValue:useMemo(()=>{let L=Math.round(g*Math.pow(10,o))/Math.pow(10,o);try{switch(s){case "currency":return new Intl.NumberFormat(t,{style:"currency",currency:r,minimumFractionDigits:o,maximumFractionDigits:o}).format(L);case "percent":return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o}).format(L/100);default:let u=new Intl.NumberFormat(t,{minimumFractionDigits:o,maximumFractionDigits:o}).format(L);return k&&k!==","&&(u=u.replace(/,/g,k)),u}}catch{return L.toFixed(o)}},[g,o,s,r,t,k]),displayValue:g,isAnimating:M,startAnimation:P}}i(Tt,"useAnimatedNumber");function St({value:e,from:n=0,duration:a=2e3,decimals:o=0,format:s="number",currency:r="USD",locale:t="en-US",easing:l="easeOut",autoStart:d=true,onComplete:c,className:y,style:k,prefix:g="",suffix:f="",useSpring:M=false,springConfig:v={},separator:A,animateOnHover:h=false,hoverValue:b}){let[R,x]=useState(false),[P,D]=useState(0),L=h&&R&&b!==void 0?b:e,{formattedValue:u,displayValue:p,isAnimating:m,startAnimation:w}=Tt(L,n,a,o,s,r,t,l,d,M,v,A);useEffect(()=>{!m&&c&&Math.abs(p-L)<.001&&c(p);},[m,p,L,c]),useEffect(()=>{h&&b!==void 0&&w();},[R,h,b,w]);let I=i(()=>{h&&x(true);},"handleMouseEnter"),S=i(()=>{h&&x(false);},"handleMouseLeave"),V=Ae();return jsxs(motion.span,{className:cn$1("inline-block tabular-nums",y),style:k,onMouseEnter:I,onMouseLeave:S,initial:{scale:1},animate:!V&&m?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[g,jsx(motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:u},P),f]})}i(St,"AnimatedNumber");var ke=T.forwardRef(({className:e,testimonials:n,autoPlay:a=true,duration:o=5e3,...s},r)=>{let[t,l]=T.useState(0);return T.useEffect(()=>{if(!a)return;let d=setInterval(()=>{l(c=>(c+1)%n.length);},o);return ()=>clearInterval(d)},[a,o,n.length]),jsxs("div",{ref:r,className:cn("relative min-h-[200px]",e),...s,children:[jsx(AnimatePresence,{mode:"wait",children:jsx(motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:jsx(Card,{children:jsx(CardContent,{className:"pt-6",children:jsxs("blockquote",{className:"space-y-4",children:[jsxs("p",{className:"text-lg italic",children:['"',n[t].content,'"']}),jsxs("footer",{className:"flex items-center gap-4",children:[jsxs(Avatar,{children:[jsx(AvatarImage,{src:n[t].avatar}),jsx(AvatarFallback,{children:n[t].author.slice(0,2).toUpperCase()})]}),jsxs("div",{children:[jsx("cite",{className:"not-italic font-medium",children:n[t].author}),n[t].role&&jsxs("p",{className:"text-sm text-muted-foreground",children:[n[t].role,n[t].company&&`, ${n[t].company}`]})]})]})]})})})},t)}),jsx("div",{className:"mt-4 flex justify-center gap-2",children:n.map((d,c)=>jsx("button",{onClick:()=>l(c),className:cn("h-2 w-2 rounded-full transition-all",c===t?"w-8 bg-primary":"bg-muted hover:bg-muted-foreground"),"aria-label":`Go to testimonial ${c+1}`},c))})]})});ke.displayName="AnimatedTestimonials";var Re=T.forwardRef(({className:e,content:n,children:a,delay:o=0,...s},r)=>{let[t,l]=T.useState(false);return jsxs("div",{ref:r,className:cn("relative inline-block",e),onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),...s,children:[a,jsx(AnimatePresence$1,{children:t&&jsxs(motion$1.div,{initial:{opacity:0,y:10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.95},transition:{duration:.2,delay:o/1e3,ease:"easeOut"},className:"absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",children:[n,jsx("div",{className:"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover"})]})})]})});Re.displayName="AnimatedTooltip";function Zt({cards:e,autoPlay:n=false,autoPlayInterval:a=5e3,className:o,cardClassName:s,showArrows:r=true,showDots:t=true,parallaxOffset:l=50,stackOffset:d=10,stackScale:c=.95,swipeThreshold:y=50}){let[k,g]=T.useState(0),[f,M]=T.useState(n),v=T.useRef(null),A=useMotionValue(0),h=i(u=>{let p=u-k,m=Math.abs(p);if(m>2)return {display:"none",x:0,scale:1,opacity:0,zIndex:0};let I=p*d,S=Math.pow(c,m),V=Math.max(0,1-m*.3),H=e.length-m;return {display:"block",x:I,scale:S,opacity:V,zIndex:H}},"getCardStyle"),b=T.useCallback(()=>{g(u=>(u+1)%e.length);},[e.length]),R=T.useCallback(()=>{g(u=>(u-1+e.length)%e.length);},[e.length]),x=T.useCallback(u=>{g(u);},[]),P=T.useCallback((u,p)=>{let{offset:m,velocity:w}=p;(Math.abs(m.x)>y||Math.abs(w.x)>500)&&(m.x>0?R():b());},[b,R,y]);T.useEffect(()=>{if(!f)return;let u=setInterval(b,a);return ()=>clearInterval(u)},[f,b,a]);let D=T.useCallback(()=>{n&&M(false);},[n]),L=T.useCallback(()=>{n&&M(true);},[n]);return T.useEffect(()=>{let u=i(p=>{p.key==="ArrowLeft"?R():p.key==="ArrowRight"&&b();},"handleKeyDown");return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[b,R]),jsxs("div",{ref:v,className:cn("relative w-full max-w-6xl mx-auto px-4 py-8",o),onMouseEnter:D,onMouseLeave:L,children:[jsx("div",{className:"relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center",children:jsx(AnimatePresence$1,{mode:"popLayout",children:e.map((u,p)=>{let m=h(p),w=p===k;return jsx(motion$1.div,{className:cn("absolute inset-0 w-full h-full",!w&&"pointer-events-none"),initial:false,animate:{x:m.x,scale:m.scale,opacity:m.opacity,zIndex:m.zIndex},transition:{type:"spring",stiffness:300,damping:30},drag:w?"x":false,dragSnapToOrigin:true,dragElastic:.2,onDragEnd:P,whileDrag:{cursor:"grabbing"},style:{x:A,display:m.display},children:jsxs(Card,{className:cn("relative w-full h-full overflow-hidden cursor-grab","bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950","shadow-2xl hover:shadow-3xl transition-shadow duration-300",s),style:{background:u.gradient},children:[u.image&&jsxs(motion$1.div,{className:"absolute inset-0 w-full h-full",style:{x:useTransform(A,[-200,0,200],[l,0,-l])},children:[jsx("img",{src:u.image,alt:u.title,className:"w-full h-full object-cover"}),jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"})]}),jsx("div",{className:"relative z-10 flex flex-col justify-end h-full p-8 md:p-12",children:u.content?u.content:jsxs(Fragment,{children:[jsx(motion$1.h3,{className:"text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",initial:{opacity:0,y:20},animate:{opacity:w?1:.7,y:0},transition:{delay:.1},children:u.title}),u.subtitle&&jsx(motion$1.p,{className:"text-xl md:text-2xl text-white/80 mb-4",initial:{opacity:0,y:20},animate:{opacity:w?1:.7,y:0},transition:{delay:.2},children:u.subtitle}),u.description&&jsx(motion$1.p,{className:"text-base md:text-lg text-white/70 max-w-2xl",initial:{opacity:0,y:20},animate:{opacity:w?1:.7,y:0},transition:{delay:.3},children:u.description})]})})]})},u.id)})})}),r&&jsxs(Fragment,{children:[jsxs(Button,{variant:"ghost",size:"icon",className:cn("absolute left-4 top-1/2 -translate-y-1/2 z-20","bg-white/10 backdrop-blur-md hover:bg-white/20","text-white border border-white/20","hidden md:flex"),onClick:R,children:[jsx(ChevronLeft,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Previous card"})]}),jsxs(Button,{variant:"ghost",size:"icon",className:cn("absolute right-4 top-1/2 -translate-y-1/2 z-20","bg-white/10 backdrop-blur-md hover:bg-white/20","text-white border border-white/20","hidden md:flex"),onClick:b,children:[jsx(ChevronRight,{className:"h-6 w-6"}),jsx("span",{className:"sr-only",children:"Next card"})]})]}),t&&jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:e.map((u,p)=>jsx("button",{className:cn("w-2 h-2 rounded-full transition-all duration-300","bg-white/40 hover:bg-white/60",p===k&&"w-8 bg-white"),onClick:()=>x(p),children:jsxs("span",{className:"sr-only",children:["Go to card ",p+1]})},p))})]})}i(Zt,"AppleCardsCarousel");var Jt={sunset:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)",ocean:"linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",fire:"linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",forest:"linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",galaxy:"linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",aurora:"linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",peach:"linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",lavender:"linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"};var Te=T.forwardRef(({className:e,text:n="Hello",duration:a=2,...o},s)=>{let r=n.split("");return jsx("div",{ref:s,className:cn("relative flex items-center justify-center text-6xl font-bold",e),...o,children:r.map((t,l)=>jsx(motion$1.span,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{duration:a,delay:l*.1,ease:[.215,.61,.355,1]},className:"inline-block",children:t},l))})});Te.displayName="AppleHelloEffect";
2
- export{We as AnimatedBackground,be as AnimatedBeam,tt as AnimatedCursor,ft as AnimatedIcon,Lt as AnimatedList,St as AnimatedNumber,ke as AnimatedTestimonials,Re as AnimatedTooltip,Zt as AppleCardsCarousel,Te as AppleHelloEffect,Jt as gradientPresets};
1
+ "use client";
2
+ import * as React9 from 'react';
3
+ import { useMemo, useState, useEffect, useCallback, useRef } from 'react';
4
+ import { motion, AnimatePresence, Reorder, useMotionValue as useMotionValue$1, useTransform as useTransform$1, useSpring } from 'motion/react';
5
+ import { cn as cn$1 } from '@/lib/utils';
6
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
7
+ import { cn } from '@hanzo/ui/lib/utils';
8
+ import { Avatar, AvatarImage, AvatarFallback } from '@hanzo/ui/primitives/avatar';
9
+ import { Card, CardContent, Button } from '@hanzo/ui';
10
+ import { AnimatePresence as AnimatePresence$1, motion as motion$1, useMotionValue, useTransform } from 'framer-motion';
11
+ import { ChevronLeft, ChevronRight } from 'lucide-react';
12
+
13
+ var __defProp = Object.defineProperty;
14
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
15
+ function usePrefersReducedMotion() {
16
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
17
+ useEffect(() => {
18
+ if (typeof window === "undefined") return;
19
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
20
+ setPrefersReducedMotion(mediaQuery.matches);
21
+ const handleChange = /* @__PURE__ */ __name((event) => {
22
+ setPrefersReducedMotion(event.matches);
23
+ }, "handleChange");
24
+ mediaQuery.addEventListener("change", handleChange);
25
+ return () => mediaQuery.removeEventListener("change", handleChange);
26
+ }, []);
27
+ return prefersReducedMotion;
28
+ }
29
+ __name(usePrefersReducedMotion, "usePrefersReducedMotion");
30
+ function GradientBackground({
31
+ colors,
32
+ speed,
33
+ intensity,
34
+ paused
35
+ }) {
36
+ const gradientColors = colors.length >= 2 ? colors : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
37
+ return /* @__PURE__ */ jsx(
38
+ motion.div,
39
+ {
40
+ className: "absolute inset-0",
41
+ style: {
42
+ background: `linear-gradient(-45deg, ${gradientColors.join(", ")})`,
43
+ backgroundSize: "400% 400%"
44
+ },
45
+ animate: paused ? {} : {
46
+ x: ["0%", "100%", "0%"]
47
+ },
48
+ transition: {
49
+ duration: 10 / speed,
50
+ repeat: Infinity,
51
+ ease: "linear"
52
+ }
53
+ }
54
+ );
55
+ }
56
+ __name(GradientBackground, "GradientBackground");
57
+ function BlobBackground({
58
+ colors,
59
+ speed,
60
+ elementCount,
61
+ intensity,
62
+ paused
63
+ }) {
64
+ const blobs = useMemo(
65
+ () => Array.from({ length: elementCount }, (_, i) => ({
66
+ id: i,
67
+ color: colors[i % colors.length],
68
+ size: Math.random() * 200 + 100,
69
+ x: Math.random() * 100,
70
+ y: Math.random() * 100,
71
+ duration: (Math.random() * 10 + 10) / speed
72
+ })),
73
+ [elementCount, colors, speed]
74
+ );
75
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: blobs.map((blob) => /* @__PURE__ */ jsx(
76
+ motion.div,
77
+ {
78
+ className: "absolute rounded-full",
79
+ style: {
80
+ background: `radial-gradient(circle, ${blob.color}40, transparent)`,
81
+ width: blob.size * intensity,
82
+ height: blob.size * intensity,
83
+ filter: "blur(40px)"
84
+ },
85
+ initial: {
86
+ x: `${blob.x}%`,
87
+ y: `${blob.y}%`
88
+ },
89
+ animate: paused ? {} : {
90
+ x: [`${blob.x}%`, `${(blob.x + 50) % 100}%`, `${blob.x}%`],
91
+ y: [`${blob.y}%`, `${(blob.y + 30) % 100}%`, `${blob.y}%`],
92
+ scale: [1, 1.2, 1]
93
+ },
94
+ transition: {
95
+ duration: blob.duration,
96
+ repeat: Infinity,
97
+ ease: "easeInOut"
98
+ }
99
+ },
100
+ blob.id
101
+ )) });
102
+ }
103
+ __name(BlobBackground, "BlobBackground");
104
+ function WaveBackground({
105
+ colors,
106
+ speed,
107
+ intensity,
108
+ paused
109
+ }) {
110
+ const waveColor = colors[0] || "#4ecdc4";
111
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: [0, 1, 2].map((index) => /* @__PURE__ */ jsx(
112
+ motion.div,
113
+ {
114
+ className: "absolute inset-0",
115
+ style: {
116
+ background: `radial-gradient(ellipse 100% 50% at center ${50 + index * 20}%, ${waveColor}${Math.round(
117
+ 30 * intensity
118
+ ).toString(16).padStart(2, "0")}, transparent)`
119
+ },
120
+ animate: paused ? {} : {
121
+ y: [index * 10, index * 10 + 20 * intensity, index * 10]
122
+ },
123
+ transition: {
124
+ duration: (3 + index) / speed,
125
+ repeat: Infinity,
126
+ ease: "easeInOut"
127
+ }
128
+ },
129
+ index
130
+ )) });
131
+ }
132
+ __name(WaveBackground, "WaveBackground");
133
+ function MeshBackground({
134
+ colors,
135
+ speed,
136
+ intensity,
137
+ paused
138
+ }) {
139
+ const meshColors = colors.length >= 4 ? colors.slice(0, 4) : ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4"];
140
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: meshColors.map((color, index) => /* @__PURE__ */ jsx(
141
+ motion.div,
142
+ {
143
+ className: "absolute rounded-full",
144
+ style: {
145
+ background: `radial-gradient(circle, ${color}60, transparent)`,
146
+ width: `${60 + index * 20}%`,
147
+ height: `${60 + index * 20}%`,
148
+ filter: "blur(60px)",
149
+ mixBlendMode: "multiply"
150
+ },
151
+ initial: {
152
+ x: `${25 + index * 15}%`,
153
+ y: `${25 + index * 15}%`
154
+ },
155
+ animate: paused ? {} : {
156
+ x: [
157
+ `${25 + index * 15}%`,
158
+ `${35 + index * 15}%`,
159
+ `${25 + index * 15}%`
160
+ ],
161
+ y: [
162
+ `${25 + index * 15}%`,
163
+ `${15 + index * 15}%`,
164
+ `${25 + index * 15}%`
165
+ ],
166
+ rotate: [0, 180, 360]
167
+ },
168
+ transition: {
169
+ duration: (8 + index * 2) / speed,
170
+ repeat: Infinity,
171
+ ease: "easeInOut"
172
+ }
173
+ },
174
+ index
175
+ )) });
176
+ }
177
+ __name(MeshBackground, "MeshBackground");
178
+ function ParallaxBackground({
179
+ layers,
180
+ speed,
181
+ paused
182
+ }) {
183
+ const mouseX = useMotionValue$1(0);
184
+ const mouseY = useMotionValue$1(0);
185
+ useEffect(() => {
186
+ const handleMouseMove = /* @__PURE__ */ __name((e) => {
187
+ const { clientX, clientY } = e;
188
+ const { innerWidth, innerHeight } = window;
189
+ mouseX.set((clientX / innerWidth - 0.5) * 100);
190
+ mouseY.set((clientY / innerHeight - 0.5) * 100);
191
+ }, "handleMouseMove");
192
+ window.addEventListener("mousemove", handleMouseMove);
193
+ return () => window.removeEventListener("mousemove", handleMouseMove);
194
+ }, [mouseX, mouseY]);
195
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: layers.map((layer, index) => {
196
+ const x = useTransform$1(
197
+ mouseX,
198
+ [-50, 50],
199
+ [-layer.speed * 10, layer.speed * 10]
200
+ );
201
+ const y = useTransform$1(
202
+ mouseY,
203
+ [-50, 50],
204
+ [-layer.speed * 10, layer.speed * 10]
205
+ );
206
+ return /* @__PURE__ */ jsx(
207
+ motion.div,
208
+ {
209
+ className: "absolute inset-0",
210
+ style: {
211
+ background: `radial-gradient(circle, ${layer.color}, transparent)`,
212
+ opacity: layer.opacity,
213
+ x: paused ? 0 : x,
214
+ y: paused ? 0 : y
215
+ }
216
+ },
217
+ index
218
+ );
219
+ }) });
220
+ }
221
+ __name(ParallaxBackground, "ParallaxBackground");
222
+ function ParticlesBackground({
223
+ colors,
224
+ speed,
225
+ elementCount,
226
+ intensity,
227
+ paused
228
+ }) {
229
+ const particles = useMemo(
230
+ () => Array.from({ length: elementCount }, (_, i) => ({
231
+ id: i,
232
+ color: colors[i % colors.length],
233
+ size: Math.random() * 4 + 2,
234
+ x: Math.random() * 100,
235
+ y: Math.random() * 100,
236
+ duration: (Math.random() * 20 + 20) / speed,
237
+ delay: Math.random() * 5
238
+ })),
239
+ [elementCount, colors, speed]
240
+ );
241
+ return /* @__PURE__ */ jsx("div", { className: "absolute inset-0 overflow-hidden", children: particles.map((particle) => /* @__PURE__ */ jsx(
242
+ motion.div,
243
+ {
244
+ className: "absolute rounded-full",
245
+ style: {
246
+ backgroundColor: particle.color,
247
+ width: particle.size * intensity,
248
+ height: particle.size * intensity,
249
+ opacity: 0.6
250
+ },
251
+ initial: {
252
+ x: `${particle.x}%`,
253
+ y: `${particle.y}%`
254
+ },
255
+ animate: paused ? {} : {
256
+ y: [`${particle.y}%`, `${particle.y - 100}%`],
257
+ opacity: [0, 0.6, 0]
258
+ },
259
+ transition: {
260
+ duration: particle.duration,
261
+ repeat: Infinity,
262
+ delay: particle.delay,
263
+ ease: "linear"
264
+ }
265
+ },
266
+ particle.id
267
+ )) });
268
+ }
269
+ __name(ParticlesBackground, "ParticlesBackground");
270
+ function AnimatedBackground({
271
+ animation = "gradient",
272
+ speed = 1,
273
+ colors = ["#ff6b6b", "#4ecdc4", "#45b7d1", "#96ceb4", "#ffeaa7"],
274
+ paused = false,
275
+ className,
276
+ style,
277
+ children,
278
+ intensity = 1,
279
+ blur = false,
280
+ blurAmount = 20,
281
+ opacity = 1,
282
+ elementCount = 5,
283
+ width = "100%",
284
+ height = "100%",
285
+ fullscreen = false,
286
+ parallaxLayers = [
287
+ { speed: 0.5, color: "#ff6b6b50", opacity: 0.3 },
288
+ { speed: 1, color: "#4ecdc450", opacity: 0.4 },
289
+ { speed: 1.5, color: "#45b7d150", opacity: 0.3 }
290
+ ]
291
+ }) {
292
+ const prefersReducedMotion = usePrefersReducedMotion();
293
+ const isAnimationPaused = paused || prefersReducedMotion;
294
+ const containerStyle = useMemo(
295
+ () => ({
296
+ width: fullscreen ? "100vw" : width,
297
+ height: fullscreen ? "100vh" : height,
298
+ opacity,
299
+ filter: blur ? `blur(${blurAmount}px)` : void 0,
300
+ ...style
301
+ }),
302
+ [fullscreen, width, height, opacity, blur, blurAmount, style]
303
+ );
304
+ const renderAnimation = /* @__PURE__ */ __name(() => {
305
+ const props = { colors, speed, intensity, paused: isAnimationPaused };
306
+ switch (animation) {
307
+ case "blob":
308
+ return /* @__PURE__ */ jsx(BlobBackground, { ...props, elementCount });
309
+ case "wave":
310
+ return /* @__PURE__ */ jsx(WaveBackground, { ...props });
311
+ case "mesh":
312
+ return /* @__PURE__ */ jsx(MeshBackground, { ...props });
313
+ case "parallax":
314
+ return /* @__PURE__ */ jsx(
315
+ ParallaxBackground,
316
+ {
317
+ layers: parallaxLayers,
318
+ speed,
319
+ paused: isAnimationPaused
320
+ }
321
+ );
322
+ case "particles":
323
+ return /* @__PURE__ */ jsx(ParticlesBackground, { ...props, elementCount });
324
+ default:
325
+ return /* @__PURE__ */ jsx(GradientBackground, { ...props });
326
+ }
327
+ }, "renderAnimation");
328
+ return /* @__PURE__ */ jsxs(
329
+ "div",
330
+ {
331
+ className: cn$1(
332
+ "relative overflow-hidden",
333
+ fullscreen && "fixed inset-0 z-0",
334
+ className
335
+ ),
336
+ style: containerStyle,
337
+ children: [
338
+ renderAnimation(),
339
+ children && /* @__PURE__ */ jsx("div", { className: "relative z-10 h-full w-full", children })
340
+ ]
341
+ }
342
+ );
343
+ }
344
+ __name(AnimatedBackground, "AnimatedBackground");
345
+ var AnimatedBeam = React9.forwardRef(
346
+ ({
347
+ className,
348
+ duration = 3,
349
+ delay = 0,
350
+ pathColor = "gray",
351
+ pathWidth = 2,
352
+ gradientStartColor = "#18CCFC",
353
+ gradientStopColor = "#6344F5",
354
+ containerRef,
355
+ fromRef,
356
+ toRef,
357
+ ...props
358
+ }, ref) => {
359
+ const [pathD, setPathD] = React9.useState("");
360
+ React9.useEffect(() => {
361
+ if (!containerRef?.current || !fromRef?.current || !toRef?.current) return;
362
+ const updatePath = /* @__PURE__ */ __name(() => {
363
+ const containerRect = containerRef.current.getBoundingClientRect();
364
+ const fromRect = fromRef.current.getBoundingClientRect();
365
+ const toRect = toRef.current.getBoundingClientRect();
366
+ const fromX = fromRect.left - containerRect.left + fromRect.width / 2;
367
+ const fromY = fromRect.top - containerRect.top + fromRect.height / 2;
368
+ const toX = toRect.left - containerRect.left + toRect.width / 2;
369
+ const toY = toRect.top - containerRect.top + toRect.height / 2;
370
+ const controlX = (fromX + toX) / 2;
371
+ const controlY = Math.min(fromY, toY) - 50;
372
+ setPathD(`M ${fromX} ${fromY} Q ${controlX} ${controlY} ${toX} ${toY}`);
373
+ }, "updatePath");
374
+ updatePath();
375
+ window.addEventListener("resize", updatePath);
376
+ return () => window.removeEventListener("resize", updatePath);
377
+ }, [containerRef, fromRef, toRef]);
378
+ return /* @__PURE__ */ jsxs(
379
+ "svg",
380
+ {
381
+ ref,
382
+ className: cn("pointer-events-none absolute inset-0", className),
383
+ ...props,
384
+ children: [
385
+ /* @__PURE__ */ jsx(
386
+ "path",
387
+ {
388
+ d: pathD,
389
+ stroke: pathColor,
390
+ strokeWidth: pathWidth,
391
+ fill: "none",
392
+ strokeOpacity: 0.2
393
+ }
394
+ ),
395
+ /* @__PURE__ */ jsx(
396
+ motion.path,
397
+ {
398
+ d: pathD,
399
+ stroke: `url(#gradient-${gradientStartColor}-${gradientStopColor})`,
400
+ strokeWidth: pathWidth,
401
+ fill: "none",
402
+ initial: { pathLength: 0 },
403
+ animate: { pathLength: 1 },
404
+ transition: {
405
+ duration,
406
+ delay,
407
+ ease: "easeInOut",
408
+ repeat: Infinity
409
+ }
410
+ }
411
+ ),
412
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsxs(
413
+ "linearGradient",
414
+ {
415
+ id: `gradient-${gradientStartColor}-${gradientStopColor}`,
416
+ x1: "0%",
417
+ y1: "0%",
418
+ x2: "100%",
419
+ y2: "0%",
420
+ children: [
421
+ /* @__PURE__ */ jsx("stop", { offset: "0%", stopColor: gradientStartColor }),
422
+ /* @__PURE__ */ jsx("stop", { offset: "100%", stopColor: gradientStopColor })
423
+ ]
424
+ }
425
+ ) })
426
+ ]
427
+ }
428
+ );
429
+ }
430
+ );
431
+ AnimatedBeam.displayName = "AnimatedBeam";
432
+ var INTERACTIVE_SELECTORS = [
433
+ "a",
434
+ "button",
435
+ "input",
436
+ "textarea",
437
+ "select",
438
+ '[role="button"]',
439
+ '[role="link"]',
440
+ '[tabindex]:not([tabindex="-1"])',
441
+ ".cursor-pointer",
442
+ '[data-cursor="pointer"]'
443
+ ].join(", ");
444
+ var TEXT_SELECTORS = [
445
+ 'input[type="text"]',
446
+ 'input[type="email"]',
447
+ 'input[type="password"]',
448
+ 'input[type="search"]',
449
+ "textarea",
450
+ '[contenteditable="true"]',
451
+ '[data-cursor="text"]'
452
+ ].join(", ");
453
+ var GRAB_SELECTORS = ['[data-cursor="grab"]', ".cursor-grab"].join(", ");
454
+ var GRABBING_SELECTORS = [
455
+ '[data-cursor="grabbing"]',
456
+ ".cursor-grabbing"
457
+ ].join(", ");
458
+ function isTouchDevice() {
459
+ if (typeof window === "undefined") return false;
460
+ return "ontouchstart" in window || navigator.maxTouchPoints > 0 || // @ts-ignore
461
+ navigator.msMaxTouchPoints > 0;
462
+ }
463
+ __name(isTouchDevice, "isTouchDevice");
464
+ function useCursorState() {
465
+ const [cursorState, setCursorState] = useState({
466
+ position: { x: 0, y: 0 },
467
+ isHovering: false,
468
+ isClicking: false,
469
+ cursorType: "default"
470
+ });
471
+ const updatePosition = useCallback((x, y) => {
472
+ setCursorState((prev) => ({
473
+ ...prev,
474
+ position: { x, y }
475
+ }));
476
+ }, []);
477
+ const updateHoverState = useCallback(
478
+ (isHovering, cursorType = "default") => {
479
+ setCursorState((prev) => ({
480
+ ...prev,
481
+ isHovering,
482
+ cursorType
483
+ }));
484
+ },
485
+ []
486
+ );
487
+ const updateClickState = useCallback((isClicking) => {
488
+ setCursorState((prev) => ({
489
+ ...prev,
490
+ isClicking
491
+ }));
492
+ }, []);
493
+ return {
494
+ cursorState,
495
+ updatePosition,
496
+ updateHoverState,
497
+ updateClickState
498
+ };
499
+ }
500
+ __name(useCursorState, "useCursorState");
501
+ function useCursorTrail(trailLength, position) {
502
+ const [trail, setTrail] = useState([]);
503
+ const trailRef = useRef([]);
504
+ useEffect(() => {
505
+ trailRef.current.push(position);
506
+ if (trailRef.current.length > trailLength) {
507
+ trailRef.current.shift();
508
+ }
509
+ setTrail([...trailRef.current]);
510
+ }, [position, trailLength]);
511
+ return trail;
512
+ }
513
+ __name(useCursorTrail, "useCursorTrail");
514
+ function AnimatedCursor({
515
+ isVisible = true,
516
+ size = 20,
517
+ color = "#000000",
518
+ trailColor = "#00000050",
519
+ animationDuration = 200,
520
+ showTrail = true,
521
+ trailLength = 8,
522
+ blendMode = "normal",
523
+ hoverScale = 1.5,
524
+ hideOnTouch = true,
525
+ className,
526
+ clickAnimationDuration = 100,
527
+ zIndex = 9999
528
+ }) {
529
+ const { cursorState, updatePosition, updateHoverState, updateClickState } = useCursorState();
530
+ const trail = useCursorTrail(trailLength, cursorState.position);
531
+ const [isTouch, setIsTouch] = useState(false);
532
+ const [mounted, setMounted] = useState(false);
533
+ useEffect(() => {
534
+ setIsTouch(isTouchDevice());
535
+ setMounted(true);
536
+ }, []);
537
+ useEffect(() => {
538
+ if (!mounted || hideOnTouch && isTouch) return;
539
+ const handleMouseMove = /* @__PURE__ */ __name((e) => {
540
+ try {
541
+ requestAnimationFrame(() => {
542
+ updatePosition(e.clientX, e.clientY);
543
+ });
544
+ } catch (error) {
545
+ console.warn("AnimatedCursor: Error updating position", error);
546
+ }
547
+ }, "handleMouseMove");
548
+ const handleMouseOver = /* @__PURE__ */ __name((e) => {
549
+ try {
550
+ const target = e.target;
551
+ if (target?.closest?.(INTERACTIVE_SELECTORS)) {
552
+ updateHoverState(true, "pointer");
553
+ } else if (target?.closest?.(TEXT_SELECTORS)) {
554
+ updateHoverState(true, "text");
555
+ } else if (target?.closest?.(GRAB_SELECTORS)) {
556
+ updateHoverState(true, "grab");
557
+ } else if (target?.closest?.(GRABBING_SELECTORS)) {
558
+ updateHoverState(true, "grabbing");
559
+ } else {
560
+ updateHoverState(false, "default");
561
+ }
562
+ } catch (error) {
563
+ console.warn("AnimatedCursor: Error handling mouse over", error);
564
+ updateHoverState(false, "default");
565
+ }
566
+ }, "handleMouseOver");
567
+ const handleMouseDown = /* @__PURE__ */ __name(() => {
568
+ updateClickState(true);
569
+ }, "handleMouseDown");
570
+ const handleMouseUp = /* @__PURE__ */ __name(() => {
571
+ updateClickState(false);
572
+ }, "handleMouseUp");
573
+ const handleMouseLeave = /* @__PURE__ */ __name(() => {
574
+ updateHoverState(false, "default");
575
+ }, "handleMouseLeave");
576
+ document.addEventListener("mousemove", handleMouseMove);
577
+ document.addEventListener("mouseover", handleMouseOver);
578
+ document.addEventListener("mousedown", handleMouseDown);
579
+ document.addEventListener("mouseup", handleMouseUp);
580
+ document.addEventListener("mouseleave", handleMouseLeave);
581
+ return () => {
582
+ document.removeEventListener("mousemove", handleMouseMove);
583
+ document.removeEventListener("mouseover", handleMouseOver);
584
+ document.removeEventListener("mousedown", handleMouseDown);
585
+ document.removeEventListener("mouseup", handleMouseUp);
586
+ document.removeEventListener("mouseleave", handleMouseLeave);
587
+ };
588
+ }, [
589
+ mounted,
590
+ hideOnTouch,
591
+ isTouch,
592
+ updatePosition,
593
+ updateHoverState,
594
+ updateClickState
595
+ ]);
596
+ useEffect(() => {
597
+ if (!mounted || hideOnTouch && isTouch) return;
598
+ try {
599
+ const originalCursor = document.body.style.cursor;
600
+ document.body.style.cursor = "none";
601
+ return () => {
602
+ try {
603
+ document.body.style.cursor = originalCursor;
604
+ } catch (error) {
605
+ console.warn("AnimatedCursor: Error restoring cursor style", error);
606
+ }
607
+ };
608
+ } catch (error) {
609
+ console.warn("AnimatedCursor: Error hiding cursor", error);
610
+ }
611
+ }, [mounted, hideOnTouch, isTouch]);
612
+ if (!mounted || !isVisible || hideOnTouch && isTouch) {
613
+ return null;
614
+ }
615
+ const currentScale = cursorState.isHovering ? hoverScale : 1;
616
+ const clickScale = cursorState.isClicking ? 0.8 : 1;
617
+ const finalScale = currentScale * clickScale;
618
+ const getCursorShape = /* @__PURE__ */ __name(() => {
619
+ switch (cursorState.cursorType) {
620
+ case "text":
621
+ return "h-6 w-0.5";
622
+ case "grab":
623
+ case "grabbing":
624
+ return "rounded-md";
625
+ default:
626
+ return "rounded-full";
627
+ }
628
+ }, "getCursorShape");
629
+ return /* @__PURE__ */ jsxs("div", { className: cn("pointer-events-none fixed inset-0", className), children: [
630
+ showTrail && trail.map((point, index) => {
631
+ const opacity = (index + 1) / trail.length * 0.5;
632
+ const scale = (index + 1) / trail.length * 0.8;
633
+ return /* @__PURE__ */ jsx(
634
+ "div",
635
+ {
636
+ className: "absolute",
637
+ style: {
638
+ left: point.x - size / 2,
639
+ top: point.y - size / 2,
640
+ width: size,
641
+ height: size,
642
+ backgroundColor: trailColor,
643
+ borderRadius: "50%",
644
+ opacity,
645
+ transform: `scale(${scale})`,
646
+ zIndex: zIndex - index - 1,
647
+ mixBlendMode: blendMode
648
+ }
649
+ },
650
+ index
651
+ );
652
+ }),
653
+ /* @__PURE__ */ jsx(
654
+ "div",
655
+ {
656
+ className: cn(
657
+ "absolute transition-transform duration-100 ease-out",
658
+ getCursorShape()
659
+ ),
660
+ style: {
661
+ left: cursorState.position.x - size / 2,
662
+ top: cursorState.position.y - size / 2,
663
+ width: cursorState.cursorType === "text" ? 2 : size,
664
+ height: cursorState.cursorType === "text" ? 24 : size,
665
+ backgroundColor: color,
666
+ transform: `scale(${finalScale})`,
667
+ transitionDuration: `${animationDuration}ms`,
668
+ zIndex,
669
+ mixBlendMode: blendMode
670
+ }
671
+ }
672
+ ),
673
+ cursorState.isHovering && cursorState.cursorType !== "text" && /* @__PURE__ */ jsx(
674
+ "div",
675
+ {
676
+ className: "absolute rounded-full border-2 transition-all duration-200 ease-out",
677
+ style: {
678
+ left: cursorState.position.x - size * hoverScale / 2,
679
+ top: cursorState.position.y - size * hoverScale / 2,
680
+ width: size * hoverScale,
681
+ height: size * hoverScale,
682
+ borderColor: color,
683
+ opacity: 0.3,
684
+ zIndex: zIndex - 1,
685
+ mixBlendMode: blendMode
686
+ }
687
+ }
688
+ )
689
+ ] });
690
+ }
691
+ __name(AnimatedCursor, "AnimatedCursor");
692
+ function usePrefersReducedMotion2() {
693
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
694
+ useEffect(() => {
695
+ if (typeof window === "undefined") return;
696
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
697
+ setPrefersReducedMotion(mediaQuery.matches);
698
+ const handleChange = /* @__PURE__ */ __name((event) => {
699
+ setPrefersReducedMotion(event.matches);
700
+ }, "handleChange");
701
+ mediaQuery.addEventListener("change", handleChange);
702
+ return () => mediaQuery.removeEventListener("change", handleChange);
703
+ }, []);
704
+ return prefersReducedMotion;
705
+ }
706
+ __name(usePrefersReducedMotion2, "usePrefersReducedMotion");
707
+ var iconPaths = {
708
+ loading: "M12 2v4m0 12v4M4.93 4.93l2.83 2.83m8.48 8.48l2.83 2.83M2 12h4m12 0h4M4.93 19.07l2.83-2.83m8.48-8.48l2.83-2.83",
709
+ heart: [
710
+ "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z",
711
+ "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"
712
+ ],
713
+ star: "m12 2 3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2Z",
714
+ hamburger: ["M3 12h18M3 6h18M3 18h18", "m6 6 12 12M6 18 18 6"],
715
+ arrow: "M5 12l14 0m-7 -7l7 7l-7 7",
716
+ check: "m9 12 2 2 4-4",
717
+ x: "m18 6-12 12M6 6l12 12"
718
+ };
719
+ var animationVariants = {
720
+ spin: {
721
+ animate: {
722
+ rotate: 360,
723
+ transition: {
724
+ duration: 1,
725
+ repeat: Infinity,
726
+ ease: "linear"
727
+ }
728
+ }
729
+ },
730
+ pulse: {
731
+ animate: {
732
+ scale: [1, 1.2, 1],
733
+ transition: {
734
+ duration: 1,
735
+ repeat: Infinity,
736
+ ease: "easeInOut"
737
+ }
738
+ }
739
+ },
740
+ bounce: {
741
+ animate: {
742
+ y: [0, -10, 0],
743
+ transition: {
744
+ duration: 0.6,
745
+ repeat: Infinity,
746
+ ease: "easeInOut"
747
+ }
748
+ }
749
+ },
750
+ draw: {
751
+ initial: { pathLength: 0, opacity: 0 },
752
+ animate: {
753
+ pathLength: 1,
754
+ opacity: 1,
755
+ transition: { duration: 2, ease: "easeInOut" }
756
+ }
757
+ },
758
+ hover: {
759
+ whileHover: {
760
+ scale: 1.1,
761
+ transition: { duration: 0.2 }
762
+ }
763
+ }
764
+ };
765
+ var hoverVariants = {
766
+ scale: { scale: 1.2 },
767
+ rotate: { rotate: 15 },
768
+ glow: { filter: "drop-shadow(0 0 8px currentColor)" },
769
+ shake: { x: [-2, 2, -2, 2, 0] }
770
+ };
771
+ var clickVariants = {
772
+ scale: { scale: 0.9 },
773
+ rotate: { rotate: 180 },
774
+ ripple: { scale: [1, 1.3, 1] }
775
+ };
776
+ function MorphingPath({
777
+ paths,
778
+ duration,
779
+ strokeWidth = 2,
780
+ autoAnimate,
781
+ repeat,
782
+ onComplete
783
+ }) {
784
+ const [currentPathIndex, setCurrentPathIndex] = useState(0);
785
+ useEffect(() => {
786
+ if (!autoAnimate || paths.length < 2) return;
787
+ const interval = setInterval(() => {
788
+ setCurrentPathIndex((prev) => {
789
+ const next = (prev + 1) % paths.length;
790
+ if (next === 0 && !repeat) {
791
+ clearInterval(interval);
792
+ onComplete?.();
793
+ }
794
+ return next;
795
+ });
796
+ }, duration);
797
+ return () => clearInterval(interval);
798
+ }, [autoAnimate, paths.length, duration, repeat, onComplete]);
799
+ return /* @__PURE__ */ jsx(
800
+ motion.path,
801
+ {
802
+ d: paths[currentPathIndex],
803
+ fill: "none",
804
+ stroke: "currentColor",
805
+ strokeWidth,
806
+ strokeLinecap: "round",
807
+ strokeLinejoin: "round",
808
+ animate: { d: paths[currentPathIndex] },
809
+ transition: { duration: duration / 1e3, ease: "easeInOut" }
810
+ }
811
+ );
812
+ }
813
+ __name(MorphingPath, "MorphingPath");
814
+ function DrawingPath({
815
+ path,
816
+ duration,
817
+ strokeWidth = 2,
818
+ progress,
819
+ autoAnimate
820
+ }) {
821
+ const pathRef = useRef(null);
822
+ const [pathLength, setPathLength] = useState(0);
823
+ useEffect(() => {
824
+ if (pathRef.current) {
825
+ const length = pathRef.current.getTotalLength();
826
+ setPathLength(length);
827
+ }
828
+ }, [path]);
829
+ const animatedLength = progress !== void 0 ? pathLength * progress : pathLength;
830
+ return /* @__PURE__ */ jsx(
831
+ motion.path,
832
+ {
833
+ ref: pathRef,
834
+ d: path,
835
+ fill: "none",
836
+ stroke: "currentColor",
837
+ strokeWidth,
838
+ strokeLinecap: "round",
839
+ strokeLinejoin: "round",
840
+ initial: { pathLength: 0 },
841
+ animate: autoAnimate ? { pathLength: 1 } : { pathLength: animatedLength / pathLength },
842
+ transition: { duration: duration / 1e3, ease: "easeInOut" },
843
+ style: {
844
+ strokeDasharray: pathLength,
845
+ strokeDashoffset: pathLength - animatedLength
846
+ }
847
+ }
848
+ );
849
+ }
850
+ __name(DrawingPath, "DrawingPath");
851
+ function LoadingSpinner({
852
+ size,
853
+ strokeWidth = 2
854
+ }) {
855
+ return /* @__PURE__ */ jsx(
856
+ motion.div,
857
+ {
858
+ animate: { rotate: 360 },
859
+ transition: { duration: 1, repeat: Infinity, ease: "linear" },
860
+ style: { width: size, height: size },
861
+ children: /* @__PURE__ */ jsx("svg", { width: "100%", height: "100%", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx(
862
+ "circle",
863
+ {
864
+ cx: "12",
865
+ cy: "12",
866
+ r: "10",
867
+ stroke: "currentColor",
868
+ strokeWidth,
869
+ strokeLinecap: "round",
870
+ strokeDasharray: "60 40",
871
+ opacity: "0.3"
872
+ }
873
+ ) })
874
+ }
875
+ );
876
+ }
877
+ __name(LoadingSpinner, "LoadingSpinner");
878
+ function AnimatedIcon({
879
+ icon = "loading",
880
+ paths,
881
+ animation = "spin",
882
+ size = 24,
883
+ color = "currentColor",
884
+ duration = 1e3,
885
+ autoAnimate = true,
886
+ repeat = true,
887
+ className,
888
+ style,
889
+ onAnimationComplete,
890
+ onClick,
891
+ interactive = true,
892
+ hoverAnimation = "scale",
893
+ clickAnimation = "scale",
894
+ customVariants,
895
+ viewBox = "0 0 24 24",
896
+ strokeWidth = 2,
897
+ loading = false,
898
+ progress
899
+ }) {
900
+ const [isHovered, setIsHovered] = useState(false);
901
+ const [isClicked, setIsClicked] = useState(false);
902
+ const prefersReducedMotion = usePrefersReducedMotion2();
903
+ const variants = customVariants || animationVariants[animation] || {};
904
+ const shouldAnimate = autoAnimate && !prefersReducedMotion;
905
+ const getIconPaths = /* @__PURE__ */ __name(() => {
906
+ if (paths) {
907
+ return Array.isArray(paths) ? paths : [paths];
908
+ }
909
+ const builtInPath = iconPaths[icon];
910
+ return Array.isArray(builtInPath) ? builtInPath : [builtInPath];
911
+ }, "getIconPaths");
912
+ const iconPathsArray = getIconPaths();
913
+ const handleClick = /* @__PURE__ */ __name(() => {
914
+ if (!interactive) return;
915
+ setIsClicked(true);
916
+ setTimeout(() => setIsClicked(false), 200);
917
+ onClick?.();
918
+ }, "handleClick");
919
+ const getHoverVariant = /* @__PURE__ */ __name(() => {
920
+ if (!interactive || !isHovered) return {};
921
+ return hoverVariants[hoverAnimation] || {};
922
+ }, "getHoverVariant");
923
+ const getClickVariant = /* @__PURE__ */ __name(() => {
924
+ if (!interactive || !isClicked) return {};
925
+ return clickVariants[clickAnimation] || {};
926
+ }, "getClickVariant");
927
+ if (loading) {
928
+ return /* @__PURE__ */ jsx(LoadingSpinner, { size, strokeWidth });
929
+ }
930
+ const renderIcon = /* @__PURE__ */ __name(() => {
931
+ if (animation === "morph" && iconPathsArray.length > 1) {
932
+ return /* @__PURE__ */ jsx(
933
+ MorphingPath,
934
+ {
935
+ paths: iconPathsArray,
936
+ duration,
937
+ strokeWidth,
938
+ autoAnimate: shouldAnimate,
939
+ repeat,
940
+ onComplete: onAnimationComplete
941
+ }
942
+ );
943
+ }
944
+ if (animation === "draw") {
945
+ return /* @__PURE__ */ jsx(
946
+ DrawingPath,
947
+ {
948
+ path: iconPathsArray[0],
949
+ duration,
950
+ strokeWidth,
951
+ progress,
952
+ autoAnimate: shouldAnimate
953
+ }
954
+ );
955
+ }
956
+ return iconPathsArray.map((path, index) => /* @__PURE__ */ jsx(
957
+ motion.path,
958
+ {
959
+ d: path,
960
+ fill: icon === "heart" ? "currentColor" : "none",
961
+ stroke: icon === "heart" ? "none" : "currentColor",
962
+ strokeWidth,
963
+ strokeLinecap: "round",
964
+ strokeLinejoin: "round"
965
+ },
966
+ index
967
+ ));
968
+ }, "renderIcon");
969
+ return /* @__PURE__ */ jsx(
970
+ motion.div,
971
+ {
972
+ className: cn$1(
973
+ "inline-flex items-center justify-center",
974
+ interactive && "cursor-pointer",
975
+ className
976
+ ),
977
+ style: {
978
+ width: size,
979
+ height: size,
980
+ color,
981
+ ...style
982
+ },
983
+ onClick: handleClick,
984
+ onMouseEnter: () => setIsHovered(true),
985
+ onMouseLeave: () => setIsHovered(false),
986
+ variants,
987
+ animate: shouldAnimate ? "animate" : "initial",
988
+ whileHover: !prefersReducedMotion ? getHoverVariant() : {},
989
+ whileTap: !prefersReducedMotion ? getClickVariant() : {},
990
+ onAnimationComplete,
991
+ children: /* @__PURE__ */ jsx(
992
+ "svg",
993
+ {
994
+ width: "100%",
995
+ height: "100%",
996
+ viewBox,
997
+ fill: "none",
998
+ xmlns: "http://www.w3.org/2000/svg",
999
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: renderIcon() })
1000
+ }
1001
+ )
1002
+ }
1003
+ );
1004
+ }
1005
+ __name(AnimatedIcon, "AnimatedIcon");
1006
+ function usePrefersReducedMotion3() {
1007
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
1008
+ useEffect(() => {
1009
+ if (typeof window === "undefined") return;
1010
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
1011
+ setPrefersReducedMotion(mediaQuery.matches);
1012
+ const handleChange = /* @__PURE__ */ __name((event) => {
1013
+ setPrefersReducedMotion(event.matches);
1014
+ }, "handleChange");
1015
+ mediaQuery.addEventListener("change", handleChange);
1016
+ return () => mediaQuery.removeEventListener("change", handleChange);
1017
+ }, []);
1018
+ return prefersReducedMotion;
1019
+ }
1020
+ __name(usePrefersReducedMotion3, "usePrefersReducedMotion");
1021
+ var slideVariants = {
1022
+ hidden: { opacity: 0, x: -50 },
1023
+ visible: /* @__PURE__ */ __name((i) => ({
1024
+ opacity: 1,
1025
+ x: 0,
1026
+ transition: {
1027
+ delay: i * 0.1,
1028
+ duration: 0.5,
1029
+ ease: "easeOut"
1030
+ }
1031
+ }), "visible"),
1032
+ exit: { opacity: 0, x: 50, transition: { duration: 0.3 } }
1033
+ };
1034
+ var fadeVariants = {
1035
+ hidden: { opacity: 0 },
1036
+ visible: /* @__PURE__ */ __name((i) => ({
1037
+ opacity: 1,
1038
+ transition: {
1039
+ delay: i * 0.1,
1040
+ duration: 0.5,
1041
+ ease: "easeOut"
1042
+ }
1043
+ }), "visible"),
1044
+ exit: { opacity: 0, transition: { duration: 0.3 } }
1045
+ };
1046
+ var scaleVariants = {
1047
+ hidden: { opacity: 0, scale: 0.8 },
1048
+ visible: /* @__PURE__ */ __name((i) => ({
1049
+ opacity: 1,
1050
+ scale: 1,
1051
+ transition: {
1052
+ delay: i * 0.1,
1053
+ duration: 0.5,
1054
+ ease: "easeOut",
1055
+ type: "spring",
1056
+ stiffness: 100
1057
+ }
1058
+ }), "visible"),
1059
+ exit: { opacity: 0, scale: 0.8, transition: { duration: 0.3 } }
1060
+ };
1061
+ var slideUpVariants = {
1062
+ hidden: { opacity: 0, y: 50 },
1063
+ visible: /* @__PURE__ */ __name((i) => ({
1064
+ opacity: 1,
1065
+ y: 0,
1066
+ transition: {
1067
+ delay: i * 0.1,
1068
+ duration: 0.5,
1069
+ ease: "easeOut"
1070
+ }
1071
+ }), "visible"),
1072
+ exit: { opacity: 0, y: -50, transition: { duration: 0.3 } }
1073
+ };
1074
+ var slideDownVariants = {
1075
+ hidden: { opacity: 0, y: -50 },
1076
+ visible: /* @__PURE__ */ __name((i) => ({
1077
+ opacity: 1,
1078
+ y: 0,
1079
+ transition: {
1080
+ delay: i * 0.1,
1081
+ duration: 0.5,
1082
+ ease: "easeOut"
1083
+ }
1084
+ }), "visible"),
1085
+ exit: { opacity: 0, y: 50, transition: { duration: 0.3 } }
1086
+ };
1087
+ var slideLeftVariants = {
1088
+ hidden: { opacity: 0, x: 50 },
1089
+ visible: /* @__PURE__ */ __name((i) => ({
1090
+ opacity: 1,
1091
+ x: 0,
1092
+ transition: {
1093
+ delay: i * 0.1,
1094
+ duration: 0.5,
1095
+ ease: "easeOut"
1096
+ }
1097
+ }), "visible"),
1098
+ exit: { opacity: 0, x: -50, transition: { duration: 0.3 } }
1099
+ };
1100
+ var slideRightVariants = {
1101
+ hidden: { opacity: 0, x: -50 },
1102
+ visible: /* @__PURE__ */ __name((i) => ({
1103
+ opacity: 1,
1104
+ x: 0,
1105
+ transition: {
1106
+ delay: i * 0.1,
1107
+ duration: 0.5,
1108
+ ease: "easeOut"
1109
+ }
1110
+ }), "visible"),
1111
+ exit: { opacity: 0, x: 50, transition: { duration: 0.3 } }
1112
+ };
1113
+ var animationVariants2 = {
1114
+ slide: slideVariants,
1115
+ fade: fadeVariants,
1116
+ scale: scaleVariants,
1117
+ slideUp: slideUpVariants,
1118
+ slideDown: slideDownVariants,
1119
+ slideLeft: slideLeftVariants,
1120
+ slideRight: slideRightVariants
1121
+ };
1122
+ function useVirtualizedList(items, containerHeight, itemHeight, enabled) {
1123
+ const [scrollTop, setScrollTop] = useState(0);
1124
+ const visibleItems = useMemo(() => {
1125
+ if (!enabled) return items;
1126
+ const startIndex = Math.floor(scrollTop / itemHeight);
1127
+ const endIndex = Math.min(
1128
+ startIndex + Math.ceil(containerHeight / itemHeight) + 1,
1129
+ items.length
1130
+ );
1131
+ return items.slice(startIndex, endIndex).map((item, index) => ({
1132
+ ...item,
1133
+ virtualIndex: startIndex + index,
1134
+ style: {
1135
+ position: "absolute",
1136
+ top: (startIndex + index) * itemHeight,
1137
+ height: itemHeight,
1138
+ width: "100%"
1139
+ }
1140
+ }));
1141
+ }, [items, scrollTop, itemHeight, containerHeight, enabled]);
1142
+ const totalHeight = items.length * itemHeight;
1143
+ const handleScroll = useCallback((e) => {
1144
+ setScrollTop(e.currentTarget.scrollTop);
1145
+ }, []);
1146
+ return {
1147
+ visibleItems,
1148
+ totalHeight,
1149
+ handleScroll
1150
+ };
1151
+ }
1152
+ __name(useVirtualizedList, "useVirtualizedList");
1153
+ function AnimatedList({
1154
+ items,
1155
+ animation = "slideUp",
1156
+ staggerDelay = 100,
1157
+ duration = 500,
1158
+ reorderable = false,
1159
+ enableAddRemove = true,
1160
+ layout = "vertical",
1161
+ gridColumns = 3,
1162
+ className,
1163
+ itemClassName,
1164
+ style,
1165
+ onReorder,
1166
+ onItemClick,
1167
+ showHoverEffects = true,
1168
+ customVariants,
1169
+ virtualized = false,
1170
+ itemHeight = 60,
1171
+ containerHeight = 400,
1172
+ autoStart = true,
1173
+ onAnimationComplete
1174
+ }) {
1175
+ const [animatedItems, setAnimatedItems] = useState(items);
1176
+ const [animationKey, setAnimationKey] = useState(0);
1177
+ const prefersReducedMotion = usePrefersReducedMotion3();
1178
+ const variants = customVariants || animationVariants2[animation];
1179
+ const shouldAnimate = !prefersReducedMotion && autoStart;
1180
+ const { visibleItems, totalHeight, handleScroll } = useVirtualizedList(
1181
+ items,
1182
+ containerHeight,
1183
+ itemHeight,
1184
+ virtualized
1185
+ );
1186
+ useEffect(() => {
1187
+ setAnimatedItems(items);
1188
+ }, [items]);
1189
+ const updatedVariants = useMemo(() => {
1190
+ if (!variants.visible || typeof variants.visible !== "function")
1191
+ return variants;
1192
+ return {
1193
+ ...variants,
1194
+ visible: /* @__PURE__ */ __name((i) => {
1195
+ const original = variants.visible;
1196
+ const originalResult = original(i);
1197
+ return {
1198
+ ...originalResult,
1199
+ transition: {
1200
+ ...originalResult.transition,
1201
+ delay: i * (staggerDelay / 1e3),
1202
+ duration: duration / 1e3
1203
+ }
1204
+ };
1205
+ }, "visible")
1206
+ };
1207
+ }, [variants, staggerDelay, duration]);
1208
+ const getLayoutClassName = /* @__PURE__ */ __name(() => {
1209
+ switch (layout) {
1210
+ case "horizontal":
1211
+ return "flex flex-row gap-4 overflow-x-auto";
1212
+ case "grid":
1213
+ return `grid gap-4 grid-cols-${gridColumns}`;
1214
+ default:
1215
+ return "flex flex-col gap-4";
1216
+ }
1217
+ }, "getLayoutClassName");
1218
+ const renderListItem = /* @__PURE__ */ __name((item, index, virtualStyle) => {
1219
+ const itemContent = /* @__PURE__ */ jsx(
1220
+ motion.div,
1221
+ {
1222
+ custom: index,
1223
+ variants: updatedVariants,
1224
+ initial: shouldAnimate ? "hidden" : "visible",
1225
+ animate: "visible",
1226
+ exit: "exit",
1227
+ layout: enableAddRemove,
1228
+ className: cn$1(
1229
+ "cursor-pointer select-none",
1230
+ showHoverEffects && "hover:scale-105 transition-transform",
1231
+ itemClassName
1232
+ ),
1233
+ style: virtualStyle,
1234
+ onClick: () => onItemClick?.(item, index),
1235
+ whileHover: showHoverEffects ? { scale: 1.02 } : void 0,
1236
+ whileTap: showHoverEffects ? { scale: 0.98 } : void 0,
1237
+ onAnimationComplete: () => {
1238
+ if (index === animatedItems.length - 1) {
1239
+ onAnimationComplete?.();
1240
+ }
1241
+ },
1242
+ children: item.content
1243
+ },
1244
+ item.id
1245
+ );
1246
+ return itemContent;
1247
+ }, "renderListItem");
1248
+ if (reorderable && !virtualized) {
1249
+ return /* @__PURE__ */ jsx(
1250
+ Reorder.Group,
1251
+ {
1252
+ axis: layout === "horizontal" ? "x" : "y",
1253
+ values: animatedItems,
1254
+ onReorder: (newItems) => {
1255
+ setAnimatedItems(newItems);
1256
+ onReorder?.(newItems);
1257
+ },
1258
+ className: cn$1(getLayoutClassName(), className),
1259
+ style,
1260
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: animatedItems.map((item, index) => /* @__PURE__ */ jsx(
1261
+ Reorder.Item,
1262
+ {
1263
+ value: item,
1264
+ className: cn$1(
1265
+ "cursor-grab active:cursor-grabbing",
1266
+ itemClassName
1267
+ ),
1268
+ whileDrag: { scale: 1.05, zIndex: 10 },
1269
+ children: item.content
1270
+ },
1271
+ item.id
1272
+ )) })
1273
+ }
1274
+ );
1275
+ }
1276
+ if (virtualized) {
1277
+ return /* @__PURE__ */ jsx(
1278
+ "div",
1279
+ {
1280
+ className: cn$1("overflow-auto", className),
1281
+ style: { height: containerHeight, ...style },
1282
+ onScroll: handleScroll,
1283
+ children: /* @__PURE__ */ jsx("div", { style: { height: totalHeight, position: "relative" }, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: visibleItems.map(
1284
+ (item, index) => renderListItem(item, item.virtualIndex || index, item.style)
1285
+ ) }) })
1286
+ }
1287
+ );
1288
+ }
1289
+ return /* @__PURE__ */ jsx(
1290
+ motion.div,
1291
+ {
1292
+ className: cn$1(getLayoutClassName(), className),
1293
+ style,
1294
+ initial: "hidden",
1295
+ animate: "visible",
1296
+ children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: animatedItems.map((item, index) => renderListItem(item, index)) })
1297
+ },
1298
+ animationKey
1299
+ );
1300
+ }
1301
+ __name(AnimatedList, "AnimatedList");
1302
+ function usePrefersReducedMotion4() {
1303
+ const [prefersReducedMotion, setPrefersReducedMotion] = useState(false);
1304
+ useEffect(() => {
1305
+ if (typeof window === "undefined") return;
1306
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
1307
+ setPrefersReducedMotion(mediaQuery.matches);
1308
+ const handleChange = /* @__PURE__ */ __name((event) => {
1309
+ setPrefersReducedMotion(event.matches);
1310
+ }, "handleChange");
1311
+ mediaQuery.addEventListener("change", handleChange);
1312
+ return () => mediaQuery.removeEventListener("change", handleChange);
1313
+ }, []);
1314
+ return prefersReducedMotion;
1315
+ }
1316
+ __name(usePrefersReducedMotion4, "usePrefersReducedMotion");
1317
+ function useAnimatedNumber(targetValue, from, duration, decimals, format, currency, locale, easing, autoStart, useSpringAnim, springConfig, separator) {
1318
+ const [displayValue, setDisplayValue] = useState(from);
1319
+ const [isAnimating, setIsAnimating] = useState(false);
1320
+ const animationRef = useRef(null);
1321
+ const prefersReducedMotion = usePrefersReducedMotion4();
1322
+ const springValue = useSpring(from, {
1323
+ stiffness: springConfig.tension || 100,
1324
+ damping: springConfig.friction || 10,
1325
+ mass: springConfig.mass || 1
1326
+ });
1327
+ const [motionValue, setMotionValue] = useState(from);
1328
+ const startAnimation = useCallback(() => {
1329
+ if (prefersReducedMotion) {
1330
+ setDisplayValue(targetValue);
1331
+ return;
1332
+ }
1333
+ setIsAnimating(true);
1334
+ if (useSpringAnim) {
1335
+ springValue.set(targetValue);
1336
+ } else {
1337
+ const startTime = Date.now();
1338
+ const startValue = displayValue;
1339
+ const distance = targetValue - startValue;
1340
+ const animate = /* @__PURE__ */ __name(() => {
1341
+ const elapsed = Date.now() - startTime;
1342
+ const progress = Math.min(elapsed / duration, 1);
1343
+ const easedProgress = progress;
1344
+ const currentValue = startValue + distance * easedProgress;
1345
+ setDisplayValue(currentValue);
1346
+ setMotionValue(currentValue);
1347
+ if (progress < 1) {
1348
+ animationRef.current = requestAnimationFrame(animate);
1349
+ } else {
1350
+ setIsAnimating(false);
1351
+ animationRef.current = null;
1352
+ }
1353
+ }, "animate");
1354
+ animationRef.current = requestAnimationFrame(animate);
1355
+ }
1356
+ }, [
1357
+ targetValue,
1358
+ displayValue,
1359
+ duration,
1360
+ useSpringAnim,
1361
+ springValue,
1362
+ prefersReducedMotion
1363
+ ]);
1364
+ useEffect(() => {
1365
+ return () => {
1366
+ if (animationRef.current) {
1367
+ cancelAnimationFrame(animationRef.current);
1368
+ }
1369
+ };
1370
+ }, []);
1371
+ useEffect(() => {
1372
+ if (useSpringAnim) {
1373
+ const unsubscribe = springValue.onChange((latest) => {
1374
+ setDisplayValue(latest);
1375
+ if (Math.abs(latest - targetValue) < 0.01) {
1376
+ setIsAnimating(false);
1377
+ }
1378
+ });
1379
+ return () => {
1380
+ unsubscribe();
1381
+ };
1382
+ }
1383
+ }, [springValue, useSpringAnim, targetValue]);
1384
+ useEffect(() => {
1385
+ if (autoStart) {
1386
+ startAnimation();
1387
+ }
1388
+ }, [autoStart, startAnimation]);
1389
+ const formattedValue = useMemo(() => {
1390
+ const roundedValue = Math.round(displayValue * Math.pow(10, decimals)) / Math.pow(10, decimals);
1391
+ try {
1392
+ switch (format) {
1393
+ case "currency":
1394
+ return new Intl.NumberFormat(locale, {
1395
+ style: "currency",
1396
+ currency,
1397
+ minimumFractionDigits: decimals,
1398
+ maximumFractionDigits: decimals
1399
+ }).format(roundedValue);
1400
+ case "percent":
1401
+ return new Intl.NumberFormat(locale, {
1402
+ style: "percent",
1403
+ minimumFractionDigits: decimals,
1404
+ maximumFractionDigits: decimals
1405
+ }).format(roundedValue / 100);
1406
+ default:
1407
+ let formatted = new Intl.NumberFormat(locale, {
1408
+ minimumFractionDigits: decimals,
1409
+ maximumFractionDigits: decimals
1410
+ }).format(roundedValue);
1411
+ if (separator && separator !== ",") {
1412
+ formatted = formatted.replace(/,/g, separator);
1413
+ }
1414
+ return formatted;
1415
+ }
1416
+ } catch (error) {
1417
+ return roundedValue.toFixed(decimals);
1418
+ }
1419
+ }, [displayValue, decimals, format, currency, locale, separator]);
1420
+ return {
1421
+ formattedValue,
1422
+ displayValue,
1423
+ isAnimating,
1424
+ startAnimation
1425
+ };
1426
+ }
1427
+ __name(useAnimatedNumber, "useAnimatedNumber");
1428
+ function AnimatedNumber({
1429
+ value,
1430
+ from = 0,
1431
+ duration = 2e3,
1432
+ decimals = 0,
1433
+ format = "number",
1434
+ currency = "USD",
1435
+ locale = "en-US",
1436
+ easing = "easeOut",
1437
+ autoStart = true,
1438
+ onComplete,
1439
+ className,
1440
+ style,
1441
+ prefix = "",
1442
+ suffix = "",
1443
+ useSpring: useSpring2 = false,
1444
+ springConfig = {},
1445
+ separator,
1446
+ animateOnHover = false,
1447
+ hoverValue
1448
+ }) {
1449
+ const [isHovered, setIsHovered] = useState(false);
1450
+ const [animationKey, setAnimationKey] = useState(0);
1451
+ const currentValue = animateOnHover && isHovered && hoverValue !== void 0 ? hoverValue : value;
1452
+ const { formattedValue, displayValue, isAnimating, startAnimation } = useAnimatedNumber(
1453
+ currentValue,
1454
+ from,
1455
+ duration,
1456
+ decimals,
1457
+ format,
1458
+ currency,
1459
+ locale,
1460
+ easing,
1461
+ autoStart,
1462
+ useSpring2,
1463
+ springConfig,
1464
+ separator
1465
+ );
1466
+ useEffect(() => {
1467
+ if (!isAnimating && onComplete && Math.abs(displayValue - currentValue) < 1e-3) {
1468
+ onComplete(displayValue);
1469
+ }
1470
+ }, [isAnimating, displayValue, currentValue, onComplete]);
1471
+ useEffect(() => {
1472
+ if (animateOnHover && hoverValue !== void 0) {
1473
+ startAnimation();
1474
+ }
1475
+ }, [isHovered, animateOnHover, hoverValue, startAnimation]);
1476
+ const handleMouseEnter = /* @__PURE__ */ __name(() => {
1477
+ if (animateOnHover) {
1478
+ setIsHovered(true);
1479
+ }
1480
+ }, "handleMouseEnter");
1481
+ const handleMouseLeave = /* @__PURE__ */ __name(() => {
1482
+ if (animateOnHover) {
1483
+ setIsHovered(false);
1484
+ }
1485
+ }, "handleMouseLeave");
1486
+ const prefersReducedMotion = usePrefersReducedMotion4();
1487
+ return /* @__PURE__ */ jsxs(
1488
+ motion.span,
1489
+ {
1490
+ className: cn$1("inline-block tabular-nums", className),
1491
+ style,
1492
+ onMouseEnter: handleMouseEnter,
1493
+ onMouseLeave: handleMouseLeave,
1494
+ initial: { scale: 1 },
1495
+ animate: !prefersReducedMotion && isAnimating ? { scale: [1, 1.05, 1] } : { scale: 1 },
1496
+ transition: { duration: 0.3 },
1497
+ children: [
1498
+ prefix,
1499
+ /* @__PURE__ */ jsx(
1500
+ motion.span,
1501
+ {
1502
+ initial: { opacity: 0, y: 20 },
1503
+ animate: { opacity: 1, y: 0 },
1504
+ transition: { duration: 0.3 },
1505
+ children: formattedValue
1506
+ },
1507
+ animationKey
1508
+ ),
1509
+ suffix
1510
+ ]
1511
+ }
1512
+ );
1513
+ }
1514
+ __name(AnimatedNumber, "AnimatedNumber");
1515
+ var AnimatedTestimonials = React9.forwardRef(
1516
+ ({ className, testimonials, autoPlay = true, duration = 5e3, ...props }, ref) => {
1517
+ const [activeIndex, setActiveIndex] = React9.useState(0);
1518
+ React9.useEffect(() => {
1519
+ if (!autoPlay) return;
1520
+ const interval = setInterval(() => {
1521
+ setActiveIndex((prev) => (prev + 1) % testimonials.length);
1522
+ }, duration);
1523
+ return () => clearInterval(interval);
1524
+ }, [autoPlay, duration, testimonials.length]);
1525
+ return /* @__PURE__ */ jsxs(
1526
+ "div",
1527
+ {
1528
+ ref,
1529
+ className: cn("relative min-h-[200px]", className),
1530
+ ...props,
1531
+ children: [
1532
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
1533
+ motion.div,
1534
+ {
1535
+ initial: { opacity: 0, y: 20 },
1536
+ animate: { opacity: 1, y: 0 },
1537
+ exit: { opacity: 0, y: -20 },
1538
+ transition: { duration: 0.5 },
1539
+ children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "pt-6", children: /* @__PURE__ */ jsxs("blockquote", { className: "space-y-4", children: [
1540
+ /* @__PURE__ */ jsxs("p", { className: "text-lg italic", children: [
1541
+ '"',
1542
+ testimonials[activeIndex].content,
1543
+ '"'
1544
+ ] }),
1545
+ /* @__PURE__ */ jsxs("footer", { className: "flex items-center gap-4", children: [
1546
+ /* @__PURE__ */ jsxs(Avatar, { children: [
1547
+ /* @__PURE__ */ jsx(AvatarImage, { src: testimonials[activeIndex].avatar }),
1548
+ /* @__PURE__ */ jsx(AvatarFallback, { children: testimonials[activeIndex].author.slice(0, 2).toUpperCase() })
1549
+ ] }),
1550
+ /* @__PURE__ */ jsxs("div", { children: [
1551
+ /* @__PURE__ */ jsx("cite", { className: "not-italic font-medium", children: testimonials[activeIndex].author }),
1552
+ testimonials[activeIndex].role && /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
1553
+ testimonials[activeIndex].role,
1554
+ testimonials[activeIndex].company && `, ${testimonials[activeIndex].company}`
1555
+ ] })
1556
+ ] })
1557
+ ] })
1558
+ ] }) }) })
1559
+ },
1560
+ activeIndex
1561
+ ) }),
1562
+ /* @__PURE__ */ jsx("div", { className: "mt-4 flex justify-center gap-2", children: testimonials.map((_, index) => /* @__PURE__ */ jsx(
1563
+ "button",
1564
+ {
1565
+ onClick: () => setActiveIndex(index),
1566
+ className: cn(
1567
+ "h-2 w-2 rounded-full transition-all",
1568
+ index === activeIndex ? "w-8 bg-primary" : "bg-muted hover:bg-muted-foreground"
1569
+ ),
1570
+ "aria-label": `Go to testimonial ${index + 1}`
1571
+ },
1572
+ index
1573
+ )) })
1574
+ ]
1575
+ }
1576
+ );
1577
+ }
1578
+ );
1579
+ AnimatedTestimonials.displayName = "AnimatedTestimonials";
1580
+ var AnimatedTooltip = React9.forwardRef(
1581
+ ({ className, content, children, delay = 0, ...props }, ref) => {
1582
+ const [isVisible, setIsVisible] = React9.useState(false);
1583
+ return /* @__PURE__ */ jsxs(
1584
+ "div",
1585
+ {
1586
+ ref,
1587
+ className: cn("relative inline-block", className),
1588
+ onMouseEnter: () => setIsVisible(true),
1589
+ onMouseLeave: () => setIsVisible(false),
1590
+ ...props,
1591
+ children: [
1592
+ children,
1593
+ /* @__PURE__ */ jsx(AnimatePresence$1, { children: isVisible && /* @__PURE__ */ jsxs(
1594
+ motion$1.div,
1595
+ {
1596
+ initial: { opacity: 0, y: 10, scale: 0.95 },
1597
+ animate: { opacity: 1, y: 0, scale: 1 },
1598
+ exit: { opacity: 0, y: 10, scale: 0.95 },
1599
+ transition: {
1600
+ duration: 0.2,
1601
+ delay: delay / 1e3,
1602
+ ease: "easeOut"
1603
+ },
1604
+ className: "absolute left-1/2 -translate-x-1/2 bottom-full mb-2 px-3 py-1.5 bg-popover text-popover-foreground text-sm rounded-md shadow-md whitespace-nowrap z-50",
1605
+ children: [
1606
+ content,
1607
+ /* @__PURE__ */ jsx("div", { className: "absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-popover" })
1608
+ ]
1609
+ }
1610
+ ) })
1611
+ ]
1612
+ }
1613
+ );
1614
+ }
1615
+ );
1616
+ AnimatedTooltip.displayName = "AnimatedTooltip";
1617
+ function AppleCardsCarousel({
1618
+ cards,
1619
+ autoPlay = false,
1620
+ autoPlayInterval = 5e3,
1621
+ className,
1622
+ cardClassName,
1623
+ showArrows = true,
1624
+ showDots = true,
1625
+ parallaxOffset = 50,
1626
+ stackOffset = 10,
1627
+ stackScale = 0.95,
1628
+ swipeThreshold = 50
1629
+ }) {
1630
+ const [currentIndex, setCurrentIndex] = React9.useState(0);
1631
+ const [isAutoPlaying, setIsAutoPlaying] = React9.useState(autoPlay);
1632
+ const containerRef = React9.useRef(null);
1633
+ const dragX = useMotionValue(0);
1634
+ const getCardStyle = /* @__PURE__ */ __name((index) => {
1635
+ const offset = index - currentIndex;
1636
+ const absOffset = Math.abs(offset);
1637
+ if (absOffset > 2) {
1638
+ return {
1639
+ display: "none",
1640
+ x: 0,
1641
+ scale: 1,
1642
+ opacity: 0,
1643
+ zIndex: 0
1644
+ };
1645
+ }
1646
+ const baseX = offset * stackOffset;
1647
+ const scale = Math.pow(stackScale, absOffset);
1648
+ const opacity = Math.max(0, 1 - absOffset * 0.3);
1649
+ const zIndex = cards.length - absOffset;
1650
+ return {
1651
+ display: "block",
1652
+ x: baseX,
1653
+ scale,
1654
+ opacity,
1655
+ zIndex
1656
+ };
1657
+ }, "getCardStyle");
1658
+ const goToNext = React9.useCallback(() => {
1659
+ setCurrentIndex((prev) => (prev + 1) % cards.length);
1660
+ }, [cards.length]);
1661
+ const goToPrevious = React9.useCallback(() => {
1662
+ setCurrentIndex((prev) => (prev - 1 + cards.length) % cards.length);
1663
+ }, [cards.length]);
1664
+ const goToCard = React9.useCallback((index) => {
1665
+ setCurrentIndex(index);
1666
+ }, []);
1667
+ const handleDragEnd = React9.useCallback(
1668
+ (event, info) => {
1669
+ const { offset, velocity } = info;
1670
+ if (Math.abs(offset.x) > swipeThreshold || Math.abs(velocity.x) > 500) {
1671
+ if (offset.x > 0) {
1672
+ goToPrevious();
1673
+ } else {
1674
+ goToNext();
1675
+ }
1676
+ }
1677
+ },
1678
+ [goToNext, goToPrevious, swipeThreshold]
1679
+ );
1680
+ React9.useEffect(() => {
1681
+ if (!isAutoPlaying) return;
1682
+ const interval = setInterval(goToNext, autoPlayInterval);
1683
+ return () => clearInterval(interval);
1684
+ }, [isAutoPlaying, goToNext, autoPlayInterval]);
1685
+ const handleMouseEnter = React9.useCallback(() => {
1686
+ if (autoPlay) {
1687
+ setIsAutoPlaying(false);
1688
+ }
1689
+ }, [autoPlay]);
1690
+ const handleMouseLeave = React9.useCallback(() => {
1691
+ if (autoPlay) {
1692
+ setIsAutoPlaying(true);
1693
+ }
1694
+ }, [autoPlay]);
1695
+ React9.useEffect(() => {
1696
+ const handleKeyDown = /* @__PURE__ */ __name((e) => {
1697
+ if (e.key === "ArrowLeft") {
1698
+ goToPrevious();
1699
+ } else if (e.key === "ArrowRight") {
1700
+ goToNext();
1701
+ }
1702
+ }, "handleKeyDown");
1703
+ window.addEventListener("keydown", handleKeyDown);
1704
+ return () => window.removeEventListener("keydown", handleKeyDown);
1705
+ }, [goToNext, goToPrevious]);
1706
+ return /* @__PURE__ */ jsxs(
1707
+ "div",
1708
+ {
1709
+ ref: containerRef,
1710
+ className: cn("relative w-full max-w-6xl mx-auto px-4 py-8", className),
1711
+ onMouseEnter: handleMouseEnter,
1712
+ onMouseLeave: handleMouseLeave,
1713
+ children: [
1714
+ /* @__PURE__ */ jsx("div", { className: "relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center", children: /* @__PURE__ */ jsx(AnimatePresence$1, { mode: "popLayout", children: cards.map((card, index) => {
1715
+ const style = getCardStyle(index);
1716
+ const isActive = index === currentIndex;
1717
+ return /* @__PURE__ */ jsx(
1718
+ motion$1.div,
1719
+ {
1720
+ className: cn(
1721
+ "absolute inset-0 w-full h-full",
1722
+ !isActive && "pointer-events-none"
1723
+ ),
1724
+ initial: false,
1725
+ animate: {
1726
+ x: style.x,
1727
+ scale: style.scale,
1728
+ opacity: style.opacity,
1729
+ zIndex: style.zIndex
1730
+ },
1731
+ transition: {
1732
+ type: "spring",
1733
+ stiffness: 300,
1734
+ damping: 30
1735
+ },
1736
+ drag: isActive ? "x" : false,
1737
+ dragSnapToOrigin: true,
1738
+ dragElastic: 0.2,
1739
+ onDragEnd: handleDragEnd,
1740
+ whileDrag: { cursor: "grabbing" },
1741
+ style: {
1742
+ x: dragX,
1743
+ display: style.display
1744
+ },
1745
+ children: /* @__PURE__ */ jsxs(
1746
+ Card,
1747
+ {
1748
+ className: cn(
1749
+ "relative w-full h-full overflow-hidden cursor-grab",
1750
+ "bg-gradient-to-br from-white to-gray-50 dark:from-gray-900 dark:to-gray-950",
1751
+ "shadow-2xl hover:shadow-3xl transition-shadow duration-300",
1752
+ cardClassName
1753
+ ),
1754
+ style: {
1755
+ background: card.gradient
1756
+ },
1757
+ children: [
1758
+ card.image && /* @__PURE__ */ jsxs(
1759
+ motion$1.div,
1760
+ {
1761
+ className: "absolute inset-0 w-full h-full",
1762
+ style: {
1763
+ x: useTransform(
1764
+ dragX,
1765
+ [-200, 0, 200],
1766
+ [parallaxOffset, 0, -parallaxOffset]
1767
+ )
1768
+ },
1769
+ children: [
1770
+ /* @__PURE__ */ jsx(
1771
+ "img",
1772
+ {
1773
+ src: card.image,
1774
+ alt: card.title,
1775
+ className: "w-full h-full object-cover"
1776
+ }
1777
+ ),
1778
+ /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent" })
1779
+ ]
1780
+ }
1781
+ ),
1782
+ /* @__PURE__ */ jsx("div", { className: "relative z-10 flex flex-col justify-end h-full p-8 md:p-12", children: card.content ? card.content : /* @__PURE__ */ jsxs(Fragment, { children: [
1783
+ /* @__PURE__ */ jsx(
1784
+ motion$1.h3,
1785
+ {
1786
+ className: "text-3xl md:text-4xl lg:text-5xl font-bold text-white mb-2",
1787
+ initial: { opacity: 0, y: 20 },
1788
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1789
+ transition: { delay: 0.1 },
1790
+ children: card.title
1791
+ }
1792
+ ),
1793
+ card.subtitle && /* @__PURE__ */ jsx(
1794
+ motion$1.p,
1795
+ {
1796
+ className: "text-xl md:text-2xl text-white/80 mb-4",
1797
+ initial: { opacity: 0, y: 20 },
1798
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1799
+ transition: { delay: 0.2 },
1800
+ children: card.subtitle
1801
+ }
1802
+ ),
1803
+ card.description && /* @__PURE__ */ jsx(
1804
+ motion$1.p,
1805
+ {
1806
+ className: "text-base md:text-lg text-white/70 max-w-2xl",
1807
+ initial: { opacity: 0, y: 20 },
1808
+ animate: { opacity: isActive ? 1 : 0.7, y: 0 },
1809
+ transition: { delay: 0.3 },
1810
+ children: card.description
1811
+ }
1812
+ )
1813
+ ] }) })
1814
+ ]
1815
+ }
1816
+ )
1817
+ },
1818
+ card.id
1819
+ );
1820
+ }) }) }),
1821
+ showArrows && /* @__PURE__ */ jsxs(Fragment, { children: [
1822
+ /* @__PURE__ */ jsxs(
1823
+ Button,
1824
+ {
1825
+ variant: "ghost",
1826
+ size: "icon",
1827
+ className: cn(
1828
+ "absolute left-4 top-1/2 -translate-y-1/2 z-20",
1829
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
1830
+ "text-white border border-white/20",
1831
+ "hidden md:flex"
1832
+ ),
1833
+ onClick: goToPrevious,
1834
+ children: [
1835
+ /* @__PURE__ */ jsx(ChevronLeft, { className: "h-6 w-6" }),
1836
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Previous card" })
1837
+ ]
1838
+ }
1839
+ ),
1840
+ /* @__PURE__ */ jsxs(
1841
+ Button,
1842
+ {
1843
+ variant: "ghost",
1844
+ size: "icon",
1845
+ className: cn(
1846
+ "absolute right-4 top-1/2 -translate-y-1/2 z-20",
1847
+ "bg-white/10 backdrop-blur-md hover:bg-white/20",
1848
+ "text-white border border-white/20",
1849
+ "hidden md:flex"
1850
+ ),
1851
+ onClick: goToNext,
1852
+ children: [
1853
+ /* @__PURE__ */ jsx(ChevronRight, { className: "h-6 w-6" }),
1854
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Next card" })
1855
+ ]
1856
+ }
1857
+ )
1858
+ ] }),
1859
+ showDots && /* @__PURE__ */ jsx("div", { className: "absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2", children: cards.map((_, index) => /* @__PURE__ */ jsx(
1860
+ "button",
1861
+ {
1862
+ className: cn(
1863
+ "w-2 h-2 rounded-full transition-all duration-300",
1864
+ "bg-white/40 hover:bg-white/60",
1865
+ index === currentIndex && "w-8 bg-white"
1866
+ ),
1867
+ onClick: () => goToCard(index),
1868
+ children: /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
1869
+ "Go to card ",
1870
+ index + 1
1871
+ ] })
1872
+ },
1873
+ index
1874
+ )) })
1875
+ ]
1876
+ }
1877
+ );
1878
+ }
1879
+ __name(AppleCardsCarousel, "AppleCardsCarousel");
1880
+ var gradientPresets = {
1881
+ sunset: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
1882
+ ocean: "linear-gradient(135deg, #667eea 0%, #4ca1af 100%)",
1883
+ fire: "linear-gradient(135deg, #f093fb 0%, #f5576c 100%)",
1884
+ forest: "linear-gradient(135deg, #4facfe 0%, #00f2fe 100%)",
1885
+ galaxy: "linear-gradient(135deg, #7303c0 0%, #ec38bc 50%, #fdeff9 100%)",
1886
+ aurora: "linear-gradient(135deg, #89f7fe 0%, #66a6ff 100%)",
1887
+ peach: "linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%)",
1888
+ lavender: "linear-gradient(135deg, #a8edea 0%, #fed6e3 100%)"
1889
+ };
1890
+ var AppleHelloEffect = React9.forwardRef(({ className, text = "Hello", duration = 2, ...props }, ref) => {
1891
+ const letters = text.split("");
1892
+ return /* @__PURE__ */ jsx(
1893
+ "div",
1894
+ {
1895
+ ref,
1896
+ className: cn(
1897
+ "relative flex items-center justify-center text-6xl font-bold",
1898
+ className
1899
+ ),
1900
+ ...props,
1901
+ children: letters.map((letter, index) => /* @__PURE__ */ jsx(
1902
+ motion$1.span,
1903
+ {
1904
+ initial: { opacity: 0, y: 50 },
1905
+ animate: { opacity: 1, y: 0 },
1906
+ transition: {
1907
+ duration,
1908
+ delay: index * 0.1,
1909
+ ease: [0.215, 0.61, 0.355, 1]
1910
+ },
1911
+ className: "inline-block",
1912
+ children: letter
1913
+ },
1914
+ index
1915
+ ))
1916
+ }
1917
+ );
1918
+ });
1919
+ AppleHelloEffect.displayName = "AppleHelloEffect";
1920
+
1921
+ export { AnimatedBackground, AnimatedBeam, AnimatedCursor, AnimatedIcon, AnimatedList, AnimatedNumber, AnimatedTestimonials, AnimatedTooltip, AppleCardsCarousel, AppleHelloEffect, gradientPresets };