"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[4646],{4646:(e,s,t)=>{t.d(s,{loadParticlesRepulseInteraction:()=>r});var i=t(9201);class o extends i.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,i.Cs)(e.distance)),void 0!==e.duration&&(this.duration=(0,i.Cs)(e.duration)),void 0!==e.factor&&(this.factor=(0,i.Cs)(e.factor)),void 0!==e.speed&&(this.speed=(0,i.Cs)(e.speed)))}}class a extends i.$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,i.Gu)(t.distance)*s.retina.pixelRatio,speed:(0,i.Gu)(t.speed),factor:(0,i.Gu)(t.factor)}}const t=e.getPosition(),o=s.particles.quadTree.queryCircle(t,e.repulse.distance);for(const s of o){if(e===s||s.destroyed)continue;const o=s.getPosition(),{dx:a,dy:r,distance:n}=(0,i.oW)(o,t),d=e.repulse.speed*e.repulse.factor;if(n>0){const t=(0,i.uZ)((1-Math.pow(n/e.repulse.distance,2))*d,0,d),o=i.OW.create(a/n*t,r/n*t);s.position.addTo(o)}else{const e=i.OW.create(d,d);s.position.addTo(e)}}}isEnabled(e){return e.options.repulse?.enabled??!1}loadParticlesOptions(e,...s){e.repulse||(e.repulse=new o);for(const t of s)e.repulse.load(t?.repulse)}reset(){}}async function r(e,s=!0){await e.addInteractor("particlesRepulse",(e=>new a(e)),s)}}}]);