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