"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[7541],{7541:function(e,l,o){o.r(l),o.d(l,{loadRollUpdater:function(){return i}});var a=o(3563);class n{constructor(){this.enable=!1,this.value=0}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=(0,a.Cs)(e.value)))}}class t{constructor(){this.darken=new n,this.enable=!1,this.enlighten=new n,this.mode="vertical",this.speed=25}load(e){e&&(void 0!==e.backColor&&(this.backColor=a.Oz.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=(0,a.Cs)(e.speed)))}}class r{getTransformValues(e){var l;const o=(null===(l=e.roll)||void 0===l?void 0:l.enable)&&e.roll,a=o&&o.horizontal,n=o&&o.vertical;return{a:a?Math.cos(o.angle):void 0,d:n?Math.sin(o.angle):void 0}}init(e){const l=e.options.roll;if(null==l?void 0:l.enable)if(e.roll={enable:l.enable,horizontal:"horizontal"===l.mode||"both"===l.mode,vertical:"vertical"===l.mode||"both"===l.mode,angle:(0,a.sZ)()*Math.PI*2,speed:(0,a.Gu)(l.speed)/360},l.backColor)e.backColor=(0,a.lN)(l.backColor);else if(l.darken.enable&&l.enlighten.enable){const o=(0,a.sZ)()>=.5?"darken":"enlighten";e.roll.alter={type:o,value:(0,a.Gu)("darken"===o?l.darken.value:l.enlighten.value)}}else l.darken.enable?e.roll.alter={type:"darken",value:(0,a.Gu)(l.darken.value)}:l.enlighten.enable&&(e.roll.alter={type:"enlighten",value:(0,a.Gu)(l.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}isEnabled(e){const l=e.options.roll;return!e.destroyed&&!e.spawning&&!!(null==l?void 0:l.enable)}loadOptions(e){e.roll||(e.roll=new t);for(var l=arguments.length,o=new Array(l>1?l-1:0),a=1;a<l;a++)o[a-1]=arguments[a];for(const l of o)e.roll.load(null==l?void 0:l.roll)}update(e,l){this.isEnabled(e)&&function(e,l){const o=e.options.roll;if(!e.roll||!(null==o?void 0:o.enable))return;const a=e.roll.speed*l.factor,n=2*Math.PI;e.roll.angle+=a,e.roll.angle>n&&(e.roll.angle-=n)}(e,l)}}async function i(e){await e.addParticleUpdater("roll",(()=>new r))}}}]);