"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[8137],{8137:(o,e,a)=>{a.d(e,{loadColorUpdater:()=>i});var t=a(9201);function l(o,e,a,l,s){if(!e||!a.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=o.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const i=(0,t.vd)(a.offset),n=(e.velocity??0)*o.factor+3.6*i,r=e.decay??1;s&&"increasing"!==e.status?(e.value-=n,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=n,e.value>l&&(e.loops||(e.loops=0),e.loops++,s&&(e.status="decreasing",e.value-=e.value%l))),e.velocity&&1!==r&&(e.velocity*=r),e.value>l&&(e.value%=l)}class s{constructor(o){this.container=o}init(o){const e=(0,t.lN)(o.options.color,o.id,o.options.reduceDuplicates);e&&(o.color=(0,t.bS)(e,o.options.color.animation,this.container.retina.reduceFactor))}isEnabled(o){const{h:e,s:a,l:t}=o.options.color.animation,{color:l}=o;return!o.destroyed&&!o.spawning&&(void 0!==l?.h.value&&e.enable||void 0!==l?.s.value&&a.enable||void 0!==l?.l.value&&t.enable)}update(o,e){!function(o,e){const{h:a,s:t,l:s}=o.options.color.animation,{color:i}=o;if(!i)return;const{h:n,s:r,l:c}=i;n&&l(e,n,a,360,!1),r&&l(e,r,t,100,!0),c&&l(e,c,s,100,!0)}(o,e)}}async function i(o,e=!0){await o.addParticleUpdater("color",(o=>new s(o)),e)}}}]);