"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[879],{879:(e,s,i)=>{i.r(s),i.d(s,{loadSizeUpdater:()=>t});var a=i(5302);class o{init(e){const s=e.container,i=e.options.size.animation;i.enable&&(e.size.velocity=(e.retina.sizeAnimationSpeed??s.retina.sizeAnimationSpeed)/100*s.retina.reduceFactor,i.sync||(e.size.velocity*=(0,a.sZ)()))}isEnabled(e){return!e.destroyed&&!e.spawning&&e.size.enable&&((e.size.maxLoops??0)<=0||(e.size.maxLoops??0)>0&&(e.size.loops??0)<(e.size.maxLoops??0))}reset(e){e.size.loops=0}update(e,s){this.isEnabled(e)&&function(e,s){const i=e.size;if(e.destroyed||!i||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*s.factor,t=i.min,n=i.max,l=i.decay??1;if(i.time||(i.time=0),(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=s.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case"increasing":i.value>=n?(i.status="decreasing",i.loops||(i.loops=0),i.loops++):i.value+=o;break;case"decreasing":i.value<=t?(i.status="increasing",i.loops||(i.loops=0),i.loops++):i.value-=o}i.velocity&&1!==l&&(i.velocity*=l),function(e,s,i,a){switch(e.options.size.animation.destroy){case"max":s>=a&&e.destroy();break;case"min":s<=i&&e.destroy()}}(e,i.value,t,n),e.destroyed||(i.value=(0,a.uZ)(i.value,t,n))}}(e,s)}}async function t(e,s=!0){await e.addParticleUpdater("size",(()=>new o),s)}}}]);