"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[8135],{8135(e,a,t){t.d(a,{loadRotateUpdater:()=>r});var s=t(3199);class i{decay=0;enable=!1;speed=0;sync=!1;load(e){(0,s.kZJ)(e)||((0,s.kBH)(this,"enable",e.enable),(0,s.dPX)(this,"speed",e.speed),(0,s.dPX)(this,"decay",e.decay),(0,s.kBH)(this,"sync",e.sync))}}class n extends s.PVU{animation=new i;direction=s.pTR.clockwise;path=!1;load(e){(0,s.kZJ)(e)||(super.load(e),(0,s.kBH)(this,"direction",e.direction),this.animation.load(e.animation),(0,s.kBH)(this,"path",e.path))}}var o=t(5206);class c{#e;constructor(e){this.#e=e}init(e){const a=e.options.rotate;if(!a)return;e.rotate={enable:a.animation.enable,value:(0,s.puj)((0,s.VGA)(a.value)),min:0,max:s.R1e},e.pathRotation=a.path;let t=a.direction;switch(t===s.pTR.random&&(t=Math.floor((0,s.G0i)()*s.gdl)>0?s.pTR.counterClockwise:s.pTR.clockwise),t){case s.pTR.counterClockwise:case"counterClockwise":e.rotate.status=s.H_P.decreasing;break;case s.pTR.clockwise:e.rotate.status=s.H_P.increasing}const i=a.animation;i.enable&&(e.rotate.decay=s.D_O-(0,s.VGA)(i.decay),e.rotate.velocity=(0,s.VGA)(i.speed)/360*this.#e.retina.reduceFactor,i.sync||(e.rotate.velocity*=(0,s.G0i)())),e.rotation=e.rotate.value}isEnabled(e){const a=e.options.rotate;return!!a&&!e.destroyed&&!e.spawning&&(!!a.value||a.animation.enable||a.path)}loadOptions(e,...a){(0,s.Ret)(e,"rotate",n,...a)}update(e,a){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&((0,o.U)(e,e.rotate,!1,s.VKE.none,a),e.rotation=e.rotate.value))}}async function r(e){e.checkVersion("4.1.3"),await e.pluginManager.register(e=>{e.pluginManager.addParticleUpdater("rotate",e=>Promise.resolve(new c(e)))})}},5206(e,a,t){t.d(a,{X:()=>i,U:()=>n});var s=t(3199);function i(e,a){const t=e.value,i=e.animation,n={delayTime:(0,s.VGA)(i.delay)*s.XuV,enable:i.enable,value:(0,s.VGA)(e.value)*a,max:(0,s.W9e)(t)*a,min:(0,s.Sgh)(t)*a,loops:0,maxLoops:(0,s.VGA)(i.count),time:0};if(i.enable){switch(n.decay=1-(0,s.VGA)(i.decay),i.mode){case s.gmr.increase:n.status=s.H_P.increasing;break;case s.gmr.decrease:n.status=s.H_P.decreasing;break;case s.gmr.random:n.status=(0,s.G0i)()>=s.MXx?s.H_P.increasing:s.H_P.decreasing}const e=i.mode===s.gmr.auto;switch(i.startValue){case s.SKz.min:n.value=n.min,e&&(n.status=s.H_P.increasing);break;case s.SKz.max:n.value=n.max,e&&(n.status=s.H_P.decreasing);break;case s.SKz.random:default:n.value=(0,s.vEz)(n),e&&(n.status=(0,s.G0i)()>=s.MXx?s.H_P.increasing:s.H_P.decreasing)}}return n.initialValue=n.value,n}function n(e,a,t,i,n){if(e.destroyed||!a.enable||(a.maxLoops??0)>0&&(a.loops??0)>(a.maxLoops??0))return;const o=(a.velocity??0)*n.factor,c=a.min,r=a.max,l=a.decay??1;a.time??=0;const d=a.delayTime??0;if(!(d>0&&a.time<d&&(a.time+=n.value,a.time<d))){switch(a.status){case s.H_P.increasing:a.value+=o;break;case s.H_P.decreasing:a.value-=o}switch(a.velocity&&1!==l&&(a.velocity*=l),a.status){case s.H_P.increasing:a.value>=r&&(t?a.status=s.H_P.decreasing:a.value-=r,a.loops??=0,a.loops++);break;case s.H_P.decreasing:a.value<=c&&(t?a.status=s.H_P.increasing:a.value+=r,a.loops??=0,a.loops++)}!function(e,a,t,i,n){switch(a){case s.VKE.max:t>=n&&e.destroy();break;case s.VKE.min:t<=i&&e.destroy()}}(e,i,a.value,c,r),e.destroyed||(a.value=(0,s.qE8)(a.value,c,r))}}}}]);