"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[3945],{3945:(e,o,l)=>{l.r(o),l.d(o,{loadWobbleUpdater:()=>t});var n=l(1197);class a{constructor(){this.angle=50,this.move=10}load(e){e&&(void 0!==e.angle&&(this.angle=(0,n.Cs)(e.angle)),void 0!==e.move&&(this.move=(0,n.Cs)(e.move)))}}class s{constructor(){this.distance=5,this.enable=!1,this.speed=new a}load(e){if(e&&(void 0!==e.distance&&(this.distance=(0,n.Cs)(e.distance)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed))if("number"==typeof e.speed)this.speed.load({angle:e.speed});else{const o=e.speed;void 0!==o.min?this.speed.load({angle:o}):this.speed.load(e.speed)}}}class i{constructor(e){this.container=e}init(e){var o;const l=e.options.wobble;(null==l?void 0:l.enable)?e.wobble={angle:(0,n.sZ)()*Math.PI*2,angleSpeed:(0,n.Gu)(l.speed.angle)/360,moveSpeed:(0,n.Gu)(l.speed.move)/10}:e.wobble={angle:0,angleSpeed:0,moveSpeed:0},e.retina.wobbleDistance=(0,n.Gu)(null!==(o=null==l?void 0:l.distance)&&void 0!==o?o:0)*this.container.retina.pixelRatio}isEnabled(e){var o;return!e.destroyed&&!e.spawning&&!!(null===(o=e.options.wobble)||void 0===o?void 0:o.enable)}loadOptions(e){e.wobble||(e.wobble=new s);for(var o=arguments.length,l=new Array(o>1?o-1:0),n=1;n<o;n++)l[n-1]=arguments[n];for(const o of l)e.wobble.load(null==o?void 0:o.wobble)}update(e,o){this.isEnabled(e)&&function(e,o){var l;const n=e.options.wobble;if(!(null==n?void 0:n.enable)||!e.wobble)return;const a=e.wobble.angleSpeed*o.factor,s=e.wobble.moveSpeed*o.factor*((null!==(l=e.retina.wobbleDistance)&&void 0!==l?l:0)*o.factor)/(1e3/60),i=2*Math.PI;e.wobble.angle+=a,e.wobble.angle>i&&(e.wobble.angle-=i),e.position.x+=s*Math.cos(e.wobble.angle),e.position.y+=s*Math.abs(Math.sin(e.wobble.angle))}(e,o)}}async function t(e){await e.addParticleUpdater("wobble",(e=>new i(e)))}}}]);