"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[3546],{3546:function(e,s,t){t.r(s),t.d(s,{loadParticlesRepulseInteraction:function(){return n}});var o=t(3563);class r extends o.SW{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(e){super.load(e),e&&(void 0!==e.enabled&&(this.enabled=e.enabled),void 0!==e.distance&&(this.distance=(0,o.Cs)(e.distance)),void 0!==e.duration&&(this.duration=(0,o.Cs)(e.duration)),void 0!==e.factor&&(this.factor=(0,o.Cs)(e.factor)),void 0!==e.speed&&(this.speed=(0,o.Cs)(e.speed)))}}class i extends o.$S{constructor(e){super(e)}clear(){}init(){}async interact(e){const s=this.container;if(!e.repulse){const t=e.options.repulse;if(!t)return;e.repulse={distance:(0,o.Gu)(t.distance)*s.retina.pixelRatio,speed:(0,o.Gu)(t.speed),factor:(0,o.Gu)(t.factor)}}const t=e.getPosition(),r=s.particles.quadTree.queryCircle(t,e.repulse.distance);for(const s of r){if(e===s||s.destroyed)continue;const r=s.getPosition(),{dx:i,dy:n,distance:a}=(0,o.oW)(r,t),d=e.repulse.speed*e.repulse.factor;if(a>0){const t=(0,o.uZ)((1-Math.pow(a/e.repulse.distance,2))*d,0,d),r=o.OW.create(i/a*t,n/a*t);s.position.addTo(r)}else{const e=o.OW.create(d,d);s.position.addTo(e)}}}isEnabled(e){var s,t;return null!==(t=null===(s=e.options.repulse)||void 0===s?void 0:s.enabled)&&void 0!==t&&t}loadParticlesOptions(e){e.repulse||(e.repulse=new r);for(var s=arguments.length,t=new Array(s>1?s-1:0),o=1;o<s;o++)t[o-1]=arguments[o];for(const s of t)e.repulse.load(null==s?void 0:s.repulse)}reset(){}}function n(e){e.addInteractor("particlesRepulse",(e=>new i(e)))}}}]);