"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[5691],{5691:(e,s,t)=>{t.r(s),t.d(s,{loadParticlesRepulseInteraction:()=>a});var o=t(3290);class i 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 r 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(),i=s.particles.quadTree.queryCircle(t,e.repulse.distance);for(const s of i){if(e===s||s.destroyed)continue;const i=s.getPosition(),{dx:r,dy:a,distance:n}=(0,o.oW)(i,t),d=e.repulse.speed*e.repulse.factor;if(n>0){const t=(0,o.uZ)((1-Math.pow(n/e.repulse.distance,2))*d,0,d),i=o.OW.create(r/n*t,a/n*t);s.position.addTo(i)}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 i);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 a(e){e.addInteractor("particlesRepulse",(e=>new r(e)))}}}]);