@hanzo/ui 5.6.0 → 5.7.1

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 (73) hide show
  1. package/dist/3d/carousel.js +1 -1
  2. package/dist/3d/carousel.mjs +1 -1
  3. package/dist/animation/animated-background.js +1 -1
  4. package/dist/animation/animated-background.mjs +1 -1
  5. package/dist/animation/animated-icon.js +2 -2
  6. package/dist/animation/animated-icon.mjs +2 -2
  7. package/dist/animation/animated-list.js +1 -1
  8. package/dist/animation/animated-list.mjs +1 -1
  9. package/dist/animation/animated-number.js +1 -1
  10. package/dist/animation/animated-number.mjs +1 -1
  11. package/dist/animation/index.js +2 -2
  12. package/dist/animation/index.mjs +2 -2
  13. package/dist/auth/index.js +2 -2
  14. package/dist/auth/index.mjs +2 -2
  15. package/dist/billing/index.js +2 -2
  16. package/dist/billing/index.mjs +2 -2
  17. package/dist/drawer.js +1 -1
  18. package/dist/drawer.mjs +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/index.mjs +1 -1
  21. package/dist/models/index.js +1 -1
  22. package/dist/models/index.mjs +1 -1
  23. package/dist/navigation/hanzo-shell.js +1 -1
  24. package/dist/navigation/hanzo-shell.mjs +1 -1
  25. package/dist/navigation/index.js +2 -2
  26. package/dist/navigation/index.mjs +2 -2
  27. package/dist/primitives/drawer.d.ts +2 -2
  28. package/dist/primitives/drawer.d.ts.map +1 -1
  29. package/dist/primitives/form.d.ts +1 -1
  30. package/dist/primitives/form.d.ts.map +1 -1
  31. package/dist/primitives/resizable.d.ts +18 -2
  32. package/dist/primitives/resizable.d.ts.map +1 -1
  33. package/dist/primitives/resizable.js +1 -1
  34. package/dist/resizable.js +1 -1
  35. package/dist/resizable.mjs +1 -1
  36. package/dist/src/auth/AuthGuard.d.ts.map +1 -1
  37. package/dist/src/auth/AuthGuard.js +3 -7
  38. package/dist/src/auth/IAMLoginButton.d.ts +10 -3
  39. package/dist/src/auth/IAMLoginButton.d.ts.map +1 -1
  40. package/dist/src/auth/IAMLoginButton.js +14 -19
  41. package/dist/src/auth/PasswordForm.d.ts +22 -0
  42. package/dist/src/auth/PasswordForm.d.ts.map +1 -0
  43. package/dist/src/auth/PasswordForm.js +28 -0
  44. package/dist/src/auth/SignIn.d.ts +37 -0
  45. package/dist/src/auth/SignIn.d.ts.map +1 -0
  46. package/dist/src/auth/SignIn.js +26 -0
  47. package/dist/src/auth/SocialButton.d.ts +27 -0
  48. package/dist/src/auth/SocialButton.d.ts.map +1 -0
  49. package/dist/src/auth/SocialButton.js +37 -0
  50. package/dist/src/auth/Web3Connect.d.ts +9 -0
  51. package/dist/src/auth/Web3Connect.d.ts.map +1 -0
  52. package/dist/src/auth/Web3Connect.js +11 -0
  53. package/dist/src/auth/iam.d.ts +56 -0
  54. package/dist/src/auth/iam.d.ts.map +1 -0
  55. package/dist/src/auth/iam.js +78 -0
  56. package/dist/src/auth/index.d.ts +11 -0
  57. package/dist/src/auth/index.d.ts.map +1 -1
  58. package/dist/src/auth/index.js +9 -0
  59. package/dist/src/auth/types.d.ts +43 -0
  60. package/dist/src/auth/types.d.ts.map +1 -0
  61. package/dist/src/auth/types.js +8 -0
  62. package/dist/src/billing/components/payment-manager.d.ts.map +1 -1
  63. package/dist/src/billing/components/payment-manager.js +13 -1
  64. package/dist/src/form/form.d.ts +4 -2
  65. package/dist/src/form/form.d.ts.map +1 -1
  66. package/dist/src/models/ModelCard.js +2 -2
  67. package/dist/src/navigation/hanzo-shell/AppSwitcher.js +1 -1
  68. package/dist/src/navigation/hanzo-shell/types.d.ts +1 -0
  69. package/dist/src/navigation/hanzo-shell/types.d.ts.map +1 -1
  70. package/dist/src/navigation/hanzo-shell/types.js +11 -0
  71. package/dist/src/navigation/hanzo-shell/useHanzoAuth.js +2 -2
  72. package/dist/util/index.mjs +1 -1
  73. package/package.json +8 -16
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';var t=require('react'),lucideReact=require('lucide-react'),utils=require('@hanzo/ui/lib/utils'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var B=Object.defineProperty;var $=(s,n)=>B(s,"name",{value:n,configurable:true});var W=t__namespace.forwardRef(({items:s,itemWidth:n=300,itemHeight:l=400,spacing:c=80,perspective:A=1e3,rotateY:ne=40,autoRotate:w=false,autoRotateSpeed:E=3e3,showControls:Y=true,infinite:i=true,className:X,...z},O)=>{let m=t__namespace.useRef(null),[f,v]=t__namespace.useState(0),[R,L]=t__namespace.useState(false),[d,H]=t__namespace.useState(false),[S,K]=t__namespace.useState({x:0,y:0}),[C,x]=t__namespace.useState(0),b=t__namespace.useRef(void 0),o=s.length,I=(n+c)/2/Math.tan(Math.PI/o);t__namespace.useEffect(()=>(w&&!R&&!d?b.current=setInterval(()=>{v(e=>(e+1)%o);},E):b.current&&clearInterval(b.current),()=>{b.current&&clearInterval(b.current);}),[w,R,d,E,o]);let g=t__namespace.useCallback(()=>{v(e=>i?(e-1+o)%o:Math.max(0,e-1));},[i,o]),p=t__namespace.useCallback(()=>{v(e=>i?(e+1)%o:Math.min(o-1,e+1));},[i,o]),y=t__namespace.useCallback(e=>{v(Math.max(0,Math.min(o-1,e)));},[o]),D=t__namespace.useCallback((e,a)=>{H(true),K({x:e,y:a}),x(0);},[]),M=t__namespace.useCallback((e,a)=>{if(!d)return;let T=(e-S.x)*.5;x(T);},[d,S.x]),k=t__namespace.useCallback(()=>{if(!d)return;Math.abs(C)>50&&(C>0?g():p()),H(false),x(0);},[d,C,g,p]),U=t__namespace.useCallback(e=>{e.preventDefault(),D(e.clientX,e.clientY);},[D]),Z=t__namespace.useCallback(e=>{M(e.clientX,e.clientY);},[M]),j=t__namespace.useCallback(()=>{k();},[k]),G=t__namespace.useCallback(e=>{if(e.touches.length===1){let a=e.touches[0];D(a.clientX,a.clientY);}},[D]),J=t__namespace.useCallback(e=>{if(e.touches.length===1){e.preventDefault();let a=e.touches[0];M(a.clientX,a.clientY);}},[M]),V=t__namespace.useCallback(()=>{k();},[k]);t__namespace.useEffect(()=>{let e=$(a=>{if(a.key==="ArrowLeft")a.preventDefault(),g();else if(a.key==="ArrowRight")a.preventDefault(),p();else if(a.key>="1"&&a.key<="9"){let h=parseInt(a.key)-1;h<o&&y(h);}},"handleKeyDown");if(m.current)return m.current.addEventListener("keydown",e),()=>{m.current?.removeEventListener("keydown",e);}},[g,p,y,o]),t__namespace.useImperativeHandle(O,()=>m.current);let _={perspective:`${A}px`,height:`${l+100}px`},q={transform:`translateZ(-${I}px) rotateY(${-f*(360/o)+C/5}deg)`,transition:d?"none":"transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1)",transformStyle:"preserve-3d"};return jsxRuntime.jsxs("div",{ref:m,className:utils.cn("relative w-full select-none focus:outline-none",X),style:_,onMouseEnter:()=>L(true),onMouseLeave:()=>L(false),onMouseDown:U,onMouseMove:Z,onMouseUp:j,onTouchStart:G,onTouchMove:J,onTouchEnd:V,tabIndex:0,...z,children:[jsxRuntime.jsx("div",{className:"relative mx-auto",style:{width:`${n}px`,height:`${l}px`,transformStyle:"preserve-3d"},children:jsxRuntime.jsx("div",{className:"absolute inset-0",style:q,children:s.map((e,a)=>{let h=a/o*360,P=a===f,T={transform:`rotateY(${h}deg) translateZ(${I}px)`,width:`${n}px`,height:`${l}px`,position:"absolute",backfaceVisibility:"hidden",transformStyle:"preserve-3d"};return jsxRuntime.jsx("div",{className:utils.cn("rounded-lg border bg-card text-card-foreground shadow-lg cursor-pointer","transition-all duration-300 transform-gpu will-change-transform",P&&"ring-2 ring-primary ring-offset-2"),style:T,onClick:()=>y(a),children:jsxRuntime.jsx("div",{className:"w-full h-full overflow-hidden rounded-lg",children:e.content})},e.id)})})}),Y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{className:utils.cn("absolute left-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:g,disabled:!i&&f===0,"aria-label":"Previous item",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{className:utils.cn("absolute right-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:p,disabled:!i&&f===o-1,"aria-label":"Next item",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-5 h-5"})})]}),jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",children:jsxRuntime.jsx("div",{className:"flex space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-lg",children:s.map((e,a)=>jsxRuntime.jsx("button",{className:utils.cn("w-2 h-2 rounded-full transition-all",a===f?"bg-primary scale-125":"bg-muted-foreground/50 hover:bg-muted-foreground/75"),onClick:()=>y(a),"aria-label":`Go to item ${a+1}`},a))})}),w&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm",children:[jsxRuntime.jsx("div",{className:utils.cn("w-2 h-2 rounded-full transition-all",R||d?"bg-orange-500":"bg-green-500 animate-pulse")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:R||d?"Paused":"Auto"})]})})]})});W.displayName="Carousel3D";var ee=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("div",{ref:c,className:utils.cn("w-full h-full flex flex-col bg-gradient-to-br from-background to-muted/20","border rounded-lg overflow-hidden group",s),...l,children:n}));ee.displayName="Carousel3DCard";var te=t__namespace.forwardRef(({className:s,alt:n,...l},c)=>jsxRuntime.jsx("img",{ref:c,className:utils.cn("w-full h-48 object-cover transition-transform duration-300","group-hover:scale-105",s),alt:n,...l}));te.displayName="Carousel3DCardImage";var ae=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("div",{ref:c,className:utils.cn("flex-1 p-4 flex flex-col justify-between",s),...l,children:n}));ae.displayName="Carousel3DCardContent";var re=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("h3",{ref:c,className:utils.cn("font-semibold text-lg mb-2 line-clamp-2",s),...l,children:n}));re.displayName="Carousel3DCardTitle";var oe=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("p",{ref:c,className:utils.cn("text-sm text-muted-foreground line-clamp-3 mb-4",s),...l,children:n}));oe.displayName="Carousel3DCardDescription";exports.Carousel3D=W;exports.Carousel3DCard=ee;exports.Carousel3DCardContent=ae;exports.Carousel3DCardDescription=oe;exports.Carousel3DCardImage=te;exports.Carousel3DCardTitle=re;
2
+ 'use strict';var t=require('react'),lucideReact=require('lucide-react'),utils=require('@hanzo/ui/lib/utils'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);var F=Object.defineProperty;var $=(s,n)=>F(s,"name",{value:n,configurable:true});var W=t__namespace.forwardRef(({items:s,itemWidth:n=300,itemHeight:l=400,spacing:c=80,perspective:A=1e3,rotateY:ne=40,autoRotate:w=false,autoRotateSpeed:E=3e3,showControls:Y=true,infinite:i=true,className:X,...z},O)=>{let m=t__namespace.useRef(null),[f,v]=t__namespace.useState(0),[R,L]=t__namespace.useState(false),[d,H]=t__namespace.useState(false),[I,K]=t__namespace.useState({x:0,y:0}),[C,x]=t__namespace.useState(0),b=t__namespace.useRef(void 0),o=s.length,S=(n+c)/2/Math.tan(Math.PI/o);t__namespace.useEffect(()=>(w&&!R&&!d?b.current=setInterval(()=>{v(e=>(e+1)%o);},E):b.current&&clearInterval(b.current),()=>{b.current&&clearInterval(b.current);}),[w,R,d,E,o]);let g=t__namespace.useCallback(()=>{v(e=>i?(e-1+o)%o:Math.max(0,e-1));},[i,o]),p=t__namespace.useCallback(()=>{v(e=>i?(e+1)%o:Math.min(o-1,e+1));},[i,o]),y=t__namespace.useCallback(e=>{v(Math.max(0,Math.min(o-1,e)));},[o]),D=t__namespace.useCallback((e,a)=>{H(true),K({x:e,y:a}),x(0);},[]),M=t__namespace.useCallback((e,a)=>{if(!d)return;let T=(e-I.x)*.5;x(T);},[d,I.x]),k=t__namespace.useCallback(()=>{if(!d)return;Math.abs(C)>50&&(C>0?g():p()),H(false),x(0);},[d,C,g,p]),U=t__namespace.useCallback(e=>{e.preventDefault(),D(e.clientX,e.clientY);},[D]),Z=t__namespace.useCallback(e=>{M(e.clientX,e.clientY);},[M]),j=t__namespace.useCallback(()=>{k();},[k]),G=t__namespace.useCallback(e=>{if(e.touches.length===1){let a=e.touches[0];D(a.clientX,a.clientY);}},[D]),V=t__namespace.useCallback(e=>{if(e.touches.length===1){e.preventDefault();let a=e.touches[0];M(a.clientX,a.clientY);}},[M]),_=t__namespace.useCallback(()=>{k();},[k]);t__namespace.useEffect(()=>{let e=$(a=>{if(a.key==="ArrowLeft")a.preventDefault(),g();else if(a.key==="ArrowRight")a.preventDefault(),p();else if(a.key>="1"&&a.key<="9"){let h=parseInt(a.key)-1;h<o&&y(h);}},"handleKeyDown");if(m.current)return m.current.addEventListener("keydown",e),()=>{m.current?.removeEventListener("keydown",e);}},[g,p,y,o]),t__namespace.useImperativeHandle(O,()=>m.current);let q={perspective:`${A}px`,height:`${l+100}px`},B={transform:`translateZ(-${S}px) rotateY(${-f*(360/o)+C/5}deg)`,transition:d?"none":"transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1)",transformStyle:"preserve-3d"};return jsxRuntime.jsxs("div",{ref:m,className:utils.cn("relative w-full select-none focus:outline-none",X),style:q,onMouseEnter:()=>L(true),onMouseLeave:()=>L(false),onMouseDown:U,onMouseMove:Z,onMouseUp:j,onTouchStart:G,onTouchMove:V,onTouchEnd:_,tabIndex:0,...z,children:[jsxRuntime.jsx("div",{className:"relative mx-auto",style:{width:`${n}px`,height:`${l}px`,transformStyle:"preserve-3d"},children:jsxRuntime.jsx("div",{className:"absolute inset-0",style:B,children:s.map((e,a)=>{let h=a/o*360,P=a===f,T={transform:`rotateY(${h}deg) translateZ(${S}px)`,width:`${n}px`,height:`${l}px`,position:"absolute",backfaceVisibility:"hidden",transformStyle:"preserve-3d"};return jsxRuntime.jsx("div",{className:utils.cn("rounded-lg border bg-card text-card-foreground shadow-lg cursor-pointer","transition-all duration-300 transform-gpu will-change-transform",P&&"ring-2 ring-primary ring-offset-2"),style:T,onClick:()=>y(a),children:jsxRuntime.jsx("div",{className:"w-full h-full overflow-hidden rounded-lg",children:e.content})},e.id)})})}),Y&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("button",{className:utils.cn("absolute left-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:g,disabled:!i&&f===0,"aria-label":"Previous item",children:jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"w-5 h-5"})}),jsxRuntime.jsx("button",{className:utils.cn("absolute right-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:p,disabled:!i&&f===o-1,"aria-label":"Next item",children:jsxRuntime.jsx(lucideReact.ChevronRight,{className:"w-5 h-5"})})]}),jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",children:jsxRuntime.jsx("div",{className:"flex space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-lg",children:s.map((e,a)=>jsxRuntime.jsx("button",{className:utils.cn("w-2 h-2 rounded-full transition-all",a===f?"bg-primary scale-125":"bg-muted-foreground/50 hover:bg-muted-foreground/75"),onClick:()=>y(a),"aria-label":`Go to item ${a+1}`},a))})}),w&&jsxRuntime.jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxRuntime.jsxs("div",{className:"flex items-center space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm",children:[jsxRuntime.jsx("div",{className:utils.cn("w-2 h-2 rounded-full transition-all",R||d?"bg-orange-500":"bg-green-500 animate-pulse")}),jsxRuntime.jsx("span",{className:"text-xs text-muted-foreground",children:R||d?"Paused":"Auto"})]})})]})});W.displayName="Carousel3D";var ee=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("div",{ref:c,className:utils.cn("w-full h-full flex flex-col bg-gradient-to-br from-background to-muted/20","border rounded-lg overflow-hidden group",s),...l,children:n}));ee.displayName="Carousel3DCard";var te=t__namespace.forwardRef(({className:s,alt:n,...l},c)=>jsxRuntime.jsx("img",{ref:c,className:utils.cn("w-full h-48 object-cover transition-transform duration-300","group-hover:scale-105",s),alt:n,...l}));te.displayName="Carousel3DCardImage";var ae=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("div",{ref:c,className:utils.cn("flex-1 p-4 flex flex-col justify-between",s),...l,children:n}));ae.displayName="Carousel3DCardContent";var re=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("h3",{ref:c,className:utils.cn("font-semibold text-lg mb-2 line-clamp-2",s),...l,children:n}));re.displayName="Carousel3DCardTitle";var oe=t__namespace.forwardRef(({className:s,children:n,...l},c)=>jsxRuntime.jsx("p",{ref:c,className:utils.cn("text-sm text-muted-foreground line-clamp-3 mb-4",s),...l,children:n}));oe.displayName="Carousel3DCardDescription";exports.Carousel3D=W;exports.Carousel3DCard=ee;exports.Carousel3DCardContent=ae;exports.Carousel3DCardDescription=oe;exports.Carousel3DCardImage=te;exports.Carousel3DCardTitle=re;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import*as t from'react';import {ChevronLeft,ChevronRight}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var B=Object.defineProperty;var $=(s,n)=>B(s,"name",{value:n,configurable:true});var W=t.forwardRef(({items:s,itemWidth:n=300,itemHeight:l=400,spacing:c=80,perspective:A=1e3,rotateY:ne=40,autoRotate:w=false,autoRotateSpeed:E=3e3,showControls:Y=true,infinite:i=true,className:X,...z},O)=>{let m=t.useRef(null),[f,v]=t.useState(0),[R,L]=t.useState(false),[d,H]=t.useState(false),[S,K]=t.useState({x:0,y:0}),[C,x]=t.useState(0),b=t.useRef(void 0),o=s.length,I=(n+c)/2/Math.tan(Math.PI/o);t.useEffect(()=>(w&&!R&&!d?b.current=setInterval(()=>{v(e=>(e+1)%o);},E):b.current&&clearInterval(b.current),()=>{b.current&&clearInterval(b.current);}),[w,R,d,E,o]);let g=t.useCallback(()=>{v(e=>i?(e-1+o)%o:Math.max(0,e-1));},[i,o]),p=t.useCallback(()=>{v(e=>i?(e+1)%o:Math.min(o-1,e+1));},[i,o]),y=t.useCallback(e=>{v(Math.max(0,Math.min(o-1,e)));},[o]),D=t.useCallback((e,a)=>{H(true),K({x:e,y:a}),x(0);},[]),M=t.useCallback((e,a)=>{if(!d)return;let T=(e-S.x)*.5;x(T);},[d,S.x]),k=t.useCallback(()=>{if(!d)return;Math.abs(C)>50&&(C>0?g():p()),H(false),x(0);},[d,C,g,p]),U=t.useCallback(e=>{e.preventDefault(),D(e.clientX,e.clientY);},[D]),Z=t.useCallback(e=>{M(e.clientX,e.clientY);},[M]),j=t.useCallback(()=>{k();},[k]),G=t.useCallback(e=>{if(e.touches.length===1){let a=e.touches[0];D(a.clientX,a.clientY);}},[D]),J=t.useCallback(e=>{if(e.touches.length===1){e.preventDefault();let a=e.touches[0];M(a.clientX,a.clientY);}},[M]),V=t.useCallback(()=>{k();},[k]);t.useEffect(()=>{let e=$(a=>{if(a.key==="ArrowLeft")a.preventDefault(),g();else if(a.key==="ArrowRight")a.preventDefault(),p();else if(a.key>="1"&&a.key<="9"){let h=parseInt(a.key)-1;h<o&&y(h);}},"handleKeyDown");if(m.current)return m.current.addEventListener("keydown",e),()=>{m.current?.removeEventListener("keydown",e);}},[g,p,y,o]),t.useImperativeHandle(O,()=>m.current);let _={perspective:`${A}px`,height:`${l+100}px`},q={transform:`translateZ(-${I}px) rotateY(${-f*(360/o)+C/5}deg)`,transition:d?"none":"transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1)",transformStyle:"preserve-3d"};return jsxs("div",{ref:m,className:cn("relative w-full select-none focus:outline-none",X),style:_,onMouseEnter:()=>L(true),onMouseLeave:()=>L(false),onMouseDown:U,onMouseMove:Z,onMouseUp:j,onTouchStart:G,onTouchMove:J,onTouchEnd:V,tabIndex:0,...z,children:[jsx("div",{className:"relative mx-auto",style:{width:`${n}px`,height:`${l}px`,transformStyle:"preserve-3d"},children:jsx("div",{className:"absolute inset-0",style:q,children:s.map((e,a)=>{let h=a/o*360,P=a===f,T={transform:`rotateY(${h}deg) translateZ(${I}px)`,width:`${n}px`,height:`${l}px`,position:"absolute",backfaceVisibility:"hidden",transformStyle:"preserve-3d"};return jsx("div",{className:cn("rounded-lg border bg-card text-card-foreground shadow-lg cursor-pointer","transition-all duration-300 transform-gpu will-change-transform",P&&"ring-2 ring-primary ring-offset-2"),style:T,onClick:()=>y(a),children:jsx("div",{className:"w-full h-full overflow-hidden rounded-lg",children:e.content})},e.id)})})}),Y&&jsxs(Fragment,{children:[jsx("button",{className:cn("absolute left-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:g,disabled:!i&&f===0,"aria-label":"Previous item",children:jsx(ChevronLeft,{className:"w-5 h-5"})}),jsx("button",{className:cn("absolute right-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:p,disabled:!i&&f===o-1,"aria-label":"Next item",children:jsx(ChevronRight,{className:"w-5 h-5"})})]}),jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",children:jsx("div",{className:"flex space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-lg",children:s.map((e,a)=>jsx("button",{className:cn("w-2 h-2 rounded-full transition-all",a===f?"bg-primary scale-125":"bg-muted-foreground/50 hover:bg-muted-foreground/75"),onClick:()=>y(a),"aria-label":`Go to item ${a+1}`},a))})}),w&&jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxs("div",{className:"flex items-center space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm",children:[jsx("div",{className:cn("w-2 h-2 rounded-full transition-all",R||d?"bg-orange-500":"bg-green-500 animate-pulse")}),jsx("span",{className:"text-xs text-muted-foreground",children:R||d?"Paused":"Auto"})]})})]})});W.displayName="Carousel3D";var ee=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("w-full h-full flex flex-col bg-gradient-to-br from-background to-muted/20","border rounded-lg overflow-hidden group",s),...l,children:n}));ee.displayName="Carousel3DCard";var te=t.forwardRef(({className:s,alt:n,...l},c)=>jsx("img",{ref:c,className:cn("w-full h-48 object-cover transition-transform duration-300","group-hover:scale-105",s),alt:n,...l}));te.displayName="Carousel3DCardImage";var ae=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("flex-1 p-4 flex flex-col justify-between",s),...l,children:n}));ae.displayName="Carousel3DCardContent";var re=t.forwardRef(({className:s,children:n,...l},c)=>jsx("h3",{ref:c,className:cn("font-semibold text-lg mb-2 line-clamp-2",s),...l,children:n}));re.displayName="Carousel3DCardTitle";var oe=t.forwardRef(({className:s,children:n,...l},c)=>jsx("p",{ref:c,className:cn("text-sm text-muted-foreground line-clamp-3 mb-4",s),...l,children:n}));oe.displayName="Carousel3DCardDescription";export{W as Carousel3D,ee as Carousel3DCard,ae as Carousel3DCardContent,oe as Carousel3DCardDescription,te as Carousel3DCardImage,re as Carousel3DCardTitle};
2
+ import*as t from'react';import {ChevronLeft,ChevronRight}from'lucide-react';import {cn}from'@hanzo/ui/lib/utils';import {jsxs,jsx,Fragment}from'react/jsx-runtime';var F=Object.defineProperty;var $=(s,n)=>F(s,"name",{value:n,configurable:true});var W=t.forwardRef(({items:s,itemWidth:n=300,itemHeight:l=400,spacing:c=80,perspective:A=1e3,rotateY:ne=40,autoRotate:w=false,autoRotateSpeed:E=3e3,showControls:Y=true,infinite:i=true,className:X,...z},O)=>{let m=t.useRef(null),[f,v]=t.useState(0),[R,L]=t.useState(false),[d,H]=t.useState(false),[I,K]=t.useState({x:0,y:0}),[C,x]=t.useState(0),b=t.useRef(void 0),o=s.length,S=(n+c)/2/Math.tan(Math.PI/o);t.useEffect(()=>(w&&!R&&!d?b.current=setInterval(()=>{v(e=>(e+1)%o);},E):b.current&&clearInterval(b.current),()=>{b.current&&clearInterval(b.current);}),[w,R,d,E,o]);let g=t.useCallback(()=>{v(e=>i?(e-1+o)%o:Math.max(0,e-1));},[i,o]),p=t.useCallback(()=>{v(e=>i?(e+1)%o:Math.min(o-1,e+1));},[i,o]),y=t.useCallback(e=>{v(Math.max(0,Math.min(o-1,e)));},[o]),D=t.useCallback((e,a)=>{H(true),K({x:e,y:a}),x(0);},[]),M=t.useCallback((e,a)=>{if(!d)return;let T=(e-I.x)*.5;x(T);},[d,I.x]),k=t.useCallback(()=>{if(!d)return;Math.abs(C)>50&&(C>0?g():p()),H(false),x(0);},[d,C,g,p]),U=t.useCallback(e=>{e.preventDefault(),D(e.clientX,e.clientY);},[D]),Z=t.useCallback(e=>{M(e.clientX,e.clientY);},[M]),j=t.useCallback(()=>{k();},[k]),G=t.useCallback(e=>{if(e.touches.length===1){let a=e.touches[0];D(a.clientX,a.clientY);}},[D]),V=t.useCallback(e=>{if(e.touches.length===1){e.preventDefault();let a=e.touches[0];M(a.clientX,a.clientY);}},[M]),_=t.useCallback(()=>{k();},[k]);t.useEffect(()=>{let e=$(a=>{if(a.key==="ArrowLeft")a.preventDefault(),g();else if(a.key==="ArrowRight")a.preventDefault(),p();else if(a.key>="1"&&a.key<="9"){let h=parseInt(a.key)-1;h<o&&y(h);}},"handleKeyDown");if(m.current)return m.current.addEventListener("keydown",e),()=>{m.current?.removeEventListener("keydown",e);}},[g,p,y,o]),t.useImperativeHandle(O,()=>m.current);let q={perspective:`${A}px`,height:`${l+100}px`},B={transform:`translateZ(-${S}px) rotateY(${-f*(360/o)+C/5}deg)`,transition:d?"none":"transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1)",transformStyle:"preserve-3d"};return jsxs("div",{ref:m,className:cn("relative w-full select-none focus:outline-none",X),style:q,onMouseEnter:()=>L(true),onMouseLeave:()=>L(false),onMouseDown:U,onMouseMove:Z,onMouseUp:j,onTouchStart:G,onTouchMove:V,onTouchEnd:_,tabIndex:0,...z,children:[jsx("div",{className:"relative mx-auto",style:{width:`${n}px`,height:`${l}px`,transformStyle:"preserve-3d"},children:jsx("div",{className:"absolute inset-0",style:B,children:s.map((e,a)=>{let h=a/o*360,P=a===f,T={transform:`rotateY(${h}deg) translateZ(${S}px)`,width:`${n}px`,height:`${l}px`,position:"absolute",backfaceVisibility:"hidden",transformStyle:"preserve-3d"};return jsx("div",{className:cn("rounded-lg border bg-card text-card-foreground shadow-lg cursor-pointer","transition-all duration-300 transform-gpu will-change-transform",P&&"ring-2 ring-primary ring-offset-2"),style:T,onClick:()=>y(a),children:jsx("div",{className:"w-full h-full overflow-hidden rounded-lg",children:e.content})},e.id)})})}),Y&&jsxs(Fragment,{children:[jsx("button",{className:cn("absolute left-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:g,disabled:!i&&f===0,"aria-label":"Previous item",children:jsx(ChevronLeft,{className:"w-5 h-5"})}),jsx("button",{className:cn("absolute right-4 top-1/2 -translate-y-1/2 z-10","p-2 rounded-full bg-background/80 backdrop-blur-sm","border shadow-lg hover:bg-background transition-all","disabled:opacity-50 disabled:cursor-not-allowed"),onClick:p,disabled:!i&&f===o-1,"aria-label":"Next item",children:jsx(ChevronRight,{className:"w-5 h-5"})})]}),jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-10",children:jsx("div",{className:"flex space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-lg",children:s.map((e,a)=>jsx("button",{className:cn("w-2 h-2 rounded-full transition-all",a===f?"bg-primary scale-125":"bg-muted-foreground/50 hover:bg-muted-foreground/75"),onClick:()=>y(a),"aria-label":`Go to item ${a+1}`},a))})}),w&&jsx("div",{className:"absolute top-4 right-4 z-10",children:jsxs("div",{className:"flex items-center space-x-2 p-2 rounded-full bg-background/80 backdrop-blur-sm border shadow-sm",children:[jsx("div",{className:cn("w-2 h-2 rounded-full transition-all",R||d?"bg-orange-500":"bg-green-500 animate-pulse")}),jsx("span",{className:"text-xs text-muted-foreground",children:R||d?"Paused":"Auto"})]})})]})});W.displayName="Carousel3D";var ee=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("w-full h-full flex flex-col bg-gradient-to-br from-background to-muted/20","border rounded-lg overflow-hidden group",s),...l,children:n}));ee.displayName="Carousel3DCard";var te=t.forwardRef(({className:s,alt:n,...l},c)=>jsx("img",{ref:c,className:cn("w-full h-48 object-cover transition-transform duration-300","group-hover:scale-105",s),alt:n,...l}));te.displayName="Carousel3DCardImage";var ae=t.forwardRef(({className:s,children:n,...l},c)=>jsx("div",{ref:c,className:cn("flex-1 p-4 flex flex-col justify-between",s),...l,children:n}));ae.displayName="Carousel3DCardContent";var re=t.forwardRef(({className:s,children:n,...l},c)=>jsx("h3",{ref:c,className:cn("font-semibold text-lg mb-2 line-clamp-2",s),...l,children:n}));re.displayName="Carousel3DCardTitle";var oe=t.forwardRef(({className:s,children:n,...l},c)=>jsx("p",{ref:c,className:cn("text-sm text-muted-foreground line-clamp-3 mb-4",s),...l,children:n}));oe.displayName="Carousel3DCardDescription";export{W as Carousel3D,ee as Carousel3DCard,ae as Carousel3DCardContent,oe as Carousel3DCardDescription,te as Carousel3DCardImage,re as Carousel3DCardTitle};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');var x=Object.defineProperty;var s=(n,o)=>x(n,"name",{value:o,configurable:true});function R(){let[n,o]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let i=window.matchMedia("(prefers-reduced-motion: reduce)");o(i.matches);let r=s(d=>{o(d.matches);},"handleChange");return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),n}s(R,"usePrefersReducedMotion");function E({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=2?n:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${d.join(", ")})`,backgroundSize:"400% 400%"},animate:r?{}:{x:["0%","100%","0%"]},transition:{duration:10/o,repeat:1/0,ease:"linear"}})}s(E,"GradientBackground");function I({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=react.useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/o})),[i,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${e.color}40, transparent)`,width:e.size*r,height:e.size*r,filter:"blur(40px)"},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{x:[`${e.x}%`,`${(e.x+50)%100}%`,`${e.x}%`],y:[`${e.y}%`,`${(e.y+30)%100}%`,`${e.y}%`],scale:[1,1.2,1]},transition:{duration:e.duration,repeat:1/0,ease:"easeInOut"}},e.id))})}s(I,"BlobBackground");function L({colors:n,speed:o,intensity:i,paused:r}){let d=n[0]||"#4ecdc4";return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(a=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+a*20}%, ${d}${Math.round(30*i).toString(16).padStart(2,"0")}, transparent)`},animate:r?{}:{y:[a*10,a*10+20*i,a*10]},transition:{duration:(3+a)/o,repeat:1/0,ease:"easeInOut"}},a))})}s(L,"WaveBackground");function S({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=4?n.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:d.map((a,e)=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${a}60, transparent)`,width:`${60+e*20}%`,height:`${60+e*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+e*15}%`,y:`${25+e*15}%`},animate:r?{}:{x:[`${25+e*15}%`,`${35+e*15}%`,`${25+e*15}%`],y:[`${25+e*15}%`,`${15+e*15}%`,`${25+e*15}%`],rotate:[0,180,360]},transition:{duration:(8+e*2)/o,repeat:1/0,ease:"easeInOut"}},e))})}s(S,"MeshBackground");function W({layers:n,speed:o,paused:i}){let r=react$1.useMotionValue(0),d=react$1.useMotionValue(0);return react.useEffect(()=>{let a=s(e=>{let{clientX:u,clientY:l}=e,{innerWidth:p,innerHeight:y}=window;r.set((u/p-.5)*100),d.set((l/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",a),()=>window.removeEventListener("mousemove",a)},[r,d]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:n.map((a,e)=>{let u=react$1.useTransform(r,[-50,50],[-a.speed*10,a.speed*10]),l=react$1.useTransform(d,[-50,50],[-a.speed*10,a.speed*10]);return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${a.color}, transparent)`,opacity:a.opacity,x:i?0:u,y:i?0:l}},e)})})}s(W,"ParallaxBackground");function G({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=react.useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/o,delay:Math.random()*5})),[i,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{backgroundColor:e.color,width:e.size*r,height:e.size*r,opacity:.6},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{y:[`${e.y}%`,`${e.y-100}%`],opacity:[0,.6,0]},transition:{duration:e.duration,repeat:1/0,delay:e.delay,ease:"linear"}},e.id))})}s(G,"ParticlesBackground");function c({animation:n="gradient",speed:o=1,colors:i=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:r=false,className:d,style:a,children:e,intensity:u=1,blur:l=false,blurAmount:p=20,opacity:y=1,elementCount:h=5,width:v="100%",height:$="100%",fullscreen:b=false,parallaxLayers:A=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let C=R(),k=r||C,N=react.useMemo(()=>({width:b?"100vw":v,height:b?"100vh":$,opacity:y,filter:l?`blur(${p}px)`:void 0,...a}),[b,v,$,y,l,p,a]),P=s(()=>{let f={colors:i,speed:o,intensity:u,paused:k};switch(n){case "blob":return jsxRuntime.jsx(I,{...f,elementCount:h});case "wave":return jsxRuntime.jsx(L,{...f});case "mesh":return jsxRuntime.jsx(S,{...f});case "parallax":return jsxRuntime.jsx(W,{layers:A,speed:o,paused:k});case "particles":return jsxRuntime.jsx(G,{...f,elementCount:h});default:return jsxRuntime.jsx(E,{...f})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:utils.cn("relative overflow-hidden",b&&"fixed inset-0 z-0",d),style:N,children:[P(),e&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:e})]})}s(c,"AnimatedBackground");var V={CalmGradient:s(n=>jsxRuntime.jsx(c,{animation:"gradient",colors:["#667eea","#764ba2","#f093fb","#f5576c"],speed:.5,...n}),"CalmGradient"),OceanWaves:s(n=>jsxRuntime.jsx(c,{animation:"wave",colors:["#0093E9","#80D0C7"],...n}),"OceanWaves"),FloatingBubbles:s(n=>jsxRuntime.jsx(c,{animation:"blob",colors:["#667eea","#764ba2","#f093fb"],elementCount:8,...n}),"FloatingBubbles"),CosmicMesh:s(n=>jsxRuntime.jsx(c,{animation:"mesh",colors:["#667eea","#764ba2","#f093fb","#f5576c"],...n}),"CosmicMesh"),Starfield:s(n=>jsxRuntime.jsx(c,{animation:"particles",colors:["#ffffff","#f0f0f0","#e0e0e0"],elementCount:50,intensity:.5,...n}),"Starfield"),Aurora:s(n=>jsxRuntime.jsx(c,{animation:"parallax",parallaxLayers:[{speed:.3,color:"#00ff8850",opacity:.4},{speed:.6,color:"#0080ff50",opacity:.3},{speed:.9,color:"#8000ff50",opacity:.3},{speed:1.2,color:"#ff008050",opacity:.2}],...n}),"Aurora")},j=c;exports.AnimatedBackground=c;exports.AnimatedBackgroundPresets=V;exports.default=j;
2
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');var L=Object.defineProperty;var i=(n,o)=>L(n,"name",{value:o,configurable:true});function k(...n){return tailwindMerge.twMerge(clsx.clsx(n))}i(k,"cn");function z(){let[n,o]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let s=window.matchMedia("(prefers-reduced-motion: reduce)");o(s.matches);let r=i(d=>{o(d.matches);},"handleChange");return s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[]),n}i(z,"usePrefersReducedMotion");function E({colors:n,speed:o,intensity:s,paused:r}){let d=n.length>=2?n:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${d.join(", ")})`,backgroundSize:"400% 400%"},animate:r?{}:{x:["0%","100%","0%"]},transition:{duration:10/o,repeat:1/0,ease:"linear"}})}i(E,"GradientBackground");function I({colors:n,speed:o,elementCount:s,intensity:r,paused:d}){let t=react.useMemo(()=>Array.from({length:s},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/o})),[s,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:t.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${e.color}40, transparent)`,width:e.size*r,height:e.size*r,filter:"blur(40px)"},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{x:[`${e.x}%`,`${(e.x+50)%100}%`,`${e.x}%`],y:[`${e.y}%`,`${(e.y+30)%100}%`,`${e.y}%`],scale:[1,1.2,1]},transition:{duration:e.duration,repeat:1/0,ease:"easeInOut"}},e.id))})}i(I,"BlobBackground");function _({colors:n,speed:o,intensity:s,paused:r}){let d=n[0]||"#4ecdc4";return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(t=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+t*20}%, ${d}${Math.round(30*s).toString(16).padStart(2,"0")}, transparent)`},animate:r?{}:{y:[t*10,t*10+20*s,t*10]},transition:{duration:(3+t)/o,repeat:1/0,ease:"easeInOut"}},t))})}i(_,"WaveBackground");function D({colors:n,speed:o,intensity:s,paused:r}){let d=n.length>=4?n.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:d.map((t,e)=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${t}60, transparent)`,width:`${60+e*20}%`,height:`${60+e*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+e*15}%`,y:`${25+e*15}%`},animate:r?{}:{x:[`${25+e*15}%`,`${35+e*15}%`,`${25+e*15}%`],y:[`${25+e*15}%`,`${15+e*15}%`,`${25+e*15}%`],rotate:[0,180,360]},transition:{duration:(8+e*2)/o,repeat:1/0,ease:"easeInOut"}},e))})}i(D,"MeshBackground");function U({layers:n,speed:o,paused:s}){let r=react$1.useMotionValue(0),d=react$1.useMotionValue(0);return react.useEffect(()=>{let t=i(e=>{let{clientX:u,clientY:l}=e,{innerWidth:p,innerHeight:y}=window;r.set((u/p-.5)*100),d.set((l/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",t),()=>window.removeEventListener("mousemove",t)},[r,d]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:n.map((t,e)=>{let u=react$1.useTransform(r,[-50,50],[-t.speed*10,t.speed*10]),l=react$1.useTransform(d,[-50,50],[-t.speed*10,t.speed*10]);return jsxRuntime.jsx(react$1.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${t.color}, transparent)`,opacity:t.opacity,x:s?0:u,y:s?0:l}},e)})})}i(U,"ParallaxBackground");function V({colors:n,speed:o,elementCount:s,intensity:r,paused:d}){let t=react.useMemo(()=>Array.from({length:s},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/o,delay:Math.random()*5})),[s,n,o]);return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:t.map(e=>jsxRuntime.jsx(react$1.motion.div,{className:"absolute rounded-full",style:{backgroundColor:e.color,width:e.size*r,height:e.size*r,opacity:.6},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{y:[`${e.y}%`,`${e.y-100}%`],opacity:[0,.6,0]},transition:{duration:e.duration,repeat:1/0,delay:e.delay,ease:"linear"}},e.id))})}i(V,"ParticlesBackground");function c({animation:n="gradient",speed:o=1,colors:s=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:r=false,className:d,style:t,children:e,intensity:u=1,blur:l=false,blurAmount:p=20,opacity:y=1,elementCount:h=5,width:v="100%",height:$="100%",fullscreen:g=false,parallaxLayers:x=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let C=z(),w=r||C,P=react.useMemo(()=>({width:g?"100vw":v,height:g?"100vh":$,opacity:y,filter:l?`blur(${p}px)`:void 0,...t}),[g,v,$,y,l,p,t]),N=i(()=>{let f={colors:s,speed:o,intensity:u,paused:w};switch(n){case "blob":return jsxRuntime.jsx(I,{...f,elementCount:h});case "wave":return jsxRuntime.jsx(_,{...f});case "mesh":return jsxRuntime.jsx(D,{...f});case "parallax":return jsxRuntime.jsx(U,{layers:x,speed:o,paused:w});case "particles":return jsxRuntime.jsx(V,{...f,elementCount:h});default:return jsxRuntime.jsx(E,{...f})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:k("relative overflow-hidden",g&&"fixed inset-0 z-0",d),style:P,children:[N(),e&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:e})]})}i(c,"AnimatedBackground");var Z={CalmGradient:i(n=>jsxRuntime.jsx(c,{animation:"gradient",colors:["#667eea","#764ba2","#f093fb","#f5576c"],speed:.5,...n}),"CalmGradient"),OceanWaves:i(n=>jsxRuntime.jsx(c,{animation:"wave",colors:["#0093E9","#80D0C7"],...n}),"OceanWaves"),FloatingBubbles:i(n=>jsxRuntime.jsx(c,{animation:"blob",colors:["#667eea","#764ba2","#f093fb"],elementCount:8,...n}),"FloatingBubbles"),CosmicMesh:i(n=>jsxRuntime.jsx(c,{animation:"mesh",colors:["#667eea","#764ba2","#f093fb","#f5576c"],...n}),"CosmicMesh"),Starfield:i(n=>jsxRuntime.jsx(c,{animation:"particles",colors:["#ffffff","#f0f0f0","#e0e0e0"],elementCount:50,intensity:.5,...n}),"Starfield"),Aurora:i(n=>jsxRuntime.jsx(c,{animation:"parallax",parallaxLayers:[{speed:.3,color:"#00ff8850",opacity:.4},{speed:.6,color:"#0080ff50",opacity:.3},{speed:.9,color:"#8000ff50",opacity:.3},{speed:1.2,color:"#ff008050",opacity:.2}],...n}),"Aurora")},ee=c;exports.AnimatedBackground=c;exports.AnimatedBackgroundPresets=Z;exports.default=ee;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {useMemo,useState,useEffect}from'react';import {motion,useMotionValue,useTransform}from'motion/react';import {cn}from'@/lib/utils';import {jsx,jsxs}from'react/jsx-runtime';var x=Object.defineProperty;var s=(n,o)=>x(n,"name",{value:o,configurable:true});function R(){let[n,o]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let i=window.matchMedia("(prefers-reduced-motion: reduce)");o(i.matches);let r=s(d=>{o(d.matches);},"handleChange");return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]),n}s(R,"usePrefersReducedMotion");function E({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=2?n:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx(motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${d.join(", ")})`,backgroundSize:"400% 400%"},animate:r?{}:{x:["0%","100%","0%"]},transition:{duration:10/o,repeat:1/0,ease:"linear"}})}s(E,"GradientBackground");function I({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/o})),[i,n,o]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${e.color}40, transparent)`,width:e.size*r,height:e.size*r,filter:"blur(40px)"},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{x:[`${e.x}%`,`${(e.x+50)%100}%`,`${e.x}%`],y:[`${e.y}%`,`${(e.y+30)%100}%`,`${e.y}%`],scale:[1,1.2,1]},transition:{duration:e.duration,repeat:1/0,ease:"easeInOut"}},e.id))})}s(I,"BlobBackground");function L({colors:n,speed:o,intensity:i,paused:r}){let d=n[0]||"#4ecdc4";return jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(a=>jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+a*20}%, ${d}${Math.round(30*i).toString(16).padStart(2,"0")}, transparent)`},animate:r?{}:{y:[a*10,a*10+20*i,a*10]},transition:{duration:(3+a)/o,repeat:1/0,ease:"easeInOut"}},a))})}s(L,"WaveBackground");function S({colors:n,speed:o,intensity:i,paused:r}){let d=n.length>=4?n.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx("div",{className:"absolute inset-0 overflow-hidden",children:d.map((a,e)=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${a}60, transparent)`,width:`${60+e*20}%`,height:`${60+e*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+e*15}%`,y:`${25+e*15}%`},animate:r?{}:{x:[`${25+e*15}%`,`${35+e*15}%`,`${25+e*15}%`],y:[`${25+e*15}%`,`${15+e*15}%`,`${25+e*15}%`],rotate:[0,180,360]},transition:{duration:(8+e*2)/o,repeat:1/0,ease:"easeInOut"}},e))})}s(S,"MeshBackground");function W({layers:n,speed:o,paused:i}){let r=useMotionValue(0),d=useMotionValue(0);return useEffect(()=>{let a=s(e=>{let{clientX:u,clientY:l}=e,{innerWidth:p,innerHeight:y}=window;r.set((u/p-.5)*100),d.set((l/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",a),()=>window.removeEventListener("mousemove",a)},[r,d]),jsx("div",{className:"absolute inset-0 overflow-hidden",children:n.map((a,e)=>{let u=useTransform(r,[-50,50],[-a.speed*10,a.speed*10]),l=useTransform(d,[-50,50],[-a.speed*10,a.speed*10]);return jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${a.color}, transparent)`,opacity:a.opacity,x:i?0:u,y:i?0:l}},e)})})}s(W,"ParallaxBackground");function G({colors:n,speed:o,elementCount:i,intensity:r,paused:d}){let a=useMemo(()=>Array.from({length:i},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/o,delay:Math.random()*5})),[i,n,o]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:a.map(e=>jsx(motion.div,{className:"absolute rounded-full",style:{backgroundColor:e.color,width:e.size*r,height:e.size*r,opacity:.6},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{y:[`${e.y}%`,`${e.y-100}%`],opacity:[0,.6,0]},transition:{duration:e.duration,repeat:1/0,delay:e.delay,ease:"linear"}},e.id))})}s(G,"ParticlesBackground");function c({animation:n="gradient",speed:o=1,colors:i=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:r=false,className:d,style:a,children:e,intensity:u=1,blur:l=false,blurAmount:p=20,opacity:y=1,elementCount:h=5,width:v="100%",height:$="100%",fullscreen:b=false,parallaxLayers:A=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let C=R(),k=r||C,N=useMemo(()=>({width:b?"100vw":v,height:b?"100vh":$,opacity:y,filter:l?`blur(${p}px)`:void 0,...a}),[b,v,$,y,l,p,a]),P=s(()=>{let f={colors:i,speed:o,intensity:u,paused:k};switch(n){case "blob":return jsx(I,{...f,elementCount:h});case "wave":return jsx(L,{...f});case "mesh":return jsx(S,{...f});case "parallax":return jsx(W,{layers:A,speed:o,paused:k});case "particles":return jsx(G,{...f,elementCount:h});default:return jsx(E,{...f})}},"renderAnimation");return jsxs("div",{className:cn("relative overflow-hidden",b&&"fixed inset-0 z-0",d),style:N,children:[P(),e&&jsx("div",{className:"relative z-10 h-full w-full",children:e})]})}s(c,"AnimatedBackground");var V={CalmGradient:s(n=>jsx(c,{animation:"gradient",colors:["#667eea","#764ba2","#f093fb","#f5576c"],speed:.5,...n}),"CalmGradient"),OceanWaves:s(n=>jsx(c,{animation:"wave",colors:["#0093E9","#80D0C7"],...n}),"OceanWaves"),FloatingBubbles:s(n=>jsx(c,{animation:"blob",colors:["#667eea","#764ba2","#f093fb"],elementCount:8,...n}),"FloatingBubbles"),CosmicMesh:s(n=>jsx(c,{animation:"mesh",colors:["#667eea","#764ba2","#f093fb","#f5576c"],...n}),"CosmicMesh"),Starfield:s(n=>jsx(c,{animation:"particles",colors:["#ffffff","#f0f0f0","#e0e0e0"],elementCount:50,intensity:.5,...n}),"Starfield"),Aurora:s(n=>jsx(c,{animation:"parallax",parallaxLayers:[{speed:.3,color:"#00ff8850",opacity:.4},{speed:.6,color:"#0080ff50",opacity:.3},{speed:.9,color:"#8000ff50",opacity:.3},{speed:1.2,color:"#ff008050",opacity:.2}],...n}),"Aurora")},j=c;export{c as AnimatedBackground,V as AnimatedBackgroundPresets,j as default};
2
+ import {useMemo,useState,useEffect}from'react';import {motion,useMotionValue,useTransform}from'motion/react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';var L=Object.defineProperty;var i=(n,o)=>L(n,"name",{value:o,configurable:true});function k(...n){return twMerge(clsx(n))}i(k,"cn");function z(){let[n,o]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let s=window.matchMedia("(prefers-reduced-motion: reduce)");o(s.matches);let r=i(d=>{o(d.matches);},"handleChange");return s.addEventListener("change",r),()=>s.removeEventListener("change",r)},[]),n}i(z,"usePrefersReducedMotion");function E({colors:n,speed:o,intensity:s,paused:r}){let d=n.length>=2?n:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx(motion.div,{className:"absolute inset-0",style:{background:`linear-gradient(-45deg, ${d.join(", ")})`,backgroundSize:"400% 400%"},animate:r?{}:{x:["0%","100%","0%"]},transition:{duration:10/o,repeat:1/0,ease:"linear"}})}i(E,"GradientBackground");function I({colors:n,speed:o,elementCount:s,intensity:r,paused:d}){let t=useMemo(()=>Array.from({length:s},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*200+100,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*10+10)/o})),[s,n,o]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:t.map(e=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${e.color}40, transparent)`,width:e.size*r,height:e.size*r,filter:"blur(40px)"},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{x:[`${e.x}%`,`${(e.x+50)%100}%`,`${e.x}%`],y:[`${e.y}%`,`${(e.y+30)%100}%`,`${e.y}%`],scale:[1,1.2,1]},transition:{duration:e.duration,repeat:1/0,ease:"easeInOut"}},e.id))})}i(I,"BlobBackground");function _({colors:n,speed:o,intensity:s,paused:r}){let d=n[0]||"#4ecdc4";return jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(t=>jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+t*20}%, ${d}${Math.round(30*s).toString(16).padStart(2,"0")}, transparent)`},animate:r?{}:{y:[t*10,t*10+20*s,t*10]},transition:{duration:(3+t)/o,repeat:1/0,ease:"easeInOut"}},t))})}i(_,"WaveBackground");function D({colors:n,speed:o,intensity:s,paused:r}){let d=n.length>=4?n.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsx("div",{className:"absolute inset-0 overflow-hidden",children:d.map((t,e)=>jsx(motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${t}60, transparent)`,width:`${60+e*20}%`,height:`${60+e*20}%`,filter:"blur(60px)",mixBlendMode:"multiply"},initial:{x:`${25+e*15}%`,y:`${25+e*15}%`},animate:r?{}:{x:[`${25+e*15}%`,`${35+e*15}%`,`${25+e*15}%`],y:[`${25+e*15}%`,`${15+e*15}%`,`${25+e*15}%`],rotate:[0,180,360]},transition:{duration:(8+e*2)/o,repeat:1/0,ease:"easeInOut"}},e))})}i(D,"MeshBackground");function U({layers:n,speed:o,paused:s}){let r=useMotionValue(0),d=useMotionValue(0);return useEffect(()=>{let t=i(e=>{let{clientX:u,clientY:l}=e,{innerWidth:p,innerHeight:y}=window;r.set((u/p-.5)*100),d.set((l/y-.5)*100);},"handleMouseMove");return window.addEventListener("mousemove",t),()=>window.removeEventListener("mousemove",t)},[r,d]),jsx("div",{className:"absolute inset-0 overflow-hidden",children:n.map((t,e)=>{let u=useTransform(r,[-50,50],[-t.speed*10,t.speed*10]),l=useTransform(d,[-50,50],[-t.speed*10,t.speed*10]);return jsx(motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${t.color}, transparent)`,opacity:t.opacity,x:s?0:u,y:s?0:l}},e)})})}i(U,"ParallaxBackground");function V({colors:n,speed:o,elementCount:s,intensity:r,paused:d}){let t=useMemo(()=>Array.from({length:s},(e,u)=>({id:u,color:n[u%n.length],size:Math.random()*4+2,x:Math.random()*100,y:Math.random()*100,duration:(Math.random()*20+20)/o,delay:Math.random()*5})),[s,n,o]);return jsx("div",{className:"absolute inset-0 overflow-hidden",children:t.map(e=>jsx(motion.div,{className:"absolute rounded-full",style:{backgroundColor:e.color,width:e.size*r,height:e.size*r,opacity:.6},initial:{x:`${e.x}%`,y:`${e.y}%`},animate:d?{}:{y:[`${e.y}%`,`${e.y-100}%`],opacity:[0,.6,0]},transition:{duration:e.duration,repeat:1/0,delay:e.delay,ease:"linear"}},e.id))})}i(V,"ParticlesBackground");function c({animation:n="gradient",speed:o=1,colors:s=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:r=false,className:d,style:t,children:e,intensity:u=1,blur:l=false,blurAmount:p=20,opacity:y=1,elementCount:h=5,width:v="100%",height:$="100%",fullscreen:g=false,parallaxLayers:x=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let C=z(),w=r||C,P=useMemo(()=>({width:g?"100vw":v,height:g?"100vh":$,opacity:y,filter:l?`blur(${p}px)`:void 0,...t}),[g,v,$,y,l,p,t]),N=i(()=>{let f={colors:s,speed:o,intensity:u,paused:w};switch(n){case "blob":return jsx(I,{...f,elementCount:h});case "wave":return jsx(_,{...f});case "mesh":return jsx(D,{...f});case "parallax":return jsx(U,{layers:x,speed:o,paused:w});case "particles":return jsx(V,{...f,elementCount:h});default:return jsx(E,{...f})}},"renderAnimation");return jsxs("div",{className:k("relative overflow-hidden",g&&"fixed inset-0 z-0",d),style:P,children:[N(),e&&jsx("div",{className:"relative z-10 h-full w-full",children:e})]})}i(c,"AnimatedBackground");var Z={CalmGradient:i(n=>jsx(c,{animation:"gradient",colors:["#667eea","#764ba2","#f093fb","#f5576c"],speed:.5,...n}),"CalmGradient"),OceanWaves:i(n=>jsx(c,{animation:"wave",colors:["#0093E9","#80D0C7"],...n}),"OceanWaves"),FloatingBubbles:i(n=>jsx(c,{animation:"blob",colors:["#667eea","#764ba2","#f093fb"],elementCount:8,...n}),"FloatingBubbles"),CosmicMesh:i(n=>jsx(c,{animation:"mesh",colors:["#667eea","#764ba2","#f093fb","#f5576c"],...n}),"CosmicMesh"),Starfield:i(n=>jsx(c,{animation:"particles",colors:["#ffffff","#f0f0f0","#e0e0e0"],elementCount:50,intensity:.5,...n}),"Starfield"),Aurora:i(n=>jsx(c,{animation:"parallax",parallaxLayers:[{speed:.3,color:"#00ff8850",opacity:.4},{speed:.6,color:"#0080ff50",opacity:.3},{speed:.9,color:"#8000ff50",opacity:.3},{speed:1.2,color:"#ff008050",opacity:.2}],...n}),"Aurora")},ee=c;export{c as AnimatedBackground,Z as AnimatedBackgroundPresets,ee as default};
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');var z=Object.defineProperty;var t=(e,r)=>z(e,"name",{value:r,configurable:true});function Z(){let[e,r]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let o=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}t(Z,"usePrefersReducedMotion");var q={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"},F={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}}}},J={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},K={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function U({paths:e,duration:r,strokeWidth:a=2,autoAnimate:o,repeat:c,onComplete:s}){let[i,m]=react.useState(0);return react.useEffect(()=>{if(!o||e.length<2)return;let l=setInterval(()=>{m(h=>{let d=(h+1)%e.length;return d===0&&!c&&(clearInterval(l),s?.()),d});},r);return ()=>clearInterval(l)},[o,e.length,r,c,s]),jsxRuntime.jsx(react$1.motion.path,{d:e[i],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[i]},transition:{duration:r/1e3,ease:"easeInOut"}})}t(U,"MorphingPath");function X({path:e,duration:r,strokeWidth:a=2,progress:o,autoAnimate:c}){let s=react.useRef(null),[i,m]=react.useState(0);react.useEffect(()=>{if(s.current){let h=s.current.getTotalLength();m(h);}},[e]);let l=o!==void 0?i*o:i;return jsxRuntime.jsx(react$1.motion.path,{ref:s,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:c?{pathLength:1}:{pathLength:l/i},transition:{duration:r/1e3,ease:"easeInOut"},style:{strokeDasharray:i,strokeDashoffset:i-l}})}t(X,"DrawingPath");function Y({size:e,strokeWidth:r=2}){return jsxRuntime.jsx(react$1.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:r,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}t(Y,"LoadingSpinner");function u({icon:e="loading",paths:r,animation:a="spin",size:o=24,color:c="currentColor",duration:s=1e3,autoAnimate:i=true,repeat:m=true,className:l,style:h,onAnimationComplete:d,onClick:P,interactive:k=true,hoverAnimation:M="scale",clickAnimation:C="scale",customVariants:x,viewBox:O="0 0 24 24",strokeWidth:v=2,loading:V=false,progress:R}){let[W,y]=react.useState(false),[H,A]=react.useState(false),I=Z(),S=x||F[a]||{},b=i&&!I,w=t(()=>{if(r)return Array.isArray(r)?r:[r];let p=q[e];return Array.isArray(p)?p:[p]},"getIconPaths")(),E=t(()=>{k&&(A(true),setTimeout(()=>A(false),200),P?.());},"handleClick"),B=t(()=>!k||!W?{}:J[M]||{},"getHoverVariant"),D=t(()=>!k||!H?{}:K[C]||{},"getClickVariant");if(V)return jsxRuntime.jsx(Y,{size:o,strokeWidth:v});let T=t(()=>a==="morph"&&w.length>1?jsxRuntime.jsx(U,{paths:w,duration:s,strokeWidth:v,autoAnimate:b,repeat:m,onComplete:d}):a==="draw"?jsxRuntime.jsx(X,{path:w[0],duration:s,strokeWidth:v,progress:R,autoAnimate:b}):w.map((p,j)=>jsxRuntime.jsx(react$1.motion.path,{d:p,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"},j)),"renderIcon");return jsxRuntime.jsx(react$1.motion.div,{className:utils.cn("inline-flex items-center justify-center",k&&"cursor-pointer",l),style:{width:o,height:o,color:c,...h},onClick:E,onMouseEnter:()=>y(true),onMouseLeave:()=>y(false),variants:S,animate:b?"animate":"initial",whileHover:I?{}:B(),whileTap:I?{}:D(),onAnimationComplete:d,children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:O,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"wait",children:T()})})})}t(u,"AnimatedIcon");var ae={Spinner:t(e=>jsxRuntime.jsx(u,{icon:"loading",animation:"spin",...e}),"Spinner"),HeartBeat:t(e=>jsxRuntime.jsx(u,{icon:"heart",animation:"pulse",color:"#ef4444",...e}),"HeartBeat"),MenuToggle:t(e=>jsxRuntime.jsx(u,{icon:"hamburger",animation:"morph",...e}),"MenuToggle"),CheckDraw:t(e=>jsxRuntime.jsx(u,{icon:"check",animation:"draw",color:"#10b981",...e}),"CheckDraw"),BounceStar:t(e=>jsxRuntime.jsx(u,{icon:"star",animation:"bounce",color:"#fbbf24",...e}),"BounceStar"),HoverArrow:t(e=>jsxRuntime.jsx(u,{icon:"arrow",hoverAnimation:"scale",interactive:true,...e}),"HoverArrow")},ie=u;
3
- exports.AnimatedIcon=u;exports.AnimatedIconPresets=ae;exports.default=ie;
2
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');var N=Object.defineProperty;var t=(e,r)=>N(e,"name",{value:r,configurable:true});function P(...e){return tailwindMerge.twMerge(clsx.clsx(e))}t(P,"cn");function G(){let[e,r]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let o=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}t(G,"usePrefersReducedMotion");var X={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"},Z={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}}}},q={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},F={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function J({paths:e,duration:r,strokeWidth:a=2,autoAnimate:o,repeat:c,onComplete:s}){let[i,m]=react.useState(0);return react.useEffect(()=>{if(!o||e.length<2)return;let l=setInterval(()=>{m(d=>{let h=(d+1)%e.length;return h===0&&!c&&(clearInterval(l),s?.()),h});},r);return ()=>clearInterval(l)},[o,e.length,r,c,s]),jsxRuntime.jsx(react$1.motion.path,{d:e[i],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[i]},transition:{duration:r/1e3,ease:"easeInOut"}})}t(J,"MorphingPath");function K({path:e,duration:r,strokeWidth:a=2,progress:o,autoAnimate:c}){let s=react.useRef(null),[i,m]=react.useState(0);react.useEffect(()=>{if(s.current){let d=s.current.getTotalLength();m(d);}},[e]);let l=o!==void 0?i*o:i;return jsxRuntime.jsx(react$1.motion.path,{ref:s,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:c?{pathLength:1}:{pathLength:l/i},transition:{duration:r/1e3,ease:"easeInOut"},style:{strokeDasharray:i,strokeDashoffset:i-l}})}t(K,"DrawingPath");function Y({size:e,strokeWidth:r=2}){return jsxRuntime.jsx(react$1.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:r,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}t(Y,"LoadingSpinner");function u({icon:e="loading",paths:r,animation:a="spin",size:o=24,color:c="currentColor",duration:s=1e3,autoAnimate:i=true,repeat:m=true,className:l,style:d,onAnimationComplete:h,onClick:M,interactive:k=true,hoverAnimation:C="scale",clickAnimation:x="scale",customVariants:V,viewBox:O="0 0 24 24",strokeWidth:v=2,loading:R=false,progress:S}){let[D,I]=react.useState(false),[W,A]=react.useState(false),L=G(),E=V||Z[a]||{},b=i&&!L,w=t(()=>{if(r)return Array.isArray(r)?r:[r];let p=X[e];return Array.isArray(p)?p:[p]},"getIconPaths")(),H=t(()=>{k&&(A(true),setTimeout(()=>A(false),200),M?.());},"handleClick"),B=t(()=>!k||!D?{}:q[C]||{},"getHoverVariant"),T=t(()=>!k||!W?{}:F[x]||{},"getClickVariant");if(R)return jsxRuntime.jsx(Y,{size:o,strokeWidth:v});let U=t(()=>a==="morph"&&w.length>1?jsxRuntime.jsx(J,{paths:w,duration:s,strokeWidth:v,autoAnimate:b,repeat:m,onComplete:h}):a==="draw"?jsxRuntime.jsx(K,{path:w[0],duration:s,strokeWidth:v,progress:S,autoAnimate:b}):w.map((p,j)=>jsxRuntime.jsx(react$1.motion.path,{d:p,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"},j)),"renderIcon");return jsxRuntime.jsx(react$1.motion.div,{className:P("inline-flex items-center justify-center",k&&"cursor-pointer",l),style:{width:o,height:o,color:c,...d},onClick:H,onMouseEnter:()=>I(true),onMouseLeave:()=>I(false),variants:E,animate:b?"animate":"initial",whileHover:L?{}:B(),whileTap:L?{}:T(),onAnimationComplete:h,children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:O,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"wait",children:U()})})})}t(u,"AnimatedIcon");var me={Spinner:t(e=>jsxRuntime.jsx(u,{icon:"loading",animation:"spin",...e}),"Spinner"),HeartBeat:t(e=>jsxRuntime.jsx(u,{icon:"heart",animation:"pulse",color:"#ef4444",...e}),"HeartBeat"),MenuToggle:t(e=>jsxRuntime.jsx(u,{icon:"hamburger",animation:"morph",...e}),"MenuToggle"),CheckDraw:t(e=>jsxRuntime.jsx(u,{icon:"check",animation:"draw",color:"#10b981",...e}),"CheckDraw"),BounceStar:t(e=>jsxRuntime.jsx(u,{icon:"star",animation:"bounce",color:"#fbbf24",...e}),"BounceStar"),HoverArrow:t(e=>jsxRuntime.jsx(u,{icon:"arrow",hoverAnimation:"scale",interactive:true,...e}),"HoverArrow")},de=u;
3
+ exports.AnimatedIcon=u;exports.AnimatedIconPresets=me;exports.default=de;
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- import {useState,useEffect,useRef}from'react';import {motion,AnimatePresence}from'motion/react';import {cn}from'@/lib/utils';import {jsx}from'react/jsx-runtime';var z=Object.defineProperty;var t=(e,r)=>z(e,"name",{value:r,configurable:true});function Z(){let[e,r]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let o=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}t(Z,"usePrefersReducedMotion");var q={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"},F={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}}}},J={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},K={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function U({paths:e,duration:r,strokeWidth:a=2,autoAnimate:o,repeat:c,onComplete:s}){let[i,m]=useState(0);return useEffect(()=>{if(!o||e.length<2)return;let l=setInterval(()=>{m(h=>{let d=(h+1)%e.length;return d===0&&!c&&(clearInterval(l),s?.()),d});},r);return ()=>clearInterval(l)},[o,e.length,r,c,s]),jsx(motion.path,{d:e[i],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[i]},transition:{duration:r/1e3,ease:"easeInOut"}})}t(U,"MorphingPath");function X({path:e,duration:r,strokeWidth:a=2,progress:o,autoAnimate:c}){let s=useRef(null),[i,m]=useState(0);useEffect(()=>{if(s.current){let h=s.current.getTotalLength();m(h);}},[e]);let l=o!==void 0?i*o:i;return jsx(motion.path,{ref:s,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:c?{pathLength:1}:{pathLength:l/i},transition:{duration:r/1e3,ease:"easeInOut"},style:{strokeDasharray:i,strokeDashoffset:i-l}})}t(X,"DrawingPath");function Y({size:e,strokeWidth:r=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:r,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}t(Y,"LoadingSpinner");function u({icon:e="loading",paths:r,animation:a="spin",size:o=24,color:c="currentColor",duration:s=1e3,autoAnimate:i=true,repeat:m=true,className:l,style:h,onAnimationComplete:d,onClick:P,interactive:k=true,hoverAnimation:M="scale",clickAnimation:C="scale",customVariants:x,viewBox:O="0 0 24 24",strokeWidth:v=2,loading:V=false,progress:R}){let[W,y]=useState(false),[H,A]=useState(false),I=Z(),S=x||F[a]||{},b=i&&!I,w=t(()=>{if(r)return Array.isArray(r)?r:[r];let p=q[e];return Array.isArray(p)?p:[p]},"getIconPaths")(),E=t(()=>{k&&(A(true),setTimeout(()=>A(false),200),P?.());},"handleClick"),B=t(()=>!k||!W?{}:J[M]||{},"getHoverVariant"),D=t(()=>!k||!H?{}:K[C]||{},"getClickVariant");if(V)return jsx(Y,{size:o,strokeWidth:v});let T=t(()=>a==="morph"&&w.length>1?jsx(U,{paths:w,duration:s,strokeWidth:v,autoAnimate:b,repeat:m,onComplete:d}):a==="draw"?jsx(X,{path:w[0],duration:s,strokeWidth:v,progress:R,autoAnimate:b}):w.map((p,j)=>jsx(motion.path,{d:p,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"},j)),"renderIcon");return jsx(motion.div,{className:cn("inline-flex items-center justify-center",k&&"cursor-pointer",l),style:{width:o,height:o,color:c,...h},onClick:E,onMouseEnter:()=>y(true),onMouseLeave:()=>y(false),variants:S,animate:b?"animate":"initial",whileHover:I?{}:B(),whileTap:I?{}:D(),onAnimationComplete:d,children:jsx("svg",{width:"100%",height:"100%",viewBox:O,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx(AnimatePresence,{mode:"wait",children:T()})})})}t(u,"AnimatedIcon");var ae={Spinner:t(e=>jsx(u,{icon:"loading",animation:"spin",...e}),"Spinner"),HeartBeat:t(e=>jsx(u,{icon:"heart",animation:"pulse",color:"#ef4444",...e}),"HeartBeat"),MenuToggle:t(e=>jsx(u,{icon:"hamburger",animation:"morph",...e}),"MenuToggle"),CheckDraw:t(e=>jsx(u,{icon:"check",animation:"draw",color:"#10b981",...e}),"CheckDraw"),BounceStar:t(e=>jsx(u,{icon:"star",animation:"bounce",color:"#fbbf24",...e}),"BounceStar"),HoverArrow:t(e=>jsx(u,{icon:"arrow",hoverAnimation:"scale",interactive:true,...e}),"HoverArrow")},ie=u;
3
- export{u as AnimatedIcon,ae as AnimatedIconPresets,ie as default};
2
+ import {useState,useEffect,useRef}from'react';import {motion,AnimatePresence}from'motion/react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx}from'react/jsx-runtime';var N=Object.defineProperty;var t=(e,r)=>N(e,"name",{value:r,configurable:true});function P(...e){return twMerge(clsx(e))}t(P,"cn");function G(){let[e,r]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let o=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}t(G,"usePrefersReducedMotion");var X={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"},Z={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}}}},q={scale:{scale:1.2},rotate:{rotate:15},glow:{filter:"drop-shadow(0 0 8px currentColor)"},shake:{x:[-2,2,-2,2,0]}},F={scale:{scale:.9},rotate:{rotate:180},ripple:{scale:[1,1.3,1]}};function J({paths:e,duration:r,strokeWidth:a=2,autoAnimate:o,repeat:c,onComplete:s}){let[i,m]=useState(0);return useEffect(()=>{if(!o||e.length<2)return;let l=setInterval(()=>{m(d=>{let h=(d+1)%e.length;return h===0&&!c&&(clearInterval(l),s?.()),h});},r);return ()=>clearInterval(l)},[o,e.length,r,c,s]),jsx(motion.path,{d:e[i],fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",animate:{d:e[i]},transition:{duration:r/1e3,ease:"easeInOut"}})}t(J,"MorphingPath");function K({path:e,duration:r,strokeWidth:a=2,progress:o,autoAnimate:c}){let s=useRef(null),[i,m]=useState(0);useEffect(()=>{if(s.current){let d=s.current.getTotalLength();m(d);}},[e]);let l=o!==void 0?i*o:i;return jsx(motion.path,{ref:s,d:e,fill:"none",stroke:"currentColor",strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round",initial:{pathLength:0},animate:c?{pathLength:1}:{pathLength:l/i},transition:{duration:r/1e3,ease:"easeInOut"},style:{strokeDasharray:i,strokeDashoffset:i-l}})}t(K,"DrawingPath");function Y({size:e,strokeWidth:r=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:r,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}t(Y,"LoadingSpinner");function u({icon:e="loading",paths:r,animation:a="spin",size:o=24,color:c="currentColor",duration:s=1e3,autoAnimate:i=true,repeat:m=true,className:l,style:d,onAnimationComplete:h,onClick:M,interactive:k=true,hoverAnimation:C="scale",clickAnimation:x="scale",customVariants:V,viewBox:O="0 0 24 24",strokeWidth:v=2,loading:R=false,progress:S}){let[D,I]=useState(false),[W,A]=useState(false),L=G(),E=V||Z[a]||{},b=i&&!L,w=t(()=>{if(r)return Array.isArray(r)?r:[r];let p=X[e];return Array.isArray(p)?p:[p]},"getIconPaths")(),H=t(()=>{k&&(A(true),setTimeout(()=>A(false),200),M?.());},"handleClick"),B=t(()=>!k||!D?{}:q[C]||{},"getHoverVariant"),T=t(()=>!k||!W?{}:F[x]||{},"getClickVariant");if(R)return jsx(Y,{size:o,strokeWidth:v});let U=t(()=>a==="morph"&&w.length>1?jsx(J,{paths:w,duration:s,strokeWidth:v,autoAnimate:b,repeat:m,onComplete:h}):a==="draw"?jsx(K,{path:w[0],duration:s,strokeWidth:v,progress:S,autoAnimate:b}):w.map((p,j)=>jsx(motion.path,{d:p,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:v,strokeLinecap:"round",strokeLinejoin:"round"},j)),"renderIcon");return jsx(motion.div,{className:P("inline-flex items-center justify-center",k&&"cursor-pointer",l),style:{width:o,height:o,color:c,...d},onClick:H,onMouseEnter:()=>I(true),onMouseLeave:()=>I(false),variants:E,animate:b?"animate":"initial",whileHover:L?{}:B(),whileTap:L?{}:T(),onAnimationComplete:h,children:jsx("svg",{width:"100%",height:"100%",viewBox:O,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsx(AnimatePresence,{mode:"wait",children:U()})})})}t(u,"AnimatedIcon");var me={Spinner:t(e=>jsx(u,{icon:"loading",animation:"spin",...e}),"Spinner"),HeartBeat:t(e=>jsx(u,{icon:"heart",animation:"pulse",color:"#ef4444",...e}),"HeartBeat"),MenuToggle:t(e=>jsx(u,{icon:"hamburger",animation:"morph",...e}),"MenuToggle"),CheckDraw:t(e=>jsx(u,{icon:"check",animation:"draw",color:"#10b981",...e}),"CheckDraw"),BounceStar:t(e=>jsx(u,{icon:"star",animation:"bounce",color:"#fbbf24",...e}),"BounceStar"),HoverArrow:t(e=>jsx(u,{icon:"arrow",hoverAnimation:"scale",interactive:true,...e}),"HoverArrow")},de=u;
3
+ export{u as AnimatedIcon,me as AnimatedIconPresets,de as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');var B=Object.defineProperty;var t=(e,s)=>B(e,"name",{value:s,configurable:true});function W(){let[e,s]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");s(a.matches);let d=t(c=>{s(c.matches);},"handleChange");return a.addEventListener("change",d),()=>a.removeEventListener("change",d)},[]),e}t(W,"usePrefersReducedMotion");var X={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Y={hidden:{opacity:0},visible:t(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},Z={hidden:{opacity:0,scale:.8},visible:t(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}}},_={hidden:{opacity:0,y:50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},j={hidden:{opacity:0,y:-50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},H={hidden:{opacity:0,x:50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},ee={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},te={slide:X,fade:Y,scale:Z,slideUp:_,slideDown:j,slideLeft:H,slideRight:ee};function ie(e,s,a,d){let[c,x]=react.useState(0),b=react.useMemo(()=>{if(!d)return e;let r=Math.floor(c/a),p=Math.min(r+Math.ceil(s/a)+1,e.length);return e.slice(r,p).map((A,f)=>({...A,virtualIndex:r+f,style:{position:"absolute",top:(r+f)*a,height:a,width:"100%"}}))},[e,c,a,s,d]),g=e.length*a,m=react.useCallback(r=>{x(r.currentTarget.scrollTop);},[]);return {visibleItems:b,totalHeight:g,handleScroll:m}}t(ie,"useVirtualizedList");function l({items:e,animation:s="slideUp",staggerDelay:a=100,duration:d=500,reorderable:c=false,enableAddRemove:x=true,layout:b="vertical",gridColumns:g=3,className:m,itemClassName:r,style:p,onReorder:A,onItemClick:f,showHoverEffects:R=true,customVariants:T,virtualized:I=false,itemHeight:E=60,containerHeight:P=400,autoStart:N=true,onAnimationComplete:z}){let[v,w]=react.useState(e),[D,ne]=react.useState(0),G=W(),u=T||te[s],K=!G&&N,{visibleItems:Q,totalHeight:F,handleScroll:$}=ie(e,P,E,I);react.useEffect(()=>{w(e);},[e]);let q=react.useMemo(()=>!u.visible||typeof u.visible!="function"?u:{...u,visible:t(i=>{let o=u.visible,h=o(i);return {...h,transition:{...h.transition,delay:i*(a/1e3),duration:d/1e3}}},"visible")},[u,a,d]),C=t(()=>{switch(b){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${g}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),S=t((i,o,h)=>jsxRuntime.jsx(react$1.motion.div,{custom:o,variants:q,initial:K?"hidden":"visible",animate:"visible",exit:"exit",layout:x,className:utils.cn("cursor-pointer select-none",R&&"hover:scale-105 transition-transform",r),style:h,onClick:()=>f?.(i,o),whileHover:R?{scale:1.02}:void 0,whileTap:R?{scale:.98}:void 0,onAnimationComplete:()=>{o===v.length-1&&z?.();},children:i.content},i.id),"renderListItem");return c&&!I?jsxRuntime.jsx(react$1.Reorder.Group,{axis:b==="horizontal"?"x":"y",values:v,onReorder:i=>{w(i),A?.(i);},className:utils.cn(C(),m),style:p,children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>jsxRuntime.jsx(react$1.Reorder.Item,{value:i,className:utils.cn("cursor-grab active:cursor-grabbing",r),whileDrag:{scale:1.05,zIndex:10},children:i.content},i.id))})}):I?jsxRuntime.jsx("div",{className:utils.cn("overflow-auto",m),style:{height:P,...p},onScroll:$,children:jsxRuntime.jsx("div",{style:{height:F,position:"relative"},children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:Q.map((i,o)=>S(i,i.virtualIndex||o,i.style))})})}):jsxRuntime.jsx(react$1.motion.div,{className:utils.cn(C(),m),style:p,initial:"hidden",animate:"visible",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>S(i,o))})},D)}t(l,"AnimatedList");var ue={FadeList:t(e=>jsxRuntime.jsx(l,{animation:"fade",...e}),"FadeList"),ScaleList:t(e=>jsxRuntime.jsx(l,{animation:"scale",...e}),"ScaleList"),SlideUpList:t(e=>jsxRuntime.jsx(l,{animation:"slideUp",...e}),"SlideUpList"),CarouselList:t(e=>jsxRuntime.jsx(l,{layout:"horizontal",animation:"slideLeft",...e}),"CarouselList"),GridList:t(e=>jsxRuntime.jsx(l,{layout:"grid",animation:"scale",...e}),"GridList"),TaskList:t(e=>jsxRuntime.jsx(l,{reorderable:true,animation:"slideUp",showHoverEffects:true,...e}),"TaskList")},me=l;exports.AnimatedList=l;exports.AnimatedListPresets=ue;exports.default=me;
2
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');var F=Object.defineProperty;var t=(e,r)=>F(e,"name",{value:r,configurable:true});function m(...e){return tailwindMerge.twMerge(clsx.clsx(e))}t(m,"cn");function W(){let[e,r]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let d=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",d),()=>a.removeEventListener("change",d)},[]),e}t(W,"usePrefersReducedMotion");var Y={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Z={hidden:{opacity:0},visible:t(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},j={hidden:{opacity:0,scale:.8},visible:t(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}}},H={hidden:{opacity:0,y:50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},ee={hidden:{opacity:0,y:-50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},te={hidden:{opacity:0,x:50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},ie={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},ne={slide:Y,fade:Z,scale:j,slideUp:H,slideDown:ee,slideLeft:te,slideRight:ie};function ae(e,r,a,d){let[c,x]=react.useState(0),f=react.useMemo(()=>{if(!d)return e;let s=Math.floor(c/a),y=Math.min(s+Math.ceil(r/a)+1,e.length);return e.slice(s,y).map((A,b)=>({...A,virtualIndex:s+b,style:{position:"absolute",top:(s+b)*a,height:a,width:"100%"}}))},[e,c,a,r,d]),g=e.length*a,p=react.useCallback(s=>{x(s.currentTarget.scrollTop);},[]);return {visibleItems:f,totalHeight:g,handleScroll:p}}t(ae,"useVirtualizedList");function l({items:e,animation:r="slideUp",staggerDelay:a=100,duration:d=500,reorderable:c=false,enableAddRemove:x=true,layout:f="vertical",gridColumns:g=3,className:p,itemClassName:s,style:y,onReorder:A,onItemClick:b,showHoverEffects:R=true,customVariants:T,virtualized:V=false,itemHeight:k=60,containerHeight:P=400,autoStart:E=true,onAnimationComplete:N}){let[v,C]=react.useState(e),[z,oe]=react.useState(0),G=W(),u=T||ne[r],_=!G&&E,{visibleItems:$,totalHeight:K,handleScroll:Q}=ae(e,P,k,V);react.useEffect(()=>{C(e);},[e]);let B=react.useMemo(()=>!u.visible||typeof u.visible!="function"?u:{...u,visible:t(i=>{let o=u.visible,h=o(i);return {...h,transition:{...h.transition,delay:i*(a/1e3),duration:d/1e3}}},"visible")},[u,a,d]),w=t(()=>{switch(f){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${g}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),S=t((i,o,h)=>jsxRuntime.jsx(react$1.motion.div,{custom:o,variants:B,initial:_?"hidden":"visible",animate:"visible",exit:"exit",layout:x,className:m("cursor-pointer select-none",R&&"hover:scale-105 transition-transform",s),style:h,onClick:()=>b?.(i,o),whileHover:R?{scale:1.02}:void 0,whileTap:R?{scale:.98}:void 0,onAnimationComplete:()=>{o===v.length-1&&N?.();},children:i.content},i.id),"renderListItem");return c&&!V?jsxRuntime.jsx(react$1.Reorder.Group,{axis:f==="horizontal"?"x":"y",values:v,onReorder:i=>{C(i),A?.(i);},className:m(w(),p),style:y,children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>jsxRuntime.jsx(react$1.Reorder.Item,{value:i,className:m("cursor-grab active:cursor-grabbing",s),whileDrag:{scale:1.05,zIndex:10},children:i.content},i.id))})}):V?jsxRuntime.jsx("div",{className:m("overflow-auto",p),style:{height:P,...y},onScroll:Q,children:jsxRuntime.jsx("div",{style:{height:K,position:"relative"},children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:$.map((i,o)=>S(i,i.virtualIndex||o,i.style))})})}):jsxRuntime.jsx(react$1.motion.div,{className:m(w(),p),style:y,initial:"hidden",animate:"visible",children:jsxRuntime.jsx(react$1.AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>S(i,o))})},z)}t(l,"AnimatedList");var ve={FadeList:t(e=>jsxRuntime.jsx(l,{animation:"fade",...e}),"FadeList"),ScaleList:t(e=>jsxRuntime.jsx(l,{animation:"scale",...e}),"ScaleList"),SlideUpList:t(e=>jsxRuntime.jsx(l,{animation:"slideUp",...e}),"SlideUpList"),CarouselList:t(e=>jsxRuntime.jsx(l,{layout:"horizontal",animation:"slideLeft",...e}),"CarouselList"),GridList:t(e=>jsxRuntime.jsx(l,{layout:"grid",animation:"scale",...e}),"GridList"),TaskList:t(e=>jsxRuntime.jsx(l,{reorderable:true,animation:"slideUp",showHoverEffects:true,...e}),"TaskList")},he=l;exports.AnimatedList=l;exports.AnimatedListPresets=ve;exports.default=he;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {useState,useEffect,useMemo,useCallback}from'react';import {motion,Reorder,AnimatePresence}from'motion/react';import {cn}from'@/lib/utils';import {jsx}from'react/jsx-runtime';var B=Object.defineProperty;var t=(e,s)=>B(e,"name",{value:s,configurable:true});function W(){let[e,s]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");s(a.matches);let d=t(c=>{s(c.matches);},"handleChange");return a.addEventListener("change",d),()=>a.removeEventListener("change",d)},[]),e}t(W,"usePrefersReducedMotion");var X={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Y={hidden:{opacity:0},visible:t(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},Z={hidden:{opacity:0,scale:.8},visible:t(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}}},_={hidden:{opacity:0,y:50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},j={hidden:{opacity:0,y:-50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},H={hidden:{opacity:0,x:50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},ee={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},te={slide:X,fade:Y,scale:Z,slideUp:_,slideDown:j,slideLeft:H,slideRight:ee};function ie(e,s,a,d){let[c,x]=useState(0),b=useMemo(()=>{if(!d)return e;let r=Math.floor(c/a),p=Math.min(r+Math.ceil(s/a)+1,e.length);return e.slice(r,p).map((A,f)=>({...A,virtualIndex:r+f,style:{position:"absolute",top:(r+f)*a,height:a,width:"100%"}}))},[e,c,a,s,d]),g=e.length*a,m=useCallback(r=>{x(r.currentTarget.scrollTop);},[]);return {visibleItems:b,totalHeight:g,handleScroll:m}}t(ie,"useVirtualizedList");function l({items:e,animation:s="slideUp",staggerDelay:a=100,duration:d=500,reorderable:c=false,enableAddRemove:x=true,layout:b="vertical",gridColumns:g=3,className:m,itemClassName:r,style:p,onReorder:A,onItemClick:f,showHoverEffects:R=true,customVariants:T,virtualized:I=false,itemHeight:E=60,containerHeight:P=400,autoStart:N=true,onAnimationComplete:z}){let[v,w]=useState(e),[D,ne]=useState(0),G=W(),u=T||te[s],K=!G&&N,{visibleItems:Q,totalHeight:F,handleScroll:$}=ie(e,P,E,I);useEffect(()=>{w(e);},[e]);let q=useMemo(()=>!u.visible||typeof u.visible!="function"?u:{...u,visible:t(i=>{let o=u.visible,h=o(i);return {...h,transition:{...h.transition,delay:i*(a/1e3),duration:d/1e3}}},"visible")},[u,a,d]),C=t(()=>{switch(b){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${g}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),S=t((i,o,h)=>jsx(motion.div,{custom:o,variants:q,initial:K?"hidden":"visible",animate:"visible",exit:"exit",layout:x,className:cn("cursor-pointer select-none",R&&"hover:scale-105 transition-transform",r),style:h,onClick:()=>f?.(i,o),whileHover:R?{scale:1.02}:void 0,whileTap:R?{scale:.98}:void 0,onAnimationComplete:()=>{o===v.length-1&&z?.();},children:i.content},i.id),"renderListItem");return c&&!I?jsx(Reorder.Group,{axis:b==="horizontal"?"x":"y",values:v,onReorder:i=>{w(i),A?.(i);},className:cn(C(),m),style:p,children:jsx(AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>jsx(Reorder.Item,{value:i,className:cn("cursor-grab active:cursor-grabbing",r),whileDrag:{scale:1.05,zIndex:10},children:i.content},i.id))})}):I?jsx("div",{className:cn("overflow-auto",m),style:{height:P,...p},onScroll:$,children:jsx("div",{style:{height:F,position:"relative"},children:jsx(AnimatePresence,{mode:"popLayout",children:Q.map((i,o)=>S(i,i.virtualIndex||o,i.style))})})}):jsx(motion.div,{className:cn(C(),m),style:p,initial:"hidden",animate:"visible",children:jsx(AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>S(i,o))})},D)}t(l,"AnimatedList");var ue={FadeList:t(e=>jsx(l,{animation:"fade",...e}),"FadeList"),ScaleList:t(e=>jsx(l,{animation:"scale",...e}),"ScaleList"),SlideUpList:t(e=>jsx(l,{animation:"slideUp",...e}),"SlideUpList"),CarouselList:t(e=>jsx(l,{layout:"horizontal",animation:"slideLeft",...e}),"CarouselList"),GridList:t(e=>jsx(l,{layout:"grid",animation:"scale",...e}),"GridList"),TaskList:t(e=>jsx(l,{reorderable:true,animation:"slideUp",showHoverEffects:true,...e}),"TaskList")},me=l;export{l as AnimatedList,ue as AnimatedListPresets,me as default};
2
+ import {useState,useEffect,useMemo,useCallback}from'react';import {motion,Reorder,AnimatePresence}from'motion/react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx}from'react/jsx-runtime';var F=Object.defineProperty;var t=(e,r)=>F(e,"name",{value:r,configurable:true});function m(...e){return twMerge(clsx(e))}t(m,"cn");function W(){let[e,r]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");r(a.matches);let d=t(c=>{r(c.matches);},"handleChange");return a.addEventListener("change",d),()=>a.removeEventListener("change",d)},[]),e}t(W,"usePrefersReducedMotion");var Y={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},Z={hidden:{opacity:0},visible:t(e=>({opacity:1,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,transition:{duration:.3}}},j={hidden:{opacity:0,scale:.8},visible:t(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}}},H={hidden:{opacity:0,y:50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:-50,transition:{duration:.3}}},ee={hidden:{opacity:0,y:-50},visible:t(e=>({opacity:1,y:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,y:50,transition:{duration:.3}}},te={hidden:{opacity:0,x:50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:-50,transition:{duration:.3}}},ie={hidden:{opacity:0,x:-50},visible:t(e=>({opacity:1,x:0,transition:{delay:e*.1,duration:.5,ease:"easeOut"}}),"visible"),exit:{opacity:0,x:50,transition:{duration:.3}}},ne={slide:Y,fade:Z,scale:j,slideUp:H,slideDown:ee,slideLeft:te,slideRight:ie};function ae(e,r,a,d){let[c,x]=useState(0),f=useMemo(()=>{if(!d)return e;let s=Math.floor(c/a),y=Math.min(s+Math.ceil(r/a)+1,e.length);return e.slice(s,y).map((A,b)=>({...A,virtualIndex:s+b,style:{position:"absolute",top:(s+b)*a,height:a,width:"100%"}}))},[e,c,a,r,d]),g=e.length*a,p=useCallback(s=>{x(s.currentTarget.scrollTop);},[]);return {visibleItems:f,totalHeight:g,handleScroll:p}}t(ae,"useVirtualizedList");function l({items:e,animation:r="slideUp",staggerDelay:a=100,duration:d=500,reorderable:c=false,enableAddRemove:x=true,layout:f="vertical",gridColumns:g=3,className:p,itemClassName:s,style:y,onReorder:A,onItemClick:b,showHoverEffects:R=true,customVariants:T,virtualized:V=false,itemHeight:k=60,containerHeight:P=400,autoStart:E=true,onAnimationComplete:N}){let[v,C]=useState(e),[z,oe]=useState(0),G=W(),u=T||ne[r],_=!G&&E,{visibleItems:$,totalHeight:K,handleScroll:Q}=ae(e,P,k,V);useEffect(()=>{C(e);},[e]);let B=useMemo(()=>!u.visible||typeof u.visible!="function"?u:{...u,visible:t(i=>{let o=u.visible,h=o(i);return {...h,transition:{...h.transition,delay:i*(a/1e3),duration:d/1e3}}},"visible")},[u,a,d]),w=t(()=>{switch(f){case "horizontal":return "flex flex-row gap-4 overflow-x-auto";case "grid":return `grid gap-4 grid-cols-${g}`;default:return "flex flex-col gap-4"}},"getLayoutClassName"),S=t((i,o,h)=>jsx(motion.div,{custom:o,variants:B,initial:_?"hidden":"visible",animate:"visible",exit:"exit",layout:x,className:m("cursor-pointer select-none",R&&"hover:scale-105 transition-transform",s),style:h,onClick:()=>b?.(i,o),whileHover:R?{scale:1.02}:void 0,whileTap:R?{scale:.98}:void 0,onAnimationComplete:()=>{o===v.length-1&&N?.();},children:i.content},i.id),"renderListItem");return c&&!V?jsx(Reorder.Group,{axis:f==="horizontal"?"x":"y",values:v,onReorder:i=>{C(i),A?.(i);},className:m(w(),p),style:y,children:jsx(AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>jsx(Reorder.Item,{value:i,className:m("cursor-grab active:cursor-grabbing",s),whileDrag:{scale:1.05,zIndex:10},children:i.content},i.id))})}):V?jsx("div",{className:m("overflow-auto",p),style:{height:P,...y},onScroll:Q,children:jsx("div",{style:{height:K,position:"relative"},children:jsx(AnimatePresence,{mode:"popLayout",children:$.map((i,o)=>S(i,i.virtualIndex||o,i.style))})})}):jsx(motion.div,{className:m(w(),p),style:y,initial:"hidden",animate:"visible",children:jsx(AnimatePresence,{mode:"popLayout",children:v.map((i,o)=>S(i,o))})},z)}t(l,"AnimatedList");var ve={FadeList:t(e=>jsx(l,{animation:"fade",...e}),"FadeList"),ScaleList:t(e=>jsx(l,{animation:"scale",...e}),"ScaleList"),SlideUpList:t(e=>jsx(l,{animation:"slideUp",...e}),"SlideUpList"),CarouselList:t(e=>jsx(l,{layout:"horizontal",animation:"slideLeft",...e}),"CarouselList"),GridList:t(e=>jsx(l,{layout:"grid",animation:"scale",...e}),"GridList"),TaskList:t(e=>jsx(l,{reorderable:true,animation:"slideUp",showHoverEffects:true,...e}),"TaskList")},he=l;export{l as AnimatedList,ve as AnimatedListPresets,he as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),utils=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime');var K=Object.defineProperty;var u=(n,t)=>K(n,"name",{value:t,configurable:true});function O(){let[n,t]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let e=u(f=>{t(f.matches);},"handleChange");return o.addEventListener("change",e),()=>o.removeEventListener("change",e)},[]),n}u(O,"usePrefersReducedMotion");function z(n,t,o,e,f,w,b,F,g,a,r,c){let[m,y]=react.useState(t),[l,N]=react.useState(false),h=react.useRef(null),p=O(),d=react$1.useSpring(t,{stiffness:r.tension||100,damping:r.friction||10,mass:r.mass||1}),[E,I]=react.useState(t),A=react.useCallback(()=>{if(p){y(n);return}if(N(true),a)d.set(n);else {let s=Date.now(),i=m,R=n-i,v=u(()=>{let D=Date.now()-s,P=Math.min(D/o,1),C=i+R*P;y(C),I(C),P<1?h.current=requestAnimationFrame(v):(N(false),h.current=null);},"animate");h.current=requestAnimationFrame(v);}},[n,m,o,a,d,p]);return react.useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),react.useEffect(()=>{if(a){let s=d.onChange(i=>{y(i),Math.abs(i-n)<.01&&N(false);});return ()=>{s();}}},[d,a,n]),react.useEffect(()=>{g&&A();},[g,A]),{formattedValue:react.useMemo(()=>{let s=Math.round(m*Math.pow(10,e))/Math.pow(10,e);try{switch(f){case "currency":return new Intl.NumberFormat(b,{style:"currency",currency:w,minimumFractionDigits:e,maximumFractionDigits:e}).format(s);case "percent":return new Intl.NumberFormat(b,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(s/100);default:let i=new Intl.NumberFormat(b,{minimumFractionDigits:e,maximumFractionDigits:e}).format(s);return c&&c!==","&&(i=i.replace(/,/g,c)),i}}catch{return s.toFixed(e)}},[m,e,f,w,b,c]),displayValue:m,isAnimating:l,startAnimation:A}}u(z,"useAnimatedNumber");function L({value:n,from:t=0,duration:o=2e3,decimals:e=0,format:f="number",currency:w="USD",locale:b="en-US",easing:F="easeOut",autoStart:g=true,onComplete:a,className:r,style:c,prefix:m="",suffix:y="",useSpring:l=false,springConfig:N={},separator:h,animateOnHover:p=false,hoverValue:d}){let[E,I]=react.useState(false),[A,B]=react.useState(0),s=p&&E&&d!==void 0?d:n,{formattedValue:i,displayValue:R,isAnimating:v,startAnimation:D}=z(s,t,o,e,f,w,b,F,g,l,N,h);react.useEffect(()=>{!v&&a&&Math.abs(R-s)<.001&&a(R);},[v,R,s,a]),react.useEffect(()=>{p&&d!==void 0&&D();},[E,p,d,D]);let P=u(()=>{p&&I(true);},"handleMouseEnter"),S=u(()=>{p&&I(false);},"handleMouseLeave"),C=O();return jsxRuntime.jsxs(react$1.motion.span,{className:utils.cn("inline-block tabular-nums",r),style:c,onMouseEnter:P,onMouseLeave:S,initial:{scale:1},animate:!C&&v?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[m,jsxRuntime.jsx(react$1.motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:i},A),y]})}u(L,"AnimatedNumber");function $({initialValue:n=0,min:t=-1/0,max:o=1/0,step:e=1,showControls:f=true,incrementButton:w,decrementButton:b,onChange:F,className:g,...a}){let[r,c]=react.useState(n),m=u(()=>{let l=Math.min(r+e,o);c(l),F?.(l);},"increment"),y=u(()=>{let l=Math.max(r-e,t);c(l),F?.(l);},"decrement");return f?jsxRuntime.jsxs("div",{className:utils.cn("flex items-center gap-2",g),children:[jsxRuntime.jsx(react$1.motion.button,{onClick:y,disabled:r<=t,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:b||"\u2212"}),jsxRuntime.jsx(L,{value:r,...a}),jsxRuntime.jsx(react$1.motion.button,{onClick:m,disabled:r>=o,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:w||"+"})]}):jsxRuntime.jsx(L,{value:r,className:g,...a})}u($,"AnimatedCounter");var ee=L;exports.AnimatedCounter=$;exports.AnimatedNumber=L;exports.default=ee;
2
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var react=require('react'),react$1=require('motion/react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');var _=Object.defineProperty;var r=(n,t)=>_(n,"name",{value:t,configurable:true});function E(...n){return tailwindMerge.twMerge(clsx.clsx(n))}r(E,"cn");function T(){let[n,t]=react.useState(false);return react.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");t(a.matches);let e=r(f=>{t(f.matches);},"handleChange");return a.addEventListener("change",e),()=>a.removeEventListener("change",e)},[]),n}r(T,"usePrefersReducedMotion");function X(n,t,a,e,f,M,b,N,g,u,o,c){let[m,y]=react.useState(t),[l,A]=react.useState(false),h=react.useRef(null),p=T(),d=react$1.useSpring(t,{stiffness:o.tension||100,damping:o.friction||10,mass:o.mass||1}),[L,D]=react.useState(t),F=react.useCallback(()=>{if(p){y(n);return}if(A(true),u)d.set(n);else {let s=Date.now(),i=m,R=n-i,x=r(()=>{let P=Date.now()-s,C=Math.min(P/a,1),I=i+R*C;y(I),D(I),C<1?h.current=requestAnimationFrame(x):(A(false),h.current=null);},"animate");h.current=requestAnimationFrame(x);}},[n,m,a,u,d,p]);return react.useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),react.useEffect(()=>{if(u){let s=d.onChange(i=>{y(i),Math.abs(i-n)<.01&&A(false);});return ()=>{s();}}},[d,u,n]),react.useEffect(()=>{g&&F();},[g,F]),{formattedValue:react.useMemo(()=>{let s=Math.round(m*Math.pow(10,e))/Math.pow(10,e);try{switch(f){case "currency":return new Intl.NumberFormat(b,{style:"currency",currency:M,minimumFractionDigits:e,maximumFractionDigits:e}).format(s);case "percent":return new Intl.NumberFormat(b,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(s/100);default:let i=new Intl.NumberFormat(b,{minimumFractionDigits:e,maximumFractionDigits:e}).format(s);return c&&c!==","&&(i=i.replace(/,/g,c)),i}}catch{return s.toFixed(e)}},[m,e,f,M,b,c]),displayValue:m,isAnimating:l,startAnimation:F}}r(X,"useAnimatedNumber");function S({value:n,from:t=0,duration:a=2e3,decimals:e=0,format:f="number",currency:M="USD",locale:b="en-US",easing:N="easeOut",autoStart:g=true,onComplete:u,className:o,style:c,prefix:m="",suffix:y="",useSpring:l=false,springConfig:A={},separator:h,animateOnHover:p=false,hoverValue:d}){let[L,D]=react.useState(false),[F,O]=react.useState(0),s=p&&L&&d!==void 0?d:n,{formattedValue:i,displayValue:R,isAnimating:x,startAnimation:P}=X(s,t,a,e,f,M,b,N,g,l,A,h);react.useEffect(()=>{!x&&u&&Math.abs(R-s)<.001&&u(R);},[x,R,s,u]),react.useEffect(()=>{p&&d!==void 0&&P();},[L,p,d,P]);let C=r(()=>{p&&D(true);},"handleMouseEnter"),U=r(()=>{p&&D(false);},"handleMouseLeave"),I=T();return jsxRuntime.jsxs(react$1.motion.span,{className:E("inline-block tabular-nums",o),style:c,onMouseEnter:C,onMouseLeave:U,initial:{scale:1},animate:!I&&x?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[m,jsxRuntime.jsx(react$1.motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:i},F),y]})}r(S,"AnimatedNumber");function se({initialValue:n=0,min:t=-1/0,max:a=1/0,step:e=1,showControls:f=true,incrementButton:M,decrementButton:b,onChange:N,className:g,...u}){let[o,c]=react.useState(n),m=r(()=>{let l=Math.min(o+e,a);c(l),N?.(l);},"increment"),y=r(()=>{let l=Math.max(o-e,t);c(l),N?.(l);},"decrement");return f?jsxRuntime.jsxs("div",{className:E("flex items-center gap-2",g),children:[jsxRuntime.jsx(react$1.motion.button,{onClick:y,disabled:o<=t,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:b||"\u2212"}),jsxRuntime.jsx(S,{value:o,...u}),jsxRuntime.jsx(react$1.motion.button,{onClick:m,disabled:o>=a,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:M||"+"})]}):jsxRuntime.jsx(S,{value:o,className:g,...u})}r(se,"AnimatedCounter");var ie=S;exports.AnimatedCounter=se;exports.AnimatedNumber=S;exports.default=ie;
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import {useState,useEffect,useRef,useCallback,useMemo}from'react';import {motion,useSpring}from'motion/react';import {cn}from'@/lib/utils';import {jsxs,jsx}from'react/jsx-runtime';var K=Object.defineProperty;var u=(n,t)=>K(n,"name",{value:t,configurable:true});function O(){let[n,t]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let o=window.matchMedia("(prefers-reduced-motion: reduce)");t(o.matches);let e=u(f=>{t(f.matches);},"handleChange");return o.addEventListener("change",e),()=>o.removeEventListener("change",e)},[]),n}u(O,"usePrefersReducedMotion");function z(n,t,o,e,f,w,b,F,g,a,r,c){let[m,y]=useState(t),[l,N]=useState(false),h=useRef(null),p=O(),d=useSpring(t,{stiffness:r.tension||100,damping:r.friction||10,mass:r.mass||1}),[E,I]=useState(t),A=useCallback(()=>{if(p){y(n);return}if(N(true),a)d.set(n);else {let s=Date.now(),i=m,R=n-i,v=u(()=>{let D=Date.now()-s,P=Math.min(D/o,1),C=i+R*P;y(C),I(C),P<1?h.current=requestAnimationFrame(v):(N(false),h.current=null);},"animate");h.current=requestAnimationFrame(v);}},[n,m,o,a,d,p]);return useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),useEffect(()=>{if(a){let s=d.onChange(i=>{y(i),Math.abs(i-n)<.01&&N(false);});return ()=>{s();}}},[d,a,n]),useEffect(()=>{g&&A();},[g,A]),{formattedValue:useMemo(()=>{let s=Math.round(m*Math.pow(10,e))/Math.pow(10,e);try{switch(f){case "currency":return new Intl.NumberFormat(b,{style:"currency",currency:w,minimumFractionDigits:e,maximumFractionDigits:e}).format(s);case "percent":return new Intl.NumberFormat(b,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(s/100);default:let i=new Intl.NumberFormat(b,{minimumFractionDigits:e,maximumFractionDigits:e}).format(s);return c&&c!==","&&(i=i.replace(/,/g,c)),i}}catch{return s.toFixed(e)}},[m,e,f,w,b,c]),displayValue:m,isAnimating:l,startAnimation:A}}u(z,"useAnimatedNumber");function L({value:n,from:t=0,duration:o=2e3,decimals:e=0,format:f="number",currency:w="USD",locale:b="en-US",easing:F="easeOut",autoStart:g=true,onComplete:a,className:r,style:c,prefix:m="",suffix:y="",useSpring:l=false,springConfig:N={},separator:h,animateOnHover:p=false,hoverValue:d}){let[E,I]=useState(false),[A,B]=useState(0),s=p&&E&&d!==void 0?d:n,{formattedValue:i,displayValue:R,isAnimating:v,startAnimation:D}=z(s,t,o,e,f,w,b,F,g,l,N,h);useEffect(()=>{!v&&a&&Math.abs(R-s)<.001&&a(R);},[v,R,s,a]),useEffect(()=>{p&&d!==void 0&&D();},[E,p,d,D]);let P=u(()=>{p&&I(true);},"handleMouseEnter"),S=u(()=>{p&&I(false);},"handleMouseLeave"),C=O();return jsxs(motion.span,{className:cn("inline-block tabular-nums",r),style:c,onMouseEnter:P,onMouseLeave:S,initial:{scale:1},animate:!C&&v?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[m,jsx(motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:i},A),y]})}u(L,"AnimatedNumber");function $({initialValue:n=0,min:t=-1/0,max:o=1/0,step:e=1,showControls:f=true,incrementButton:w,decrementButton:b,onChange:F,className:g,...a}){let[r,c]=useState(n),m=u(()=>{let l=Math.min(r+e,o);c(l),F?.(l);},"increment"),y=u(()=>{let l=Math.max(r-e,t);c(l),F?.(l);},"decrement");return f?jsxs("div",{className:cn("flex items-center gap-2",g),children:[jsx(motion.button,{onClick:y,disabled:r<=t,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:b||"\u2212"}),jsx(L,{value:r,...a}),jsx(motion.button,{onClick:m,disabled:r>=o,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:w||"+"})]}):jsx(L,{value:r,className:g,...a})}u($,"AnimatedCounter");var ee=L;export{$ as AnimatedCounter,L as AnimatedNumber,ee as default};
2
+ import {useState,useEffect,useRef,useCallback,useMemo}from'react';import {motion,useSpring}from'motion/react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx}from'react/jsx-runtime';var _=Object.defineProperty;var r=(n,t)=>_(n,"name",{value:t,configurable:true});function E(...n){return twMerge(clsx(n))}r(E,"cn");function T(){let[n,t]=useState(false);return useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");t(a.matches);let e=r(f=>{t(f.matches);},"handleChange");return a.addEventListener("change",e),()=>a.removeEventListener("change",e)},[]),n}r(T,"usePrefersReducedMotion");function X(n,t,a,e,f,M,b,N,g,u,o,c){let[m,y]=useState(t),[l,A]=useState(false),h=useRef(null),p=T(),d=useSpring(t,{stiffness:o.tension||100,damping:o.friction||10,mass:o.mass||1}),[L,D]=useState(t),F=useCallback(()=>{if(p){y(n);return}if(A(true),u)d.set(n);else {let s=Date.now(),i=m,R=n-i,x=r(()=>{let P=Date.now()-s,C=Math.min(P/a,1),I=i+R*C;y(I),D(I),C<1?h.current=requestAnimationFrame(x):(A(false),h.current=null);},"animate");h.current=requestAnimationFrame(x);}},[n,m,a,u,d,p]);return useEffect(()=>()=>{h.current&&cancelAnimationFrame(h.current);},[]),useEffect(()=>{if(u){let s=d.onChange(i=>{y(i),Math.abs(i-n)<.01&&A(false);});return ()=>{s();}}},[d,u,n]),useEffect(()=>{g&&F();},[g,F]),{formattedValue:useMemo(()=>{let s=Math.round(m*Math.pow(10,e))/Math.pow(10,e);try{switch(f){case "currency":return new Intl.NumberFormat(b,{style:"currency",currency:M,minimumFractionDigits:e,maximumFractionDigits:e}).format(s);case "percent":return new Intl.NumberFormat(b,{style:"percent",minimumFractionDigits:e,maximumFractionDigits:e}).format(s/100);default:let i=new Intl.NumberFormat(b,{minimumFractionDigits:e,maximumFractionDigits:e}).format(s);return c&&c!==","&&(i=i.replace(/,/g,c)),i}}catch{return s.toFixed(e)}},[m,e,f,M,b,c]),displayValue:m,isAnimating:l,startAnimation:F}}r(X,"useAnimatedNumber");function S({value:n,from:t=0,duration:a=2e3,decimals:e=0,format:f="number",currency:M="USD",locale:b="en-US",easing:N="easeOut",autoStart:g=true,onComplete:u,className:o,style:c,prefix:m="",suffix:y="",useSpring:l=false,springConfig:A={},separator:h,animateOnHover:p=false,hoverValue:d}){let[L,D]=useState(false),[F,O]=useState(0),s=p&&L&&d!==void 0?d:n,{formattedValue:i,displayValue:R,isAnimating:x,startAnimation:P}=X(s,t,a,e,f,M,b,N,g,l,A,h);useEffect(()=>{!x&&u&&Math.abs(R-s)<.001&&u(R);},[x,R,s,u]),useEffect(()=>{p&&d!==void 0&&P();},[L,p,d,P]);let C=r(()=>{p&&D(true);},"handleMouseEnter"),U=r(()=>{p&&D(false);},"handleMouseLeave"),I=T();return jsxs(motion.span,{className:E("inline-block tabular-nums",o),style:c,onMouseEnter:C,onMouseLeave:U,initial:{scale:1},animate:!I&&x?{scale:[1,1.05,1]}:{scale:1},transition:{duration:.3},children:[m,jsx(motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:i},F),y]})}r(S,"AnimatedNumber");function se({initialValue:n=0,min:t=-1/0,max:a=1/0,step:e=1,showControls:f=true,incrementButton:M,decrementButton:b,onChange:N,className:g,...u}){let[o,c]=useState(n),m=r(()=>{let l=Math.min(o+e,a);c(l),N?.(l);},"increment"),y=r(()=>{let l=Math.max(o-e,t);c(l),N?.(l);},"decrement");return f?jsxs("div",{className:E("flex items-center gap-2",g),children:[jsx(motion.button,{onClick:y,disabled:o<=t,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:b||"\u2212"}),jsx(S,{value:o,...u}),jsx(motion.button,{onClick:m,disabled:o>=a,className:"flex h-8 w-8 items-center justify-center rounded border bg-background hover:bg-accent disabled:opacity-50",whileTap:{scale:.95},whileHover:{scale:1.05},children:M||"+"})]}):jsx(S,{value:o,className:g,...u})}r(se,"AnimatedCounter");var ie=S;export{se as AnimatedCounter,S as AnimatedNumber,ie as default};
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- 'use strict';var T=require('react'),react=require('motion/react'),utils$1=require('@/lib/utils'),jsxRuntime=require('react/jsx-runtime'),utils=require('@hanzo/ui/lib/utils'),avatar=require('@hanzo/ui/primitives/avatar'),ui=require('@hanzo/ui'),framerMotion=require('framer-motion'),lucideReact=require('lucide-react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var T__namespace=/*#__PURE__*/_interopNamespace(T);var Se=Object.defineProperty;var i=(e,n)=>Se(e,"name",{value:n,configurable:true});function $e(){let[e,n]=T.useState(false);return T.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 jsxRuntime.jsx(react.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=T.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:r.map(t=>jsxRuntime.jsx(react.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(r=>jsxRuntime.jsx(react.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:s.map((r,t)=>jsxRuntime.jsx(react.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=react.useMotionValue(0),s=react.useMotionValue(0);return T.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]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.map((r,t)=>{let l=react.useTransform(o,[-50,50],[-r.speed*10,r.speed*10]),d=react.useTransform(s,[-50,50],[-r.speed*10,r.speed*10]);return jsxRuntime.jsx(react.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=T.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:r.map(t=>jsxRuntime.jsx(react.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=T.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 jsxRuntime.jsx(De,{...x,elementCount:k});case "wave":return jsxRuntime.jsx(He,{...x});case "mesh":return jsxRuntime.jsx(Fe,{...x});case "parallax":return jsxRuntime.jsx(ze,{layers:v,speed:n,paused:h});case "particles":return jsxRuntime.jsx(Ge,{...x,elementCount:k});default:return jsxRuntime.jsx(Be,{...x})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:utils$1.cn("relative overflow-hidden",M&&"fixed inset-0 z-0",s),style:b,children:[R(),t&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:t})]})}i(We,"AnimatedBackground");var be=T__namespace.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__namespace.useState("");return T__namespace.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]),jsxRuntime.jsxs("svg",{ref:k,className:utils.cn("pointer-events-none absolute inset-0",e),...y,children:[jsxRuntime.jsx("path",{d:g,stroke:o,strokeWidth:s,fill:"none",strokeOpacity:.2}),jsxRuntime.jsx(react.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}}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:`gradient-${r}-${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:r}),jsxRuntime.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]=T.useState({position:{x:0,y:0},isHovering:false,isClicking:false,cursorType:"default"}),a=T.useCallback((r,t)=>{n(l=>({...l,position:{x:r,y:t}}));},[]),o=T.useCallback((r,t="default")=>{n(l=>({...l,isHovering:r,cursorType:t}));},[]),s=T.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]=T.useState([]),s=T.useRef([]);return T.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]=T.useState(false),[x,P]=T.useState(false);if(T.useEffect(()=>{R(Ze()),P(true);},[]),T.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]),T.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 jsxRuntime.jsxs("div",{className:utils.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 jsxRuntime.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)}),jsxRuntime.jsx("div",{className:utils.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"&&jsxRuntime.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]=T.useState(false);return T.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]=T.useState(0);return T.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]),jsxRuntime.jsx(react.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=T.useRef(null),[t,l]=T.useState(0);T.useEffect(()=>{if(r.current){let c=r.current.getTotalLength();l(c);}},[e]);let d=o!==void 0?t*o:t;return jsxRuntime.jsx(react.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 jsxRuntime.jsx(react.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.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]=T.useState(false),[D,L]=T.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 jsxRuntime.jsx(pt,{size:o,strokeWidth:h});let O=i(()=>a==="morph"&&I.length>1?jsxRuntime.jsx(dt,{paths:I,duration:r,strokeWidth:h,autoAnimate:m,repeat:l,onComplete:y}):a==="draw"?jsxRuntime.jsx(mt,{path:I[0],duration:r,strokeWidth:h,progress:R,autoAnimate:m}):I.map((C,$)=>jsxRuntime.jsx(react.motion.path,{d:C,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:h,strokeLinecap:"round",strokeLinejoin:"round"},$)),"renderIcon");return jsxRuntime.jsx(react.motion.div,{className:utils$1.cn("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:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:A,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:O()})})})}i(ft,"AnimatedIcon");function gt(){let[e,n]=T.useState(false);return T.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]=T.useState(0),t=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=T.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]=T.useState(e),[D,L]=T.useState(0),u=gt(),p=M||kt[n],m=!u&&b,{visibleItems:w,totalHeight:I,handleScroll:S}=Mt(e,h,A,v);T.useEffect(()=>{P(e);},[e]);let V=T.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)=>jsxRuntime.jsx(react.motion.div,{custom:$,variants:V,initial:m?"hidden":"visible",animate:"visible",exit:"exit",layout:r,className:utils$1.cn("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?jsxRuntime.jsx(react.Reorder.Group,{axis:t==="horizontal"?"x":"y",values:x,onReorder:C=>{P(C),k?.(C);},className:utils$1.cn(H(),d),style:y,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>jsxRuntime.jsx(react.Reorder.Item,{value:C,className:utils$1.cn("cursor-grab active:cursor-grabbing",c),whileDrag:{scale:1.05,zIndex:10},children:C.content},C.id))})}):v?jsxRuntime.jsx("div",{className:utils$1.cn("overflow-auto",d),style:{height:h,...y},onScroll:S,children:jsxRuntime.jsx("div",{style:{height:I,position:"relative"},children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:w.map((C,$)=>O(C,C.virtualIndex||$,C.style))})})}):jsxRuntime.jsx(react.motion.div,{className:utils$1.cn(H(),d),style:y,initial:"hidden",animate:"visible",children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>O(C,$))})},D)}i(Lt,"AnimatedList");function Ae(){let[e,n]=T.useState(false);return T.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]=T.useState(n),[M,v]=T.useState(false),A=T.useRef(null),h=Ae(),b=react.useSpring(n,{stiffness:y.tension||100,damping:y.friction||10,mass:y.mass||1}),[R,x]=T.useState(n),P=T.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 T.useEffect(()=>()=>{A.current&&cancelAnimationFrame(A.current);},[]),T.useEffect(()=>{if(c){let L=b.onChange(u=>{f(u),Math.abs(u-e)<.01&&v(false);});return ()=>{L();}}},[b,c,e]),T.useEffect(()=>{d&&P();},[d,P]),{formattedValue:T.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]=T.useState(false),[P,D]=T.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);T.useEffect(()=>{!m&&c&&Math.abs(p-L)<.001&&c(p);},[m,p,L,c]),T.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 jsxRuntime.jsxs(react.motion.span,{className:utils$1.cn("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,jsxRuntime.jsx(react.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__namespace.forwardRef(({className:e,testimonials:n,autoPlay:a=true,duration:o=5e3,...s},r)=>{let[t,l]=T__namespace.useState(0);return T__namespace.useEffect(()=>{if(!a)return;let d=setInterval(()=>{l(c=>(c+1)%n.length);},o);return ()=>clearInterval(d)},[a,o,n.length]),jsxRuntime.jsxs("div",{ref:r,className:utils.cn("relative min-h-[200px]",e),...s,children:[jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:jsxRuntime.jsx(ui.Card,{children:jsxRuntime.jsx(ui.CardContent,{className:"pt-6",children:jsxRuntime.jsxs("blockquote",{className:"space-y-4",children:[jsxRuntime.jsxs("p",{className:"text-lg italic",children:['"',n[t].content,'"']}),jsxRuntime.jsxs("footer",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(avatar.Avatar,{children:[jsxRuntime.jsx(avatar.AvatarImage,{src:n[t].avatar}),jsxRuntime.jsx(avatar.AvatarFallback,{children:n[t].author.slice(0,2).toUpperCase()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("cite",{className:"not-italic font-medium",children:n[t].author}),n[t].role&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[n[t].role,n[t].company&&`, ${n[t].company}`]})]})]})]})})})},t)}),jsxRuntime.jsx("div",{className:"mt-4 flex justify-center gap-2",children:n.map((d,c)=>jsxRuntime.jsx("button",{onClick:()=>l(c),className:utils.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__namespace.forwardRef(({className:e,content:n,children:a,delay:o=0,...s},r)=>{let[t,l]=T__namespace.useState(false);return jsxRuntime.jsxs("div",{ref:r,className:utils.cn("relative inline-block",e),onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),...s,children:[a,jsxRuntime.jsx(framerMotion.AnimatePresence,{children:t&&jsxRuntime.jsxs(framerMotion.motion.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,jsxRuntime.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__namespace.useState(0),[f,M]=T__namespace.useState(n),v=T__namespace.useRef(null),A=framerMotion.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__namespace.useCallback(()=>{g(u=>(u+1)%e.length);},[e.length]),R=T__namespace.useCallback(()=>{g(u=>(u-1+e.length)%e.length);},[e.length]),x=T__namespace.useCallback(u=>{g(u);},[]),P=T__namespace.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__namespace.useEffect(()=>{if(!f)return;let u=setInterval(b,a);return ()=>clearInterval(u)},[f,b,a]);let D=T__namespace.useCallback(()=>{n&&M(false);},[n]),L=T__namespace.useCallback(()=>{n&&M(true);},[n]);return T__namespace.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]),jsxRuntime.jsxs("div",{ref:v,className:utils.cn("relative w-full max-w-6xl mx-auto px-4 py-8",o),onMouseEnter:D,onMouseLeave:L,children:[jsxRuntime.jsx("div",{className:"relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"popLayout",children:e.map((u,p)=>{let m=h(p),w=p===k;return jsxRuntime.jsx(framerMotion.motion.div,{className:utils.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:jsxRuntime.jsxs(ui.Card,{className:utils.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&&jsxRuntime.jsxs(framerMotion.motion.div,{className:"absolute inset-0 w-full h-full",style:{x:framerMotion.useTransform(A,[-200,0,200],[l,0,-l])},children:[jsxRuntime.jsx("img",{src:u.image,alt:u.title,className:"w-full h-full object-cover"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"})]}),jsxRuntime.jsx("div",{className:"relative z-10 flex flex-col justify-end h-full p-8 md:p-12",children:u.content?u.content:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.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&&jsxRuntime.jsx(framerMotion.motion.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&&jsxRuntime.jsx(framerMotion.motion.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&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(ui.Button,{variant:"ghost",size:"icon",className:utils.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:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous card"})]}),jsxRuntime.jsxs(ui.Button,{variant:"ghost",size:"icon",className:utils.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:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next card"})]})]}),t&&jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:e.map((u,p)=>jsxRuntime.jsx("button",{className:utils.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:jsxRuntime.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__namespace.forwardRef(({className:e,text:n="Hello",duration:a=2,...o},s)=>{let r=n.split("");return jsxRuntime.jsx("div",{ref:s,className:utils.cn("relative flex items-center justify-center text-6xl font-bold",e),...o,children:r.map((t,l)=>jsxRuntime.jsx(framerMotion.motion.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";
3
- exports.AnimatedBackground=We;exports.AnimatedBeam=be;exports.AnimatedCursor=tt;exports.AnimatedIcon=ft;exports.AnimatedList=Lt;exports.AnimatedNumber=St;exports.AnimatedTestimonials=ke;exports.AnimatedTooltip=Re;exports.AppleCardsCarousel=Zt;exports.AppleHelloEffect=Te;exports.gradientPresets=Jt;
2
+ 'use strict';var T=require('react'),react=require('motion/react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime'),utils=require('@hanzo/ui/lib/utils'),avatar=require('@hanzo/ui/primitives/avatar'),ui=require('@hanzo/ui'),framerMotion=require('framer-motion'),lucideReact=require('lucide-react');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var T__namespace=/*#__PURE__*/_interopNamespace(T);var Se=Object.defineProperty;var r=(e,n)=>Se(e,"name",{value:n,configurable:true});function B(...e){return tailwindMerge.twMerge(clsx.clsx(e))}r(B,"cn");function Be(){let[e,n]=T.useState(false);return T.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=r(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}r(Be,"usePrefersReducedMotion");function De({colors:e,speed:n,intensity:a,paused:o}){let s=e.length>=2?e:["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx(react.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"}})}r(De,"GradientBackground");function He({colors:e,speed:n,elementCount:a,intensity:o,paused:s}){let i=T.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:i.map(t=>jsxRuntime.jsx(react.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))})}r(He,"BlobBackground");function Fe({colors:e,speed:n,intensity:a,paused:o}){let s=e[0]||"#4ecdc4";return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:[0,1,2].map(i=>jsxRuntime.jsx(react.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(ellipse 100% 50% at center ${50+i*20}%, ${s}${Math.round(30*a).toString(16).padStart(2,"0")}, transparent)`},animate:o?{}:{y:[i*10,i*10+20*a,i*10]},transition:{duration:(3+i)/n,repeat:1/0,ease:"easeInOut"}},i))})}r(Fe,"WaveBackground");function ze({colors:e,speed:n,intensity:a,paused:o}){let s=e.length>=4?e.slice(0,4):["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4"];return jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:s.map((i,t)=>jsxRuntime.jsx(react.motion.div,{className:"absolute rounded-full",style:{background:`radial-gradient(circle, ${i}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))})}r(ze,"MeshBackground");function Ge({layers:e,speed:n,paused:a}){let o=react.useMotionValue(0),s=react.useMotionValue(0);return T.useEffect(()=>{let i=r(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",i),()=>window.removeEventListener("mousemove",i)},[o,s]),jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:e.map((i,t)=>{let l=react.useTransform(o,[-50,50],[-i.speed*10,i.speed*10]),d=react.useTransform(s,[-50,50],[-i.speed*10,i.speed*10]);return jsxRuntime.jsx(react.motion.div,{className:"absolute inset-0",style:{background:`radial-gradient(circle, ${i.color}, transparent)`,opacity:i.opacity,x:a?0:l,y:a?0:d}},t)})})}r(Ge,"ParallaxBackground");function Ue({colors:e,speed:n,elementCount:a,intensity:o,paused:s}){let i=T.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 jsxRuntime.jsx("div",{className:"absolute inset-0 overflow-hidden",children:i.map(t=>jsxRuntime.jsx(react.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))})}r(Ue,"ParticlesBackground");function We({animation:e="gradient",speed:n=1,colors:a=["#ff6b6b","#4ecdc4","#45b7d1","#96ceb4","#ffeaa7"],paused:o=false,className:s,style:i,children:t,intensity:l=1,blur:d=false,blurAmount:c=20,opacity:y=1,elementCount:k=5,width:g="100%",height:f="100%",fullscreen:L=false,parallaxLayers:v=[{speed:.5,color:"#ff6b6b50",opacity:.3},{speed:1,color:"#4ecdc450",opacity:.4},{speed:1.5,color:"#45b7d150",opacity:.3}]}){let A=Be(),h=o||A,b=T.useMemo(()=>({width:L?"100vw":g,height:L?"100vh":f,opacity:y,filter:d?`blur(${c}px)`:void 0,...i}),[L,g,f,y,d,c,i]),R=r(()=>{let x={colors:a,speed:n,intensity:l,paused:h};switch(e){case "blob":return jsxRuntime.jsx(He,{...x,elementCount:k});case "wave":return jsxRuntime.jsx(Fe,{...x});case "mesh":return jsxRuntime.jsx(ze,{...x});case "parallax":return jsxRuntime.jsx(Ge,{layers:v,speed:n,paused:h});case "particles":return jsxRuntime.jsx(Ue,{...x,elementCount:k});default:return jsxRuntime.jsx(De,{...x})}},"renderAnimation");return jsxRuntime.jsxs("div",{className:B("relative overflow-hidden",L&&"fixed inset-0 z-0",s),style:b,children:[R(),t&&jsxRuntime.jsx("div",{className:"relative z-10 h-full w-full",children:t})]})}r(We,"AnimatedBackground");var be=T__namespace.forwardRef(({className:e,duration:n=3,delay:a=0,pathColor:o="gray",pathWidth:s=2,gradientStartColor:i="#18CCFC",gradientStopColor:t="#6344F5",containerRef:l,fromRef:d,toRef:c,...y},k)=>{let[g,f]=T__namespace.useState("");return T__namespace.useEffect(()=>{if(!l?.current||!d?.current||!c?.current)return;let L=r(()=>{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,H=(b+x)/2,M=Math.min(R,P)-50;f(`M ${b} ${R} Q ${H} ${M} ${x} ${P}`);},"updatePath");return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[l,d,c]),jsxRuntime.jsxs("svg",{ref:k,className:utils.cn("pointer-events-none absolute inset-0",e),...y,children:[jsxRuntime.jsx("path",{d:g,stroke:o,strokeWidth:s,fill:"none",strokeOpacity:.2}),jsxRuntime.jsx(react.motion.path,{d:g,stroke:`url(#gradient-${i}-${t})`,strokeWidth:s,fill:"none",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:n,delay:a,ease:"easeInOut",repeat:1/0}}),jsxRuntime.jsx("defs",{children:jsxRuntime.jsxs("linearGradient",{id:`gradient-${i}-${t}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[jsxRuntime.jsx("stop",{offset:"0%",stopColor:i}),jsxRuntime.jsx("stop",{offset:"100%",stopColor:t})]})})]})});be.displayName="AnimatedBeam";var Ke=["a","button","input","textarea","select",'[role="button"]','[role="link"]','[tabindex]:not([tabindex="-1"])',".cursor-pointer",'[data-cursor="pointer"]'].join(", "),Ye=['input[type="text"]','input[type="email"]','input[type="password"]','input[type="search"]',"textarea",'[contenteditable="true"]','[data-cursor="text"]'].join(", "),qe=['[data-cursor="grab"]',".cursor-grab"].join(", "),Ze=['[data-cursor="grabbing"]',".cursor-grabbing"].join(", ");function Je(){return typeof window>"u"?false:"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}r(Je,"isTouchDevice");function et(){let[e,n]=T.useState({position:{x:0,y:0},isHovering:false,isClicking:false,cursorType:"default"}),a=T.useCallback((i,t)=>{n(l=>({...l,position:{x:i,y:t}}));},[]),o=T.useCallback((i,t="default")=>{n(l=>({...l,isHovering:i,cursorType:t}));},[]),s=T.useCallback(i=>{n(t=>({...t,isClicking:i}));},[]);return {cursorState:e,updatePosition:a,updateHoverState:o,updateClickState:s}}r(et,"useCursorState");function tt(e,n){let[a,o]=T.useState([]),s=T.useRef([]);return T.useEffect(()=>{s.current.push(n),s.current.length>e&&s.current.shift(),o([...s.current]);},[n,e]),a}r(tt,"useCursorTrail");function nt({isVisible:e=true,size:n=20,color:a="#000000",trailColor:o="#00000050",animationDuration:s=200,showTrail:i=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:L,updateHoverState:v,updateClickState:A}=et(),h=tt(t,f.position),[b,R]=T.useState(false),[x,P]=T.useState(false);if(T.useEffect(()=>{R(Je()),P(true);},[]),T.useEffect(()=>{if(!x||c&&b)return;let m=r(F=>{try{requestAnimationFrame(()=>{L(F.clientX,F.clientY);});}catch(O){console.warn("AnimatedCursor: Error updating position",O);}},"handleMouseMove"),w=r(F=>{try{let O=F.target;O?.closest?.(Ke)?v(!0,"pointer"):O?.closest?.(Ye)?v(!0,"text"):O?.closest?.(qe)?v(!0,"grab"):O?.closest?.(Ze)?v(!0,"grabbing"):v(!1,"default");}catch(O){console.warn("AnimatedCursor: Error handling mouse over",O),v(false,"default");}},"handleMouseOver"),I=r(()=>{A(true);},"handleMouseDown"),S=r(()=>{A(false);},"handleMouseUp"),V=r(()=>{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,L,v,A]),T.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 H=f.isHovering?d:1,M=f.isClicking?.8:1,u=H*M,p=r(()=>{switch(f.cursorType){case "text":return "h-6 w-0.5";case "grab":case "grabbing":return "rounded-md";default:return "rounded-full"}},"getCursorShape");return jsxRuntime.jsxs("div",{className:utils.cn("pointer-events-none fixed inset-0",y),children:[i&&h.map((m,w)=>{let I=(w+1)/h.length*.5,S=(w+1)/h.length*.8;return jsxRuntime.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)}),jsxRuntime.jsx("div",{className:utils.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"&&jsxRuntime.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}})]})}r(nt,"AnimatedCursor");function it(){let[e,n]=T.useState(false);return T.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=r(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}r(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:i}){let[t,l]=T.useState(0);return T.useEffect(()=>{if(!o||e.length<2)return;let d=setInterval(()=>{l(c=>{let y=(c+1)%e.length;return y===0&&!s&&(clearInterval(d),i?.()),y});},n);return ()=>clearInterval(d)},[o,e.length,n,s,i]),jsxRuntime.jsx(react.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"}})}r(dt,"MorphingPath");function mt({path:e,duration:n,strokeWidth:a=2,progress:o,autoAnimate:s}){let i=T.useRef(null),[t,l]=T.useState(0);T.useEffect(()=>{if(i.current){let c=i.current.getTotalLength();l(c);}},[e]);let d=o!==void 0?t*o:t;return jsxRuntime.jsx(react.motion.path,{ref:i,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}})}r(mt,"DrawingPath");function pt({size:e,strokeWidth:n=2}){return jsxRuntime.jsx(react.motion.div,{animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"},style:{width:e,height:e},children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:"0 0 24 24",fill:"none",children:jsxRuntime.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeDasharray:"60 40",opacity:"0.3"})})})}r(pt,"LoadingSpinner");function ft({icon:e="loading",paths:n,animation:a="spin",size:o=24,color:s="currentColor",duration:i=1e3,autoAnimate:t=true,repeat:l=true,className:d,style:c,onAnimationComplete:y,onClick:k,interactive:g=true,hoverAnimation:f="scale",clickAnimation:L="scale",customVariants:v,viewBox:A="0 0 24 24",strokeWidth:h=2,loading:b=false,progress:R}){let[x,P]=T.useState(false),[H,M]=T.useState(false),u=it(),p=v||lt[a]||{},m=t&&!u,I=r(()=>{if(n)return Array.isArray(n)?n:[n];let C=st[e];return Array.isArray(C)?C:[C]},"getIconPaths")(),S=r(()=>{g&&(M(true),setTimeout(()=>M(false),200),k?.());},"handleClick"),V=r(()=>!g||!x?{}:ct[f]||{},"getHoverVariant"),F=r(()=>!g||!H?{}:ut[L]||{},"getClickVariant");if(b)return jsxRuntime.jsx(pt,{size:o,strokeWidth:h});let O=r(()=>a==="morph"&&I.length>1?jsxRuntime.jsx(dt,{paths:I,duration:i,strokeWidth:h,autoAnimate:m,repeat:l,onComplete:y}):a==="draw"?jsxRuntime.jsx(mt,{path:I[0],duration:i,strokeWidth:h,progress:R,autoAnimate:m}):I.map((C,$)=>jsxRuntime.jsx(react.motion.path,{d:C,fill:e==="heart"?"currentColor":"none",stroke:e==="heart"?"none":"currentColor",strokeWidth:h,strokeLinecap:"round",strokeLinejoin:"round"},$)),"renderIcon");return jsxRuntime.jsx(react.motion.div,{className:B("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?{}:F(),onAnimationComplete:y,children:jsxRuntime.jsx("svg",{width:"100%",height:"100%",viewBox:A,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:O()})})})}r(ft,"AnimatedIcon");function gt(){let[e,n]=T.useState(false);return T.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=r(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}r(gt,"usePrefersReducedMotion");var ht={hidden:{opacity:0,x:-50},visible:r(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:r(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:r(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:r(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:r(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:r(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:r(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 Lt(e,n,a,o){let[s,i]=T.useState(0),t=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=T.useCallback(c=>{i(c.currentTarget.scrollTop);},[]);return {visibleItems:t,totalHeight:l,handleScroll:d}}r(Lt,"useVirtualizedList");function Mt({items:e,animation:n="slideUp",staggerDelay:a=100,duration:o=500,reorderable:s=false,enableAddRemove:i=true,layout:t="vertical",gridColumns:l=3,className:d,itemClassName:c,style:y,onReorder:k,onItemClick:g,showHoverEffects:f=true,customVariants:L,virtualized:v=false,itemHeight:A=60,containerHeight:h=400,autoStart:b=true,onAnimationComplete:R}){let[x,P]=T.useState(e),[H,M]=T.useState(0),u=gt(),p=L||kt[n],m=!u&&b,{visibleItems:w,totalHeight:I,handleScroll:S}=Lt(e,h,A,v);T.useEffect(()=>{P(e);},[e]);let V=T.useMemo(()=>!p.visible||typeof p.visible!="function"?p:{...p,visible:r(C=>{let $=p.visible,te=$(C);return {...te,transition:{...te.transition,delay:C*(a/1e3),duration:o/1e3}}},"visible")},[p,a,o]),F=r(()=>{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=r((C,$,te)=>jsxRuntime.jsx(react.motion.div,{custom:$,variants:V,initial:m?"hidden":"visible",animate:"visible",exit:"exit",layout:i,className:B("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?jsxRuntime.jsx(react.Reorder.Group,{axis:t==="horizontal"?"x":"y",values:x,onReorder:C=>{P(C),k?.(C);},className:B(F(),d),style:y,children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>jsxRuntime.jsx(react.Reorder.Item,{value:C,className:B("cursor-grab active:cursor-grabbing",c),whileDrag:{scale:1.05,zIndex:10},children:C.content},C.id))})}):v?jsxRuntime.jsx("div",{className:B("overflow-auto",d),style:{height:h,...y},onScroll:S,children:jsxRuntime.jsx("div",{style:{height:I,position:"relative"},children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:w.map((C,$)=>O(C,C.virtualIndex||$,C.style))})})}):jsxRuntime.jsx(react.motion.div,{className:B(F(),d),style:y,initial:"hidden",animate:"visible",children:jsxRuntime.jsx(react.AnimatePresence,{mode:"popLayout",children:x.map((C,$)=>O(C,$))})},H)}r(Mt,"AnimatedList");function Ae(){let[e,n]=T.useState(false);return T.useEffect(()=>{if(typeof window>"u")return;let a=window.matchMedia("(prefers-reduced-motion: reduce)");n(a.matches);let o=r(s=>{n(s.matches);},"handleChange");return a.addEventListener("change",o),()=>a.removeEventListener("change",o)},[]),e}r(Ae,"usePrefersReducedMotion");function Et(e,n,a,o,s,i,t,l,d,c,y,k){let[g,f]=T.useState(n),[L,v]=T.useState(false),A=T.useRef(null),h=Ae(),b=react.useSpring(n,{stiffness:y.tension||100,damping:y.friction||10,mass:y.mass||1}),[R,x]=T.useState(n),P=T.useCallback(()=>{if(h){f(e);return}if(v(true),c)b.set(e);else {let M=Date.now(),u=g,p=e-u,m=r(()=>{let w=Date.now()-M,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 T.useEffect(()=>()=>{A.current&&cancelAnimationFrame(A.current);},[]),T.useEffect(()=>{if(c){let M=b.onChange(u=>{f(u),Math.abs(u-e)<.01&&v(false);});return ()=>{M();}}},[b,c,e]),T.useEffect(()=>{d&&P();},[d,P]),{formattedValue:T.useMemo(()=>{let M=Math.round(g*Math.pow(10,o))/Math.pow(10,o);try{switch(s){case "currency":return new Intl.NumberFormat(t,{style:"currency",currency:i,minimumFractionDigits:o,maximumFractionDigits:o}).format(M);case "percent":return new Intl.NumberFormat(t,{style:"percent",minimumFractionDigits:o,maximumFractionDigits:o}).format(M/100);default:let u=new Intl.NumberFormat(t,{minimumFractionDigits:o,maximumFractionDigits:o}).format(M);return k&&k!==","&&(u=u.replace(/,/g,k)),u}}catch{return M.toFixed(o)}},[g,o,s,i,t,k]),displayValue:g,isAnimating:L,startAnimation:P}}r(Et,"useAnimatedNumber");function Tt({value:e,from:n=0,duration:a=2e3,decimals:o=0,format:s="number",currency:i="USD",locale:t="en-US",easing:l="easeOut",autoStart:d=true,onComplete:c,className:y,style:k,prefix:g="",suffix:f="",useSpring:L=false,springConfig:v={},separator:A,animateOnHover:h=false,hoverValue:b}){let[R,x]=T.useState(false),[P,H]=T.useState(0),M=h&&R&&b!==void 0?b:e,{formattedValue:u,displayValue:p,isAnimating:m,startAnimation:w}=Et(M,n,a,o,s,i,t,l,d,L,v,A);T.useEffect(()=>{!m&&c&&Math.abs(p-M)<.001&&c(p);},[m,p,M,c]),T.useEffect(()=>{h&&b!==void 0&&w();},[R,h,b,w]);let I=r(()=>{h&&x(true);},"handleMouseEnter"),S=r(()=>{h&&x(false);},"handleMouseLeave"),V=Ae();return jsxRuntime.jsxs(react.motion.span,{className:B("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,jsxRuntime.jsx(react.motion.span,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},children:u},P),f]})}r(Tt,"AnimatedNumber");var ke=T__namespace.forwardRef(({className:e,testimonials:n,autoPlay:a=true,duration:o=5e3,...s},i)=>{let[t,l]=T__namespace.useState(0);return T__namespace.useEffect(()=>{if(!a)return;let d=setInterval(()=>{l(c=>(c+1)%n.length);},o);return ()=>clearInterval(d)},[a,o,n.length]),jsxRuntime.jsxs("div",{ref:i,className:utils.cn("relative min-h-[200px]",e),...s,children:[jsxRuntime.jsx(react.AnimatePresence,{mode:"wait",children:jsxRuntime.jsx(react.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},exit:{opacity:0,y:-20},transition:{duration:.5},children:jsxRuntime.jsx(ui.Card,{children:jsxRuntime.jsx(ui.CardContent,{className:"pt-6",children:jsxRuntime.jsxs("blockquote",{className:"space-y-4",children:[jsxRuntime.jsxs("p",{className:"text-lg italic",children:['"',n[t].content,'"']}),jsxRuntime.jsxs("footer",{className:"flex items-center gap-4",children:[jsxRuntime.jsxs(avatar.Avatar,{children:[jsxRuntime.jsx(avatar.AvatarImage,{src:n[t].avatar}),jsxRuntime.jsx(avatar.AvatarFallback,{children:n[t].author.slice(0,2).toUpperCase()})]}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("cite",{className:"not-italic font-medium",children:n[t].author}),n[t].role&&jsxRuntime.jsxs("p",{className:"text-sm text-muted-foreground",children:[n[t].role,n[t].company&&`, ${n[t].company}`]})]})]})]})})})},t)}),jsxRuntime.jsx("div",{className:"mt-4 flex justify-center gap-2",children:n.map((d,c)=>jsxRuntime.jsx("button",{onClick:()=>l(c),className:utils.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__namespace.forwardRef(({className:e,content:n,children:a,delay:o=0,...s},i)=>{let[t,l]=T__namespace.useState(false);return jsxRuntime.jsxs("div",{ref:i,className:utils.cn("relative inline-block",e),onMouseEnter:()=>l(true),onMouseLeave:()=>l(false),...s,children:[a,jsxRuntime.jsx(framerMotion.AnimatePresence,{children:t&&jsxRuntime.jsxs(framerMotion.motion.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,jsxRuntime.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 qt({cards:e,autoPlay:n=false,autoPlayInterval:a=5e3,className:o,cardClassName:s,showArrows:i=true,showDots:t=true,parallaxOffset:l=50,stackOffset:d=10,stackScale:c=.95,swipeThreshold:y=50}){let[k,g]=T__namespace.useState(0),[f,L]=T__namespace.useState(n),v=T__namespace.useRef(null),A=framerMotion.useMotionValue(0),h=r(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),F=e.length-m;return {display:"block",x:I,scale:S,opacity:V,zIndex:F}},"getCardStyle"),b=T__namespace.useCallback(()=>{g(u=>(u+1)%e.length);},[e.length]),R=T__namespace.useCallback(()=>{g(u=>(u-1+e.length)%e.length);},[e.length]),x=T__namespace.useCallback(u=>{g(u);},[]),P=T__namespace.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__namespace.useEffect(()=>{if(!f)return;let u=setInterval(b,a);return ()=>clearInterval(u)},[f,b,a]);let H=T__namespace.useCallback(()=>{n&&L(false);},[n]),M=T__namespace.useCallback(()=>{n&&L(true);},[n]);return T__namespace.useEffect(()=>{let u=r(p=>{p.key==="ArrowLeft"?R():p.key==="ArrowRight"&&b();},"handleKeyDown");return window.addEventListener("keydown",u),()=>window.removeEventListener("keydown",u)},[b,R]),jsxRuntime.jsxs("div",{ref:v,className:utils.cn("relative w-full max-w-6xl mx-auto px-4 py-8",o),onMouseEnter:H,onMouseLeave:M,children:[jsxRuntime.jsx("div",{className:"relative h-[400px] md:h-[500px] lg:h-[600px] flex items-center justify-center",children:jsxRuntime.jsx(framerMotion.AnimatePresence,{mode:"popLayout",children:e.map((u,p)=>{let m=h(p),w=p===k;return jsxRuntime.jsx(framerMotion.motion.div,{className:utils.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:jsxRuntime.jsxs(ui.Card,{className:utils.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&&jsxRuntime.jsxs(framerMotion.motion.div,{className:"absolute inset-0 w-full h-full",style:{x:framerMotion.useTransform(A,[-200,0,200],[l,0,-l])},children:[jsxRuntime.jsx("img",{src:u.image,alt:u.title,className:"w-full h-full object-cover"}),jsxRuntime.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"})]}),jsxRuntime.jsx("div",{className:"relative z-10 flex flex-col justify-end h-full p-8 md:p-12",children:u.content?u.content:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(framerMotion.motion.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&&jsxRuntime.jsx(framerMotion.motion.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&&jsxRuntime.jsx(framerMotion.motion.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)})})}),i&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(ui.Button,{variant:"ghost",size:"icon",className:utils.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:[jsxRuntime.jsx(lucideReact.ChevronLeft,{className:"h-6 w-6"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous card"})]}),jsxRuntime.jsxs(ui.Button,{variant:"ghost",size:"icon",className:utils.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:[jsxRuntime.jsx(lucideReact.ChevronRight,{className:"h-6 w-6"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next card"})]})]}),t&&jsxRuntime.jsx("div",{className:"absolute bottom-4 left-1/2 -translate-x-1/2 z-20 flex gap-2",children:e.map((u,p)=>jsxRuntime.jsx("button",{className:utils.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:jsxRuntime.jsxs("span",{className:"sr-only",children:["Go to card ",p+1]})},p))})]})}r(qt,"AppleCardsCarousel");var Zt={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__namespace.forwardRef(({className:e,text:n="Hello",duration:a=2,...o},s)=>{let i=n.split("");return jsxRuntime.jsx("div",{ref:s,className:utils.cn("relative flex items-center justify-center text-6xl font-bold",e),...o,children:i.map((t,l)=>jsxRuntime.jsx(framerMotion.motion.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";
3
+ exports.AnimatedBackground=We;exports.AnimatedBeam=be;exports.AnimatedCursor=nt;exports.AnimatedIcon=ft;exports.AnimatedList=Mt;exports.AnimatedNumber=Tt;exports.AnimatedTestimonials=ke;exports.AnimatedTooltip=Re;exports.AppleCardsCarousel=qt;exports.AppleHelloEffect=Te;exports.gradientPresets=Zt;