"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[5620],{5620(t,i,a){a.d(i,{loadOrbitUpdater:()=>c});var o,r=a(3199);class n extends r.PVU{value=45;load(t){(0,r.kZJ)(t)||super.load(t)}}class e{animation=new r.pK_;color;enable=!1;opacity=1;radius;rotation=new n;width=1;load(t){(0,r.kZJ)(t)||(this.animation.load(t.animation),this.rotation.load(t.rotation),(0,r.kBH)(this,"enable",t.enable),(0,r.dPX)(this,"opacity",t.opacity),(0,r.dPX)(this,"width",t.width),(0,r.dPX)(this,"radius",t.radius),void 0!==t.color&&(this.color=r.Oit.create(this.color,t.color)))}}!function(t){t.front="front",t.back="back"}(o||(o={}));const s=Math.PI*r.MXx,l=Math.PI+s;class d{#t;#i;constructor(t,i){this.#i=t,this.#t=i}afterDraw(t){const i=t.options.orbit;i?.enable&&this.drawOrbit(t,o.front)}beforeDraw(t){const i=t.options.orbit;i?.enable&&this.drawOrbit(t,o.back)}drawOrbit(t,i){const a=this.#t;let n,e;switch(i){case o.back:n=s,e=l;break;case o.front:n=l,e=s;break;default:n=0,e=r.R1e}a.canvas.render.draw(i=>{!function(t,i,a,o,n,e,s,l,d,c){if(s<=0)return;const b=a.getPosition();o&&(i.strokeStyle=(0,r.LCf)(o,t.hdr,e)),i.lineWidth=s;const p=(0,r.puj)(l);i.beginPath(),i.ellipse(b.x,b.y,n*r.MXx,n*r.gdl,p,d,c),i.stroke()}(a,i,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??a.retina.orbitRadius??t.getRadius(),t.orbitOpacity??r.hvP,t.orbitWidth??1,(t.orbitRotation??0)*a.retina.pixelRatio,n,e)})}init(t){const i=this.#t,a=t.options.orbit;a?.enable&&(t.orbitRotation=(0,r.VGA)(a.rotation.value),t.orbitColor=(0,r.R5R)(this.#i,a.color),t.retina.orbitRadius=void 0!==a.radius?(0,r.VGA)(a.radius)*i.retina.pixelRatio:void 0,i.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=a.animation.enable?(0,r.VGA)(a.animation.speed):0,t.orbitWidth=(0,r.VGA)(a.width),t.orbitOpacity=(0,r.VGA)(a.opacity))}isEnabled(t){const i=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!i?.enable}loadOptions(t,...i){(0,r.Ret)(t,"orbit",e,...i)}update(t,i){this.isEnabled(t)&&(t.orbitRotation??=0,t.orbitRotation+=(t.orbitAnimationSpeed??0/r.R1e)*i.factor)}}async function c(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("orbit",i=>Promise.resolve(new d(t.pluginManager,i)))})}}}]);