"use strict";(globalThis.webpackChunkultimate_cursor=globalThis.webpackChunkultimate_cursor||[]).push([[180],{7494(t,e,a){a.r(e),a.d(e,{default:()=>h});var r=a(6087),s=a(3560),o=a(2064),c=a(4922),n=a(790);const i=(0,r.memo)(({count:t=200,magnetRadius:e=10,ringRadius:a=10,waveSpeed:s=.4,waveAmplitude:i=1,particleSize:h=2,lerpSpeed:l=.1,color:u="#FF9FFC",autoAnimate:d=!1,particleVariance:m=1,rotationSpeed:p=0,depthFactor:x=1,pulseSpeed:M=3,particleShape:y="capsule",fieldStrength:f=10})=>{const g=(0,r.useRef)(null),{viewport:w}=(0,o.D)(),z=(0,r.useMemo)(()=>new c.B69,[]),b=(0,r.useRef)({x:0,y:0}),j=(0,r.useMemo)(()=>{const e=[],a=w.width||40,r=w.height||30;for(let s=0;s<t;s++){const t=(Math.random()-.5)*a,s=(Math.random()-.5)*r,o=20*(Math.random()-.5);e.push({t:100*Math.random(),speed:.01+Math.random()/200,mx:t,my:s,mz:o,cx:t,cy:s,cz:o,randomRadiusOffset:2*(Math.random()-.5)})}return e},[t]);return(0,o.F)(t=>{const r=g.current;if(!r)return;const o=t.viewport,c=t.pointer;let n=c.x*o.width/2,u=c.y*o.height/2;if(d){const e=t.clock.getElapsedTime();n=Math.sin(.5*e)*(o.width/4),u=Math.cos(e)*(o.height/4)}b.current.x+=.05*(n-b.current.x),b.current.y+=.05*(u-b.current.y);const y=b.current.x,w=b.current.y,k=t.clock.getElapsedTime()*p;j.forEach((t,o)=>{t.t+=t.speed/2;const c=1-t.cz/50,n=y*c,u=w*c,d=t.mx-n,p=t.my-u,g=Math.sqrt(d*d+p*p);let b=t.mx,j=t.my,v=t.mz*x;if(g<e){const e=Math.atan2(p,d)+k,r=Math.sin(t.t*s+e)*(.5*i),o=t.randomRadiusOffset*(5/(f+.1)),c=a+r+o;b=n+c*Math.cos(e),j=u+c*Math.sin(e),v=t.mz*x+Math.sin(t.t)*i*x}t.cx+=(b-t.cx)*l,t.cy+=(j-t.cy)*l,t.cz+=(v-t.cz)*l,z.position.set(t.cx,t.cy,t.cz),z.lookAt(n,u,t.cz),z.rotateX(Math.PI/2);const S=Math.abs(Math.sqrt((t.cx-n)**2+(t.cy-u)**2)-a);let F=Math.max(0,Math.min(1,1-S/10));F*=(.8+.2*Math.sin(t.t*M)*m)*h,z.scale.set(F,F,F),z.updateMatrix(),r.setMatrixAt(o,z.matrix)}),r.instanceMatrix.needsUpdate=!0}),(0,n.jsxs)("instancedMesh",{ref:g,args:[void 0,void 0,t],children:["capsule"===y&&(0,n.jsx)("capsuleGeometry",{args:[.1,.4,4,8]}),"sphere"===y&&(0,n.jsx)("sphereGeometry",{args:[.2,16,16]}),"box"===y&&(0,n.jsx)("boxGeometry",{args:[.3,.3,.3]}),"tetrahedron"===y&&(0,n.jsx)("tetrahedronGeometry",{args:[.3]}),(0,n.jsx)("meshBasicMaterial",{color:u})]})}),h=t=>{const e=Math.min(t.count||200,200);return(0,n.jsx)(s.Hl,{camera:{position:[0,0,50],fov:35},frameloop:"always",gl:{antialias:!1,alpha:!0,powerPreference:"low-power"},dpr:1,style:{background:"transparent"},children:(0,n.jsx)(i,{...t,count:e})})}}}]);