"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[8158],{1688:(t,e,a)=>{a.d(e,{$:()=>s});class s{constructor(t){this.container=t,this.type="particles"}}},8158:(t,e,a)=>{a.r(e),a.d(e,{loadParticlesAttractInteraction:()=>i});var s=a(1688),r=a(5302);class c extends s.${constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container,a=t.retina.attractDistance??e.retina.attractDistance,s=t.getPosition(),c=e.particles.quadTree.queryCircle(s,a);for(const e of c){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const a=e.getPosition(),{dx:c,dy:i}=(0,r.oW)(s,a),o=t.options.move.attract.rotate,n=c/(1e3*o.x),l=i/(1e3*o.y),p=e.size.value/t.size.value,d=1/p;t.velocity.x-=n*p,t.velocity.y-=l*p,e.velocity.x+=n*d,e.velocity.y+=l*d}}isEnabled(t){return t.options.move.attract.enable}reset(){}}async function i(t,e=!0){await t.addInteractor("particlesAttract",(t=>new c(t)),e)}}}]);