"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[9713],{9713:(t,e,o)=>{o.d(e,{loadExternalBounceInteraction:()=>a});var n=o(9201);class i{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}const s="bounce";class c extends n.L8{constructor(t){super(t),this._processBounce=(t,e,o)=>{const i=this.container.particles.quadTree.query(o,(t=>this.isEnabled(t)));for(const s of i)o instanceof n.Cd?(0,n.kR)((0,n.gy)(s),{position:t,radius:e,mass:e**2*Math.PI/2,velocity:n.OW.origin,factor:n.OW.origin}):o instanceof n.Ae&&(0,n.dp)(s,(0,n.M_)(t,e))},this._processMouseBounce=()=>{const t=this.container,e=10*t.retina.pixelRatio,o=t.interactivity.mouse.position,i=t.retina.bounceModeDistance;!i||i<0||!o||this._processBounce(o,i,new n.Cd(o.x,o.y,i+e))},this._singleSelectorBounce=(t,e)=>{const o=this.container,i=document.querySelectorAll(t);i.length&&i.forEach((t=>{const i=t,s=o.retina.pixelRatio,c={x:(i.offsetLeft+i.offsetWidth/2)*s,y:(i.offsetTop+i.offsetHeight/2)*s},a=i.offsetWidth/2*s,r=10*s,u="circle"===e.type?new n.Cd(c.x,c.y,a+r):new n.Ae(i.offsetLeft*s-r,i.offsetTop*s-r,i.offsetWidth*s+2*r,i.offsetHeight*s+2*r);this._processBounce(c,a,u)}))}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bounce;e&&(t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions.interactivity.events,o=t.interactivity.status===n.Wt,i=e.onHover.enable,c=e.onHover.mode,a=e.onDiv;o&&i&&(0,n.dB)(s,c)?this._processMouseBounce():(0,n.XD)(s,a,((t,e)=>this._singleSelectorBounce(t,e)))}isEnabled(t){const e=this.container,o=e.actualOptions,i=e.interactivity.mouse,c=(t?.interactivity??o.interactivity).events,a=c.onDiv;return i.position&&c.onHover.enable&&(0,n.dB)(s,c.onHover.mode)||(0,n.wm)(s,a)}loadModeOptions(t,...e){t.bounce||(t.bounce=new i);for(const o of e)t.bounce.load(o?.bounce)}reset(){}}async function a(t,e=!0){await t.addInteractor("externalBounce",(t=>new c(t)),e)}}}]);