@tsparticles/all 3.8.1 → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.js +3 -1
- package/cjs/index.js +3 -1
- package/esm/index.js +3 -1
- package/package.json +52 -51
- package/report.html +1 -1
- package/tsparticles.all.bundle.js +748 -688
- package/tsparticles.all.bundle.min.js +1 -1
- package/tsparticles.all.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.all.js +16 -6
- package/tsparticles.all.min.js +1 -1
- package/tsparticles.all.min.js.LICENSE.txt +1 -1
- package/umd/index.js +4 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.all.bundle.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,(()=>(()=>{var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AlterType:()=>di,AnimatableColor:()=>ks,AnimationMode:()=>Ce,AnimationOptions:()=>xs,AnimationStatus:()=>Oe,AnimationValueWithRandom:()=>As,Background:()=>rs,BackgroundMask:()=>hs,BackgroundMaskCover:()=>cs,BaseRange:()=>pn,Circle:()=>gn,ClickEvent:()=>ds,CollisionMode:()=>mi,Collisions:()=>Gs,CollisionsAbsorb:()=>Ts,CollisionsOverlap:()=>Vs,ColorAnimation:()=>Cs,DestroyType:()=>ke,DivEvent:()=>us,DivType:()=>gi,EasingType:()=>Mn,EventType:()=>pi,Events:()=>ys,ExternalInteractorBase:()=>On,FullScreen:()=>ls,GradientType:()=>Vn,HoverEvent:()=>gs,HslAnimation:()=>Os,Interactivity:()=>vs,InteractivityDetect:()=>ui,InteractorType:()=>bi,LimitMode:()=>wi,ManualParticle:()=>ws,Modes:()=>ms,Move:()=>js,MoveAngle:()=>Ls,MoveAttract:()=>Ds,MoveCenter:()=>Hs,MoveDirection:()=>Nt,MoveGravity:()=>Fs,MovePath:()=>Bs,MoveTrail:()=>Ns,Opacity:()=>Ws,OpacityAnimation:()=>Qs,Options:()=>cn,OptionsColor:()=>as,OutMode:()=>vi,OutModeDirection:()=>Te,OutModes:()=>qs,Parallax:()=>ps,ParticleOutType:()=>_i,ParticlesBounce:()=>Rs,ParticlesBounceFactor:()=>zs,ParticlesDensity:()=>Zs,ParticlesInteractorBase:()=>kn,ParticlesNumber:()=>Ys,ParticlesNumberLimit:()=>Xs,ParticlesOptions:()=>on,PixelMode:()=>Ve,Point:()=>un,RangedAnimationOptions:()=>Ps,RangedAnimationValueWithRandom:()=>Es,Rectangle:()=>fn,ResizeEvent:()=>fs,Responsive:()=>bs,ResponsiveMode:()=>fi,RotateDirection:()=>Tn,Shadow:()=>Js,Shape:()=>Ks,Size:()=>en,SizeAnimation:()=>tn,Spin:()=>$s,StartValueType:()=>Me,Stroke:()=>sn,Theme:()=>Ss,ThemeDefault:()=>_s,ThemeMode:()=>yi,ValueWithRandom:()=>Ms,Vector:()=>Jt,Vector3d:()=>Yt,ZIndex:()=>nn,alterHsl:()=>ts,animate:()=>ne,areBoundsInside:()=>$e,arrayRandomIndex:()=>Ue,calcExactPositionOrRandomFromSize:()=>Se,calcExactPositionOrRandomFromSizeRanged:()=>xe,calcPositionFromSize:()=>we,calcPositionOrRandomFromSize:()=>be,calcPositionOrRandomFromSizeRanged:()=>_e,calculateBounds:()=>je,cancelAnimation:()=>oe,canvasFirstIndex:()=>at,canvasTag:()=>T,circleBounce:()=>Ke,circleBounceDataFromParticle:()=>Je,clamp:()=>ae,clear:()=>Qi,clickRadius:()=>K,cloneStyle:()=>hi,collisionVelocity:()=>ve,colorMix:()=>Ii,colorToHsl:()=>Oi,colorToRgb:()=>Ci,countOffset:()=>bt,decayOffset:()=>dt,deepExtend:()=>Qe,defaultAlpha:()=>C,defaultAngle:()=>Vt,defaultDensityFactor:()=>Ct,defaultFps:()=>P,defaultFpsLimit:()=>nt,defaultLoops:()=>Bt,defaultOpacity:()=>J,defaultRadius:()=>yt,defaultRatio:()=>z,defaultReduceFactor:()=>R,defaultRemoveQuantity:()=>E,defaultRetryCount:()=>V,defaultRgbMin:()=>Ht,defaultTime:()=>Ut,defaultTransform:()=>w,defaultTransformValue:()=>W,defaultVelocity:()=>Ft,degToRad:()=>fe,deleteCount:()=>Ot,divMode:()=>Ye,divModeExecute:()=>Ze,double:()=>S,doublePI:()=>x,drawEffect:()=>Zi,drawLine:()=>qi,drawParticle:()=>Wi,drawParticlePlugin:()=>Ki,drawPlugin:()=>Ji,drawShape:()=>Xi,drawShapeAfterDraw:()=>Yi,empty:()=>q,errorPrefix:()=>g,executeOnSingleOrMultiple:()=>ei,findItemFromSingleOrMultiple:()=>si,generatedAttribute:()=>i,generatedFalse:()=>k,generatedTrue:()=>O,getDistance:()=>ge,getDistances:()=>pe,getFullScreenStyle:()=>li,getHslAnimationFromHsl:()=>Fi,getHslFromAnimation:()=>Hi,getLinkColor:()=>Li,getLinkRandomColor:()=>Di,getLogger:()=>ze,getParticleBaseVelocity:()=>me,getParticleDirectionAngle:()=>ye,getPosition:()=>ai,getRandom:()=>ie,getRandomRgbColor:()=>zi,getRangeMax:()=>de,getRangeMin:()=>le,getRangeValue:()=>he,getSize:()=>ri,getStyleFromHsl:()=>Gi,getStyleFromRgb:()=>Ri,hMax:()=>D,hMin:()=>B,hPhase:()=>N,half:()=>y,hasMatchMedia:()=>Ie,hslToRgb:()=>Ai,hslaToRgba:()=>Ei,identity:()=>Mt,initParticleNumericAnimationValue:()=>ni,inverseFactorNumerator:()=>I,isArray:()=>Zt,isBoolean:()=>qt,isDivModeEnabled:()=>We,isFunction:()=>Qt,isInArray:()=>Fe,isNull:()=>Xt,isNumber:()=>jt,isObject:()=>Wt,isPointInside:()=>qe,isSsr:()=>Ge,isString:()=>$t,itemFromArray:()=>Ne,itemFromSingleOrMultiple:()=>ii,lFactor:()=>Et,lMax:()=>F,lMin:()=>zt,lengthOffset:()=>Pt,loadAll:()=>pu,loadFont:()=>Be,loadMinIndex:()=>ct,loadOptions:()=>an,loadParticlesOptions:()=>rn,loadRandomFactor:()=>rt,manualCount:()=>xt,manualDefaultPosition:()=>Tt,midColorValue:()=>_,millisecondsToSeconds:()=>m,minCoordinate:()=>et,minCount:()=>_t,minFpsLimit:()=>ot,minIndex:()=>St,minLimit:()=>wt,minRetries:()=>pt,minStrokeWidth:()=>At,minVelocity:()=>Q,minZ:()=>ft,minimumLength:()=>X,minimumSize:()=>Z,mix:()=>re,mouseDownEvent:()=>s,mouseLeaveEvent:()=>o,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>n,none:()=>lt,one:()=>ht,originPoint:()=>v,paintBase:()=>$i,paintImage:()=>ji,parseAlpha:()=>Pe,percentDenominator:()=>f,phaseNumerator:()=>Dt,posOffset:()=>mt,qTreeCapacity:()=>A,quarter:()=>$,randomColorValue:()=>b,randomInRange:()=>ce,rangeColorToHsl:()=>ki,rangeColorToRgb:()=>Pi,rectBounce:()=>ti,removeDeleteCount:()=>it,removeMinIndex:()=>st,resizeEvent:()=>u,rgbFactor:()=>Rt,rgbMax:()=>L,rgbToHsl:()=>Ti,rollFactor:()=>gt,sMax:()=>H,sMin:()=>U,sNormalizedOffset:()=>Lt,safeIntersectionObserver:()=>De,safeMatchMedia:()=>Le,safeMutationObserver:()=>He,setAnimationFunctions:()=>se,setLogger:()=>Ee,setRandom:()=>ee,setRangeValue:()=>ue,sextuple:()=>It,singleDivModeExecute:()=>Xe,sizeFactor:()=>vt,squareExp:()=>M,stringToAlpha:()=>Vi,stringToRgb:()=>Mi,subdivideCount:()=>G,threeQuarter:()=>j,touchCancelEvent:()=>d,touchDelay:()=>kt,touchEndEvent:()=>h,touchEndLengthOffset:()=>tt,touchMoveEvent:()=>l,touchStartEvent:()=>c,triple:()=>Gt,tryCountIncrement:()=>ut,tsParticles:()=>An,updateAnimation:()=>ci,updateColor:()=>Ni,updateColorValue:()=>Ui,visibilityChangeEvent:()=>p,zIndexFactorOffset:()=>Y});const i="generated",s="pointerdown",n="pointerup",o="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",g="tsParticles - Error",f=100,y=.5,m=1e3,v={x:0,y:0,z:0},w={a:1,b:0,c:0,d:1},b="random",_="mid",S=2,x=Math.PI*S,P=60,C=1,O="true",k="false",T="canvas",V=0,M=2,A=4,E=1,z=1,R=1,G=4,I=1,L=255,D=360,H=100,F=100,B=0,U=0,N=60,q=0,$=.25,j=y+$,Q=0,W=1,Z=0,X=0,Y=1,J=1,K=1,tt=1,et=0,it=1,st=0,nt=120,ot=0,at=0,rt=1e4,ct=0,ht=1,lt=0,dt=1,ut=1,pt=0,gt=1,ft=0,yt=0,mt=-$,vt=1.5,wt=0,bt=1,_t=0,St=0,xt=0,Pt=1,Ct=1,Ot=1,kt=500,Tt=50,Vt=0,Mt=1,At=0,Et=1,zt=0,Rt=255,Gt=3,It=6,Lt=1,Dt=1,Ht=0,Ft=0,Bt=0,Ut=0;var Nt;function qt(t){return"boolean"==typeof t}function $t(t){return"string"==typeof t}function jt(t){return"number"==typeof t}function Qt(t){return"function"==typeof t}function Wt(t){return"object"==typeof t&&null!==t}function Zt(t){return Array.isArray(t)}function Xt(t){return null==t}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(Nt||(Nt={}));class Yt{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!jt(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:v.z}else{if(void 0===t||void 0===e)throw new Error(`${g} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??v.z}}static get origin(){return Yt.create(v.x,v.y,v.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return Yt.create(t.x,t.y,t.z)}static create(t,e,i){return new Yt(t,e,i)}add(t){return Yt.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return Yt.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return Yt.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**M+this.y**M}mult(t){return Yt.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;t!=lt&&this.multTo(I/t)}rotate(t){return Yt.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),v.z)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:v.z}sub(t){return Yt.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}}class Jt extends Yt{constructor(t,e){super(t,e,v.z)}static get origin(){return Jt.create(v.x,v.y)}static clone(t){return Jt.create(t.x,t.y)}static create(t,e){return new Jt(t,e)}}let Kt=Math.random;const te={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)};function ee(t=Math.random){Kt=t}function ie(){return ae(Kt(),0,1-Number.EPSILON)}function se(t,e){te.nextFrame=e=>t(e),te.cancel=t=>e(t)}function ne(t){return te.nextFrame(t)}function oe(t){te.cancel(t)}function ae(t,e,i){return Math.min(Math.max(t,e),i)}function re(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function ce(t){const e=de(t);let i=le(t);return e===i&&(i=0),ie()*(e-i)+i}function he(t){return jt(t)?t:ce(t)}function le(t){return jt(t)?t:t.min}function de(t){return jt(t)?t:t.max}function ue(t,e){if(t===e||void 0===e&&jt(t))return t;const i=le(t),s=de(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:ue(i,s)}function pe(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i**2+s**2)}}function ge(t,e){return pe(t,e).distance}function fe(t){return t*Math.PI/180}function ye(t,e,i){if(jt(t))return fe(t);switch(t){case Nt.top:return-Math.PI*y;case Nt.topRight:return-Math.PI*$;case Nt.right:return q;case Nt.bottomRight:return Math.PI*$;case Nt.bottom:return Math.PI*y;case Nt.bottomLeft:return Math.PI*j;case Nt.left:return Math.PI;case Nt.topLeft:return-Math.PI*j;case Nt.inside:return Math.atan2(i.y-e.y,i.x-e.x);case Nt.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return ie()*x}}function me(t){const e=Jt.origin;return e.length=1,e.angle=t,e}function ve(t,e,i,s){return Jt.create(t.x*(i-s)/(i+s)+e.x*S*s/(i+s),t.y)}function we(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/f,y:t.position.y*t.size.height/f}:void 0}function be(t){return{x:(t.position?.x??ie()*f)*t.size.width/f,y:(t.position?.y??ie()*f)*t.size.height/f}}function _e(t){const e={x:void 0!==t.position?.x?he(t.position.x):void 0,y:void 0!==t.position?.y?he(t.position.y):void 0};return be({size:t.size,position:e})}function Se(t){return{x:t.position?.x??ie()*t.size.width,y:t.position?.y??ie()*t.size.height}}function xe(t){const e={x:void 0!==t.position?.x?he(t.position.x):void 0,y:void 0!==t.position?.y?he(t.position.y):void 0};return Se({size:t.size,position:e})}function Pe(t){return t?t.endsWith("%")?parseFloat(t)/f:parseFloat(t):1}var Ce,Oe,ke,Te,Ve,Me;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Ce||(Ce={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Oe||(Oe={})),function(t){t.none="none",t.max="max",t.min="min"}(ke||(ke={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Te||(Te={})),function(t){t.precise="precise",t.percent="percent"}(Ve||(Ve={})),function(t){t.max="max",t.min="min",t.random="random"}(Me||(Me={}));const Ae={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function Ee(t){Ae.debug=t.debug||Ae.debug,Ae.error=t.error||Ae.error,Ae.info=t.info||Ae.info,Ae.log=t.log||Ae.log,Ae.verbose=t.verbose||Ae.verbose,Ae.warning=t.warning||Ae.warning}function ze(){return Ae}function Re(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:o,velocity:a,factor:r}=t;return s.min<o.min||s.min>o.max||s.max<o.min||s.max>o.max||(i.max>=n.min&&i.max<=(n.max+n.min)*y&&a>Q||i.min<=n.max&&i.min>(n.max+n.min)*y&&a<Q)&&(e.velocity=a*-r,e.bounced=!0),e}function Ge(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function Ie(){return!Ge()&&"undefined"!=typeof matchMedia}function Le(t){if(Ie())return matchMedia(t)}function De(t){if(!Ge()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function He(t){if(!Ge()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function Fe(t,e){return t===e||Zt(e)&&e.indexOf(t)>-1}async function Be(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function Ue(t){return Math.floor(ie()*t.length)}function Ne(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Ue(t)]}function qe(t,e,i,s,n){return $e(je(t,s??0),e,i,n)}function $e(t,e,i,s){let n=!0;return s&&s!==Te.bottom||(n=t.top<e.height+i.x),!n||s&&s!==Te.left||(n=t.right>i.x),!n||s&&s!==Te.right||(n=t.left<e.width+i.y),!n||s&&s!==Te.top||(n=t.bottom>i.y),n}function je(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Qe(t,...e){for(const i of e){if(null==i)continue;if(!Wt(i)){t=i;continue}const e=Array.isArray(i);!e||!Wt(t)&&t&&Array.isArray(t)?e||!Wt(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],n=t;n[e]=Wt(s)&&Array.isArray(s)?s.map((t=>Qe(n[e],t))):Qe(n[e],s)}}return t}function We(t,e){return!!si(e,(e=>e.enable&&Fe(t,e.mode)))}function Ze(t,e,i){ei(e,(e=>{const s=e.mode;e.enable&&Fe(t,s)&&Xe(e,i)}))}function Xe(t,e){ei(t.selectors,(i=>{e(i,t)}))}function Ye(t,e){if(e&&t)return si(t,(t=>function(t,e){const i=ei(e,(e=>t.matches(e)));return Zt(i)?i.some((t=>t)):i}(e,t.selectors)))}function Je(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:Jt.create(he(t.options.bounce.horizontal.value),he(t.options.bounce.vertical.value))}}function Ke(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=pe(o,n);if(i*a+s*r<0)return;const c=-Math.atan2(r,a),h=t.mass,l=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=ve(d,u,h,l),g=ve(u,d,h,l),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function ti(t,e){const i=je(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Re({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:he(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const o=Re({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:he(s.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}function ei(t,e){return Zt(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function ii(t,e,i){return Zt(t)?Ne(t,e,i):t}function si(t,e){if(Zt(t))return t.find(((t,i)=>e(t,i)));return e(t,0)?t:void 0}function ni(t,e){const i=t.value,s=t.animation,n={delayTime:he(s.delay)*m,enable:s.enable,value:he(t.value)*e,max:de(i)*e,min:le(i)*e,loops:0,maxLoops:he(s.count),time:0};if(s.enable){switch(n.decay=1-he(s.decay),s.mode){case Ce.increase:n.status=Oe.increasing;break;case Ce.decrease:n.status=Oe.decreasing;break;case Ce.random:n.status=ie()>=y?Oe.increasing:Oe.decreasing}const t=s.mode===Ce.auto;switch(s.startValue){case Me.min:n.value=n.min,t&&(n.status=Oe.increasing);break;case Me.max:n.value=n.max,t&&(n.status=Oe.decreasing);break;case Me.random:default:n.value=ce(n),t&&(n.status=ie()>=y?Oe.increasing:Oe.decreasing)}}return n.initialValue=n.value,n}function oi(t,e){if(!(t.mode===Ve.percent)){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/f*e.width,y:t.y/f*e.height}:{width:t.width/f*e.width,height:t.height/f*e.height}}function ai(t,e){return oi(t,e)}function ri(t,e){return oi(t,e)}function ci(t,e,i,s,n){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const o=(e.velocity??0)*n.factor,a=e.min,r=e.max,c=e.decay??1;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case Oe.increasing:e.value>=r?(i?e.status=Oe.decreasing:e.value-=r,e.loops||(e.loops=0),e.loops++):e.value+=o;break;case Oe.decreasing:e.value<=a?(i?e.status=Oe.increasing:e.value+=r,e.loops||(e.loops=0),e.loops++):e.value-=o}e.velocity&&1!==c&&(e.velocity*=c),function(t,e,i,s,n){switch(e){case ke.max:i>=n&&t.destroy();break;case ke.min:i<=s&&t.destroy()}}(t,s,e.value,a,r),t.destroyed||(e.value=ae(e.value,a,r))}}function hi(t){const e=document.createElement("div").style;if(!t)return e;for(const i in t){const s=t[i];if(!Object.prototype.hasOwnProperty.call(t,i)||Xt(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty?.(s,n,o):e.setProperty?.(s,n)}return e}const li=function(t){const e=new Map;return(...i)=>{const s=JSON.stringify(i);if(e.has(s))return e.get(s);const n=t(...i);return e.set(s,n),n}}((function(t){const e=document.createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0"};for(const t in i){const s=i[t];e.setProperty(t,s)}return e}));var di,ui,pi,gi,fi,yi,mi,vi,wi,bi,_i,Si;function xi(t,e){if(e)for(const i of t.colorManagers.values())if(e.startsWith(i.stringPrefix))return i.parseString(e)}function Pi(t,e,i,s=!0){if(!e)return;const n=$t(e)?{value:e}:e;if($t(n.value))return Ci(t,n.value,i,s);if(Zt(n.value))return Pi(t,{value:Ne(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ci(t,e,i,s=!0){if(!e)return;const n=$t(e)?{value:e}:e;if($t(n.value))return n.value===b?zi():Mi(t,n.value);if(Zt(n.value))return Ci(t,{value:Ne(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Oi(t,e,i,s=!0){const n=Ci(t,e,i,s);return n?Ti(n):void 0}function ki(t,e,i,s=!0){const n=Pi(t,e,i,s);return n?Ti(n):void 0}function Ti(t){const e=t.r/L,i=t.g/L,s=t.b/L,n=Math.max(e,i,s),o=Math.min(e,i,s),a={h:B,l:(n+o)*y,s:U};return n!==o&&(a.s=a.l<y?(n-o)/(n+o):(n-o)/(S-n-o),a.h=e===n?(i-s)/(n-o):a.h=i===n?S+(s-e)/(n-o):S*S+(e-i)/(n-o)),a.l*=F,a.s*=H,a.h*=N,a.h<B&&(a.h+=D),a.h>=D&&(a.h-=D),a}function Vi(t,e){return xi(t,e)?.a}function Mi(t,e){return xi(t,e)}function Ai(t){const e=(t.h%D+D)%D,i=Math.max(U,Math.min(H,t.s)),s=Math.max(zt,Math.min(F,t.l)),n=e/D,o=i/H,a=s/F;if(i===U){const t=Math.round(a*Rt);return{r:t,g:t,b:t}}const r=(t,e,i)=>{if(i<0&&i++,i>1&&i--,i*It<1)return t+(e-t)*It*i;if(i*S<1)return e;if(i*Gt<1*S){return t+(e-t)*(S/Gt-i)*It}return t},c=a<y?a*(Lt+o):a+o-a*o,h=S*a-c,l=Dt/Gt,d=Math.min(Rt,Rt*r(h,c,n+l)),u=Math.min(Rt,Rt*r(h,c,n)),p=Math.min(Rt,Rt*r(h,c,n-l));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ei(t){const e=Ai(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function zi(t){const e=t??Ht,i=L+Mt;return{b:Math.floor(ce(ue(e,i))),g:Math.floor(ce(ue(e,i))),r:Math.floor(ce(ue(e,i)))}}function Ri(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??J})`}function Gi(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??J})`}function Ii(t,e,i,s){let n=t,o=e;return void 0===n.r&&(n=Ai(t)),void 0===o.r&&(o=Ai(e)),{b:re(n.b,o.b,i,s),g:re(n.g,o.g,i,s),r:re(n.r,o.r,i,s)}}function Li(t,e,i){if(i===b)return zi();if(i!==_)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ii(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ai(t)}}}function Di(t,e,i,s){const n=$t(e)?e:e.value;return n===b?s?Pi(t,{value:n}):i?b:_:n===_?_:Pi(t,{value:n})}function Hi(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function Fi(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(Bi(s.h,e.h,i),Bi(s.s,e.s,i),Bi(s.l,e.l,i)),s}function Bi(t,e,i){t.enable=e.enable,t.enable?(t.velocity=he(e.speed)/f*i,t.decay=dt-he(e.decay),t.status=Oe.increasing,t.loops=Bt,t.maxLoops=he(e.count),t.time=Ut,t.delayTime=he(e.delay)*m,e.sync||(t.velocity*=ie(),t.value*=ie()),t.initialValue=t.value,t.offset=ue(e.offset)):t.velocity=Ft}function Ui(t,e,i,s){if(!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=s.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?ce(t.offset):0,o=(t.velocity??0)*s.factor+3.6*n,a=t.decay??1,r=de(e),c=le(e);if(i&&t.status!==Oe.increasing){t.value-=o;const e=0;t.value<e&&(t.loops||(t.loops=0),t.loops++,t.status=Oe.increasing)}else t.value+=o,t.value>r&&(t.loops||(t.loops=0),t.loops++,i?t.status=Oe.decreasing:t.value-=r);t.velocity&&1!==a&&(t.velocity*=a),t.value=ae(t.value,c,r)}function Ni(t,e){if(!t)return;const{h:i,s,l:n}=t,o={min:0,max:100},a={min:0,max:100};i&&Ui(i,{min:0,max:360},!1,e),s&&Ui(s,o,!0,e),n&&Ui(n,a,!0,e)}function qi(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function $i(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(v.x,v.y,e.width,e.height)}function ji(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,v.x,v.y,e.width,e.height),t.globalAlpha=1)}function Qi(t,e){t.clearRect(v.x,v.y,e.width,e.height)}function Wi(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:Vt),g=Math.sin(p),f=Math.cos(p),y=!!p,m={a:f*(d.a??w.a),b:y?g*(d.b??Mt):d.b??w.b,c:y?-g*(d.c??Mt):d.c??w.c,d:f*(d.d??w.d)};i.setTransform(m.a,m.b,m.c,m.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const v=s.shadowColor;l.enable&&v&&(i.shadowBlur=l.blur,i.shadowColor=Ri(v),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),o.fill&&(i.fillStyle=o.fill);const b=s.strokeWidth??At;i.lineWidth=b,o.stroke&&(i.strokeStyle=o.stroke);const _={container:e,context:i,particle:s,radius:c,opacity:h,delta:n,transformData:m,strokeWidth:b};Xi(_),Yi(_),Zi(_),i.globalCompositeOperation="source-over",i.resetTransform()}function Zi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);c&&c.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Xi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,strokeWidth:r,transformData:c}=t;if(!s.shape)return;const h=e.shapeDrawers.get(s.shape);h&&(i.beginPath(),h.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),s.shapeClose&&i.closePath(),r>At&&i.stroke(),s.shapeFill&&i.fill())}function Yi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.shape)return;const c=e.shapeDrawers.get(s.shape);c?.afterDraw&&c.afterDraw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Ji(t,e,i){e.draw&&e.draw(t,i)}function Ki(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function ts(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===di.darken?-Et:Et)*i}}function es(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??W)*s)}function is(t,e,i=!1){if(!e)return;if(!t)return;const s=t.style;if(!s)return;const n=new Set;for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&n.add(s[t]);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.add(e[t]);for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}!function(t){t.darken="darken",t.enlighten="enlighten"}(di||(di={}));class ss{constructor(t,e){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,e,i,s,n,o)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)es(o,t,e)}a.beforeDraw?.(e)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=ki(this._engine,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ki(this._engine,s.particleStrokeColor(t))),e&&i)break;return[e,i]},this._initCover=async()=>{const t=this.container.actualOptions.backgroundMask.cover,e=t.color;if(e){const i=Pi(this._engine,e);if(i){const e={...i,a:t.opacity};this._coverColorStyle=Ri(e,e.a)}}else await new Promise(((e,i)=>{if(!t.image)return;const s=document.createElement("img");s.addEventListener("load",(()=>{this._coverImage={image:s,opacity:t.opacity},e()})),s.addEventListener("error",(t=>{i(t.error)})),s.src=t.image}))},this._initStyle=()=>{const t=this.element,e=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style||!Object.prototype.hasOwnProperty.call(e.style,i))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions.particles.move.trail,e=t.fill;if(!t.enable)return;const i=I/t.length;if(e.color){const t=Pi(this._engine,e.color);if(!t)return;this._trailFill={color:{...t},opacity:i}}else await new Promise(((t,s)=>{if(!e.image)return;const n=document.createElement("img");n.addEventListener("load",(()=>{this._trailFill={image:n,opacity:i},t()})),n.addEventListener("error",(t=>{s(t.error)})),n.src=e.image}))},this._paintBase=t=>{this.draw((e=>$i(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>ji(i,this.size,t,e)))},this._repairStyle=()=>{const t=this.element;t&&(this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground(),this._safeMutationObserver((e=>{t&&t instanceof Node&&e.observe(t,{attributes:!0})})))},this._resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&is(t,e,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&is(t,li(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=e,this._standardSize={height:0,width:0};const i=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,e=t.particles.move.trail,i=this._trailFill;t.backgroundMask.enable?this.paint():e.enable&&e.length>X&&i?i.color?this._paintBase(Ri(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Qi(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawAsync(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=Z)return;const s=t.getFillColor(),n=t.getStrokeColor()??s;let[o,a]=this._getPluginParticleColors(t);o||(o=s),a||(a=n),(o||a)&&this.draw((s=>{const n=this.container,r=n.actualOptions,c=t.options.zIndex,h=Y-t.zIndexFactor,l=h**c.opacityRate,d=t.bubble.opacity??t.opacity?.value??J,u=d*l,p=(t.strokeOpacity??d)*l,g={},f={fill:o?Gi(o,u):void 0};f.stroke=a?Gi(a,p):f.fill,this._applyPreDrawUpdaters(s,t,i,u,f,g),Wi({container:n,context:s,particle:t,delta:e,colorStyles:f,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*h**c.sizeRate,opacity:u,shadow:t.options.shadow,transform:g}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>Ki(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>Ji(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=He((t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(t){ze().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element;if(!e)return;const i=e.style;if(i){if(t.color){const e=Pi(this._engine,t.color);i.backgroundColor=e?Ri(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins.values())t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&i in t.dataset?"true"===t.dataset[i]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=hi(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const s=this.container.retina.pixelRatio,n=this.size;t.height=n.height=e.height*s,t.width=n.width=e.width*s,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>t.disconnect())),this.container.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Qi(e,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const o={...e};e.height=i.height,e.width=i.width;const a=this.size;return this.element.width=a.width=n.width,this.element.height=a.height=n.height,this.container.started&&t.particles.setResizeFactor({width:e.width/o.width,height:e.height/o.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Qi(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}}function ns(t,e,i,s,n){if(s){let s={passive:!0};qt(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ui||(ui={}));class os{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const e=this.container,i=e.actualOptions;if(this._canPush){const t=e.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=(new Date).getTime();ei(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),kt)},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,n=s.defaultThemes,o=e.matches?n.dark:n.light,a=s.themes.find((t=>t.name===o));a?.default.auto&&i.loadTheme(o)},this._handleVisibilityChange=()=>{const t=this.container,e=t.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(document?.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await(t?.windowResize())};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*m)},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,o=this.container,a=o.actualOptions,u=o.interactivity.element;if(!u)return;const p=u,g=o.canvas.element;g&&(g.style.pointerEvents=p===g?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(ns(u,r,i.mouseMove,e),ns(u,c,i.touchStart,e),ns(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(ns(u,h,i.touchEndClick,e),ns(u,n,i.mouseUp,e),ns(u,s,i.mouseDown,e)):ns(u,h,i.touchEnd,e),ns(u,t,i.mouseLeave,e),ns(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,n=i.canvas.element;let r=o;s===ui.window?(i.interactivity.element=window,r=a):s===ui.parent&&n?i.interactivity.element=n.parentElement??n.parentNode:i.interactivity.element=n,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&ns(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=Le("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):ns(i,"change",e.themeChange,t))},this._manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void ns(window,u,e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this.container,i=e.actualOptions,{mouse:s}=e.interactivity;s.inside=!0;let n=!1;const o=s.position;if(o&&i.interactivity.events.onClick.enable){for(const t of e.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=o,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,n=e.canvas.element;if(!s?.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(n){const t=n.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(i.interactivity.detectsOn===ui.parent){const t=e.target,i=e.currentTarget;if(t&&i&&n){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=n.getBoundingClientRect();o={x:e.offsetX+S*s.left-(a.left+r.left),y:e.offsetY+S*s.top-(a.top+r.top)}}else o={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===n&&(o={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,n){const e=t,i=e.touches[e.touches.length-Pt],s=n.getBoundingClientRect();o={x:i.clientX-(s.left??et),y:i.clientY-(s.top??et)}}const a=e.retina.pixelRatio;o&&(o.x*=a,o.y*=a),s.mouse.position=o,s.status=r},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(pi||(pi={}));class as{constructor(){this.value=""}static create(t,e){const i=new as;return i.load(t),void 0!==e&&($t(e)||Zt(e)?i.load({value:e}):i.load(e)),i}load(t){Xt(t)||Xt(t.value)||(this.value=t.value)}}class rs{constructor(){this.color=new as,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class cs{constructor(){this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.opacity&&(this.opacity=t.opacity))}}class hs{constructor(){this.composite="destination-out",this.cover=new cs,this.enable=!1}load(t){if(!Xt(t)){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=$t(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color||void 0!==e.image?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class ls{constructor(){this.enable=!0,this.zIndex=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class ds{constructor(){this.enable=!1,this.mode=[]}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}!function(t){t.circle="circle",t.rectangle="rectangle"}(gi||(gi={}));class us{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=gi.circle}load(t){Xt(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class ps{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class gs{constructor(){this.enable=!1,this.mode=[],this.parallax=new ps}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class fs{constructor(){this.delay=.5,this.enable=!0}load(t){Xt(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ys{constructor(){this.onClick=new ds,this.onDiv=new us,this.onHover=new gs,this.resize=new fs}load(t){if(Xt(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=ei(e,(t=>{const e=new us;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class ms{constructor(t,e){this._engine=t,this._container=e}load(t){if(Xt(t))return;if(!this._container)return;const e=this._engine.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class vs{constructor(t,e){this.detectsOn=ui.window,this.events=new ys,this.modes=new ms(t,e)}load(t){if(Xt(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class ws{load(t){Xt(t)||(t.position&&(this.position={x:t.position.x??Tt,y:t.position.y??Tt,mode:t.position.mode??Ve.percent}),t.options&&(this.options=Qe({},t.options)))}}!function(t){t.screen="screen",t.canvas="canvas"}(fi||(fi={}));class bs{constructor(){this.maxWidth=1/0,this.options={},this.mode=fi.canvas}load(t){Xt(t)||(Xt(t.maxWidth)||(this.maxWidth=t.maxWidth),Xt(t.mode)||(t.mode===fi.screen?this.mode=fi.screen:this.mode=fi.canvas),Xt(t.options)||(this.options=Qe({},t.options)))}}!function(t){t.any="any",t.dark="dark",t.light="light"}(yi||(yi={}));class _s{constructor(){this.auto=!1,this.mode=yi.any,this.value=!1}load(t){Xt(t)||(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ss{constructor(){this.name="",this.default=new _s}load(t){Xt(t)||(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=Qe({},t.options)))}}class xs{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ps extends xs{constructor(){super(),this.mode=Ce.auto,this.startValue=Me.random}load(t){super.load(t),Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Cs extends xs{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),Xt(t)||void 0!==t.offset&&(this.offset=ue(t.offset))}}class Os{constructor(){this.h=new Cs,this.s=new Cs,this.l=new Cs}load(t){Xt(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ks extends as{constructor(){super(),this.animation=new Os}static create(t,e){const i=new ks;return i.load(t),void 0!==e&&($t(e)||Zt(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(mi||(mi={}));class Ts{constructor(){this.speed=2}load(t){Xt(t)||void 0!==t.speed&&(this.speed=t.speed)}}class Vs{constructor(){this.enable=!0,this.retries=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Ms{constructor(){this.value=0}load(t){Xt(t)||Xt(t.value)||(this.value=ue(t.value))}}class As extends Ms{constructor(){super(),this.animation=new xs}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Es extends As{constructor(){super(),this.animation=new Ps}load(t){super.load(t)}}class zs extends Ms{constructor(){super(),this.value=1}}class Rs{constructor(){this.horizontal=new zs,this.vertical=new zs}load(t){Xt(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Gs{constructor(){this.absorb=new Ts,this.bounce=new Rs,this.enable=!1,this.maxSpeed=50,this.mode=mi.bounce,this.overlap=new Vs}load(t){Xt(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=ue(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class Is{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(Xt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Qe(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class Ls{constructor(){this.offset=0,this.value=90}load(t){Xt(t)||(void 0!==t.offset&&(this.offset=ue(t.offset)),void 0!==t.value&&(this.value=ue(t.value)))}}class Ds{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(!Xt(t)&&(void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.enable&&(this.enable=t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Hs{constructor(){this.x=50,this.y=50,this.mode=Ve.percent,this.radius=0}load(t){Xt(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Fs{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){Xt(t)||(void 0!==t.acceleration&&(this.acceleration=ue(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=ue(t.maxSpeed)))}}class Bs{constructor(){this.clamp=!0,this.delay=new Ms,this.enable=!1,this.options={}}load(t){Xt(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Qe(this.options,t.options)))}}class Us{load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class Ns{constructor(){this.enable=!1,this.length=10,this.fill=new Us}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.fill&&this.fill.load(t.fill),void 0!==t.length&&(this.length=t.length))}}!function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(vi||(vi={}));class qs{constructor(){this.default=vi.out}load(t){Xt(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class $s{constructor(){this.acceleration=0,this.enable=!1}load(t){Xt(t)||(void 0!==t.acceleration&&(this.acceleration=ue(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Qe({},t.position)))}}class js{constructor(){this.angle=new Ls,this.attract=new Ds,this.center=new Hs,this.decay=0,this.distance={},this.direction=Nt.none,this.drift=0,this.enable=!1,this.gravity=new Fs,this.path=new Bs,this.outModes=new qs,this.random=!1,this.size=!1,this.speed=2,this.spin=new $s,this.straight=!1,this.trail=new Ns,this.vibrate=!1,this.warp=!1}load(t){if(Xt(t))return;this.angle.load(jt(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=jt(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=ue(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(Wt(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=ue(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Qs extends Ps{constructor(){super(),this.destroy=ke.none,this.speed=2}load(t){super.load(t),Xt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ws extends Es{constructor(){super(),this.animation=new Qs,this.value=1}load(t){if(Xt(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Zs{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(Xt(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}!function(t){t.delete="delete",t.wait="wait"}(wi||(wi={}));class Xs{constructor(){this.mode=wi.delete,this.value=0}load(t){Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ys{constructor(){this.density=new Zs,this.limit=new Xs,this.value=0}load(t){Xt(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Js{constructor(){this.blur=0,this.color=new as,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){Xt(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=as.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class Ks{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(Xt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Qe(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class tn extends Ps{constructor(){super(),this.destroy=ke.none,this.speed=5}load(t){super.load(t),Xt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class en extends Es{constructor(){super(),this.animation=new tn,this.value=3}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class sn{constructor(){this.width=0}load(t){Xt(t)||(void 0!==t.color&&(this.color=ks.create(this.color,t.color)),void 0!==t.width&&(this.width=ue(t.width)),void 0!==t.opacity&&(this.opacity=ue(t.opacity)))}}class nn extends Ms{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),Xt(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class on{constructor(t,e){this._engine=t,this._container=e,this.bounce=new Rs,this.collisions=new Gs,this.color=new ks,this.color.value="#fff",this.effect=new Is,this.groups={},this.move=new js,this.number=new Ys,this.opacity=new Ws,this.reduceDuplicates=!1,this.shadow=new Js,this.shape=new Ks,this.size=new en,this.stroke=new sn,this.zIndex=new nn}load(t){if(Xt(t))return;if(void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!Object.hasOwn(t.groups,e))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Qe(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(ks.create(this.color,t.color)),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=Qe({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=ei(e,(t=>{const e=new sn;return e.load(t),e}))),this._container){const e=this._engine.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function an(t,...e){for(const i of e)t.load(i)}function rn(t,e,...i){const s=new on(t,e);return an(s,...i),s}class cn{constructor(t,e){this._findDefaultTheme=t=>this.themes.find((e=>e.default.value&&e.default.mode===t))??this.themes.find((t=>t.default.value&&t.default.mode===yi.any)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new rs,this.backgroundMask=new hs,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new ls,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new vs(t,e),this.manualParticles=[],this.particles=rn(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(t){if(Xt(t))return;void 0!==t.preset&&ei(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=ue(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=ue(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;qt(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new ws;return e.load(t),e}))),this.particles.load(t.particles),this.style=Qe(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const n=this._engine.interactors.get(this._container);if(n)for(const e of n)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new bs;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=this.themes.find((t=>t.name===e.name));if(t)t.load(e);else{const t=new Ss;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme(yi.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(yi.light)?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>i.mode===fi.screen&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=Le("(prefers-color-scheme: dark)"),e=t?.matches,i=this._findDefaultTheme(e?yi.dark:yi.light);i&&this.load(i.options)}}}!function(t){t.external="external",t.particles="particles"}(bi||(bi={}));class hn{constructor(t,e){this.container=e,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode?.(t)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case bi.external:this._externalInteractors.push(t);break;case bi.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&i.interact(t,e)}reset(t){for(const e of this._externalInteractors)e.isEnabled()&&e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&e.reset(t)}}function ln(t){if(!Fe(t.outMode,t.checkModes))return;const e=t.radius*S;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}!function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(_i||(_i={}));class dn{constructor(t,e){this.container=e,this._calcPosition=(t,e,i,s=V)=>{for(const s of t.plugins.values()){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return Yt.create(t.x,t.y,i)}const n=Se({size:t.canvas.size,position:e}),o=Yt.create(n.x,n.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{ln({outMode:e,checkModes:[vi.bounce],coord:o.x,maxCoord:t.canvas.size.width,setCb:t=>o.x+=t,radius:a})},h=e=>{ln({outMode:e,checkModes:[vi.bounce],coord:o.y,maxCoord:t.canvas.size.height,setCb:t=>o.y+=t,radius:a})};return c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(o,s)?this._calcPosition(t,void 0,i,s+ut):o},this._calculateVelocity=()=>{const t=me(this.direction).copy(),e=this.options.move;if(e.direction===Nt.inside||e.direction===Nt.outside)return t;const i=fe(he(e.angle.value)),s=fe(he(e.angle.offset)),n={left:s-i*y,right:s+i*y};return e.straight||(t.angle+=ce(ue(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=ie()),t},this._checkOverlap=(t,e=V)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const n=i.overlap;if(n.enable)return!1;const o=n.retries;if(o>=pt&&e>o)throw new Error(`${g} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>ge(t,e.position)<s+e.getRadius()))},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?S*gt:gt,i=this.roll.horizontal?Math.PI*y:lt;return Math.floor(((this.roll.angle??lt)+i)/(Math.PI/e))%S?this.backColor?this.backColor:this.roll.alter?ts(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=he(this.options.zIndex.value);this.position=this._calcPosition(e,t,ae(i,ft,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...ai(this.options.move.center,s),radius:this.options.move.center.radius??yt,mode:this.options.move.center.mode??Ve.percent},this.direction=ye(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case Nt.inside:this.outType=_i.inside;break;case Nt.outside:this.outType=_i.outside}this.offset=Jt.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,i=this.pathGenerator,s=e.shapeDrawers.get(this.shape);s?.particleDestroy?.(this);for(const i of e.plugins.values())i.particleDestroyed?.(this,t);for(const i of e.particles.updaters)i.particleDestroyed?.(this,t);i?.reset(this),this._engine.dispatchEvent(pi.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const e=this.container,i=e.canvas;for(const s of e.plugins.values())i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??Hi(this.color))}getMass(){return this.getRadius()**M*Math.PI*y}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??Hi(this.strokeColor))}init(t,e,i,s){const n=this.container,o=this._engine;this.id=t,this.group=s,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=_i.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,r=n.actualOptions,c=rn(this._engine,n,r.particles),{reduceDuplicates:h}=c,l=c.effect.type,d=c.shape.type;this.effect=ii(l,this.id,h),this.shape=ii(d,this.id,h);const u=c.effect,p=c.shape;if(i){if(i.effect?.type){const t=ii(i.effect.type,this.id,h);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=ii(i.shape.type,this.id,h);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===b){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(Math.random()*t.length)]}if(this.shape===b){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(Math.random()*t.length)]}this.effectData=function(t,e,i,s){const n=e.options[t];if(n)return Qe({close:e.close,fill:e.fill},ii(n,i,s))}(this.effect,u,this.id,h),this.shapeData=function(t,e,i,s){const n=e.options[t];if(n)return Qe({close:e.close,fill:e.fill},ii(n,i,s))}(this.shape,p,this.id,h),c.load(i);const g=this.effectData;g&&c.load(g.particles);const f=this.shapeData;f&&c.load(f.particles);const y=new vs(o,n);y.load(n.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=g?.fill??c.effect.fill,this.effectClose=g?.close??c.effect.close,this.shapeFill=f?.fill??c.shape.fill,this.shapeClose=f?.close??c.shape.close,this.options=c;const v=this.options.move.path;this.pathDelay=he(v.delay.value)*m,v.generator&&(this.pathGenerator=this._engine.getPathGenerator(v.generator),this.pathGenerator&&n.addPath(v.generator,this.pathGenerator)&&this.pathGenerator.init(n)),n.retina.initParticle(this),this.size=ni(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=dt-he(this.options.move.decay);const w=n.particles;w.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24;let _=n.effectDrawers.get(this.effect);_||(_=this._engine.getEffectDrawer(this.effect),_&&n.effectDrawers.set(this.effect,_)),_?.loadEffect&&_.loadEffect(this);let S=n.shapeDrawers.get(this.shape);S||(S=this._engine.getShapeDrawer(this.shape),S&&n.shapeDrawers.set(this.shape,S)),S?.loadShape&&S.loadShape(this);const x=S?.getSidesCount;x&&(this.sides=x(this)),this.spawning=!1,this.shadowColor=Pi(this._engine,this.options.shadow.color);for(const t of w.updaters)t.init(this);for(const t of w.movers)t.init?.(this);_?.particleInit?.(n,this),S?.particleInit?.(n,this);for(const t of n.plugins.values())t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}class un{constructor(t,e){this.position=t,this.particle=e}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Si||(Si={}));class pn{constructor(t,e,i){this.position={x:t,y:e},this.type=i}}class gn extends pn{constructor(t,e,i){super(t,e,Si.circle),this.radius=i}contains(t){return ge(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),o=this.radius;if(t instanceof gn||t.type===Si.circle){return o+t.radius>Math.sqrt(s**M+n**M)}if(t instanceof fn||t.type===Si.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,M)+Math.pow(n-a,M)<=o**M||s<=o+i&&n<=o+a||s<=i||n<=a}return!1}}class fn extends pn{constructor(t,e,i,s){super(t,e,Si.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof gn)return t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t instanceof fn?t.size:{width:0,height:0},a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}}class yn{constructor(t,e){this.rectangle=t,this.capacity=e,this._subdivide=()=>{const{x:t,y:e}=this.rectangle.position,{width:i,height:s}=this.rectangle.size,{capacity:n}=this;for(let o=0;o<G;o++){const a=o%S;this._subs.push(new yn(new fn(t+i*y*a,e+s*y*(Math.round(o*y)-a),i*y,s*y),n))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((e=>e.insert(t)))))}query(t,e){const i=[];if(!t.intersects(this.rectangle))return[];for(const s of this._points)!t.contains(s.position)&&ge(t.position,s.position)>s.particle.getRadius()&&(!e||e(s.particle))||i.push(s.particle);if(this._divided)for(const s of this._subs)i.push(...s.query(t,e));return i}queryCircle(t,e,i){return this.query(new gn(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new fn(t.x,t.y,e.width,e.height),i)}}const mn=t=>{const{height:e,width:i}=t;return new fn(mt*i,mt*e,vt*i,vt*e)};class vn{constructor(t,e){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,e,i)=>{const s=t.number;if(!t.number.density?.enable)return void(void 0===i?this._limit=s.limit.value:s.limit&&this._groupLimits.set(i,s.limit.value));const n=this._initDensityFactor(s.density),o=s.value,a=s.limit.value>wt?s.limit.value:o,r=Math.min(o,a)*n+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*n:this._groupLimits.set(i,s.limit.value*n),c<r?this.push(Math.abs(r-c),void 0,t,i):c>r&&this.removeQuantity(c-r,i)},this._initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return Ct;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**M)},this._pushParticle=(t,e,i,s)=>{try{let n=this._pool.pop();n||(n=new dn(this._engine,this._container)),n.init(this._nextId,t,e,i);let o=!0;if(s&&(o=s(n)),!o)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(pi.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){ze().warning(`${g} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,Ot),this._zArray.splice(n,Ot),s.destroy(i),this._engine.dispatchEvent(pi.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new hn(t,e),this._pluginsInitialized=!1;const i=e.canvas.size;this.quadTree=new yn(mn(i),A),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((e=>this.addParticle(e.position?ai(e.position,t.canvas.size):void 0,e.options)))}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,o=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(o>wt)switch(n){case wi.delete:{const t=a+bt-o;t>_t&&this.removeQuantity(t);break}case wi.wait:if(a>=o)return}return this._pushParticle(t,e,i,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(t){const e=this._container,i=e.canvas;i.clear(),this.update(t);for(const s of e.plugins.values())i.drawPlugin(s,t);for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,e=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let i=!1;for(const e of t.plugins.values())if(i=e.particlesInitialization?.()??i,i)break;if(this.addManualParticles(),!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];for(let i=this.count,n=0;n<s.number?.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const e of t.pathGenerators.values())e.init(t)}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e?.position,i,s)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=E,i,s){if(t<St||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this._removeParticle(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(St,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],xt,t);this._applyDensity(t.particles,t.manualParticles.length)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const e=this._container,i=new Set;this.quadTree=new yn(mn(e.canvas.size),A);for(const t of e.pathGenerators.values())t.update();for(const i of e.plugins.values())i.update?.(t);const s=this._resizeFactor;for(const e of this._array){s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height,e.initialPosition.x*=s.width,e.initialPosition.y*=s.height),e.ignoresResizeRatio=!1,this._interactionManager.reset(e);for(const i of this._container.plugins.values()){if(e.destroyed)break;i.particleUpdate?.(e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?i.add(e):this.quadTree.insert(new un(e.getPosition(),e))}if(i.size){const t=t=>!i.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of i)this._engine.dispatchEvent(pi.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...i)}this._interactionManager.externalInteract(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||this._interactionManager.particlesInteract(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this._lastZIndex=t[t.length-Pt].position.z,this._needsSort=!1}}}class wn{constructor(t){this.container=t,this.pixelRatio=z,this.reduceFactor=R}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||Ge()?z:window.devicePixelRatio,this.reduceFactor=R;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}const n=e.particles,o=n.move;this.maxSpeed=he(o.gravity.maxSpeed)*i,this.sizeAnimationSpeed=he(n.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.moveDrift=he(s.drift)*i,o.moveSpeed=he(s.speed)*i,o.sizeAnimationSpeed=he(e.size.animation.speed)*i;const a=o.maxDistance;a.horizontal=void 0!==n.horizontal?n.horizontal*i:void 0,a.vertical=void 0!==n.vertical?n.vertical*i:void 0,o.maxSpeed=he(s.gravity.maxSpeed)*i}}function bn(t){return t&&!t.destroyed}function _n(t,e,...i){const s=new cn(t,e);return an(s,...i),s}class Sn{constructor(t,e,i){this._intersectionManager=t=>{if(bn(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+m/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const e=function(t,e=P,i=!1){return{value:t,factor:i?P/e:P*t/m}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>m)return void this.draw(!1);if(this.particles.draw(e),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){ze().error(`${g} in animation loop`,t)}},this._engine=t,this.id=Symbol(e),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new wn(this),this.canvas=new ss(this,this._engine),this.particles=new vn(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=_n(this._engine,this),this.actualOptions=_n(this._engine,this),this._eventListeners=new os(this),this._intersectionObserver=De((t=>this._intersectionManager(t))),this._engine.dispatchEvent(pi.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&bn(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!bn(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!bn(this))return;const n=this.retina.pixelRatio,o={x:i.x*n,y:i.y*n},a=this.particles.quadTree.queryCircle(o,s*n);t(e,a)};let s=!1,n=!1;this._clickHandlers.set("click",(t=>{if(!bn(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,K)})),this._clickHandlers.set("touchstart",(()=>{bn(this)&&(s=!0,n=!1)})),this._clickHandlers.set("touchmove",(()=>{bn(this)&&(n=!0)})),this._clickHandlers.set("touchend",(t=>{if(bn(this)){if(s&&!n){const e=t;let s=e.touches[e.touches.length-tt];if(!s&&(s=e.changedTouches[e.changedTouches.length-tt],!s))return;const n=this.canvas.element,o=n?n.getBoundingClientRect():void 0,a={x:s.clientX-(o?o.left:et),y:s.clientY-(o?o.top:et)};i(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,n=!1}})),this._clickHandlers.set("touchcancel",(()=>{bn(this)&&(s=!1,n=!1)}));for(const[t,i]of this._clickHandlers)e.addEventListener(t,i)}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!bn(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(bn(this)){for(const[t,e]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,e);this._clickHandlers.clear()}}destroy(t=!0){if(bn(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);for(const t of this.shapeDrawers.values())t.destroy?.(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);if(this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,e=t.findIndex((t=>t===this));e>=st&&t.splice(e,it)}this._engine.dispatchEvent(pi.containerDestroyed,{container:this})}}draw(t){if(!bn(this))return;let e=t;const i=t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)};this._drawAnimationFrame=ne((t=>i(t)))}async export(t,e={}){for(const i of this.plugins.values()){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}ze().error(`${g} - Export plugin with type ${t} not found`)}handleClickMode(t){if(bn(this)){this.particles.handleClickMode(t);for(const e of this.plugins.values())e.handleClickMode?.(t)}}async init(){if(!bn(this))return;const t=this._engine.getSupportedEffects();for(const e of t){const t=this._engine.getEffectDrawer(e);t&&this.effectDrawers.set(e,t)}const e=this._engine.getSupportedShapes();for(const t of e){const e=this._engine.getShapeDrawer(t);e&&this.shapeDrawers.set(t,e)}await this.particles.initPlugins(),this._options=_n(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=_n(this._engine,this,this._options);const i=await this._engine.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{zLayers:s,duration:n,delay:o,fpsLimit:a,smooth:r}=this.actualOptions;this.zLayers=s,this._duration=he(n)*m,this._delay=he(o)*m,this._lifeTime=0,this.fpsLimit=a>ot?a:nt,this._smooth=r;for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));for(const t of this.plugins.values())await(t.init?.());this._engine.dispatchEvent(pi.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(pi.particlesSetup,{container:this})}async loadTheme(t){bn(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(bn(this)&&(void 0!==this._drawAnimationFrame&&(oe(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(pi.containerPaused,{container:this})}}play(t){if(!bn(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(pi.containerPlay,{container:this}),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(bn(this))return this.stop(),this.start()}async reset(t){if(bn(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=_n(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=_n(this._engine,this,this._options),this.refresh()}async start(){bn(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const e=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values())await(t.start?.());this._engine.dispatchEvent(pi.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{e()}),this._delay)})))}stop(){if(bn(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const t of this.plugins.values())t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(pi.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}class xn{constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach((t=>t(e)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<St||(s===Ot?this._listeners.delete(t):i.splice(n,Ot))}}async function Pn(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map((e=>e(t)))),e.set(t,n)),n}class Cn{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new xn,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}get items(){return this._domArray}get version(){return"3.8.1"}async addColorManager(t,e=!0){this.colorManagers.set(t.key,t),await this.refresh(e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent(pi.configAdded,{data:{name:e,config:t}})}async addEasing(t,e,i=!0){this.getEasing(t)||(this.easingFunctions.set(t,e),await this.refresh(i))}async addEffect(t,e,i=!0){ei(t,(t=>{this.getEffectDrawer(t)||this.effectDrawers.set(t,e)})),await this.refresh(i)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e,i=!0){this._initializers.interactors.set(t,e),await this.refresh(i)}async addMover(t,e,i=!0){this._initializers.movers.set(t,e),await this.refresh(i)}async addParticleUpdater(t,e,i=!0){this._initializers.updaters.set(t,e),await this.refresh(i)}async addPathGenerator(t,e,i=!0){this.getPathGenerator(t)||this.pathGenerators.set(t,e),await this.refresh(i)}async addPlugin(t,e=!0){this.getPlugin(t.id)||this.plugins.push(t),await this.refresh(e)}async addPreset(t,e,i=!1,s=!0){!i&&this.getPreset(t)||this.presets.set(t,e),await this.refresh(s)}async addShape(t,e=!0){for(const e of t.validTypes)this.getShapeDrawer(e)||this.shapeDrawers.set(e,t);await this.refresh(e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this.items}domItem(t){return this.item(t)}async getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,await i.getPlugin(t));return e}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,e=!1){return Pn(t,this.interactors,this._initializers.interactors,e)}async getMovers(t,e=!1){return Pn(t,this.movers,this._initializers.movers,e)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((e=>e.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(t,e=!1){return Pn(t,this.updaters,this._initializers.updaters,e)}init(){this._initialized||(this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(i&&!i.destroyed)return i;e.splice(t,it)}async load(t){const e=t.id??t.element?.id??`tsparticles${Math.floor(ie()*rt)}`,{index:s,url:n}=t,o=n?await async function(t){const e=ii(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ze().error(`${g} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:n,index:s}):t.options,a=ii(o,s),{items:r}=this,c=r.findIndex((t=>t.id.description===e)),h=new Sn(this,e,a);if(c>=ct){const t=this.item(c),e=t?ht:lt;t&&!t.destroyed&&t.destroy(!1),r.splice(c,e,h)}else r.push(h);const l=((t,e)=>{let s=e??document.getElementById(t);return s||(s=document.createElement("div"),s.id=t,s.dataset[i]=O,document.body.append(s),s)})(e,t.element),d=(t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===T)e=t,e.dataset[i]||(e.dataset[i]=k);else{const s=t.getElementsByTagName(T);s.length?(e=s[at],e.dataset[i]=k):(e=document.createElement(T),e.dataset[i]=O,t.appendChild(e))}const s="100%";return e.style.width||(e.style.width=s),e.style.height||(e.style.height=s),e})(l);return h.canvas.loadCanvas(d),await h.start(),h}loadOptions(t,e){this.plugins.forEach((i=>i.loadOptions?.(t,e)))}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach((t=>t.loadOptions?.(e,...i)))}async refresh(t=!0){t&&await Promise.all(this.items.map((t=>t.refresh())))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}setOnClickHandler(t){const{items:e}=this;if(!e.length)throw new Error(`${g} can only set click handlers after calling tsParticles.load()`);e.forEach((e=>e.addClickHandler(t)))}}class On{constructor(t){this.type=bi.external,this.container=t}}class kn{constructor(t){this.type=bi.particles,this.container=t}}var Tn,Vn,Mn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Tn||(Tn={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Vn||(Vn={})),function(t){t.easeInBack="ease-in-back",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInExpo="ease-in-expo",t.easeInSine="ease-in-sine",t.easeOutBack="ease-out-back",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutExpo="ease-out-expo",t.easeOutSine="ease-out-sine",t.easeInOutBack="ease-in-out-back",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutExpo="ease-in-out-expo",t.easeInOutSine="ease-in-out-sine"}(Mn||(Mn={}));const An=function(){const t=new Cn;return t.init(),t}();Ge()||(window.tsParticles=An);class En{static init(t){const e=new En,i=t.selector;if(!i)throw new Error("No selector provided");const s=document.querySelector(i);if(!s)throw new Error("No element found for selector");return An.load({element:s,id:i.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((t=>{e._container=t})),e}destroy(){const t=this._container;t?.destroy()}pauseAnimation(){const t=this._container;t?.pause()}resumeAnimation(){const t=this._container;t?.play()}}const zn={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1},Rn=t=>{t.checkVersion("3.8.1");const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>{const s=Qe(zn,i);return t.load({id:e,options:{fullScreen:{enable:!1},detectRetina:s.retina_detect,smooth:!0,interactivity:{detectsOn:s.interactivity.detect_on,events:{onHover:{enable:s.interactivity.events.onhover.enable,mode:s.interactivity.events.onhover.mode},onClick:{enable:s.interactivity.events.onclick.enable,mode:s.interactivity.events.onclick.mode},resize:{enable:s.interactivity.events.resize}},modes:{grab:{distance:s.interactivity.modes.grab.distance,links:{opacity:s.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:s.interactivity.modes.bubble.distance,size:s.interactivity.modes.bubble.size,duration:s.interactivity.modes.bubble.duration,opacity:s.interactivity.modes.bubble.opacity,speed:s.interactivity.modes.bubble.speed},repulse:{distance:s.interactivity.modes.repulse.distance,duration:s.interactivity.modes.repulse.duration},push:{quantity:s.interactivity.modes.push.particles_nb},remove:{quantity:s.interactivity.modes.remove.particles_nb}}},particles:{collisions:{enable:s.particles.move.bounce},number:{value:s.particles.number.value,density:{enable:s.particles.number.density.enable,width:s.particles.number.density.value_area}},color:{value:s.particles.color.value},stroke:{width:s.particles.shape.stroke.width,color:{value:s.particles.shape.stroke.color}},shape:{type:s.particles.shape.type,options:{polygon:{sides:s.particles.shape.polygon.nb_sides},image:{src:s.particles.shape.image.src,width:s.particles.shape.image.width,height:s.particles.shape.image.height}}},opacity:{value:s.particles.opacity.random?{min:s.particles.opacity.anim.enable?s.particles.opacity.anim.opacity_min:0,max:s.particles.opacity.value}:s.particles.opacity.value,animation:{enable:s.particles.opacity.anim.enable,speed:s.particles.opacity.anim.speed,sync:s.particles.opacity.anim.sync}},size:{value:s.particles.size.random?{min:s.particles.size.anim.enable?s.particles.size.anim.size_min:0,max:s.particles.size.value}:s.particles.size.value,animation:{enable:s.particles.size.anim.enable,speed:s.particles.size.anim.speed,sync:s.particles.size.anim.sync}},links:{enable:s.particles.line_linked.enable,distance:s.particles.line_linked.distance,color:s.particles.line_linked.color,opacity:s.particles.line_linked.opacity,width:s.particles.line_linked.width},move:{enable:s.particles.move.enable,speed:s.particles.move.speed/3,direction:s.particles.move.direction,random:s.particles.move.random,straight:s.particles.move.straight,outModes:s.particles.move.out_mode,attract:{enable:s.particles.move.attract.enable,rotate:{x:s.particles.move.attract.rotateX,y:s.particles.move.attract.rotateY}}}}}})};return e.load=(e,i,s)=>{t.load({id:e,url:i}).then((t=>{t&&s(t)})).catch((()=>{s(void 0)}))},e.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:e,pJSDom:t.dom()}})(t);return window.particlesJS=e,window.pJSDom=i,window.Particles=En,{particlesJS:e,pJSDom:i,Particles:En}},Gn=.5,In=0;class Ln{constructor(){this.validTypes=["arrow"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=2*s,o=n*(i.heightFactor??.5),a=n*(i.headWidthFactor??.2),r=o*(i.bodyHeightFactor??.5);e.moveTo(-n*Gn,In),e.lineTo(-n*Gn,-r*Gn),e.lineTo(n*Gn-a,-r*Gn),e.lineTo(n*Gn-a,-o*Gn),e.lineTo(n*Gn+a,In),e.lineTo(n*Gn-a,o*Gn),e.lineTo(n*Gn-a,r*Gn),e.lineTo(-n*Gn,r*Gn),e.lineTo(-n*Gn,In)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=he(i?.heightFactor??.5),e.headWidthFactor=he(i?.headWidthFactor??.2),e.bodyHeightFactor=he(i?.bodyHeightFactor??.5)}}class Dn{draw(t){const{context:e,radius:i}=t,s=i/3;e.beginPath(),e.arc(s,-s,s,Vt,x,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class Hn{constructor(){this.color=!0,this.opacity=!1}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Fn{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(!Xt(t)){if(void 0!==t.filter)if($t(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];Qt(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Bn{constructor(){this.src=""}load(t){Xt(t)||void 0!==t.src&&(this.src=t.src)}}class Un{constructor(){this.family="sans-serif",this.size=100}load(t){Xt(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Nn{constructor(){this.separator="\n",this.spacing=10}load(t){Xt(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class qn{constructor(){this.color="#000000",this.font=new Un,this.lines=new Nn,this.text=""}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class $n{constructor(){this.enable=!1,this.override=new Hn,this.pixels=new Fn,this.position={x:50,y:50},this.scale=1}load(t){Xt(t)||(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),void 0!==t.enable&&(this.enable=t.enable),t.image&&(this.image||(this.image=new Bn),this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),t.text&&(this.text||(this.text=new qn),this.text.load(t.text)))}}const jn={x:0,y:0};function Qn(t,e,i,s,n,o){const{height:a,width:r}=e,c=a*r,h=function(t){const e=1,i=0;for(let s=t.length-e;s>=i;s--){const e=Math.floor(ie()*s);[t[s],t[e]]=[t[e],t[s]]}return t}(Zn(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/f-r*s*.5,g=d.height*i.y/f-a*s*.5;for(;u<l&&h.length;){const i=0,a=h.pop()??i,c={x:a%r,y:Math.floor(a/r)},l=e.pixels[c.y][c.x];if(!o(l))continue;const d={x:c.x*s+p,y:c.y*s+g},f={};n.color&&(f.color={value:l}),n.opacity&&(f.opacity={value:l.a}),t.particles.addParticle(d,f),u++}}function Wn(t,e,i,s=!0){const n=t.getImageData(jn.x,jn.y,e.width,e.height).data;s&&t.clearRect(jn.x,jn.y,e.width,e.height);const o=[];for(let t=0;t<n.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};o[a.y]||(o[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;o[a.y][a.x]={r:n[t+r.r],g:n[t+r.g],b:n[t+r.b],a:n[t+r.a]/c}}return{pixels:o,width:Math.min(...o.map((t=>t.length))),height:o.length}}const Zn=t=>[...Array(t).keys()];class Xn{constructor(t){this._container=t}async init(){const t=this._container,e=t.actualOptions.canvasMask;if(!e?.enable)return;let i={pixels:[],height:0,width:0};const s=e.pixels.offset;if(e.image){const t=e.image.src;if(!t)return;i=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const n=document.createElement("canvas");n.width=i.width,n.height=i.height;const o=n.getContext("2d");if(!o)return s(new Error(`${g} Could not get canvas context`));o.drawImage(i,jn.x,jn.y,i.width,i.height,jn.x,jn.y,n.width,n.height),t(Wn(o,n,e))}}));return i.src=t,s}(t,s)}else if(e.text){const t=function(t,e){const i=document.createElement("canvas"),s=i.getContext("2d"),{font:n,text:o,lines:a,color:r}=t;if(!o||!s)return;const c=o.split(a.separator),h=jt(n.size)?`${n.size}px`:n.size,l=[];let d=0,u=0;for(const t of c){s.font=`${n.style??""} ${n.variant??""} ${n.weight??""} ${h} ${n.family}`;const e=s.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};d=Math.max(d||0,i.width),u+=i.height+a.spacing,l.push(i)}i.width=d,i.height=u;let p=0;for(const t of l)s.font=`${n.style??""} ${n.variant??""} ${n.weight??""} ${h} ${n.family}`,s.fillStyle=r,s.fillText(t.text,jn.x,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return Wn(s,i,e)}(e.text,s);if(Xt(t))return;i=t}else if(e.element??e.selector){const t=e.element??(e.selector&&document.querySelector(e.selector));if(!t)return;const n=t.getContext("2d");if(!n)return;i=Wn(n,t,s)}Qn(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class Yn{constructor(){this.id="canvasMask"}getPlugin(t){return Promise.resolve(new Xn(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new $n),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function Jn(t,e){if(!e.segments.length||!e.segments[0].values.length)return;const{context:i,radius:s}=t;i.moveTo(e.segments[0].values[0].x*s,e.segments[0].values[0].y*s);for(const t of e.segments)i.bezierCurveTo(t.values[1].x*s,t.values[1].y*s,t.values[2].x*s,t.values[2].y*s,t.values[3].x*s,t.values[3].y*s);for(let t=e.segments.length-1;t>=0;t--){const n=e.segments[t];i.bezierCurveTo(-n.values[2].x*s,n.values[2].y*s,-n.values[1].x*s,n.values[1].y*s,-n.values[0].x*s,n.values[0].y*s)}}const Kn=.5,to={heart:{segments:[{values:[{x:0,y:Kn},{x:0,y:Kn},{x:Kn,y:0},{x:Kn,y:-Kn/2}]},{values:[{x:Kn,y:-Kn/2},{x:Kn,y:-Kn/2},{x:Kn,y:-Kn},{x:Kn/2,y:-Kn}]},{values:[{x:Kn/2,y:-Kn},{x:Kn/2,y:-Kn},{x:0,y:-Kn},{x:0,y:-Kn/2}]}]},diamond:{segments:[{values:[{x:0,y:Kn},{x:0,y:Kn},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-Kn},{x:0,y:-Kn}]}]},club:{segments:[{values:[{x:0,y:-Kn},{x:0,y:-Kn},{x:Kn/2,y:-Kn},{x:Kn/2,y:-Kn/2}]},{values:[{x:Kn/2,y:-Kn/2},{x:Kn/2,y:-Kn/2},{x:Kn,y:-Kn/2},{x:Kn,y:0}]},{values:[{x:Kn,y:0},{x:Kn,y:0},{x:Kn,y:Kn/2},{x:Kn/2,y:Kn/2}]},{values:[{x:Kn/2,y:Kn/2},{x:Kn/2,y:Kn/2},{x:Kn/8,y:Kn/2},{x:Kn/8,y:Kn/8}]},{values:[{x:Kn/8,y:Kn/8},{x:Kn/8,y:Kn/2},{x:Kn/2,y:Kn},{x:Kn/2,y:Kn}]},{values:[{x:Kn/2,y:Kn},{x:Kn/2,y:Kn},{x:0,y:Kn},{x:0,y:Kn}]}]},spade:{segments:[{values:[{x:0,y:-Kn},{x:0,y:-Kn},{x:Kn,y:-Kn/2},{x:Kn,y:0}]},{values:[{x:Kn,y:0},{x:Kn,y:0},{x:Kn,y:Kn/2},{x:Kn/2,y:Kn/2}]},{values:[{x:Kn/2,y:Kn/2},{x:Kn/2,y:Kn/2},{x:Kn/8,y:Kn/2},{x:Kn/8,y:Kn/8}]},{values:[{x:Kn/8,y:Kn/8},{x:Kn/8,y:Kn/2},{x:Kn/2,y:Kn},{x:Kn/2,y:Kn}]},{values:[{x:Kn/2,y:Kn},{x:Kn/2,y:Kn},{x:0,y:Kn},{x:0,y:Kn}]}]}};class eo{constructor(){this.validTypes=["club","clubs"]}draw(t){Jn(t,to.club)}}class io{constructor(){this.validTypes=["diamond","diamonds"]}draw(t){Jn(t,to.diamond)}}class so{constructor(){this.validTypes=["heart","hearts"]}draw(t){Jn(t,to.heart)}}class no{constructor(){this.validTypes=["spade","spades"]}draw(t){Jn(t,to.spade)}}const oo=2*Math.PI,ao=0,ro=0;class co{constructor(){this.validTypes=["cog"]}afterDraw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const n=s*i.cogHoleRadius/f;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(n,ro),e.arc(ao,ro,n,0,oo),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(t)}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const n=oo/(2*i.cogNotches),o=n*i.cogInnerTaper*.005,a=n*i.cogOuterTaper*.005,r=s*i.cogInnerRadius/f;let c=n,h=!1;for(e.moveTo(s*Math.cos(a),s*Math.sin(a));c<=oo;c+=n)h?(e.lineTo(r*Math.cos(c-o),r*Math.sin(c-o)),e.lineTo(s*Math.cos(c+a),s*Math.sin(c+a))):(e.lineTo(s*Math.cos(c-a),s*Math.sin(c-a)),e.lineTo(r*Math.cos(c+o),r*Math.sin(c+o))),h=!h}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=he(i?.holeRadius??44),e.cogInnerRadius=he(i?.innerRadius??72),e.cogInnerTaper=he(i?.innerTaper??35),e.cogNotches=he(i?.notches??7),e.cogOuterTaper=he(i?.outerTaper??50)}}function ho(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class lo{constructor(){this._NORM_2D=1/47,this._SQUISH_2D=(Math.sqrt(3)-1)/2,this._STRETCH_2D=(1/Math.sqrt(3)-1)/2,this._base2D=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this._gradients2D=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this._lookup=[],this._lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this._p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256)}noise(t,e){const{_gradients2D:i,_NORM_2D:s,_SQUISH_2D:n,_STRETCH_2D:o,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*o,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),g=(u+p)*n,f=t-(u+g),y=e-(p+g),m=l-u,v=d-p,w=m+v;let b=0;for(let t=a[m-v+1|w<<1|w+v<<2|w+m<<4];void 0!==t;t=t.next){const e=f+t.dx,s=y+t.dy,n=2-e*e-s*s;if(n>0){const o=u+t.xsb,a=p+t.ysb,h=c[r[255&o]+a&255];b+=n*n*n*n*(i[h]*e+i[h+1]*s)}}return b*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,n=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let o=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===o?n[t/4]=a:o.next=a,o=a;a&&(a.next=this._contribution2D(e[t+1],e[t+2],e[t+3]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=n[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=ho(ho(ho(a)));for(let t=255;t>=0;t--){a=ho(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm2D[t]=14&this._perm[t],o[e[0]]=o[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class uo{constructor(){this._NORM_3D=1/103,this._SQUISH_3D=(Math.sqrt(4)-1)/3,this._STRETCH_3D=(1/Math.sqrt(4)-1)/3,this._base3D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this._gradients3D=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this._lookup=[],this._lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this._p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256)}noise(t,e,i){const{_STRETCH_3D:s,_NORM_3D:n,_SQUISH_3D:o,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),m=(g+f+y)*o,v=t-(g+m),w=e-(f+m),b=i-(y+m),_=d-g,S=u-f,x=p-y,P=_+S+x;let C=0;for(let t=a[S-x+1|_-S+1<<1|_-x+1<<2|P<<3|P+x<<5|P+S<<7|P+_<<9];void 0!==t;t=t.next){const e=v+t.dx,i=w+t.dy,s=b+t.dz,n=2-e*e-i*i-s*s;if(n>0){const o=g+t.xsb,a=f+t.ysb,l=y+t.zsb,d=c[r[r[255&o]+a&255]+l&255];C+=n*n*n*n*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*n}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,n=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let o=null,a=null;for(let e=0;e<i.length;e+=4)a=this._contribution3D(i[e],i[e+1],i[e+2],i[e+3]),null===o?n[t/9]=a:o.next=a,o=a;a&&(a.next=this._contribution3D(s[t+1],s[t+2],s[t+3],s[t+4]),a.next.next=this._contribution3D(s[t+5],s[t+6],s[t+7],s[t+8]))}this._lookup=[];for(let t=0;t<i.length;t+=2)this._lookup[i[t]]=n[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=ho(ho(ho(a)));for(let t=255;t>=0;t--){a=ho(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm3D[t]=this._perm[t]%24*3,o[e[0]]=o[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,xsb:e,ysb:i,zsb:s}}}class po{constructor(){this._NORM_4D=1/30,this._SQUISH_4D=.25*(Math.sqrt(5)-1),this._STRETCH_4D=.25*(1/Math.sqrt(5)-1),this._lookup=[],this._perm=new Uint8Array(0),this._perm4D=new Uint8Array(0),this._base4D=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this._gradients4D=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this._lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this._p4D=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3,2,0,1,0,3,1,0,2,0,1,2,0,1,1,0,3,0,2,1,0,3,0,1,2,0,1,2,1,0,0,1,3,2,0,0,1,3,1,0,0,2,1,2,0,1,0,1,3,0,2,0,1,3,0,1,0,2,1,2,0,0,1,1,3,0,0,2,1,3,0,0,1,2,2,3,1,1,1,0,2,1,1,1,-1,2,2,0,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,2,0,0,0,2,3,1,0,1,1,2,1,-1,1,1,2,2,0,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,2,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,2,0,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,2,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,0,2,0,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,2,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,2,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,0,0,2,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,0,2,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,0,2,2,1,1,1,-1,0,1,1,1,0,-1,0,0,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,0,0,0,0,0,2,1,-1,1,1,0,1,0,1,1,-1,0,0,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,0,0,0,0,0,2,1,-1,1,0,1,1,0,1,-1,1,0,0,0,0,0,2,1,-1,0,1,1,1,0,-1,1,1,0,0,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,2,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,2,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,2,2,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,0,2,0,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,2,0,0,2,1,-1,1,0,1,1,0,1,-1,1,2,0,2,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,0,0,2,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,0,2,0,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,2,0,2,1,1,-1,0,1,1,1,0,-1,1,2,0,0,0,2,2,1,-1,1,0,1,1,0,1,-1,1,2,0,0,0,2,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,0,2,3,1,1,0,0,0,2,2,0,0,0,2,1,1,1,-1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,1,-1,3,1,0,0,1,0,2,0,0,2,0,2,1,1,1,-1,3,1,1,0,0,0,2,2,0,0,0,2,1,1,-1,1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,-1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,e,i,s){const{_perm:n,_perm4D:o,_lookup:a,_STRETCH_4D:r,_SQUISH_4D:c,_gradients4D:h,_NORM_4D:l}=this,d=(t+e+i+s)*r,u=t+d,p=e+d,g=i+d,f=s+d,y=Math.floor(u),m=Math.floor(p),v=Math.floor(g),w=Math.floor(f),b=(y+m+v+w)*c,_=t-(y+b),S=e-(m+b),x=i-(v+b),P=s-(w+b),C=u-y,O=p-m,k=g-v,T=f-w,V=C+O+k+T;let M=0;for(let t=a[k-T+1|O-k+1<<1|O-T+1<<2|C-O+1<<3|C-k+1<<4|C-T+1<<5|V<<6|V+T<<8|V+k<<11|V+O<<14|V+C<<17];void 0!==t;t=t.next){const e=_+t.dx,i=S+t.dy,s=x+t.dz,a=P+t.dw,r=2-e*e-i*i-s*s-a*a;if(r>0){const c=y+t.xsb,l=m+t.ysb,d=v+t.zsb,u=w+t.wsb,p=o[n[n[n[255&c]+l&255]+d&255]+u&255];M+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return M*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,n=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let o=null,a=null;for(let e=0;e<s.length;e+=5)a=this._contribution4D(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===o?n[t/16]=a:o.next=a,o=a;a&&(a.next=this._contribution4D(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),a.next.next=this._contribution4D(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),a.next.next.next=this._contribution4D(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=n[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=ho(ho(ho(a)));for(let t=255;t>=0;t--){a=ho(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm4D[t]=252&this._perm[t],o[e[0]]=o[t]}}_contribution4D(t,e,i,s,n){const{_SQUISH_4D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,dw:-n-t*o,xsb:e,ysb:i,zsb:s,wsb:n}}}class go{constructor(){this.noise2d=new lo,this.noise3d=new uo,this.noise4d=new po}}const fo={speed:.2,step:250};class yo{constructor(){const t=new go;this._simplex=t.noise2d,this.options=Qe({},fo)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,n=e.x/s,o=e.y/s,a=.001,r=(this._simplex.noise(n,o+a)-this._simplex.noise(n,o-a))/.002,c=(this._simplex.noise(n+a,o)-this._simplex.noise(n-a,o))/.002;return t.velocity.x=0,t.velocity.y=0,Jt.create(i*r,i*-c)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.seed=e?.seed,this.options.speed=(e?.speed??fo.speed)*t.retina.pixelRatio,this.options.step=e?.step??fo.step,this._simplex.seed(this.options.seed??ie())}reset(){}update(){}}const mo="curlNoise";const vo=2*Math.PI;class wo{constructor(){this.options={rndFunc:null,period:100,nbHarmonics:2,attenHarmonics:.8,lowValue:-.03,highValue:.03}}generate(t){if(!t.pathGen){const e=this.options;t.pathGen=function(t,e,i,s,n=0,o=1){const a=[],r=[],c=[],h=[],l=[],d=t??ie;let u=0;i<1&&(i=1);for(let t=1;t<=i;++t)a[t]=d(),r[t]=d(),c[t]=1===t?1:c[t-1]*s,u+=c[t],h[t]=t/e,l[t]=d();return c.forEach(((t,e)=>c[e]=t/u*(o-n))),()=>{let t,e,s=0;for(let n=i;n>=1;--n)t=l[n]+=h[n],l[n]>=1&&(t=l[n]-=1,a[n]=r[n],r[n]=d()),e=t**2*(3-2*t),s+=(a[n]*(1-e)+r[n]*e)*c[n];return s+n}}(e.rndFunc,e.period,e.nbHarmonics,e.attenHarmonics,e.lowValue,e.highValue)}return t.curveVelocity?(t.curveVelocity.length+=.01,t.curveVelocity.angle=(t.curveVelocity.angle+t.pathGen())%vo):(t.curveVelocity=Jt.origin,t.curveVelocity.length=.6*ie()+.8,t.curveVelocity.angle=ie()*vo),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;Qt(e.rndFunc)?i.rndFunc=e.rndFunc:$t(e.rndFunc)&&(i.rndFunc=window[e.rndFunc]??this.options.rndFunc),i.period=e.period??i.period,i.nbHarmonics=e.nbHarmonics??i.nbHarmonics,i.attenHarmonics=e.attenHarmonics??i.attenHarmonics,i.lowValue=e.lowValue??i.lowValue,i.highValue=e.highValue??i.highValue}reset(t){delete t.pathGen,delete t.curveVelocity}update(){}}const bo="curvesPathGenerator";class _o{constructor(){this.wait=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.duration&&(this.duration=ue(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class So{constructor(){this.quantity=1,this.delay=.1}load(t){Xt(t)||(void 0!==t.quantity&&(this.quantity=ue(t.quantity)),void 0!==t.delay&&(this.delay=ue(t.delay)))}}class xo{constructor(){this.color=!1,this.opacity=!1}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Po{constructor(){this.options={},this.replace=new xo,this.type="square"}load(t){Xt(t)||(void 0!==t.options&&(this.options=Qe({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class Co{constructor(){this.mode=Ve.percent,this.height=0,this.width=0}load(t){Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class Oo{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new _o,this.rate=new So,this.shape=new Po,this.startCount=0}load(t){Xt(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new Co),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=ei(t.particles,(t=>Qe({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=ue(t.position.x)),void 0!==t.position.y&&(this.position.y=ue(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new ks),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var ko;!function(t){t.emitter="emitter"}(ko||(ko={}));function To(t,e){t.color?t.color.value=e:t.color={value:e}}class Vo{constructor(t,e,i,s,n){this.emitters=e,this.container=i,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life?.duration?he(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*m)},this._setColorAnimation=(t,e,i,s=1)=>{const n=this.container;if(!t.enable)return e;const o=ce(t.offset),a=he(this.options.rate.delay)*m/n.retina.reduceFactor;return(e+he(t.speed??0)*n.fpsLimit/a+o*s)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,s instanceof Oo?this.options=s:(this.options=new Oo,this.options.load(s)),this._spawnDelay=he(this.options.life.delay??0)*m/this.container.retina.reduceFactor,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let o=Qe({},this.options.particles);if(o??={},o.move??={},o.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=ki(this._engine,this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=o,this._size=this._calcSize(),this.size=ri(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=document.getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,r=this._engine.emitterShapeManager?.getShapeGenerator(a.type);r&&(this._shape=r.generate(this.position,this.size,this.fill,a.options)),this._engine.dispatchEvent("emitterCreated",{container:i,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0))){if(void 0===this._emitDelay){const t=he(this.options.rate.delay);this._emitDelay=t*m/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&qe(t,this.container.canvas.size,Jt.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=ri(this._size,this.container.canvas.size),this._shape?.resize(this.position,this.size)}update(t){this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=he(this.options.life.delay??0)*m/this.container.retina.reduceFactor):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay)))}_calcPosition(){if(this.options.domId){const t=document.getElementById(this.options.domId);if(t){const e=t.getBoundingClientRect(),i=this.container.retina.pixelRatio;return{x:(e.x+.5*e.width)*i,y:(e.y+.5*e.height)*i}}}return _e({size:this.container.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Ve.precise}}}return this.options.size??(()=>{const t=new Co;return t.load({height:0,mode:Ve.percent,width:0}),t})()}_emit(){if(this._paused)return;const t=he(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=ii(this._particlesOptions);for(let i=0;i<t;i++){const t=Qe({},e);if(this.spawnColor){const e=this.options.spawnColor?.animation;if(e){const t={h:360,s:100,l:100},i=3.6;this.spawnColor.h=this._setColorAnimation(e.h,this.spawnColor.h,t.h,i),this.spawnColor.s=this._setColorAnimation(e.s,this.spawnColor.s,t.s),this.spawnColor.l=this._setColorAnimation(e.l,this.spawnColor.l,t.l)}To(t,this.spawnColor)}const i=this.options.shape;let s=this.position;if(this._shape){const e=this._shape.randomPosition();if(e){s=e.position;const n=i.replace;n.color&&e.color&&To(t,e.color),n.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class Mo{constructor(t,e){this.container=e,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]};e.getEmitter=t=>void 0===t||jt(t)?this.array[t??0]:this.array.find((e=>e.name===t)),e.addEmitter=async(t,e)=>this.addEmitter(t,e),e.removeEmitter=t=>{const i=e.getEmitter(t);i&&this.removeEmitter(i)},e.playEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPlay()},e.pauseEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPause()}}async addEmitter(t,e){const i=new Oo;i.load(t);const s=new Vo(this._engine,this,this.container,i,e);return await s.init(),this.array.push(s),s}handleClickMode(t){const e=this.emitters,i=this.interactivityEmitters;if(t!==ko.emitter)return;let s;if(i&&Zt(i.value)){const t=0;if(i.value.length>t&&i.random.enable){s=[];const t=[];for(let e=0;e<i.random.count;e++){const n=Ue(i.value);t.includes(n)&&t.length<i.value.length?e--:(t.push(n),s.push(Ne(i.value,n)))}}else s=i.value}else s=i?.value;const n=s??e,o=this.container.interactivity.mouse.clickPosition;ei(n,(async t=>{await this.addEmitter(t,o)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(Zt(this.emitters))for(const t of this.emitters)await this.addEmitter(t);else await this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}update(t){for(const e of this.array)e.update(t)}}class Ao{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return Promise.resolve(new Mo(this._engine,t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=ei(e.emitters,(t=>{const e=new Oo;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(Zt(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new Oo;return e.load(t),e}))};else{const e=i;if(void 0!==e.value){const i=1;if(Zt(e.value))t.interactivity.modes.emitters={random:{count:e.random.count??i,enable:e.random.enable??!1},value:e.value.map((t=>{const e=new Oo;return e.load(t),e}))};else{const s=new Oo;s.load(e.value),t.interactivity.modes.emitters={random:{count:e.random.count??i,enable:e.random.enable??!1},value:s}}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new Oo}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return Zt(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&Fe(ko.emitter,t.interactivity.events.onClick.mode)}}const Eo=new Map;class zo{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||Eo.set(t,e)}getShapeGenerator(t){return Eo.get(t)}getSupportedShapeGenerators(){return Eo.keys()}}class Ro{constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}const Go={x:0,y:0};function Io(t,e,i,s=!0){const n=t.getImageData(Go.x,Go.y,e.width,e.height).data;s&&t.clearRect(Go.x,Go.y,e.width,e.height);const o=[];for(let t=0;t<n.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};o[a.y]||(o[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;o[a.y][a.x]={r:n[t+r.r],g:n[t+r.g],b:n[t+r.b],a:n[t+r.a]/c}}return{pixels:o,width:Math.min(...o.map((t=>t.length))),height:o.length}}class Lo extends Ro{constructor(t,e,i,s){super(t,e,i,s);const n=s.filter;let o=t=>t.a>0;if(void 0!==n)if($t(n)){if(Object.hasOwn(window,n)){const t=window[n];Qt(t)&&(o=t)}}else o=n;this.filter=o,this.scale=s.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const e=this.options,i=e.selector,s=e.pixels,n=e.image,o=e.element,a=e.text,r=s.offset;if(n){const e=n.src;if(!e)return;t=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const n=document.createElement("canvas");n.width=i.width,n.height=i.height;const o=n.getContext("2d");if(!o)return s(new Error(`${g} Could not get canvas context`));o.drawImage(i,Go.x,Go.y,i.width,i.height,Go.x,Go.y,n.width,n.height),t(Io(o,n,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),n=s.getContext("2d"),{font:o,text:a,lines:r,color:c}=t;if(!a||!n)return;const h=a.split(r.separator),l=jt(o.size)?`${o.size}px`:o.size,d=[];let u=0,p=0;for(const t of h){n.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${l} ${o.family}`;const e=n.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};u=Math.max(u||0,i.width),p+=i.height+r.spacing,d.push(i)}s.width=u,s.height=p;let g=0;for(const t of d)n.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${l} ${o.family}`,i?(n.fillStyle=c,n.fillText(t.text,Go.x,g+t.measure.actualBoundingBoxAscent)):(n.strokeStyle=c,n.strokeText(t.text,Go.x,g+t.measure.actualBoundingBoxAscent)),g+=t.height+r.spacing;return Io(n,s,e)}(a,r,this.fill);if(Xt(e))return;t=e}else if(o??i){const e=o??(i&&document.querySelector(i));if(!e)return;const s=e.getContext("2d");if(!s)return;t=Io(s,e,r)}t&&(this.pixelData=t)}randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,n=this.scale,o=s.x-e*n*.5,a=s.y-t*n*.5;for(let s=0;s<100;s++){const s=Math.floor(ie()*e*t),r={x:s%e,y:Math.floor(s/e)},c=i.pixels[r.y][r.x];if(this.filter(c))return{position:{x:r.x*n+o,y:r.y*n+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class Do{constructor(){this.offset=4}load(t){Xt(t)||void 0!==t.offset&&(this.offset=t.offset)}}class Ho{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){Xt(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Fo{constructor(){this.separator="\n",this.spacing=0}load(t){Xt(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Bo{constructor(){this.color="#000000",this.font=new Ho,this.lines=new Fo,this.text=""}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class Uo{constructor(){this.filter=t=>t.a>0,this.pixels=new Do,this.scale=1,this.selector="",this.text=new Bo}load(t){Xt(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class No{generate(t,e,i,s){const n=new Uo;return n.load(s),new Lo(t,e,i,n)}}const qo=.5;const $o=.5;class jo extends Ro{constructor(t,e,i,s){super(t,e,i,s);const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error(`${g} No 2d context available`);this.checkContext=n,this.points=s.points;const o=this.points,a=new Path2D,r=t.x-e.width*$o,c=t.y-e.height*$o;for(const[t,i]of o.entries()){const s={x:r+i.x*e.width/f,y:c+i.y*e.height/f};t?a.lineTo(s.x,s.y):a.moveTo(s.x,s.y)}const h=o[0];if(h){const t={x:r+h.x*e.width/f,y:c+h.y*e.height/f};a.lineTo(t.x,t.y)}this.path=a}async init(){}randomPosition(){const t=this.checkContext,e=this.position,i=this.size,s=this.fill,n=this.path,o=s?function(t,e,i,s){let n=null;for(let o=0;o<100;o++){const o={x:i.x+ie()*s.width-s.width*qo,y:i.y+ie()*s.height-s.height*qo};if(t.isPointInPath(e,o.x,o.y)){n=o;break}}return n}(t,n,e,i):function(t,e,i,s){let n=null;for(let o=0;o<100;o++){const o={x:i.x+ie()*s.width-s.width*qo,y:i.y+ie()*s.height-s.height*qo};if(t.isPointInStroke(e,o.x,o.y)){n=o;break}}return n}(t,n,e,i);return o?{position:o}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,n=t.x-e.width*$o,o=t.y-e.height*$o;for(const[t,a]of i.entries()){const i={x:n+a.x*e.width/f,y:o+a.y*e.height/f};t?s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)}const a=i[0];if(a){const t={x:n+a.x*e.width/f,y:o+a.y*e.height/f};s.lineTo(t.x,t.y)}this.path=s}}const Qo=50,Wo=50;class Zo{constructor(){this.points=[]}load(t){Xt(t)||void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??Qo,y:t.y??Wo}))))}}class Xo{generate(t,e,i,s){const n=new Zo;return n.load(s),new jo(t,e,i,n)}}const Yo=2*Math.PI;function Jo(t,e,i,s=0){const n=[],o=Yo/e;for(let a=0;a<e;a++){const e=o*a+s;n.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return n}function Ko(t,e){let i=!1;for(let s=0,n=e.length-1;s<e.length;n=s++){const o=e[s],a=e[n];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}class ta extends Ro{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=fe(s.angle),this.polygon=Jo(t,this.sides,.5*e.width,this.angle)}async init(){}randomPosition(){const t=this.fill,e=this.polygon,i=t?function(t){const e=t[0],i={...e},s={...e};for(const e of t)e.x<i.x&&(i.x=e.x),e.x>s.x&&(s.x=e.x),e.y<i.y&&(i.y=e.y),e.y>s.y&&(s.y=e.y);let n=null;for(let e=0;e<100;e++){const e={x:i.x+ie()*(s.x-i.x),y:i.y+ie()*(s.y-i.y)};if(Ko(e,t)){n=e;break}}return n}(e):function(t){const e=Math.floor(ie()*t.length),i=t[e],s=t[(e+1)%t.length],n=ie();return{x:i.x+(s.x-i.x)*n,y:i.y+(s.y-i.y)*n}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=Jo(t,this.sides,.5*e.width,this.angle)}}class ea{constructor(){this.angle=0,this.sides=5}load(t){Xt(t)||(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class ia{generate(t,e,i,s){const n=new ea;return n.load(s),new ta(t,e,i,n)}}class sa{constructor(t,e){this._exportImage=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{e.toBlob((t=>{i(t||void 0)}),t.type??"image/png",t.quality)}))},this._container=t,this._engine=e}async export(t,e){const i={supported:!1};if("image"===t)i.supported=!0,i.blob=await this._exportImage(e);return i}}class na{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return Promise.resolve(new sa(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class oa{constructor(t,e){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,e)=>{if(!t.startsWith("_"))return e}),2);return Promise.resolve(new Blob([t],{type:"application/json"}))},this._container=t,this._engine=e}async export(t){const e={supported:!1};if("json"===t)e.supported=!0,e.blob=await this._exportJSON();return e}}class aa{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return Promise.resolve(new oa(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}const ra=["webm","ogg","mp4","x-matroska"],ca=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class ha{constructor(t,e){this._supportedTypes=[],this._exportVideo=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{const s=e.captureStream(t.fps??this._container.actualOptions.fpsLimit),n=t.mimeType??this._supportedTypes[0],o=new MediaRecorder(s,{mimeType:n}),a=[];o.addEventListener("dataavailable",(t=>{a.push(t.data)})),o.addEventListener("stop",(()=>{i(new Blob(a,{type:n}))})),o.start(),setTimeout((()=>{o.stop()}),t.duration??5*m)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=t=>MediaRecorder.isTypeSupported(t),e=[];return ra.forEach((i=>{const s=`video/${i}`;ca.forEach((i=>[`${s};codecs=${i}`,`${s};codecs=${i.toUpperCase()}`].forEach((i=>{t(i)&&e.push(i)})))),t(s)&&e.push(s)})),e}()}async export(t,e){const i={supported:!1};if("video"===t)i.supported=!0,i.blob=await this._exportVideo(e);return i}}class la{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return Promise.resolve(new ha(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class da{constructor(){this.replaceCursor=!1,this.pauseOnStop=!1,this.stopDelay=0}load(t){Xt(t)||(void 0!==t.options&&(this.options=Qe({},t.options)),void 0!==t.replaceCursor&&(this.replaceCursor=t.replaceCursor),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop),void 0!==t.stopDelay&&(this.stopDelay=t.stopDelay))}}const ua="particle";class pa extends On{constructor(t){super(t)}clear(){}init(){}interact(){const t=this.container,{interactivity:e}=t,i=t.actualOptions;if(!t.retina.reduceFactor)return;const s=e.mouse.position,n=i.interactivity.modes.particle;if(!n)return;const o=n.pauseOnStop&&(e.mouse.position===this._lastPosition||e.mouse.position?.x===this._lastPosition?.x&&e.mouse.position?.y===this._lastPosition?.y),a=n.stopDelay;if(s?this._lastPosition={...s}:delete this._lastPosition,this._lastPosition)if(o){if(this._clearTimeout)return;this._clearTimeout=setTimeout((()=>{if(this._particle){if(n.replaceCursor){const t=e.element;t&&(t instanceof Window?document.body.style.cursor="":t.style.cursor="")}this.container.particles.remove(this._particle,void 0,!0),delete this._particle}}),a)}else{if(this._clearTimeout&&(clearTimeout(this._clearTimeout),delete this._clearTimeout),!this._particle){const i=Qe(n.options,{move:{enable:!1}});if(this._particle=t.particles.addParticle(this._lastPosition,i),n.replaceCursor){const t=e.element;t&&(t instanceof Window?document.body.style.cursor="none":t.style.cursor="none")}}this._particle&&(this._particle.position.x=this._lastPosition.x,this._particle.position.y=this._lastPosition.y)}}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&Fe(ua,n.onClick.mode)||s.inside&&!!s.position&&Fe(ua,n.onHover.mode)}loadModeOptions(t,...e){t.particle||(t.particle=new da);for(const i of e)t.particle.load(i?.particle)}reset(){}}class ga extends On{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container;if("pop"!==t)return;const i=e.interactivity.mouse.clickPosition;if(!i)return;const s=e.particles.quadTree.queryCircle(i,e.retina.pixelRatio);if(s.length)for(const t of s)e.particles.remove(t)}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}class fa{constructor(){this.radius=0,this.mass=0}load(t){Xt(t)||(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class ya extends Ms{constructor(){super(),this.density=5,this.value=50,this.limit=new fa}load(t){Xt(t)||(super.load(t),void 0!==t.density&&(this.density=t.density),jt(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class ma{constructor(){this.color=new as,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new ya}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=ue(t.position.x)),void 0!==t.position.y&&(this.position.y=ue(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}var va;!function(t){t.absorber="absorber"}(va||(va={}));const wa=2*Math.PI;class ba{constructor(t,e,i,s,n){this._calcPosition=()=>{const t=_e({size:this._container.canvas.size,position:this.options.position});return Jt.create(t.x,t.y)},this._updateParticlePosition=(t,e)=>{if(t.destroyed)return;const i=this._container,s=i.canvas.size;if(t.needsNewPosition){const e=be({size:s});t.position.setTo(e),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1}if(this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=Jt.origin,t.absorberOrbit.length=ge(t.getPosition(),this.position),t.absorberOrbit.angle=ie()*wa),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height),i=1,n=.1,o=.2;t.absorberOrbit.length=e*(i+(ie()*o-n))}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?Tn.clockwise:Tn.counterClockwise);const n=t.absorberOrbit.length,o=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(Jt.origin);const r={x:a===Tn.clockwise?Math.cos:Math.sin,y:a===Tn.clockwise?Math.sin:Math.cos};t.position.x=this.position.x+n*r.x(o),t.position.y=this.position.y+n*r.y(o),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/f*i.retina.reduceFactor}else{const i=Jt.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this._absorbers=t,this._container=e,this._engine=i,this.initialPosition=n?Jt.create(n.x,n.y):void 0,s instanceof ma?this.options=s:(this.options=new ma,this.options.load(s)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=he(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const o=this.options.size.limit;this.limit={radius:o.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:o.mass},this.color=Pi(this._engine,this.options.color)??{b:0,g:0,r:0},this.position=this.initialPosition?.copy()??this._calcPosition()}attract(t){const e=this._container,i=this.options;if(i.draggable){const t=e.interactivity.mouse;if(t.clicking&&t.downPosition){ge(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const s=t.getPosition(),{dx:n,dy:o,distance:a}=pe(this.position,s),r=Jt.create(n,o);if(r.length=this.mass/Math.pow(a,2)*e.retina.reduceFactor,a<this.size+t.getRadius()){const s=.033*t.getRadius()*e.retina.pixelRatio;this.size>t.getRadius()&&a<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?i.destroy?t.destroy():(t.needsNewPosition=!0,this._updateParticlePosition(t,r)):(i.destroy&&(t.size.value-=s),this._updateParticlePosition(t,r)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=s),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=s*this.options.size.density*e.retina.reduceFactor)}else this._updateParticlePosition(t,r)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(v.x,v.y,this.size,0,wa,!1),t.closePath(),t.fillStyle=Ri(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&qe(t,this._container.canvas.size,Jt.origin)?t:this._calcPosition()}}class _a{constructor(t,e){this._container=t,this._engine=e,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||jt(t)?this.array[t??0]:this.array.find((e=>e.name===t)),t.addAbsorber=async(t,e)=>this.addAbsorber(t,e)}async addAbsorber(t,e){const i=new ba(this,this._container,this._engine,t,e);return this.array.push(i),Promise.resolve(i)}draw(t){for(const e of this.array)e.draw(t)}handleClickMode(t){const e=this.absorbers,i=this.interactivityAbsorbers;if(t===va.absorber){const t=ii(i)??ii(e),s=this._container.interactivity.mouse.clickPosition;this.addAbsorber(t,s)}}async init(){this.absorbers=this._container.actualOptions.absorbers,this.interactivityAbsorbers=this._container.actualOptions.interactivity.modes.absorbers;const t=ei(this.absorbers,(async t=>{await this.addAbsorber(t)}));t instanceof Array?await Promise.all(t):await t}particleUpdate(t){for(const e of this.array)if(e.attract(t),t.destroyed)break}removeAbsorber(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}}class Sa{constructor(t){this.id="absorbers",this._engine=t}async getPlugin(t){return Promise.resolve(new _a(t,this._engine))}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=ei(e.absorbers,(t=>{const e=new ma;return e.load(t),e}))),t.interactivity.modes.absorbers=ei(e?.interactivity?.modes?.absorbers,(t=>{const e=new ma;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return Zt(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!Fe(va.absorber,t.interactivity.events.onClick.mode))}}class xa{load(t){Xt(t)||(void 0!==t.bottom&&(this.bottom=ue(t.bottom)),void 0!==t.left&&(this.left=ue(t.left)),void 0!==t.right&&(this.right=ue(t.right)),void 0!==t.top&&(this.top=ue(t.top)))}}var Pa;!function(t){t.none="none",t.split="split"}(Pa||(Pa={}));class Ca extends Ms{constructor(){super(),this.value=3}}class Oa extends Ms{constructor(){super(),this.value={min:4,max:9}}}class ka{constructor(){this.count=1,this.factor=new Ca,this.rate=new Oa,this.sizeOffset=!0}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=ei(t.particles,(t=>Qe({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset),t.colorOffset&&(this.colorOffset=this.colorOffset??{},void 0!==t.colorOffset.h&&(this.colorOffset.h=t.colorOffset.h),void 0!==t.colorOffset.s&&(this.colorOffset.s=t.colorOffset.s),void 0!==t.colorOffset.l&&(this.colorOffset.l=t.colorOffset.l)))}}class Ta{constructor(){this.bounds=new xa,this.mode=Pa.none,this.split=new ka}load(t){Xt(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}const Va=0,Ma=.5,Aa=0,Ea=1,za=500;function Ra(t,e,i,s){const n=i.options.destroy;if(!n)return;const o=n.split,a=rn(t,e,i.options),r=he(o.factor.value),c=i.getFillColor();o.color?a.color.load(o.color):o.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+he(o.colorOffset.h??Va),s:c.s+he(o.colorOffset.s??Va),l:c.l+he(o.colorOffset.l??Va)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:Ve.precise}}),jt(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=o.sizeOffset?ue(-i.size.value,i.size.value):Va,l={x:i.position.x+ce(h),y:i.position.y+ce(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<Ma)&&(t.velocity.length=ce(ue(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??Aa)+Ea,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),za),!0)))}class Ga{constructor(t,e){this.container=e,this.engine=t}init(t){const e=this.container,i=t.options.destroy;if(!i)return;t.splitCount=0;const s=i.bounds;t.destroyBounds||(t.destroyBounds={});const{bottom:n,left:o,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;n&&(c.bottom=he(n)*h.height/f),o&&(c.left=he(o)*h.width/f),a&&(c.right=he(a)*h.width/f),r&&(c.top=he(r)*h.height/f)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new Ta);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&i.mode===Pa.split&&function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0&&(void 0===i.splitCount||i.splitCount++>n.count))return;const o=he(n.rate.value),a=ii(n.particles);for(let s=0;s<o;s++)Ra(t,e,i,a)}(this.engine,this.container,t)}update(t){if(!this.isEnabled(t))return;const e=t.getPosition(),i=t.destroyBounds;i&&(void 0!==i.bottom&&e.y>=i.bottom||void 0!==i.left&&e.x<=i.left||void 0!==i.right&&e.x>=i.right||void 0!==i.top&&e.y<=i.top)&&t.destroy()}}const Ia=.25,La=2*Math.PI;class Da extends Ro{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[.5*t.width,.5*t.height],o=((t,e)=>{const i=ie()*Ia,s=Math.atan(e/t*Math.tan(La*i)),n=ie();return n<Ia?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),a=(l=o,(c=s)*(h=n)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(ie()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(o),y:i.y+r*Math.sin(o)}}}}class Ha{generate(t,e,i,s){return new Da(t,e,i,s)}}var Fa;function Ba(t,e){return t+e*(ie()-y)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Fa||(Fa={}));class Ua extends Ro{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ba(e.x,i.width),y:Ba(e.y,i.height)}};{const t=i.width*y,s=i.height*y,n=Math.floor(4*ie()),o=(ie()-y)*S;switch(n){case Fa.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case Fa.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case Fa.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case Fa.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Na{generate(t,e,i,s){return new Ua(t,e,i,s)}}class qa{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){Xt(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=Qe({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const $a="trail";class ja extends On{constructor(t){super(t),this._delay=0}clear(){}init(){}interact(t){const e=this.container,{interactivity:i}=e;if(!e.retina.reduceFactor)return;const s=e.actualOptions.interactivity.modes.trail;if(!s)return;const n=s.delay*m/this.container.retina.reduceFactor;if(this._delay<n&&(this._delay+=t.value),this._delay<n)return;const o=!(s.pauseOnStop&&(i.mouse.position===this._lastPosition||i.mouse.position?.x===this._lastPosition?.x&&i.mouse.position?.y===this._lastPosition?.y)),a=e.interactivity.mouse.position;a?this._lastPosition={...a}:delete this._lastPosition,o&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=n}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&Fe($a,n.onClick.mode)||s.inside&&!!s.position&&Fe($a,n.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new qa);for(const i of e)t.trail.load(i?.trail)}reset(){}}var Qa;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(Qa||(Qa={}));const Wa=2*Math.PI;class Za{constructor(){this.enable=!1,this.value=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=ue(t.value)))}}class Xa{constructor(){this.darken=new Za,this.enable=!1,this.enlighten=new Za,this.mode=Qa.vertical,this.speed=25}load(t){Xt(t)||(void 0!==t.backColor&&(this.backColor=as.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=ue(t.speed)))}}class Ya{constructor(t){this._engine=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t,e){const i=e.options.roll;if(i?.enable)if(e.roll={enable:i.enable,horizontal:i.mode===Qa.horizontal||i.mode===Qa.both,vertical:i.mode===Qa.vertical||i.mode===Qa.both,angle:ie()*Wa,speed:he(i.speed)/360},i.backColor)e.backColor=ki(t,i.backColor);else if(i.darken.enable&&i.enlighten.enable){const t=ie()>=y?di.darken:di.enlighten;e.roll.alter={type:t,value:he(t===di.darken?i.darken.value:i.enlighten.value)}}else i.darken.enable?e.roll.alter={type:di.darken,value:he(i.darken.value)}:i.enlighten.enable&&(e.roll.alter={type:di.enlighten,value:he(i.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._engine,t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new Xa);for(const i of e)t.roll.load(i?.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,o=Wa;s.angle+=n,s.angle>o&&(s.angle-=o)}(t,e)}}const Ja=1,Ka=2*Math.PI;function tr(t,e,i,s,n,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const n=t.pathGenerator?.generate(t,e);n&&t.velocity.addTo(n);s.clamp&&(t.velocity.x=ae(t.velocity.x,-Ja,Ja),t.velocity.y=ae(t.velocity.y,-Ja,Ja));t.lastPathTime-=t.pathDelay}(t,o);const a=t.gravity,r=a?.enable&&a.inverse?-Ja:Ja;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),a?.enable&&i&&(t.velocity.y+=r*(a.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c);const h=t.velocity.mult(i);a?.enable&&s>0&&(!a.inverse&&h.y>=0&&h.y>=s||a.inverse&&h.y<=0&&h.y<=-s)&&(h.y=r*s,i&&(t.velocity.y=h.y/i));const l=t.options.zIndex,d=(Ja-t.zIndexFactor)**l.velocityRate;h.multTo(d);const{position:u}=t;u.addTo(h),e.vibrate&&(u.x+=Math.sin(u.x*Math.cos(u.y)),u.y+=Math.cos(u.y*Math.sin(u.x)))}class er{init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:he(e.acceleration),inverse:e.inverse},function(t){const e=t.container,i=t.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=ge(t.getPosition(),n),a=he(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:n,direction:t.velocity.x>=0?Tn.clockwise:Tn.counterClockwise,angle:ie()*Ka,radius:o,acceleration:t.retina.spinAcceleration}}(t)}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){const i=t.options,s=i.move;if(!s.enable)return;const n=t.container,o=n.retina.pixelRatio;t.retina.moveSpeed??=he(s.speed)*o,t.retina.moveDrift??=he(t.options.move.drift)*o;const a=function(t){return t.slow.inRange?t.slow.factor:Ja}(t),r=t.retina.moveSpeed*n.retina.reduceFactor,c=t.retina.moveDrift,h=de(i.size.value)*o,l=r*(s.size?t.getRadius()/h:1)*a*(e.factor||1)/2,d=t.retina.maxSpeed??n.retina.maxSpeed;s.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const s=t.spin.direction===Tn.clockwise,n={x:s?Math.cos:Math.sin,y:s?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*n.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*n.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(i.canvas.size.width,i.canvas.size.height),a=.5*o;t.spin.radius>a?(t.spin.radius=a,t.spin.acceleration*=-Ja):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-Ja),t.spin.angle+=.01*e*(Ja-t.spin.radius/o)}(t,l):tr(t,s,l,d,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=pe(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(!r&&!c)return;if((r&&n>=r||c&&o>=c)&&!t.misplaced)t.misplaced=!!r&&n>r||!!c&&o>c,r&&(t.velocity.x=.5*t.velocity.y-t.velocity.x),c&&(t.velocity.y=.5*t.velocity.x-t.velocity.y);else if((!r||n<r)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;r&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-ie()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-ie())}}(t)}}const ir=2*Math.PI,sr=0,nr=0;class or{constructor(){this.validTypes=["circle"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:ir});const n=i.circleRange;e.arc(sr,nr,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=Wt(s)?{min:fe(s.min),max:fe(s.max)}:{min:0,max:fe(s)}}}class ar{constructor(t,e){this._container=t,this._engine=e}init(t){const e=ki(this._engine,t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=Fi(e,t.options.color.animation,this._container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:n}=t;return!t.destroyed&&!t.spawning&&(void 0!==n?.h.value&&e.enable||void 0!==n?.s.value&&i.enable||void 0!==n?.l.value&&s.enable)}update(t,e){Ni(t.color,e)}}var rr;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(rr||(rr={}));const cr=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hr=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class lr{constructor(){this.key="hex",this.stringPrefix="#"}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t)return;if(!t?.startsWith(this.stringPrefix))return;const e=t.replace(cr,((t,e,i,s,n)=>e+e+i+i+s+s+(void 0!==n?n+n:""))),i=hr.exec(e);return i?{a:void 0!==i[rr.a]?parseInt(i[rr.a],16)/255:1,b:parseInt(i[rr.b],16),g:parseInt(i[rr.g],16),r:parseInt(i[rr.r],16)}:void 0}}var dr;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(dr||(dr={}));class ur{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return Ai(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return Ai({h:he(e.h),l:he(e.l),s:he(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?Ei({a:e.length>4?Pe(e[dr.a]):1,h:parseInt(e[dr.h],10),l:parseInt(e[dr.l],10),s:parseInt(e[dr.s],10)}):void 0}}class pr{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=ni(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=he(i.speed)/f*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=ie()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ci(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}class gr{constructor(t){this.container=t,this.modes=[vi.bounce,vi.split]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let o=!1;for(const s of n.plugins.values())if(void 0!==s.particleBounce&&(o=s.particleBounce(t,i,e)),o)break;if(o)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=je(a,c),l=n.canvas.size;!function(t){if(t.outMode!==vi.bounce&&t.outMode!==vi.split||t.direction!==Te.left&&t.direction!==Te.right)return;t.bounds.right<0&&t.direction===Te.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Te.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===Te.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===Te.left&&t.bounds.left<=0&&e<0){const e=he(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===Te.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===Te.left&&(t.particle.position.x=s),t.outMode===vi.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if(t.outMode!==vi.bounce&&t.outMode!==vi.split||t.direction!==Te.bottom&&t.direction!==Te.top)return;t.bounds.bottom<0&&t.direction===Te.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Te.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===Te.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===Te.top&&t.bounds.top<=0&&e<0){const e=he(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===Te.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===Te.top&&(t.particle.position.y=s),t.outMode===vi.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class fr{constructor(t){this.container=t,this.modes=[vi.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case _i.normal:case _i.outside:if(qe(t.position,n.canvas.size,Jt.origin,t.getRadius(),e))return;break;case _i.inside:{const{dx:e,dy:i}=pe(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}n.particles.remove(t,t.group,!0)}}class yr{constructor(t){this.container=t,this.modes=[vi.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Te.left||e===Te.right))??(t.options.move.distance.vertical&&(e===Te.top||e===Te.bottom)))return;const n=t.options.move.gravity,o=this.container,a=o.canvas.size,r=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>a.height+r&&e===Te.bottom||n.inverse&&i.y<-r&&e===Te.top)&&o.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=a.height+r||t.velocity.y<0&&t.position.y>=-r||t.velocity.x>0&&t.position.x<=a.width+r||t.velocity.x<0&&t.position.x>=-r)return;qe(t.position,o.canvas.size,Jt.origin,r,e)||o.particles.remove(t)}}}class mr{constructor(t){this.container=t,this.modes=[vi.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case _i.inside:{const{x:e,y:i}=t.velocity,s=Jt.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(Jt.create(t.moveCenter));const{dx:o,dy:a}=pe(t.position,s);if(e<=0&&o>=0||i<=0&&a>=0||e>=0&&o<=0||i>=0&&a<=0)return;t.position.x=Math.floor(ce({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(ce({min:0,max:n.canvas.size.height}));const{dx:r,dy:c}=pe(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(qe(t.position,n.canvas.size,Jt.origin,t.getRadius(),e))return;switch(t.outType){case _i.outside:{t.position.x=Math.floor(ce({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(ce({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=pe(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case _i.normal:{const i=t.options.move.warp,s=n.canvas.size,o={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),r=je(t.position,a);e===Te.right&&r.left>s.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,i||(t.position.y=ie()*s.height,t.initialPosition.y=t.position.y)):e===Te.left&&r.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,i||(t.position.y=ie()*s.height,t.initialPosition.y=t.position.y)),e===Te.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=ie()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y):e===Te.top&&r.bottom<-t.offset.y&&(i||(t.position.x=ie()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y);break}}}}}class vr{constructor(t){this._addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))},this._updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)},this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,vi.bounce,(t=>new gr(t))),this._addUpdaterIfMissing(t,vi.out,(t=>new mr(t))),this._addUpdaterIfMissing(t,vi.destroy,(t=>new fr(t))),this._addUpdaterIfMissing(t,vi.none,(t=>new yr(t)))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,Te.bottom),this._updateOutMode(t,e,i.left??i.default,Te.left),this._updateOutMode(t,e,i.right??i.default,Te.right),this._updateOutMode(t,e,i.top??i.default,Te.top)}}var wr;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(wr||(wr={}));class br{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return{r:he(e.r),g:he(e.g),b:he(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?{a:e.length>4?Pe(e[wr.a]):1,b:parseInt(e[wr.b],10),g:parseInt(e[wr.g],10),r:parseInt(e[wr.r],10)}:void 0}}class _r{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/f*e.retina.reduceFactor,i.sync||(t.size.velocity*=ie()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.loops=0}update(t,e){this.isEnabled(t)&&ci(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Sr(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new lr,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new ur,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new br,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addMover("base",(()=>Promise.resolve(new er)),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new or,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("color",(e=>Promise.resolve(new ar(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("opacity",(t=>Promise.resolve(new pr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("outModes",(t=>Promise.resolve(new vr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("size",(()=>Promise.resolve(new _r)),e)}(t,!1),await t.refresh(e)}const xr='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';class Pr{constructor(){this.validTypes=["emoji"],this._emojiShapeDict=new Map}destroy(){for(const[t,e]of this._emojiShapeDict)e instanceof ImageBitmap&&e?.close(),this._emojiShapeDict.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this._emojiShapeDict.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha;if(!e)return;const o=e.width,a=.5*o;i.globalAlpha=s,i.drawImage(e,-a,-a,o,o),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(!i.find((t=>Fe(t,e.particles.shape.type))))return;const s=[Be(xr)],n=i.map((t=>e.particles.shape.options[t])).find((t=>!!t));n&&ei(n,(t=>{t.font&&s.push(Be(t.font))})),await Promise.all(s)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i?.value)return;const s=ii(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??xr,padding:i.padding??0,value:s}:{font:xr,padding:0,...i,...s},o=n.font,a=n.value,r=`${a}_${o}`;if(this._emojiShapeDict.has(r))return void(e.emojiDataKey=r);const c=2*n.padding,h=de(e.size.value),l=h+c,d=2*l;let u;if("undefined"!=typeof OffscreenCanvas){const t=new OffscreenCanvas(d,d),e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(a,l,l),u=t.transferToImageBitmap()}else{const t=document.createElement("canvas");t.width=d,t.height=d;const e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(a,l,l),u=t}this._emojiShapeDict.set(r,u),e.emojiDataKey=r}}const Cr=1,Or=1;function kr(t,e,i,s,n,o){const a=e.actualOptions.interactivity.modes.attract;if(!a)return;const r=e.particles.quadTree.query(n,o);for(const e of r){const{dx:n,dy:o,distance:r}=pe(e.position,i),c=a.speed*a.factor,h=ae(t.getEasing(a.easing)(Or-r/s)*c,Cr,a.maxSpeed),l=Jt.create(r?n/r*h:c,r?o/r*h:c);e.position.subFrom(l)}}class Tr{constructor(){this.distance=200,this.duration=.4,this.easing=Mn.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed))}}const Vr="attract";class Mr extends On{constructor(t,e){super(e),this._engine=t,e.attract||(e.attract={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&t===Vr){e.attract||(e.attract={particles:[]}),e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout((()=>{e.destroyed||(e.attract||(e.attract={particles:[]}),e.attract.clicking=!1)}),i.duration*m)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.attract;e&&(t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,{enable:n,mode:o}=s.onHover,{enable:a,mode:c}=s.onClick;i&&n&&Fe(Vr,o)?function(t,e,i){const s=e.interactivity.mouse.position,n=e.retina.attractModeDistance;!n||n<0||!s||kr(t,e,s,n,new gn(s.x,s.y,n),(t=>i(t)))}(this._engine,this.container,(t=>this.isEnabled(t))):a&&Fe(Vr,c)&&function(t,e,i){e.attract||(e.attract={particles:[]});const{attract:s}=e;if(s.finish||(s.count||(s.count=0),s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const s=e.interactivity.mouse.clickPosition,n=e.retina.attractModeDistance;if(!n||n<0||!s)return;kr(t,e,s,n,new gn(s.x,s.y,n),(t=>i(t)))}else!1===s.clicking&&(s.particles=[])}(this._engine,this.container,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;if(!(s.position&&n.onHover.enable||s.clickPosition&&n.onClick.enable))return!1;const o=n.onHover.mode,a=n.onClick.mode;return Fe(Vr,o)||Fe(Vr,a)}loadModeOptions(t,...e){t.attract||(t.attract=new Tr);for(const i of e)t.attract.load(i?.attract)}reset(){}}const Ar=2,Er=.5,zr=Math.PI*Er,Rr=2,Gr=10;function Ir(t,e,i,s,n){const o=t.particles.quadTree.query(s,n);for(const t of o)s instanceof gn?Ke(Je(t),{position:e,radius:i,mass:i**Ar*zr,velocity:Jt.origin,factor:Jt.origin}):s instanceof fn&&ti(t,je(e,i))}function Lr(t,e,i,s){Ze(i,e,((e,i)=>function(t,e,i,s){const n=document.querySelectorAll(e);n.length&&n.forEach((e=>{const n=e,o=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*Er)*o,y:(n.offsetTop+n.offsetHeight*Er)*o},r=n.offsetWidth*Er*o,c=Gr*o,h=i.type===gi.circle?new gn(a.x,a.y,r+c):new fn(n.offsetLeft*o-c,n.offsetTop*o-c,n.offsetWidth*o+c*Rr,n.offsetHeight*o+c*Rr);s(a,r,h)}))}(t,e,i,((e,i,n)=>Ir(t,e,i,n,s)))))}class Dr{constructor(){this.distance=200}load(t){Xt(t)||void 0!==t.distance&&(this.distance=t.distance)}}const Hr="bounce";class Fr extends On{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bounce;e&&(t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions.interactivity.events,i=t.interactivity.status===r,s=e.onHover.enable,n=e.onHover.mode,o=e.onDiv;i&&s&&Fe(Hr,n)?function(t,e){const i=t.retina.pixelRatio,s=Gr*i,n=t.interactivity.mouse.position,o=t.retina.bounceModeDistance;!o||o<0||!n||Ir(t,n,o,new gn(n.x,n.y,o+s),e)}(this.container,(t=>this.isEnabled(t))):Lr(this.container,o,Hr,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,o=n.onDiv;return!!s.position&&n.onHover.enable&&Fe(Hr,n.onHover.mode)||We(Hr,o)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Dr);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class Br{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(!Xt(t)){if(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color){const e=Zt(this.color)?void 0:this.color;this.color=ei(t.color,(t=>as.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class Ur extends Br{constructor(){super(),this.selectors=[]}load(t){super.load(t),Xt(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class Nr extends Br{load(t){super.load(t),Xt(t)||(this.divs=ei(t.divs,(t=>{const e=new Ur;return e.load(t),e})))}}var qr;function $r(t,e,i,s){if(e>=i){return ae(t+(e-i)*s,t,e)}if(e<i){return ae(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(qr||(qr={}));const jr="bubble";class Qr extends On{constructor(t,e){super(t),this._clickBubble=()=>{const t=this.container,e=t.actualOptions,i=t.interactivity.mouse.clickPosition,s=e.interactivity.modes.bubble;if(!s||!i)return;t.bubble||(t.bubble={});const n=t.retina.bubbleModeDistance;if(!n||n<0)return;const o=t.particles.quadTree.queryCircle(i,n,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of o){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const o=ge(e.getPosition(),i),r=((new Date).getTime()-(t.interactivity.mouse.clickTime??0))/m;r>s.duration&&(a.durationEnd=!0),r>2*s.duration&&(a.clicking=!1,a.durationEnd=!1);const c={bubbleObj:{optValue:t.retina.bubbleModeSize,value:e.bubble.radius},particlesObj:{optValue:de(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:qr.size};this._process(e,o,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:de(e.options.opacity.value),value:e.opacity?.value??1},type:qr.opacity};this._process(e,o,r,h),!a.durationEnd&&o<=n?this._hoverBubbleColor(e,o):delete e.bubble.color}},this._hoverBubble=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.bubbleModeDistance;if(!i||i<0||!e)return;const s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));for(const n of s){n.bubble.inRange=!0;const s=ge(n.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(n,a),this._hoverBubbleOpacity(n,a),this._hoverBubbleColor(n,a)):this.reset(n),t.interactivity.status===o&&this.reset(n)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,n=i??s.interactivity.modes.bubble;if(n){if(!t.bubble.finalColor){const e=n.color;if(!e)return;const i=ii(e);t.bubble.finalColor=ki(this._engine,i)}if(t.bubble.finalColor)if(n.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?Ti(Ii(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}},this._hoverBubbleOpacity=(t,e,i)=>{const s=this.container.actualOptions,n=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!n)return;const o=t.options.opacity.value,a=$r(t.opacity?.value??1,n,de(o),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const o=de(t.options.size.value)*s.retina.pixelRatio,a=$r(t.size.value,n,o,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const n=this.container,o=s.bubbleObj.optValue,a=n.actualOptions.interactivity.modes.bubble;if(!a||void 0===o)return;const r=a.duration,c=n.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value??0,u=s.type;if(c&&!(c<0)&&o!==h)if(n.bubble||(n.bubble={}),n.bubble.durationEnd)l&&(u===qr.size&&delete t.bubble.radius,u===qr.opacity&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==o){const e=d-i*(d-o)/r;u===qr.size&&(t.bubble.radius=e),u===qr.opacity&&(t.bubble.opacity=e)}}else u===qr.size&&delete t.bubble.radius,u===qr.opacity&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,n=document.querySelectorAll(e),o=s.actualOptions.interactivity.modes.bubble;o&&n.length&&n.forEach((e=>{const n=e,a=s.retina.pixelRatio,r={x:(n.offsetLeft+.5*n.offsetWidth)*a,y:(n.offsetTop+.5*n.offsetHeight)*a},c=.5*n.offsetWidth*a,h=i.type===gi.circle?new gn(r.x,r.y,c):new fn(n.offsetLeft*a,n.offsetTop*a,n.offsetWidth*a,n.offsetHeight*a),l=s.particles.quadTree.query(h,(t=>this.isEnabled(t)));for(const e of l){if(!h.contains(e.getPosition()))continue;e.bubble.inRange=!0;const i=Ye(o.divs,n);e.bubble.div&&e.bubble.div===n||(this.clear(e,t,!0),e.bubble.div=n),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},this._engine=e,t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===jr&&(t.bubble||(t.bubble={}),t.bubble.clicking=!0)}}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bubble;e&&(t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t){const e=this.container.actualOptions.interactivity.events,i=e.onHover,s=e.onClick,n=i.enable,o=i.mode,a=s.enable,r=s.mode,c=e.onDiv;n&&Fe(jr,o)?this._hoverBubble():a&&Fe(jr,r)?this._clickBubble():Ze(jr,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,{onClick:o,onDiv:a,onHover:r}=n,c=We(jr,a);return!!(c||r.enable&&s.position||o.enable&&s.clickPosition)&&(Fe(jr,r.mode)||Fe(jr,o.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new Nr);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class Wr{constructor(){this.opacity=.5}load(t){Xt(t)||void 0!==t.opacity&&(this.opacity=t.opacity)}}class Zr{constructor(){this.distance=80,this.links=new Wr,this.radius=60}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}const Xr=0,Yr=1;function Jr(t,e,i,s){const n=t.actualOptions.interactivity.modes.connect;if(n)return function(t,e,i,s){const n=Math.floor(i.getRadius()/e.getRadius()),o=e.getFillColor(),a=i.getFillColor();if(!o||!a)return;const r=e.getPosition(),c=i.getPosition(),h=Ii(o,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(Xr,Gi(o,s)),l.addColorStop(ae(n,Xr,Yr),Ri(h,s)),l.addColorStop(Yr,Gi(a,s)),l}(e,i,s,n.links.opacity)}function Kr(t,e,i){t.canvas.draw((s=>{const n=Jr(t,s,e,i);if(!n)return;const o=e.getPosition(),a=i.getPosition();!function(t,e,i,s,n){qi(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,o,a)}))}class tc extends On{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.connect;e&&(t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const e=t.interactivity.mouse.position,{connectModeDistance:i,connectModeRadius:s}=t.retina;if(!i||i<0||!s||s<0||!e)return;const n=Math.abs(s),o=t.particles.quadTree.queryCircle(e,n,(t=>this.isEnabled(t)));o.forEach(((e,s)=>{const n=e.getPosition();for(const a of o.slice(s+1)){const s=a.getPosition(),o=Math.abs(i),r=Math.abs(n.x-s.x),c=Math.abs(n.y-s.y);r<o&&c<o&&Kr(t,e,a)}}))}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return!(!s.onHover.enable||!i.position)&&Fe("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Zr);for(const i of e)t.connect.load(i?.connect)}reset(){}}class ec{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){Xt(t)||(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ic{constructor(){this.distance=100,this.links=new ec}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function sc(t,e,i,s,n){t.canvas.draw((t=>{const o=e.getPosition();!function(t,e,i,s,n,o){qi(t,i,s),t.strokeStyle=Ri(n,o),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,o,n,i,s)}))}class nc extends On{constructor(t,e){super(t),this._engine=e}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.grab;e&&(t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions.interactivity;if(!e.modes.grab||!e.events.onHover.enable||t.interactivity.status!==r)return;const i=t.interactivity.mouse.position;if(!i)return;const s=t.retina.grabModeDistance;if(!s||s<0)return;const n=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const o of n){const n=ge(o.getPosition(),i);if(n>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-n*r/s;if(c<=0)continue;const h=a.color??o.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=Di(this._engine,h,i.blink,i.consent)}const l=Li(o,void 0,t.particles.grabLineColor);l&&sc(t,o,l,c,i)}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&Fe("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new ic);for(const i of e)t.grab.load(i?.grab)}reset(){}}class oc extends On{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}class ac{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(Xt(t))return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((t=>t))),this.groups.length||(this.default=!0);const e=t.quantity;void 0!==e&&(this.quantity=ue(e))}}class rc extends On{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const e=this.container,i=e.actualOptions.interactivity.modes.push;if(!i)return;const s=he(i.quantity);if(s<=0)return;const n=Ne([void 0,...i.groups]),o=void 0!==n?e.actualOptions.particles.groups[n]:void 0;e.particles.push(s,e.interactivity.mouse,o,n)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new ac);for(const i of e)t.push.load(i?.push)}reset(){}}class cc{constructor(){this.quantity=2}load(t){if(Xt(t))return;const e=t.quantity;void 0!==e&&(this.quantity=ue(e))}}class hc extends On{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=he(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new cc);for(const i of e)t.remove.load(i?.remove)}reset(){}}class lc{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=Mn.easeOutQuad}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed))}}class dc extends lc{constructor(){super(),this.selectors=[]}load(t){super.load(t),Xt(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class uc extends lc{load(t){super.load(t),Xt(t)||(this.divs=ei(t.divs,(t=>{const e=new dc;return e.load(t),e})))}}const pc="repulse";class gc extends On{constructor(t,e){super(e),this._clickRepulse=()=>{const t=this.container,e=t.actualOptions.interactivity.modes.repulse;if(!e)return;const i=t.repulse??{particles:[]};if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const s=t.retina.repulseModeDistance;if(!s||s<0)return;const n=Math.pow(s/6,3),o=t.interactivity.mouse.clickPosition;if(void 0===o)return;const a=new gn(o.x,o.y,n),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=pe(o,t.position),c=r**2,h=-n*e.speed/c;if(c<=n){i.particles.push(t);const e=Jt.create(s,a);e.length=h,t.velocity.setTo(e)}}}else if(!1===i.clicking){for(const t of i.particles)t.velocity.setTo(t.initialVelocity);i.particles=[]}},this._hoverRepulse=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.repulseModeDistance;!i||i<0||!e||this._processRepulse(e,i,new gn(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const n=this.container,o=n.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=n.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=this._engine.getEasing(r),u=(s?.speed??c)*h;for(const i of o){const{dx:s,dy:n,distance:o}=pe(i.position,t),a=ae(d(1-o/e)*u,0,l),r=Jt.create(o?s/o*a:u,o?n/o*a:u);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const n=document.querySelectorAll(t);n.length&&n.forEach((t=>{const n=t,o=i.retina.pixelRatio,a={x:(n.offsetLeft+.5*n.offsetWidth)*o,y:(n.offsetTop+.5*n.offsetHeight)*o},r=.5*n.offsetWidth*o,c=e.type===gi.circle?new gn(a.x,a.y,r):new fn(n.offsetLeft*o,n.offsetTop*o,n.offsetWidth*o,n.offsetHeight*o),h=Ye(s.divs,n);this._processRepulse(a,r,c,h)}))},this._engine=t,e.repulse||(e.repulse={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.repulse;if(!i||t!==pc)return;e.repulse||(e.repulse={particles:[]});const s=e.repulse;s.clicking=!0,s.count=0;for(const t of e.repulse.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);s.particles=[],s.finish=!1,setTimeout((()=>{e.destroyed||(s.clicking=!1)}),i.duration*m)}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;e&&(t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,n=s.onHover,o=n.enable,a=n.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&o&&Fe(pc,a)?this._hoverRepulse():h&&Fe(pc,l)?this._clickRepulse():Ze(pc,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,o=n.onDiv,a=n.onHover,r=n.onClick,c=We(pc,o);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return Fe(pc,h)||Fe(pc,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new uc);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class fc{constructor(){this.factor=3,this.radius=200}load(t){Xt(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class yc extends On{constructor(t){super(t)}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.slow;e&&(t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&Fe("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new fc);for(const i of e)t.slow.load(i?.slow)}reset(t){t.slow.inRange=!1;const e=this.container,i=e.actualOptions,s=e.interactivity.mouse.position,n=e.retina.slowModeRadius,o=i.interactivity.modes.slow;if(!o||!n||n<0||!s)return;const a=ge(s,t.getPosition()),r=a/n,c=o.factor,{slow:h}=t;a>n||(h.inRange=!0,h.factor=r/c)}}const mc=0,vc=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function wc(t){return new Promise((e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",(()=>{t.loading=!1,e()})),i.addEventListener("error",(()=>{t.element=void 0,t.error=!0,t.loading=!1,ze().error(`${g} loading image: ${t.source}`),e()})),i.src=t.source}))}async function bc(t){if("svg"!==t.type)return void await wc(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(ze().error(`${g} Image not found`),t.error=!0),t.loading=!1}function _c(t,e,i,s){const n=function(t,e,i){const{svgData:s}=t;if(!s)return"";const n=Gi(e,i);if(s.includes("fill"))return s.replace(vc,(()=>n));const o=s.indexOf(">");return`${s.substring(mc,o)} fill="${n}"${s.substring(o)}`}(t,i,s.opacity?.value??1),o={color:i,gif:e.gif,data:{...t,svgData:n},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([n],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{o.loaded=!0,o.element=r,e(o),s.revokeObjectURL(a)}));r.addEventListener("error",(()=>{(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await wc(i),o.loaded=!0,o.element=i.element,e(o)})()})),r.src=a}))}const Sc=[0,4,2,1],xc=[8,8,4,2];class Pc{constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce(((t,e)=>t+String.fromCharCode(e)),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t="",e=0;do{e=this.data[this.pos++];for(let i=e;--i>=0;t+=String.fromCharCode(this.data[this.pos++]));}while(0!==e);return t}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Cc,Oc;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Cc||(Cc={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Oc||(Oc={}));const kc=0,Tc=0,Vc=0;function Mc(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}async function Ac(t,e,i,s,n,o){switch(t.nextByte()){case Oc.EndOfFile:return!0;case Oc.Image:await async function(t,e,i,s,n,o){const a=e.frames[s(!0)];a.left=t.nextTwoBytes(),a.top=t.nextTwoBytes(),a.width=t.nextTwoBytes(),a.height=t.nextTwoBytes();const r=t.nextByte(),c=128==(128&r),h=64==(64&r);a.sortFlag=32==(32&r),a.reserved=(24&r)>>>3;const l=1<<1+(7&r);c&&(a.localColorTable=Mc(t,l));const d=t=>{const{r:s,g:o,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:o,b:r,a:255}:{r:s,g:o,b:r,a:i?~~((s+o+r)/3):0}},u=(()=>{try{return new ImageData(a.width,a.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(g[i]+(g[i+1]<<8)+(g[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,n=p+1,r=0,c=[[0]],h=0;h<4;h++){if(Sc[h]<a.height){let t=0,e=0,s=!1;for(;!s;){const o=i;if(i=y(r,n),r+=n+1,i===f){n=p+1,c.length=f+2;for(let t=0;t<c.length;t++)c[t]=t<f?[t]:[]}else{i>=c.length?c.push(c[o].concat(c[o][0])):o!==f&&c.push(c[o].concat(c[i][0]));for(const s of c[i]){const{r:i,g:n,b:o,a:r}=d(s);u.data.set([i,n,o,r],Sc[h]*a.width+xc[h]*e+t%(4*a.width)),t+=4}c.length===1<<n&&n<12&&n++}t===4*a.width*(e+1)&&(e++,Sc[h]+xc[h]*e>=a.height&&(s=!0))}}o?.(t.pos/(t.data.length-1),s(!1)+1,u,{x:a.left,y:a.top},{width:e.width,height:e.height})}a.image=u,a.bitmap=await createImageBitmap(u)}else{let i=0,n=p+1,r=0,c=-4,h=!1;const l=[[0]];for(;!h;){const t=i;if(i=y(r,n),r+=n,i===f){n=p+1,l.length=f+2;for(let t=0;t<l.length;t++)l[t]=t<f?[t]:[]}else{if(i===f+1){h=!0;break}i>=l.length?l.push(l[t].concat(l[t][0])):t!==f&&l.push(l[t].concat(l[i][0]));for(const t of l[i]){const{r:e,g:i,b:s,a:n}=d(t);u.data.set([e,i,s,n],c+=4)}l.length>=1<<n&&n<12&&n++}}a.image=u,a.bitmap=await createImageBitmap(u),o?.((t.pos+1)/t.data.length,s(!1)+1,a.image,{x:a.left,y:a.top},{width:e.width,height:e.height})}}(t,e,i,s,n,o);break;case Oc.Extension:!function(t,e,i,s){switch(t.nextByte()){case Oc.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const o=t.nextByte();n.GCreserved=(224&o)>>>5,n.disposalMethod=(28&o)>>>2,n.userInputDelayFlag=2==(2&o);const a=1==(1&o);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case Oc.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Oc.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Oc.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function Ec(t){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i){i||(i=!1);const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const n=await s.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},a=new Pc(new Uint8ClampedArray(n));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");o.width=a.nextTwoBytes(),o.height=a.nextTwoBytes();const r=a.nextByte(),c=128==(128&r);o.colorRes=(112&r)>>>4,o.sortFlag=8==(8&r);const h=1<<1+(7&r),l=a.nextByte();o.pixelAspectRatio=a.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Mc(a,h));const d=(()=>{try{return new ImageData(o.width,o.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw new Error("GIF frame size is to large");const{r:u,g:p,b:g}=o.globalColorTable[l];d.data.set(c?[u,p,g,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);o.backgroundImage=d;let f=-1,y=!0,m=-1;const v=t=>(t&&(y=!0),f),w=t=>(null!=t&&(m=t),m);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Cc.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),f++,m=-1,y=!1)}while(!await Ac(a,o,i,v,w,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${f} "${t.message}"`);throw t}}(t.source),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}(t.gifData)??Vc,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await wc(t)}class zc{constructor(t){this.validTypes=["image","images"],this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${g} image shape not initialized`);await this._engine.loadImage({gif:t.gif,name:t.name,replaceColor:t.replaceColor??!1,src:t.src})},this._engine=t}addImage(t){this._engine.images||(this._engine.images=[]),this._engine.images.push(t)}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,o=s.image,a=o?.element;if(o){if(e.globalAlpha=n,o.gif&&o.gifData)!function(t){const{context:e,radius:i,particle:s,delta:n}=t,o=s.image;if(!o?.gifData||!o.gif)return;const a=new OffscreenCanvas(o.gifData.width,o.gifData.height),r=a.getContext("2d");if(!r)throw new Error("could not create offscreen canvas context");r.imageSmoothingQuality="low",r.imageSmoothingEnabled=!1,r.clearRect(kc,Tc,a.width,a.height),void 0===s.gifLoopCount&&(s.gifLoopCount=o.gifLoopCount??Vc);let c=s.gifFrame??0;const h={x:.5*-o.gifData.width,y:.5*-o.gifData.height},l=o.gifData.frames[c];if(void 0===s.gifTime&&(s.gifTime=0),l.bitmap){switch(e.scale(i/o.gifData.width,i/o.gifData.height),l.disposalMethod){case Cc.UndefinedA:case Cc.UndefinedB:case Cc.UndefinedC:case Cc.UndefinedD:case Cc.Replace:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(kc,Tc,a.width,a.height);break;case Cc.Combine:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y);break;case Cc.RestoreBackground:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(kc,Tc,a.width,a.height),o.gifData.globalColorTable.length?r.putImageData(o.gifData.backgroundImage,h.x,h.y):r.putImageData(o.gifData.frames[0].image,h.x+l.left,h.y+l.top);break;case Cc.RestorePrevious:{const t=r.getImageData(kc,Tc,a.width,a.height);r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(kc,Tc,a.width,a.height),r.putImageData(t,kc,Tc)}}if(s.gifTime+=n.value,s.gifTime>l.delayTime){if(s.gifTime-=l.delayTime,++c>=o.gifData.frames.length){if(--s.gifLoopCount<=Vc)return;c=0,r.clearRect(kc,Tc,a.width,a.height)}s.gifFrame=c}e.scale(o.gifData.width/i,o.gifData.height/i)}}(t);else if(a){const t=o.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(a,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(e.preload&&this._engine.loadImage)for(const t of e.preload)await this._engine.loadImage(t)}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;this._engine.images||(this._engine.images=[]);const e=t.shapeData;if(!e)return;this._engine.images.find((t=>t.name===e.name||t.source===e.src))||this.loadImageShape(e).then((()=>{this.loadShape(t)}))}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;this._engine.images||(this._engine.images=[]);const i=this._engine.images,s=e.shapeData;if(!s)return;const n=e.getFillColor(),o=i.find((t=>t.name===s.name||t.source===s.src));if(!o)return;const a=s.replaceColor??o.replaceColor;o.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=o.svgData&&n?await _c(o,s,n,e):{color:n,data:o,element:o.element,gif:o.gif,gifData:o.gifData,gifLoopCount:o.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:o.ratio??1,replaceColor:a,source:s.src},t.ratio||(t.ratio=1);const i={image:t,fill:s.fill??e.shapeFill,close:s.close??e.shapeClose};e.image=i.image,e.shapeFill=i.fill,e.shapeClose=i.close})()}}class Rc{constructor(){this.src="",this.gif=!1}load(t){Xt(t)||(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class Gc{constructor(t){this.id="imagePreloader",this._engine=t}async getPlugin(){return await Promise.resolve(),{}}loadOptions(t,e){if(!e?.preload)return;t.preload||(t.preload=[]);const i=t.preload;for(const t of e.preload){const e=i.find((e=>e.name===t.name||e.src===t.src));if(e)e.load(t);else{const e=new Rc;e.load(t),i.push(e)}}}needsPlugin(){return!0}}const Ic=3;async function Lc(t,e=!0){t.checkVersion("3.8.1"),function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${g} no image source provided`);if(t.images||(t.images=[]),!t.images.find((t=>t.name===e.name||t.source===e.src)))try{const i={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-Ic),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};let s;t.images.push(i),s=e.gif?Ec:e.replaceColor?bc:wc,await s(i)}catch{throw new Error(`${g} ${e.name??e.src} not found`)}})}(t);const i=new Gc(t);await t.addPlugin(i,e),await t.addShape(new zc(t),e)}class Dc extends Ms{constructor(){super(),this.sync=!1}load(t){Xt(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Hc extends Ms{constructor(){super(),this.sync=!1}load(t){Xt(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Fc{constructor(){this.count=0,this.delay=new Dc,this.duration=new Hc}load(t){Xt(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Bc{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?he(i.delay.value)*(i.delay.sync?1:ie())/e.retina.reduceFactor*m:0,delayTime:0,duration:e.retina.reduceFactor?he(i.duration.value)*(i.duration.sync?1:ie())/e.retina.reduceFactor*m:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.life&&(t.spawning=t.life.delay>0))}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life||(t.life=new Fc);for(const i of e)t.life.load(i?.life)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(t.spawning)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=ue(0,i.width),a=ue(0,i.width);t.position.x=ce(o),t.position.y=ce(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=he(r.delay.value)*m,s.duration=he(r.duration.value)*m)}(t,e,this.container.canvas.size)}}class Uc{constructor(){this.validTypes=["line"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}class Nc{init(){}isEnabled(t){return!Ge()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if(Ge()||!i.enable)return;const s=i.force,n=e.interactivity.mouse.position;if(!n)return;const o=e.canvas.size,a=.5*o.width,r=.5*o.height,c=i.smooth,h=t.getRadius()/s,l=(n.x-a)*h,d=(n.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class qc extends kn{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=he(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),n=e.particles.quadTree.queryCircle(s,i);for(const e of n){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:o}=pe(s,i),a=t.options.move.attract.rotate,r=n/(1e3*a.x),c=o/(1e3*a.y),h=e.size.value/t.size.value,l=1/h;t.velocity.x-=r*h,t.velocity.y-=c*h,e.velocity.x+=r*l,e.velocity.y+=c*l}}isEnabled(t){return t.options.move.attract.enable}reset(){}}const $c=.5,jc=10,Qc=0;function Wc(t,e,i,s,n,o){const a=ae(t.options.collisions.absorb.speed*n.factor/jc,Qc,s);t.size.value+=a*$c,i.size.value-=a,s<=o&&(i.size.value=0,i.destroy())}const Zc=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=he(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Xc(t,e){Ke(Je(t),Je(e)),Zc(t),Zc(e)}function Yc(t,e,i,s){switch(t.options.collisions.mode){case mi.absorb:!function(t,e,i,s){const n=t.getRadius(),o=e.getRadius();void 0===n&&void 0!==o?t.destroy():void 0!==n&&void 0===o?e.destroy():void 0!==n&&void 0!==o&&(n>=o?Wc(t,0,e,o,i,s):Wc(e,0,t,n,i,s))}(t,e,i,s);break;case mi.bounce:Xc(t,e);break;case mi.destroy:!function(t,e){t.unbreakable||e.unbreakable||Xc(t,e),void 0===t.getRadius()&&void 0!==e.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===e.getRadius()?e.destroy():void 0!==t.getRadius()&&void 0!==e.getRadius()&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Jc extends kn{constructor(t){super(t)}clear(){}init(){}interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),n=t.getRadius(),o=i.particles.quadTree.queryCircle(s,2*n);for(const a of o){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const o=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(o.z))>n+r)continue;ge(s,o)>n+r||Yc(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class Kc extends gn{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize={...s}}contains(t){const{width:e,height:i}=this.canvasSize,{x:s,y:n}=t;return super.contains(t)||super.contains({x:s-e,y:n})||super.contains({x:s-e,y:n-i})||super.contains({x:s,y:n-i})}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new gn(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new fn(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class th{constructor(){this.blur=5,this.color=new as,this.color.value="#000",this.enable=!1}load(t){Xt(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=as.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class eh{constructor(){this.enable=!1,this.frequency=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ih{constructor(){this.blink=!1,this.color=new as,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new th,this.triangles=new eh,this.width=1,this.warp=!1}load(t){Xt(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=as.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}const sh=0,nh=0;function oh(t,e,i,s,n){const{dx:o,dy:a,distance:r}=pe(t,e);if(!n||r<=i)return r;const c={x:Math.abs(o),y:Math.abs(a)},h=Math.min(c.x,s.width-c.x),l=Math.min(c.y,s.height-c.y);return Math.sqrt(h**2+l**2)}class ah extends kn{constructor(t,e){super(t),this._setColor=t=>{if(!t.options.links)return;const e=this._linkContainer,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(s)return;const n=i.color;s=Di(this._engine,n,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this._linkContainer=t,this._engine=e}clear(){}init(){this._linkContainer.particles.linksColor=void 0,this._linkContainer.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[];const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<sh||e.y<nh||e.x>s.width||e.y>s.height)return;const n=t.options.links,o=n.opacity,a=t.retina.linksDistance??0,r=n.warp;let c;c=r?new Kc(e.x,e.y,a,s):new gn(e.x,e.y,a);const h=i.particles.quadTree.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some((t=>t.destination===i))||i.links.some((e=>e.destination===t)))continue;const h=i.getPosition();if(h.x<sh||h.y<nh||h.x>s.width||h.y>s.height)continue;const l=oh(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*o;this._setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links||(t.links=new ih);for(const i of e)t.links.load(i?.links)}reset(){}}function rh(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let n=e.get(i);return void 0===n&&(n=ie(),e.set(i,n)),n}class ch{constructor(t,e){this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this._container,n=s.actualOptions,o=e.destination,a=t.getPosition(),r=o.getPosition();let c=e.opacity;s.canvas.draw((e=>{let h;const l=t.options.twinkle?.lines;if(l?.enable){const t=l.frequency,e=Pi(this._engine,l.color);ie()<t&&e&&(h=e,c=he(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=Li(t,o,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=n;!function(t){let e=!1;const{begin:i,end:s,engine:n,maxDistance:o,context:a,canvasSize:r,width:c,backgroundMask:h,colorLine:l,opacity:d,links:u}=t;if(ge(i,s)<=o)qi(a,i,s),e=!0;else if(u.warp){let t,n;const c=pe(i,{x:s.x-r.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},n={x:r.width,y:e}}else{const e=pe(i,{x:s.x,y:s.y-r.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},n={x:s,y:r.height}}else{const e=pe(i,{x:s.x-r.width,y:s.y-r.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},n={x:t.x+r.width,y:t.y+r.height}}}}t&&n&&(qi(a,i,t),qi(a,s,n),e=!0)}if(!e)return;a.lineWidth=c,h.enable&&(a.globalCompositeOperation=h.composite),a.strokeStyle=Ri(l,d);const{shadow:p}=u;if(p.enable){const t=Pi(n,p.color);t&&(a.shadowBlur=p.blur,a.shadowColor=Ri(t))}a.stroke()}({context:e,width:d,begin:a,end:r,engine:this._engine,maxDistance:u,canvasSize:s.canvas.size,links:i,backgroundMask:p,colorLine:h,opacity:c})}))},this._drawLinkTriangle=(t,e,i)=>{const s=t.options.links;if(!s?.enable)return;const n=s.triangles;if(!n.enable)return;const o=this._container,a=o.actualOptions,r=e.destination,c=i.destination,h=n.opacity??.5*(e.opacity+i.opacity);h<=0||o.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(ge(i,l)>u||ge(d,l)>u||ge(d,i)>u)return;let p=Pi(this._engine,n.color);if(!p){const e=void 0!==s.id?o.particles.linksColors.get(s.id):o.particles.linksColor;p=Li(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:n,backgroundMask:o,colorTriangle:a,opacityTriangle:r}=t;!function(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}(e,i,s,n),o.enable&&(e.globalCompositeOperation=o.composite),e.fillStyle=Ri(a,r),e.fill()}({context:e,pos1:i,pos2:l,pos3:d,backgroundMask:a.backgroundMask,colorTriangle:p,opacityTriangle:h})}))},this._drawTriangles=(t,e,i,s)=>{const n=i.destination;if(!t.links?.triangles.enable||!n.options.links?.triangles.enable)return;const o=n.links?.filter((t=>{const e=this._getLinkFrequency(n,t.destination);return n.options.links&&e<=n.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(o?.length)for(const s of o){const o=s.destination;this._getTriangleFrequency(e,n,o)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>rh([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>rh([t,e,i],this._freqs.triangles),this._container=t,this._engine=e,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length)return;const n=i.filter((t=>s.links&&(s.links.frequency>=1||this._getLinkFrequency(e,t.destination)<=s.links.frequency)));for(const t of n)this._drawTriangles(s,e,t,n),t.opacity>0&&(e.retina.linksWidth??0)>0&&this._drawLinkLine(e,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this._container.retina.pixelRatio,{retina:i}=t,{distance:s,width:n}=t.options.links;i.linksDistance=s*e,i.linksWidth=n*e}particleDestroyed(t){t.links=[]}}class hh{constructor(t){this.id="links",this._engine=t}getPlugin(t){return Promise.resolve(new ch(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}async function lh(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){await t.addInteractor("particlesLinks",(async e=>Promise.resolve(new ah(e,t))),e)}(t,e),await async function(t,e=!0){const i=new hh(t);await t.addPlugin(i,e)}(t,e)}const dh=0,uh=0;class ph{draw(t){const{particle:e,radius:i}=t;!function(t,e,i){const{context:s}=t,n=i.count.numerator*i.count.denominator,o=i.count.numerator/i.count.denominator,a=180*(o-2)/o,r=Math.PI-fe(a);if(s){s.beginPath(),s.translate(e.x,e.y),s.moveTo(dh,uh);for(let t=0;t<n;t++)s.lineTo(i.length,uh),s.translate(i.length,uh),s.rotate(r)}}(t,this.getCenter(e,i),this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}}class gh extends ph{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const i=t.sides;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class fh extends ph{constructor(){super(...arguments),this.validTypes=["triangle"]}getCenter(t,e){return{x:-e,y:e/1.66}}getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:2,numerator:3},length:2*e}}}async function yh(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new gh,e)}(t,e),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new fh,e)}(t,e)}class mh{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class vh extends Ms{constructor(){super(),this.animation=new mh,this.direction=Tn.clockwise,this.path=!1,this.value=0}load(t){Xt(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}const wh=2*Math.PI;class bh{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:fe(he(e.value)),min:0,max:wh},t.pathRotation=e.path;let i=e.direction;if(i===Tn.random){i=Math.floor(2*ie())>0?Tn.counterClockwise:Tn.clockwise}switch(i){case Tn.counterClockwise:case"counterClockwise":t.rotate.status=Oe.decreasing;break;case Tn.clockwise:t.rotate.status=Oe.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-he(s.decay),t.rotate.velocity=he(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=ie())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){t.rotate||(t.rotate=new vh);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(ci(t,t.rotate,!1,ke.none,e),t.rotation=t.rotate.value))}}const _h=Math.sqrt(2);class Sh{constructor(){this.validTypes=["edge","square"]}draw(t){!function(t){const{context:e,radius:i}=t,s=i/_h,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}const xh=0,Ph=0;class Ch{constructor(){this.validTypes=["star"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,o=i.starInset??2;e.moveTo(xh,Ph-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(xh,Ph-s*o),e.rotate(Math.PI/n),e.lineTo(xh,Ph-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=he(i?.inset??2)}}class Oh{constructor(t,e){this._container=t,this._engine=e}init(t){const e=this._container,i=t.options,s=ii(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=he(s.width)*e.retina.pixelRatio,t.strokeOpacity=he(s.opacity??1),t.strokeAnimation=s.color?.animation;const n=ki(this._engine,s.color)??t.getFillColor();n&&(t.strokeColor=Fi(n,t.strokeAnimation,e.retina.reduceFactor))}isEnabled(t){const e=t.strokeAnimation,{strokeColor:i}=t;return!t.destroyed&&!t.spawning&&!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable)}update(t,e){this.isEnabled(t)&&Ni(t.strokeColor,e)}}async function kh(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addMover("parallax",(()=>Promise.resolve(new Nc)),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalAttract",(e=>Promise.resolve(new Mr(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalBounce",(t=>Promise.resolve(new Fr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalBubble",(e=>Promise.resolve(new Qr(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalConnect",(t=>Promise.resolve(new tc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalGrab",(e=>Promise.resolve(new nc(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalPause",(t=>Promise.resolve(new oc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalPush",(t=>Promise.resolve(new rc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalRemove",(t=>Promise.resolve(new hc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalRepulse",(e=>Promise.resolve(new gc(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalSlow",(t=>Promise.resolve(new yc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("particlesAttract",(t=>Promise.resolve(new qc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("particlesCollisions",(t=>Promise.resolve(new Jc(t))),e)}(t,!1),await lh(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInQuad,(t=>t**2),!1),await t.addEasing(Mn.easeOutQuad,(t=>1-(1-t)**2),!1),await t.addEasing(Mn.easeInOutQuad,(t=>t<.5?2*t**2:1-(-2*t+2)**2/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Pr,e)}(t,!1),await Lc(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Uc,e)}(t,!1),await yh(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Sh,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Ch,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("life",(async t=>Promise.resolve(new Bc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("rotate",(t=>Promise.resolve(new bh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("strokeColor",(e=>Promise.resolve(new Oh(e,t))),e)}(t,!1),await Sr(t,e)}const Th=2,Vh=.5;function Mh(t,e,i,s,n,o){const a={x:-(e.length*i*Vh),y:i*Vh},r=i*Th;o?t.fillText(e,a.x,a.y+r*n):t.strokeText(e,a.x,a.y+r*n)}class Ah{constructor(){this.validTypes=["text","character","char","multiline-text"]}draw(t){!function(t){const{context:e,particle:i,radius:s,opacity:n}=t,o=i.shapeData;if(!o)return;const a=o.value;if(void 0===a)return;void 0===i.text&&(i.text=ii(a,i.randomIndexData));const r=i.text,c=o.style??"",h=o.weight??"400",l=Math.round(s)*Th,d=o.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=n;for(let t=0;t<p.length;t++)Mh(e,p[t],s,0,t,u);e.globalAlpha=1}}(t)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(i.find((t=>Fe(t,e.particles.shape.type)))){const t=i.map((t=>e.particles.shape.options[t])).find((t=>!!t)),s=[];ei(t,(t=>{s.push(Be(t.font,t.weight))})),await Promise.all(s)}}particleInit(t,e){if(!e.shape||!this.validTypes.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;void 0!==s&&(e.text=ii(s,e.randomIndexData))}}var Eh;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Eh||(Eh={}));class zh{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Rh extends Ms{constructor(){super(),this.animation=new zh,this.direction=Eh.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),Xt(t)||(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}const Gh=2*Math.PI;class Ih{constructor(t){this.container=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:fe(he(e.value)),sinDirection:ie()>=y?1:-1,cosDirection:ie()>=y?1:-1,min:0,max:Gh};let i=e.direction;if(i===Eh.random){i=Math.floor(2*ie())>0?Eh.counterClockwise:Eh.clockwise}switch(i){case Eh.counterClockwise:case"counterClockwise":t.tilt.status=Oe.decreasing;break;case Eh.clockwise:t.tilt.status=Oe.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-he(s.decay),t.tilt.velocity=he(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=ie()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new Rh);for(const i of e)t.tilt.load(i?.tilt)}async update(t,e){this.isEnabled(t)&&t.tilt&&(ci(t,t.tilt,!1,ke.none,e),await Promise.resolve())}}class Lh{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=ue(t.opacity)))}}class Dh{constructor(){this.lines=new Lh,this.particles=new Lh}load(t){Xt(t)||(this.lines.load(t.lines),this.particles.load(t.particles))}}class Hh{constructor(t){this._engine=t}getColorStyles(t,e,i,s){const n=t.options.twinkle;if(!n)return{};const o=n.particles,a=o.enable&&ie()<o.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?he(o.opacity)*c:s,l=ki(this._engine,o.color),d=l?Gi(l,h):void 0,u={},p=a&&d;return u.fill=p?d:void 0,u.stroke=p?d:void 0,u}async init(){await Promise.resolve()}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){t.twinkle||(t.twinkle=new Dh);for(const i of e)t.twinkle.load(i?.twinkle)}async update(){await Promise.resolve()}}class Fh{constructor(){this.angle=50,this.move=10}load(t){Xt(t)||(void 0!==t.angle&&(this.angle=ue(t.angle)),void 0!==t.move&&(this.move=ue(t.move)))}}class Bh{constructor(){this.distance=5,this.enable=!1,this.speed=new Fh}load(t){if(!Xt(t)&&(void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(jt(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;void 0!==e.min?this.speed.load({angle:e}):this.speed.load(t.speed)}}}const Uh=2*Math.PI;const Nh=2*Math.PI;class qh{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:ie()*Nh,angleSpeed:he(e.speed.angle)/360,moveSpeed:he(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=he(e?.distance??0)*this.container.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){t.wobble||(t.wobble=new Bh);for(const i of e)t.wobble.load(i?.wobble)}update(t,e){this.isEnabled(t)&&function(t,e){const{wobble:i}=t.options,{wobble:s}=t;if(!i?.enable||!s)return;const n=s.angleSpeed*e.factor,o=s.moveSpeed*e.factor*((t.retina.wobbleDistance??0)*e.factor)/(m/60),a=Uh,{position:r}=t;s.angle+=n,s.angle>a&&(s.angle-=a),r.x+=o*Math.cos(s.angle),r.y+=o*Math.abs(Math.sin(s.angle))}(t,e)}}async function $h(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("destroy",(e=>Promise.resolve(new Ga(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("roll",(()=>Promise.resolve(new Ya(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("tilt",(t=>Promise.resolve(new Ih(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("twinkle",(()=>Promise.resolve(new Hh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("wobble",(t=>Promise.resolve(new qh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Ah,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalTrail",(t=>Promise.resolve(new ja(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new Sa(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),t.emitterShapeManager||(t.emitterShapeManager=new zo(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new Ao(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.8.1"),i.addEmitterShapeGenerator?.("circle",new Ha),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.8.1"),i.addEmitterShapeGenerator?.("square",new Na),await i.refresh(e)}(t,!1),await kh(t,e)}class jh{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue=Me.random}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)))}}class Qh{constructor(){this.value=0,this.animation=new jh}load(t){Xt(t)||(this.animation.load(t.animation),void 0!==t.value&&(this.value=ue(t.value)))}}class Wh{constructor(){this.stop=0,this.value=new ks}load(t){Xt(t)||(void 0!==t.stop&&(this.stop=t.stop),this.value=ks.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Qh,jt(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Zh{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Xh{constructor(){this.value=0,this.animation=new Zh,this.direction=Tn.clockwise}load(t){Xt(t)||(this.animation.load(t.animation),void 0!==t.value&&(this.value=ue(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Yh{constructor(){this.angle=new Xh,this.colors=[],this.type=Vn.random}load(t){Xt(t)||(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new Wh;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}const Jh=2*Math.PI;class Kh{constructor(t){this._engine=t}getColorStyles(t,e,i,s){const n=t.gradient;if(!n)return{};const o=n.angle.value,a=0,r=0,c=n.type===Vn.radial?e.createRadialGradient(a,r,0,a,r,i):e.createLinearGradient(Math.cos(o)*-i,Math.sin(o)*-i,Math.cos(o)*i,Math.sin(o)*i);for(const{stop:t,value:e,opacity:i}of n.colors)c.addColorStop(t,Gi({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:c}}init(t){const e=ii(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:he(i.value),enable:i.animation.enable,velocity:he(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-he(i.animation.decay),delayTime:he(i.animation.delay)*m,max:Jh,min:0,time:0},type:e.type,colors:[]};let s=e.angle.direction;switch(s===Tn.random&&(s=ie()>y?Tn.counterClockwise:Tn.clockwise),s){case Tn.counterClockwise:case"counterClockwise":t.gradient.angle.status=Oe.decreasing;break;case Tn.clockwise:t.gradient.angle.status=Oe.increasing}const n=t.options.reduceDuplicates;for(const i of e.colors){const e=ki(this._engine,i.value,t.id,n);if(!e)continue;const s=Fi(e,i.value.animation,t.container.retina.reduceFactor),o={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:de(i.opacity.value),min:le(i.opacity.value),status:Oe.increasing,value:he(i.opacity.value),velocity:he(i.opacity.animation.speed)/f*t.container.retina.reduceFactor,decay:1-he(i.opacity.animation.decay),delayTime:he(i.opacity.animation.delay)*m,time:0}:void 0},{opacity:a}=o;if(i.opacity&&a){const t=i.opacity.value;a.min=le(t),a.max=de(t);switch(i.opacity.animation.startValue){case Me.min:a.value=a.min,a.status=Oe.increasing;break;case Me.max:a.value=a.max,a.status=Oe.decreasing;break;case Me.random:default:a.value=ce(a),a.status=ie()>=y?Oe.increasing:Oe.decreasing}}t.gradient.colors.push(o)}}isEnabled(t){return!t.destroyed&&!t.spawning&&(!!t.gradient?.angle.enable||(t.gradient?.colors.some((t=>t.value.h.enable||t.value.s.enable||t.value.l.enable))??!1))}loadOptions(t,...e){for(const i of e){if(!i?.gradient)continue;const e=i.gradient;e&&(t.gradient=ei(e,(t=>{const e=new Yh;return e.load(t),e})))}}update(t,e){!function(t,e){const{gradient:i}=t;if(i){ci(t,i.angle,!1,ke.none,e);for(const s of i.colors)Ni(s.value,e),s.opacity&&ci(t,s.opacity,!0,ke.none,e)}}(t,e)}}class tl{constructor(){this.validTypes=["heart"]}draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=.5*i,o=i+n,a=-i,r=-i;e.moveTo(a,r+n),e.quadraticCurveTo(a,r,a+n,r),e.quadraticCurveTo(a+i,r,a+i,r+n),e.quadraticCurveTo(a+i,r,a+o,r),e.quadraticCurveTo(a+s,r,a+s,r+n),e.quadraticCurveTo(a+s,r+i,a+o,r+o),e.lineTo(a+i,r+s),e.lineTo(a+n,r+o),e.quadraticCurveTo(a,r+i,a,r+n)}(t)}}const el=255;function il(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/f,n=t.v/f,o=n*s,a=o*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:o,g:a,b:0}:i>1&&i<=2?r={r:a,g:o,b:0}:i>2&&i<=3?r={r:0,g:o,b:a}:i>3&&i<=4?r={r:0,g:a,b:o}:i>4&&i<=5?r={r:a,g:0,b:o}:i>5&&i<=6&&(r={r:o,g:0,b:a}),r){const t=n-o;e.r=Math.floor((r.r+t)*el),e.g=Math.floor((r.g+t)*el),e.b=Math.floor((r.b+t)*el)}return e}class sl{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return il(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return il({h:he(e.h),s:he(e.s),v:he(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t),i=1,s=2,n=3,o=5;return e?{a:(a={a:e.length>4?Pe(e[o]):1,h:parseInt(e[i],10),s:parseInt(e[s],10),v:parseInt(e[n],10)}).a,...il(a)}:void 0;var a}}class nl{constructor(){this.color=new as,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),this.duration=t.duration,this.infectedStage=t.infectedStage,void 0!==t.radius&&(this.radius=t.radius),void 0!==t.rate&&(this.rate=t.rate))}}class ol{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){Xt(t)||(void 0!==t.cure&&(this.cure=t.cure),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.infections&&(this.infections=t.infections),void 0!==t.stages&&(this.stages=t.stages.map((t=>{const e=new nl;return e.load(t),e}))))}}class al{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const s=e.stages.length;s<=0||void 0===i.stage||(i.time=0,s<=++i.stage&&(e.cure?(delete i.stage,delete i.time):(i.stage=0,i.time=0)))},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;e>i.stages.length||e<0||(s.delay=0,s.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;const n=i.stages,o=n.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>o||t<0)return;s.delay>=i.delay*m?(s.stage=t,s.time=0,delete s.delay,delete s.delayStage):s.delay+=e}else delete s.delay,delete s.delayStage;if(void 0!==s.stage&&void 0!==s.time){const i=n[s.stage];void 0!==i.duration&&i.duration>=0&&s.time>i.duration*m?this._nextInfectionStage(t):s.time+=e}else delete s.stage,delete s.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:s}=t;if(!i.infection||!s)return;e>i.infection.stages.length||e<0||void 0!==s.stage&&s.stage>e||(s.stage=e,s.time=0)}}class rl{constructor(t){this._container=t,this._container.infecter=new al(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,s=e.infection.stages;return void 0!==i?s[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=Ne(this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})));this._container.infecter?.startInfection(t,0)}}}class cl{constructor(){this.id="infection"}getPlugin(t){return Promise.resolve(new rl(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new ol),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}class hl extends kn{constructor(t){super(t)}clear(){}init(){}interact(t,e){const i=this.container.infecter;if(!i)return;if(i.updateInfection(t,e.value),void 0===t.infection?.stage)return;const s=this.container,n=s.actualOptions.infection;if(!n?.enable||n.stages.length<1)return;const o=n.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+o.radius*a,c=t.getPosition(),h=o.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=o.rate,u=l.length;for(const e of l){const s=e;if(!(s===t||s.destroyed||s.spawning||void 0!==s.infection?.stage&&s.infection.stage===t.infection.stage||ie()>=d/u))if(void 0===s.infection?.stage)i.startInfection(s,h);else if(s.infection.stage<t.infection.stage)i.updateInfectionStage(s,h);else if(s.infection.stage>t.infection.stage){const e=n.stages[s.infection.stage],o=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,o)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}const ll=0,dl=0;class ul{constructor(){this.validTypes=["infinity"]}draw(t){!function(t){const{context:e,radius:i}=t,s=.55*i;e.moveTo(ll,dl),e.bezierCurveTo(s,-i,s,i,ll,dl),e.moveTo(ll,dl),e.bezierCurveTo(-s,-i,ll-s,i,ll,dl)}(t)}}const pl=1,gl=0,fl=.5*Math.PI,yl=2*Math.PI,ml=.25*Math.PI,vl="light";class wl{constructor(){this.start=new as,this.stop=new as,this.start.value="#ffffff",this.stop.value="#000000"}load(t){Xt(t)||(this.start=as.create(this.start,t.start),this.stop=as.create(this.stop,t.stop))}}class bl{constructor(){this.gradient=new wl,this.radius=1e3}load(t){Xt(t)||(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class _l{constructor(){this.color=new as,this.color.value="#000000",this.length=2e3}load(t){Xt(t)||(this.color=as.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class Sl{constructor(){this.area=new bl,this.shadow=new _l}load(t){Xt(t)||(this.area.load(t.area),this.shadow.load(t.shadow))}}class xl extends On{constructor(t,e){super(t),this._engine=e}clear(){}init(){}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity;if(!e.interactivity.events.onHover.enable||"pointermove"!==i.status)return;const s=i.mouse.position;s&&t.canvas.draw((e=>{!function(t,e,i){const s=t.actualOptions.interactivity.modes.light?.area;if(!s)return;e.beginPath(),e.arc(i.x,i.y,s.radius,0,yl);const n=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),o=t.canvas.mouseLight;o?.start&&o.stop&&(n.addColorStop(gl,Ri(o.start)),n.addColorStop(pl,Ri(o.stop)),e.fillStyle=n,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,n=s.events;if(!n.onHover.enable||!i.position)return!1;const o=Fe(vl,n.onHover.mode);if(o&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Pi(this._engine,t.start),stop:Pi(this._engine,t.stop)}}return o}loadModeOptions(t,...e){t.light||(t.light=new Sl);for(const i of e)t.light.load(i?.light)}reset(){}}class Pl extends kn{constructor(t,e){super(t),this._engine=e}clear(){}init(){}interact(t){const e=this.container,i=e.actualOptions,s=e.interactivity;if(!i.interactivity.events.onHover.enable||"pointermove"!==s.status)return;const n=s.mouse.position;n&&e.canvas.draw((i=>{!function(t,e,i,s){const n=i.getPosition(),o=t.actualOptions.interactivity.modes.light?.shadow;if(!o)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=yl/c,l=-i.rotation+ml,d=[];for(let t=0;t<c;t++)d.push({x:n.x+r*Math.sin(l+h*t)*1,y:n.y+r*Math.cos(l+h*t)*1});const u=[],p=o.length;for(const t of d){const e=Math.atan2(s.y-t.y,s.x-t.x),i={x:t.x+p*Math.sin(-e-fl),y:t.y+p*Math.cos(-e-fl)};u.push({end:i,start:t})}const g=Ri(a);for(let t=u.length-1,i=0;t>=0;i=t--)e.beginPath(),e.moveTo(u[t].start.x,u[t].start.y),e.lineTo(u[i].start.x,u[i].start.y),e.lineTo(u[i].end.x,u[i].end.y),e.lineTo(u[t].end.x,u[t].end.y),e.fillStyle=g,e.fill()}(e,i,t,n)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,n=i.events;if(!n.onHover.enable||!s.position)return!1;const o=Fe(vl,n.onHover.mode);if(o&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Pi(this._engine,e.color)}return o}reset(){}}class Cl{constructor(){this.factor=4,this.value=!0}load(t){Xt(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class Ol{constructor(){this.disable=!1,this.reduce=new Cl}load(t){Xt(t)||(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class kl{constructor(t,e){this._handleMotionChange=t=>{const e=this._container,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)},this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=Le("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this._handleMotionChange(i);const s=()=>{(async()=>{this._handleMotionChange(i);try{await t.refresh()}catch{}})()};void 0!==i.addEventListener?i.addEventListener("change",s):void 0!==i.addListener&&i.addListener(s),await Promise.resolve()}}class Tl{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return Promise.resolve(new kl(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new Ol),i.load(e?.motion)}needsPlugin(){return!0}}const Vl=new Map([["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["gold",{r:255,g:215,b:0}],["goldenrod",{r:218,g:165,b:32}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavender",{r:230,g:230,b:250}],["lavenderblush",{r:255,g:240,b:245}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]]);class Ml{constructor(){this.key="named",this.stringPrefix=""}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if(!t||"string"!=typeof t)return;const e=Vl.get(t.toLowerCase());if(e)return{...e,a:255};ze().error("Color not found",t)}}const Al=255,El=360;function zl(t){const e=t.l/f,i=t.c,s=t.h/El,n={r:0,g:0,b:0};return n.r=Math.floor(e*Al),n.g=Math.floor(i*Al),n.b=Math.floor(s*Al),n}function Rl(t){const e=t.l/f,i=t.c/f,s=t.h/El,n={r:0,g:0,b:0};return n.r=Math.floor(e*Al),n.g=Math.floor(i*Al),n.b=Math.floor(s*Al),n}class Gl{constructor(){this.key="color",this.stringPrefix="lch"}handleColor(t){const e=t.value.lch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return zl(e)}handleRangeColor(t){const e=t.value.lch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return zl({l:he(e.l),c:he(e.c),h:he(e.h)})}parseString(t){if(!t.startsWith("lch"))return;const e=/lch\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i.exec(t),i=1,s=3,n=5,o=7;return e?{a:(a={a:e[o]?Pe(e[o]):1,c:parseFloat(e[s]),h:parseFloat(e[n]),l:parseFloat(e[i])}).a,...zl(a)}:void 0;var a}}class Il{constructor(){this.key="color",this.stringPrefix="oklch"}handleColor(t){const e=t.value.oklch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return Rl(e)}handleRangeColor(t){const e=t.value.oklch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return Rl({l:he(e.l),c:he(e.c),h:he(e.h)})}parseString(t){if(!t.startsWith("oklch"))return;const e=/oklch\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(°)?(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i.exec(t),i=1,s=3,n=5,o=7;return e?{a:(a={a:e[o]?Pe(e[o]):1,c:parseFloat(e[s]),h:parseFloat(e[n]),l:parseFloat(e[i])}).a,...Rl(a)}:void 0;var a}}class Ll extends Ms{constructor(){super(),this.value=45}load(t){Xt(t)||super.load(t)}}class Dl{constructor(){this.animation=new xs,this.enable=!1,this.opacity=1,this.rotation=new Ll,this.width=1}load(t){Xt(t)||(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=ue(t.opacity)),void 0!==t.width&&(this.width=ue(t.width)),void 0!==t.radius&&(this.radius=ue(t.radius)),void 0!==t.color&&(this.color=as.create(this.color,t.color)))}}var Hl;!function(t){t.front="front",t.back="back"}(Hl||(Hl={}));const Fl=2*Math.PI,Bl=.5*Math.PI,Ul=Math.PI+Bl;class Nl{constructor(t,e){this._engine=e,this._container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Hl.front)}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Hl.back)}drawOrbit(t,e){const i=this._container;let s,n;switch(e){case Hl.back:s=Bl,n=Ul;break;case Hl.front:s=Ul,n=Bl;break;default:s=0,n=Fl}i.canvas.draw((e=>{!function(t,e,i,s,n,o,a,r,c){if(o<=0)return;const h=e.getPosition();i&&(t.strokeStyle=Gi(i,n)),t.lineWidth=o;const l=fe(a);t.beginPath(),t.ellipse(h.x,h.y,.5*s,2*s,l,r,c),t.stroke()}(e,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??i.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*i.retina.pixelRatio,s,n)}))}init(t){const e=this._container,i=t.options.orbit;i?.enable&&(t.orbitRotation=he(i.rotation.value),t.orbitColor=ki(this._engine,i.color),t.retina.orbitRadius=void 0!==i.radius?he(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?he(i.animation.speed):0,t.orbitWidth=he(i.width),t.orbitOpacity=he(i.opacity))}isEnabled(t){const e=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.orbit||(t.orbit=new Dl);for(const i of e)t.orbit.load(i?.orbit)}update(t,e){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/Fl)*e.factor)}}class ql extends Ms{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),Xt(t)||(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.duration&&(this.duration=ue(t.duration)),void 0!==t.factor&&(this.factor=ue(t.factor)),void 0!==t.speed&&(this.speed=ue(t.speed)))}}class $l extends kn{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;if(!t.repulse){const i=t.options.repulse;if(!i)return;t.repulse={distance:he(i.distance)*e.retina.pixelRatio,speed:he(i.speed),factor:he(i.factor)}}const i=t.getPosition(),s=e.particles.quadTree.queryCircle(i,t.repulse.distance);for(const e of s){if(t===e||e.destroyed)continue;const s=e.getPosition(),{dx:n,dy:o,distance:a}=pe(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=ae((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=Jt.create(n/a*i,o/a*i);e.position.addTo(s)}else{const t=Jt.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new ql);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}var jl;!function(t){t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(jl||(jl={}));class Ql{constructor(){this.validTypes=["path"]}draw(t){const{context:e,particle:i,radius:s}=t;i.pathData&&function(t,e,i){const s=i.segments[0].values[0];t.moveTo(s.x*e,s.y*e);for(const s of i.segments){const i=s.values[0],n=1,o=2,a=3;switch(s.type){case jl.line:t.lineTo(i.x*e,i.y*e);break;case jl.bezier:t.bezierCurveTo(s.values[n].x*e,s.values[n].y*e,s.values[o].x*e,s.values[o].y*e,s.values[a].x*e,s.values[a].y*e);break;case jl.quadratic:t.quadraticCurveTo(s.values[n].x*e,s.values[n].y*e,s.values[o].x*e,s.values[o].y*e);break;case jl.arc:t.arc(i.x*e,i.y*e,s.values[n].x*e,s.values[o].x,s.values[o].y);break;case jl.ellipse:t.ellipse(i.x*e,i.y*e,s.values[n].x*e,s.values[n].y*e,s.values[o].x,s.values[a].x,s.values[a].y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s],o=n.values[0],a=1,r=2;switch(n.type){case jl.line:t.lineTo(o.x*-e,o.y*e);break;case jl.bezier:t.bezierCurveTo(-n.values[r].x*e,n.values[r].y*e,-n.values[a].x*e,n.values[a].y*e,o.x*e,o.y*e);break;case jl.quadratic:t.quadraticCurveTo(-n.values[a].x*e,n.values[a].y*e,-n.values[r].x*e,n.values[r].y*e);case jl.arc:case jl.ellipse:}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=Qe({},i))}}class Wl{constructor(t,e,i){this.x=t,this.y=e,this.z=i}dot2(t,e){return this.x*t+this.y*e}dot3(t,e,i){return this.dot2(t,e)+this.z*i}}class Zl{constructor(){this._grad3=[new Wl(1,1,0),new Wl(-1,1,0),new Wl(1,-1,0),new Wl(-1,-1,0),new Wl(1,0,1),new Wl(-1,0,1),new Wl(1,0,-1),new Wl(-1,0,-1),new Wl(0,1,1),new Wl(0,-1,1),new Wl(0,1,-1),new Wl(0,-1,-1)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,e){const{_gradP:i,_perm:s}=this;let n=Math.floor(t),o=Math.floor(e);t-=n,e-=o,n&=255,o&=255;const a=i[n+s[o]].dot2(t,e),r=i[n+s[o+1]].dot2(t,e-1),c=i[n+1+s[o]].dot2(t-1,e),h=i[n+1+s[o+1]].dot2(t-1,e-1),l=this._fade(t);return this._lerp(this._lerp(a,c,l),this._lerp(r,h,l),this._fade(e))}noise3d(t,e,i){const{_gradP:s,_perm:n}=this;let o=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=o,e-=a,i-=r,o&=255,a&=255,r&=255;const c=s[o+n[a+n[r]]].dot3(t,e,i),h=s[o+n[a+n[r+1]]].dot3(t,e,i-1),l=s[o+n[a+1+n[r]]].dot3(t,e-1,i),d=s[o+n[a+1+n[r+1]]].dot3(t,e-1,i-1),u=s[o+1+n[a+n[r]]].dot3(t-1,e,i),p=s[o+1+n[a+n[r+1]]].dot3(t-1,e,i-1),g=s[o+1+n[a+1+n[r]]].dot3(t-1,e-1,i),f=s[o+1+n[a+1+n[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),m=this._fade(e),v=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),v),this._lerp(this._lerp(l,g,y),this._lerp(d,f,y),v),m)}seed(t){const{_grad3:e,_gradP:i,_perm:s,_p:n}=this;let o=t;o>0&&o<1&&(o*=65536),o=Math.floor(o),o<256&&(o|=o<<8);for(let t=0;t<256;t++){const a=1&t?n[t]^255&o:n[t]^o>>8&255;s[t]=s[t+256]=a,i[t]=i[t+256]=e[a%12]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,e,i){return(1-i)*t+i*e}}const Xl=2*Math.PI,Yl={draw:!1,size:20,increment:.004,columns:0,rows:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4}};class Jl{constructor(){this._calculateField=()=>{const{field:t,noiseGen:e,options:i}=this,s=i.factor.length,n=i.factor.angle;for(let o=0;o<i.columns;o++){const a=t[o];for(let t=0;t<i.rows;t++){const r=a[t];r.length=e.noise3d(o*s+i.offset.x,t*s+i.offset.y,this.noiseZ),r.angle=e.noise3d(o*n,t*n,this.noiseZ)*Xl}}},this._drawField=t=>{const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const n=e[s];for(let e=0;e<i.rows;e++){const i=n[e],{angle:o,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(o),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*a),t.stroke(),t.setTransform(1,0,0,1,0,0)}}},this._initField=()=>{const{columns:t,rows:e}=this.options;this.field=new Array(t);for(let i=0;i<t;i++){this.field[i]=new Array(e);for(let t=0;t<e;t++)this.field[i][t]=Jt.origin}},this.noiseGen=new Zl,this.field=[],this.noiseZ=0,this.options=Qe({},Yl)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),n=Math.max(Math.floor(e.y/i),0),{field:o}=this;return o?.[s]?.[n]?o[s][n].copy():Jt.origin}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseZ+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options,{options:i}=this;i.size=e.size>0?e.size:Yl.size,i.increment=e.increment>0?e.increment:Yl.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??Yl.offset.x,i.offset.y=s?.y??Yl.offset.y;const n=e.factor;i.factor.angle=n?.angle??Yl.factor.angle,i.factor.length=n?.length??Yl.factor.length,i.width=t.canvas.size.width,i.height=t.canvas.size.height,this.options.seed=e.seed,this.noiseGen.seed(this.options.seed??ie()),i.columns=Math.floor(this.options.width/this.options.size)+1,i.rows=Math.floor(this.options.height/this.options.size)+1,this._initField()}_setup(){this.noiseZ=0,this._resetField(),window.addEventListener("resize",(()=>this._resetField()))}}const Kl="perlinNoise";class td{constructor(){this.enable=!1,this.dimensions=2,this.radius=0,this.retries=30,this.steps=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.dimensions&&(this.dimensions=t.dimensions),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.retries&&(this.retries=t.retries))}}const ed=2*Math.PI;class id{constructor(t,e,i,s,n){this.size={...t},this.radius=e,this.retries=i,this.dimensions=s,this.cellSize=Math.floor(this.radius/Math.sqrt(this.dimensions)),this.cols=Math.floor(this.size.width/this.cellSize),this.rows=Math.floor(this.size.height/this.cellSize),this.points=[],this.active=[],this.grid=[],this.firstPoint=n?{...n}:void 0,this.reset()}addPoint(t){const e={position:{...t},gridPosition:{x:Math.floor(t.x/this.cellSize),y:Math.floor(t.y/this.cellSize)}},i=this.points.length;this.points.push(e),this.grid[e.gridPosition.y][e.gridPosition.x]=i,this.active.push(i)}getRandom(t,e){return Math.floor(ie()*(e-t))+t}initialiseGrid(){for(let t=0;t<=this.rows;t++){this.grid[t]=[];for(let e=0;e<=this.cols;e++)this.grid[t][e]=-1}}reset(){if(this.points=[],this.active=[],this.grid=[],this.initialiseGrid(),this.firstPoint)this.addPoint(this.firstPoint);else{const t=0;this.addPoint({x:this.getRandom(t,this.size.width),y:this.getRandom(t,this.size.height)})}}async run(){this.reset();for(;this.active.length>0;)await this.steps(1)}async steps(t){for(let e=0;e<t;e++)this.active.length<=0||await this._step()}_getNewPoint(t,e){const i=e*(ed/this.retries),s=this.getRandom(this.radius,2*this.radius),n=Math.cos(i)*s,o=Math.sin(i)*s,a={x:Math.floor(t.position.x+n),y:Math.floor(t.position.y+o)},r=Math.floor(a.x/this.cellSize),c=Math.floor(a.y/this.cellSize);if(a.x>0&&a.x<this.size.width&&a.y>0&&a.y<this.size.height&&this.grid[c][r]<0){for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const i={x:r+e,y:c+t};if(i.x>=0&&i.y>=0&&i.x<this.cols&&i.y<this.rows&&(i.x!==r||i.y!==c)&&this.grid[i.y][i.x]>=0){const t=this.grid[i.y][i.x];if(ge(a,this.points[t].position)<this.radius)return}}return a}}async _step(){const t=this.getRandom(0,this.active.length);return new Promise((e=>{let i=!1;for(let e=0;e<this.retries;e++){const s=this._getNewPoint(this.points[this.active[t]],e);if(s){i=!0,this.addPoint(s);break}}if(!i){const e=1;this.active.splice(t,e)}e()}))}}class sd{constructor(t,e){this._container=t,this._engine=e,this._currentIndex=0}async init(){await this._initData()}particlePosition(t){const e=this._container.actualOptions.poisson;if(this.poissonDisc&&e?.enable&&!(this._currentIndex>=this.poissonDisc.points.length))return t??this.poissonDisc?.points[this._currentIndex++]?.position}resize(){const t=this._container,e=t.actualOptions.poisson;if(!e?.enable)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=window.setTimeout((()=>{(async()=>{await this._initData(),await t.particles.redraw()})()}),250)}stop(){delete this.poissonDisc}async _initData(){const t=this._container,e=t.actualOptions.poisson,i=t.actualOptions.particles,s=t.canvas.size,n=t.retina.pixelRatio;if(!e?.enable)return;this._currentIndex=0,this.poissonDisc=new id(s,e.radius?e.radius*n:Math.max(de(i.size.value)*n,Math.sqrt(s.width*s.height/i.number.value)),e.retries,e.dimensions);e.steps>0?await this.poissonDisc.steps(e.steps):await this.poissonDisc.run()}}class nd{constructor(t){this.id="poisson",this._engine=t}getPlugin(t){return Promise.resolve(new sd(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.poisson;void 0===i?.load&&(t.poisson=i=new td),i.load(e?.poisson)}needsPlugin(t){return t?.poisson?.enable??!1}}!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,s,n,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=n,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,s,n,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=n,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=n},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=n},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,s,n,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=n,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,s,n,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=n,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=n},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=n},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,s,n,o){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,n,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,n,o){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,n,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,s,n,o,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,n,o,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,n,o,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,n,o,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const s=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};s.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},s.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},s.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},s.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},s.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},s.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},s.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},s.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},s.prototype._parseNumber=function(){let t=0,e=0,i=1,s=0,n=1,o=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,n=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,s+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let c=e+s;return c*=n,t&&(c*=Math.pow(10,o*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),c):void 0},s.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},s.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,s=this._pathSegTypeFromChar(t);if(s==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(s=this._nextCommandHelper(t,this._previousCommand),s==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=s,s){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const n=new i,o=new s(t);if(!o.initialCommandIsMoveTo())return[];for(;o.hasMoreData();){const t=o.parseSegment();if(!t)return[];n.appendSegment(t)}return n.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}();class od{constructor(t){this._engine=t,this.color=new as,this.width=.5,this.opacity=1}load(t){Xt(t)||(this.color=as.create(this.color,t.color),$t(this.color.value)&&(this.opacity=Vi(this._engine,this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class ad{constructor(t){this.enable=!1,this.stroke=new od(t)}load(t){if(Xt(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}var rd,cd,hd;!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(rd||(rd={}));class ld{constructor(){this.arrangement=rd.onePerPoint}load(t){Xt(t)||void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class dd{constructor(){this.path=[],this.size={height:0,width:0}}load(t){Xt(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}!function(t){t.path="path",t.radius="radius"}(cd||(cd={}));class ud{constructor(){this.radius=10,this.type=cd.path}load(t){Xt(t)||(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}!function(t){t.inline="inline",t.inside="inside",t.outside="outside",t.none="none"}(hd||(hd={}));class pd{constructor(t){this.draw=new ad(t),this.enable=!1,this.inline=new ld,this.move=new ud,this.scale=1,this.type=hd.none}load(t){Xt(t)||(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable=this.type!==hd.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&($t(t.data)?this.data=t.data:(this.data=new dd,this.data.load(t.data))),void 0!==t.position&&(this.position=Qe({},t.position)))}}const gd=0,fd=1;function yd(t,e,i,s){const n=Pi(t,s.color);if(!n)return;const o=i[0];e.beginPath(),e.moveTo(o.x,o.y);for(const t of i)e.lineTo(t.x,t.y);e.closePath(),e.strokeStyle=Ri(n),e.lineWidth=s.width,e.stroke()}function md(t,e,i,s,n){const o=1,a=0,r=0,c=1;e.setTransform(o,a,r,c,n.x,n.y);const h=Pi(t,s.color);h&&(e.strokeStyle=Ri(h,s.opacity),e.lineWidth=s.width,e.stroke(i),e.resetTransform())}function vd(t,e,i){const{dx:s,dy:n}=pe(i,t),{dx:o,dy:a}=pe(e,t),r=(s*o+n*a)/(o**2+a**2),c={x:t.x+o*r,y:t.y+a*r,isOnSegment:r>=gd&&r<=fd};return r<gd?(c.x=t.x,c.y=t.y):r>fd&&(c.x=e.x,c.y=e.y),c}function wd(t,e,i){const{dx:s,dy:n}=pe(t,e),o=Math.atan2(n,s),a=Jt.create(Math.sin(o),-Math.cos(o)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const bd=`${g} No polygon data loaded.`,_d=`${g} No polygon found, you need to specify SVG url in config.`,Sd=0,xd=0,Pd=.5;class Cd{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||i.type===hd.none||i.type===hd.inline)return!0;if(!this.raw)throw new Error(_d);const s=e.canvas.size,n=t?.x??ie()*s.width,o=t?.y??ie()*s.height;let a=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],s=this.raw[e];i.y>o!=s.y>o&&n<(s.x-i.x)*(o-i.y)/(s.y-i.y)+i.x&&(a=!a)}return i.type===hd.inside?a:i.type===hd.outside&&!a},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const i=new Path2D(e),s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),n=new Path2D,o=s.scale(this._scale);n.addPath?(n.addPath(i,o),t.path2d=n):delete t.path2d}else delete t.path2d;if(t.path2d??!this.raw)continue;t.path2d=new Path2D;const i=0,s=this.raw[i];t.path2d.moveTo(s.x,s.y),this.raw.forEach(((e,s)=>{s>i&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath()}},this._downloadSvgPath=async(t,e)=>{const i=this._container.actualOptions.polygon;if(!i)return;const s=t??i.url,n=e??!1;if(!s||void 0!==this.paths&&!n)return this.raw;const o=await fetch(s);if(!o.ok)throw new Error(`${g} occurred during polygon mask download`);return this._parseSvgPath(await o.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(bd);let i,s=0;const n=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const o=n*t-s;if(o<=e.length){i=e.element.getPointAtLength(o);break}s+=e.length}const o=this._scale;return{x:(i?.x??Sd)*o+(this.offset?.x??Sd),y:(i?.y??xd)*o+(this.offset?.y??xd)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(bd);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(bd);const t=Ne(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(bd);const t=Ne(this.paths),e=Math.floor(ie()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x??Sd),y:i.y*s+(this.offset?.y??xd)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const i=e.data;let s;if($t(i))s=i;else{const t=t=>`<path d="${t}" />`,e=Zt(i.path)?i.path.map(t).join(""):t(i.path);s=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width}" height="${i.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(s,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const i=e??!1;if(void 0!==this.paths&&!i)return this.raw;const s=this._container,n=s.actualOptions.polygon;if(!n)return;const o=(new DOMParser).parseFromString(t,"image/svg+xml"),a=o.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=o.getElementsByTagName("path")),this.paths=[];for(let t=0;t<r.length;t++){const e=r.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const c=this._scale;this.dimension.width=parseFloat(a.getAttribute("width")??"0")*c,this.dimension.height=parseFloat(a.getAttribute("height")??"0")*c;const h=n.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/f-this.dimension.width*Pd,y:l.height*h.y/f-this.dimension.height*Pd},function(t,e,i){const s=[];for(const n of t){const t=n.element.pathSegList,o=t?.numberOfItems??0,a={x:0,y:0};for(let n=0;n<o;n++){const o=t?.getItem(n),r=window.SVGPathSeg;switch(o?.pathSegType){case r.PATHSEG_MOVETO_ABS:case r.PATHSEG_LINETO_ABS:case r.PATHSEG_CURVETO_CUBIC_ABS:case r.PATHSEG_CURVETO_QUADRATIC_ABS:case r.PATHSEG_ARC_ABS:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=o;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=o.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=o.y;break;case r.PATHSEG_LINETO_REL:case r.PATHSEG_MOVETO_REL:case r.PATHSEG_CURVETO_CUBIC_REL:case r.PATHSEG_CURVETO_QUADRATIC_REL:case r.PATHSEG_ARC_REL:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=o;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=o.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=o.y;break;case r.PATHSEG_UNKNOWN:case r.PATHSEG_CLOSEPATH:continue}s.push({x:a.x*e+i.x,y:a.y*e+i.y})}}return s}(this.paths,c,this.offset)},this._polygonBounce=(t,e,i)=>{const s=this._container.actualOptions.polygon;if(!this.raw||!s?.enable||i!==Te.top)return!1;if(s.type===hd.inside||s.type===hd.outside){let e,i,s;const n=t.getPosition(),o=t.getRadius(),a=1;for(let r=0,c=this.raw.length-a;r<this.raw.length;c=r++){const a=this.raw[r],h=this.raw[c];e=vd(a,h,n);const l=pe(n,e);if([i,s]=[l.dx,l.dy],l.distance<o)return wd(a,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(n)){const i={x:1,y:1},s=2*o,a=-1;return n.x>=e.x&&(i.x=-1),n.y>=e.y&&(i.y=-1),t.position.x=e.x+s*i.x,t.position.y=e.y+s*i.y,t.velocity.mult(a),!0}}else if(s.type===hd.inline&&t.initialPosition){const e=ge(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y*Pd-i.x,i.y=i.x*Pd-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if(e.type===hd.inline)switch(e.inline.arrangement){case rd.randomPoint:i=this._getRandomPoint();break;case rd.randomLength:i=this._getRandomPointByLength();break;case rd.equidistant:i=this._getEquidistantPointByIndex(t.particles.count);break;case rd.onePerPoint:case rd.perPoint:default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:ie()*e.width,y:ie()*e.height}}return this._checkInsidePolygon(i)?i:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&e.type!==hd.none&&e.type!==hd.inline&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const i=e.draw;if(!i.enable)return;const s=this.raw;for(const e of this.paths){const n=e.path2d;t&&(n&&this.offset?md(this._engine,t,n,i.stroke,this.offset):s&&yd(this._engine,t,s,i.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,i=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*i,this._scale=e.scale*i,e.enable&&await this._initRawData())}particleBounce(t,e,i){return this._polygonBounce(t,e,i)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return Qe({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==hd.inline||t.inline.arrangement!==rd.onePerPoint&&t.inline.arrangement!==rd.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===hd.none)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=window.setTimeout((()=>{(async()=>{await this._initRawData(!0),await t.particles.redraw()})()}),250)}stop(){delete this.raw,delete this.paths}}class Od{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new Cd(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.polygon;void 0===i?.load&&(t.polygon=i=new pd(this._engine)),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==hd.none)}}class kd{constructor(){this._createDirs=()=>{this.dirsList=[];for(let t=0;t<360;t+=360/this.options.sides){const e=this.options.angle+t;this.dirsList.push(Jt.create(Math.cos(e*Math.PI/180),Math.sin(e*Math.PI/180)))}},this.dirsList=[],this.options={sides:6,turnSteps:20,angle:30}}generate(t){const{sides:e}=this.options;void 0===t.hexStep&&(t.hexStep=0),void 0===t.hexDirection&&(t.hexDirection=6===e?2*(3*ie()|0):ie()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=ie()>.5?(t.hexDirection+1)%e:(t.hexDirection+e-1)%e),t.velocity.x=0,t.velocity.y=0,t.hexStep++;const i=this.dirsList[t.hexDirection];return Jt.create(i.x*t.hexSpeed,i.y*t.hexSpeed)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.sides=e.sides>0?e.sides:6,this.options.angle=e.angle??30,this.options.turnSteps=e.turnSteps>=0?e.turnSteps:20,this._createDirs()}reset(t){delete t.hexStep,delete t.hexDirection,delete t.hexSpeed}update(){}}const Td="polygonPathGenerator";const Vd=2*Math.PI,Md=.5;class Ad{constructor(){this.validTypes=["rounded-polygon"]}draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],n=e[1];const o=e.length;t.moveTo((s.x+n.x)*Md,(s.y+n.y)*Md);for(let a=1;a<=o;a++)s=n,n=e[(a+1)%o],t.arcTo(s.x,s.y,(s.x+n.x)*Md,(s.y+n.y)*Md,i)}(e,function(t,e,i=0){const s=Vd/t,n=[];for(let o=0;o<t;o++)n.push({x:Math.cos(o*s+i)*e,y:Math.sin(o*s+i)*e});return n}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round(he(i?.radius??5))*t.retina.pixelRatio}}const Ed=Math.sqrt(2);class zd{constructor(){this.validTypes=["rounded-rect"]}draw(t){const{context:e,particle:i,radius:s}=t,n=s/Ed,o=2*n,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-n,-n,o,o,a):function(t,e,i,s){const n={x:-e,y:-e,height:i,width:i},o=s,a=s,r=s,c=s,{x:h,y:l,width:d,height:u}=n,p=h+d,g=l+u;t.moveTo(h+o,l),t.lineTo(p-a,l),t.quadraticCurveTo(p,l,p,l+a),t.lineTo(p,l+u-c),t.quadraticCurveTo(p,g,p-c,g),t.lineTo(h+r,g),t.quadraticCurveTo(h,g,h,g-r),t.lineTo(h,l+o),t.quadraticCurveTo(h,l,h+o,l)}(e,n,o,a)}particleInit(t,e){const i=e.shapeData;e.borderRadius=he(i?.radius??5)*t.retina.pixelRatio}}var Rd;!function(t){t[t.normal=0]="normal",t[t.reverse=1]="reverse"}(Rd||(Rd={}));class Gd{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:Ve.percent},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=ie()>y?Rd.normal:Rd.reverse),void 0===t.svgPathIndex&&(t.svgPathIndex=Math.floor(Math.random()*this._paths.length)),void 0===t.svgSpeed&&(t.svgSpeed=t.velocity.mult((t.retina.moveSpeed??1)*y).length),void 0===t.svgStep&&(t.svgStep=ce({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:ce({min:-this._width*y,max:this._width*y})*i,height:ce({min:-this._width*y,max:this._width*y})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,t.svgDirection===Rd.normal?t.svgStep+=t.svgSpeed*e.factor:t.svgStep-=t.svgSpeed*e.factor;let s=this._paths[t.svgPathIndex];if(s){const e=s.length,i=1;t.svgStep>=e?(t.svgPathIndex=t.svgPathIndex+i,t.svgPathIndex>=this._paths.length&&(this._reverse?(t.svgPathIndex=this._paths.length-i,t.svgDirection=Rd.reverse):(t.svgPathIndex=0,t.svgStep=0))):t.svgStep<=0&&(t.svgPathIndex=t.svgPathIndex-i,t.svgPathIndex<0&&(this._reverse?(t.svgPathIndex=0,t.svgDirection=Rd.normal):(t.svgPathIndex=this._paths.length-i,s=this._paths[t.svgPathIndex],t.svgStep=s.length))),s=this._paths[t.svgPathIndex]}if(s){const e=s.element.getPointAtLength(t.svgStep),n=t.container.canvas.size,o=ai(this._offset,n),a=this._scale*i;t.position.x=(e.x-this._size.width*y)*a+t.svgInitialPosition.x+o.x+t.svgOffset.width,t.position.y=(e.y-this._size.height*y)*a+t.svgInitialPosition.y+o.y+t.svgOffset.height}return Jt.origin}init(t){const e=t.actualOptions.particles.move.path.options,i=e.position??this._offset;if(this._reverse=e.reverse??this._reverse,this._scale=e.scale??1,this._offset.x=i.x,this._offset.y=i.y,this._offset.mode=i.mode,this._width=e.width??0,e.url&&!e.path){const t=e.url;(async()=>{const e=await fetch(t),i=await e.text(),s=(new DOMParser).parseFromString(i,"image/svg+xml"),n=s.getElementsByTagName("svg")[0];let o=n.getElementsByTagName("path");o.length||(o=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<o.length;t++){const e=o.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(n.getAttribute("height")??"0"),this._size.width=parseFloat(n.getAttribute("width")??"0")})()}else if(e.path){const t=e.path;this._paths=[];for(const e of t.data){const t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",e),this._paths.push({element:t,length:t.getTotalLength()})}this._size.height=t.size.height,this._size.width=t.size.width}}reset(){}update(){}}const Id="svgPathGenerator";const Ld={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class Dd{constructor(){const t=new go;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=Qe({},Ld)}generate(t){const e=t.getPosition(),i=Math.max(Math.floor(e.x/this.options.size),0),s=Math.max(Math.floor(e.y/this.options.size),0),n=Math.max(Math.floor(e.z/this.options.size),0),o=Jt.origin;return this.field?.[i]?.[s]?.[n]?(o.setTo(this.field[i][s][n]),o):o}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment)}_calculateField(){const t=this.options;for(let e=0;e<t.columns;e++)for(let i=0;i<t.rows;i++)for(let s=0;s<t.layers;s++)this.field[e][i][s].angle=this._simplex.noise(e/50,i/50,s/50,this.noiseW)*Math.PI*2,this.field[e][i][s].length=this._simplex.noise(e/100+t.offset.x,i/100+t.offset.y,s/100+t.offset.z,this.noiseW)}_initField(){this.field=new Array(this.options.columns);for(let t=0;t<this.options.columns;t++){this.field[t]=new Array(this.options.rows);for(let e=0;e<this.options.rows;e++){this.field[t][e]=new Array(this.options.layers);for(let i=0;i<this.options.layers;i++)this.field[t][e][i]=Jt.origin}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options;this.options.size=e.size>0?e.size:Ld.size,this.options.increment=e.increment>0?e.increment:Ld.increment,this.options.width=t.canvas.size.width,this.options.height=t.canvas.size.height;const i=e.offset;this.options.offset.x=i?.x??Ld.offset.x,this.options.offset.y=i?.y??Ld.offset.y,this.options.offset.z=i?.z??Ld.offset.z,this.options.seed=e.seed??Ld.seed,this._simplex.seed(this.options.seed??ie()),this.options.columns=Math.floor(this.options.width/this.options.size)+1,this.options.rows=Math.floor(this.options.height/this.options.size)+1,this.options.layers=Math.floor(t.zLayers/this.options.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Hd="simplexNoise";class Fd{constructor(){this.loop=!1,this.source=""}load(t){Xt(t)||(Wt(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Bd{constructor(){this.duration=500,this.value=[]}load(t){Xt(t)||(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class Ud{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){Xt(t)||(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ud;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Bd;return e.load(t),e}))))}}class Nd{constructor(){this.event=[],this.notes=[]}load(t){if(!Xt(t)&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(Zt(t.audio)?this.audio=t.audio.map((t=>{const e=new Fd;return e.load(t),e})):(this.audio=new Fd,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Bd;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ud;return e.load(t),e}))),t.filter))if($t(t.filter)){const e=window[t.filter];Qt(e)&&(this.filter=e)}else this.filter=t.filter}}class qd{constructor(){this.width=24,this.height=24,this.style=""}load(t){Xt(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class $d{constructor(){this.mute=new qd,this.unmute=new qd,this.volumeDown=new qd,this.volumeUp=new qd,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class jd{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){Xt(t)||(Wt(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class Qd{constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new $d,this.volume=new jd}load(t){Xt(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map((t=>{const e=new Nd;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}var Wd,Zd;!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(Wd||(Wd={})),function(t){t.Block="block",t.None="none"}(Zd||(Zd={}));const Xd=new Map;function Yd(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]||e[0],s=Xd.get(i);return s?s[parseInt(e[3]||"0")]:void 0}Xd.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Xd.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Xd.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Xd.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Xd.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Xd.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Xd.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Xd.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Xd.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Xd.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Xd.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Xd.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Xd.set("pause",[0]);let Jd=!0;const Kd=()=>Jd,tu=()=>{Jd=!1},eu=1;function iu(t){const e=document.createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,style:u,svg:p}=o;!function(t,e,i,s,n,o,a,r){t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.position="absolute",t.style.top=`${e+a}px`,t.style.left=i-a-o+"px",t.style.display=s,t.style.zIndex=`${n+eu}`,t.style.cssText+=r}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),n,r.fullScreen.zIndex+eu,l,a,u),e.src=d??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.element?.parentNode??document.body).append(e),e.addEventListener("click",(()=>{i()})),e}function su(t){t&&t.remove()}class nu{constructor(t,e){this._addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e},this._addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e},this._initEvents=()=>{const t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(const t of e.events){const e=i=>{(async()=>{const s=t.filter&&!t.filter(i);if(this._container!==i.container)return;if(!this._container||this._container.muted||this._container.destroyed)return void ei(t.event,(t=>{this._engine.removeEventListener(t,e)}));if(s)return;if(t.audio)this._playBuffer(ii(t.audio));else if(t.melodies){const e=Ne(t.melodies);e.melodies.length?await Promise.allSettled(e.melodies.map((t=>this._playNote(t.notes,0,e.loop)))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=Ne(t.notes);await this._playNote([e],0,!1)}})()};ei(t.event,(t=>{this._engine.addEventListener(t,e)}))}},this._mute=async()=>{const t=this._container,e=this._getAudioContext();for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._engine.dispatchEvent(Wd.mute,{container:this._container})},this._playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()},this._playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;const i=this._getAudioContext(),s=this._addOscillator(i);return s.connect(this._gain),s.type="sine",s.frequency.value=t,s.start(),new Promise((t=>{setTimeout((()=>{this._removeAudioSource(s),t()}),e)}))},this._playMuteSound=()=>{if(this._container.muted)return;const t=this._getAudioContext(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout((()=>{i.stop(),i.disconnect(),e.disconnect()}))},this._playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const n=ei(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(Zt(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),this._container.muted||await this._playNote(t,o,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const n=ii(s.value,i,!0);try{const t=Yd(n);if(!jt(t))return;await this._playFrequency(t,s.duration)}catch(t){ze().error(t)}},this._removeAudioSource=t=>{t.stop(),t.disconnect();this._audioSources.splice(this._audioSources.indexOf(t),1)},this._unmute=()=>{const t=this._container.actualOptions.sounds;if(!t)return;const e=this._getAudioContext();this._audioSources||(this._audioSources=[]);const i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/f,this._gain=i,this._initEvents(),this._engine.dispatchEvent(Wd.unmute,{container:this._container})},this._updateMuteIcons=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this._muteImg,s=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")},this._updateMuteStatus=async()=>{const t=this._container,e=this._getAudioContext();t.muted?(await(e?.suspend()),await this._mute()):(await(e?.resume()),this._unmute(),this._playMuteSound())},this._updateVolume=async()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;ae(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/f)},this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&Kd()){const t=()=>{removeEventListener(s,t),removeEventListener(c,t),tu(),this.unmute()},e={capture:!0,once:!0};addEventListener(s,t,e),addEventListener(c,t,e)}this._volume=t.volume.value;const e=t.events;this._audioMap=new Map;for(const t of e){if(!t.audio)continue;const e=ei(t.audio,(async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),n=await s.decodeAudioData(i);this._audioMap.set(t.source,n)}));e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){const t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;const s=t.canvas.element,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:o,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=async()=>{await this.toggleMute()},l=i.icons.enable?Zd.Block:Zd.None;this._muteImg=iu({container:t,options:e,pos:n,display:l,iconOptions:o,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=iu({container:t,options:e,pos:n,display:Zd.None,iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=iu({container:t,options:e,pos:n,display:l,iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=iu({container:t,options:e,pos:n,display:l,iconOptions:c,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Kd()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),su(this._muteImg),su(this._unmuteImg),su(this._volumeDownImg),su(this._volumeUpImg)})()}async toggleMute(){const t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){const t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){const t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_getAudioContext(){const t=this._container;return t.audioContext||(t.audioContext=new AudioContext),t.audioContext}}const ou=()=>{removeEventListener(s,ou),removeEventListener(c,ou),tu()};class au{constructor(t){this.id="sounds",this._engine=t;const e={capture:!0,once:!0};addEventListener(s,ou,e),addEventListener(c,ou,e)}getPlugin(t){return Promise.resolve(new nu(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.sounds;void 0===i?.load&&(t.sounds=i=new Qd),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class ru{constructor(){this.validTypes=["spiral"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.spiralInnerRadius||void 0===i.spiralLineSpacing||void 0===i.spiralWidthFactor)return;const n=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*n;t++){const s=t/10,n=i.spiralInnerRadius+i.spiralLineSpacing*s,o={x:n*Math.cos(s),y:n*Math.sin(s)};e.lineTo(o.x,o.y)}}(t)}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=he(s?.innerRadius??1)*i,e.spiralLineSpacing=he(s?.lineSpacing??1)*i,e.spiralWidthFactor=he(s?.widthFactor??10)}}const cu={a:1,b:0,c:0,d:1};class hu{draw(t){const{context:e,radius:i,particle:s,transformData:n}=t,o=i*S,a=s.container.retina.pixelRatio,r=s.getPosition(),c=s.trail;if(!c||!s.trailLength)return;const h=s.trailLength+i;if(c.push({color:e.fillStyle??e.strokeStyle,position:{x:r.x,y:r.y},transformData:{...t.transformData}}),c.length<2)return;for(;c.length>h;)c.shift();const l=Math.min(c.length,h),d=s.container.canvas.size.width+o,u=s.container.canvas.size.height+o;let p=c[l-1].position;for(let t=l;t>lt;t--){const i=c[t-1],n=i.position,r=s.trailTransform?i.transformData??cu:cu;e.setTransform(r.a,r.b,r.c,r.d,n.x,n.y),e.beginPath(),e.moveTo(p.x-n.x,p.y-n.y);const h={x:(p.x+d)%d,y:(p.y+u)%u};if(Math.abs(p.x-n.x)>d*y||Math.abs(p.y-n.y)>u*y){p=n;continue}e.lineTo(Math.abs(p.x-n.x)>d*y?h.x:v.x,Math.abs(p.y-n.y)>u*y?h.y:v.y);const g=Math.max(t/l*o,a,s.trailMinWidth??-1),f=e.globalAlpha;e.globalAlpha=s.trailFade?t/l:C,e.lineWidth=s.trailMaxWidth?Math.min(g,s.trailMaxWidth):g,e.strokeStyle=i.color,e.stroke(),e.globalAlpha=f,p=n}e.setTransform(n.a,n.b,n.c,n.d,r.x,r.y)}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=he(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?he(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?he(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}const lu=.5*Math.PI;class du{constructor(){this.options={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}}}generate(t,e){void 0===t.zigzag&&(t.zigzag={counter:ie(),waveHeight:he(this.options.waveHeight),waveLength:he(this.options.waveLength)});const i=.5/t.zigzag.waveLength*e.factor;t.zigzag.counter+=i;const s=t.zigzag.waveHeight*Math.sin(t.zigzag.counter);return t.position.x+=s*Math.cos(t.velocity.angle+lu),t.position.y+=s*Math.sin(t.velocity.angle+lu),Jt.origin}init(t){const e=t.actualOptions.particles.move.path.options;this.options.waveLength=e.waveLength??this.options.waveLength,this.options.waveHeight=e.waveHeight??this.options.waveHeight}reset(){}update(){}}const uu="zigZagPathGenerator";async function pu(t,e=!0){t.checkVersion("3.8.1"),Rn(t),await $h(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new sl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new Ml,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new Il,e),await t.addColorManager(new Gl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInBack,(t=>2.70158*t**3-1.70158*t**2),!1),await t.addEasing(Mn.easeOutBack,(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),!1),await t.addEasing(Mn.easeInOutBack,(t=>{const e=2.5949095;return t<.5?(2*t)**2*(7.189819*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2}),!1),await t.refresh(e)}(t,!1),await async function(t,e){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInCirc,(t=>1-Math.sqrt(1-t**2)),!1),await t.addEasing(Mn.easeOutCirc,(t=>Math.sqrt(1-(t-1)**2)),!1),await t.addEasing(Mn.easeInOutCirc,(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInCubic,(t=>t**3),!1),await t.addEasing(Mn.easeOutCubic,(t=>1-(1-t)**3),!1),await t.addEasing(Mn.easeInOutCubic,(t=>t<.5?4*t**3:1-(-2*t+2)**3/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInExpo,(t=>t?2**(10*t-10):0),!1),await t.addEasing(Mn.easeOutExpo,(t=>1===t?1:1-Math.pow(2,-10*t)),!1),await t.addEasing(Mn.easeInOutExpo,(t=>1===t?t?1:0:t?t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInLinear,(t=>t),!1),await t.addEasing(Mn.easeOutLinear,(t=>t),!1),await t.addEasing(Mn.easeInOutLinear,(t=>t),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInQuart,(t=>t**4),!1),await t.addEasing(Mn.easeOutQuart,(t=>1-(1-t)**4),!1),await t.addEasing(Mn.easeInOutQuart,(t=>t<.5?8*t**4:1-(-2*t+2)**4/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInQuint,(t=>t**5),!1),await t.addEasing(Mn.easeOutQuint,(t=>1-(1-t)**5),!1),await t.addEasing(Mn.easeInOutQuint,(t=>t<.5?16*t**5:1-(-2*t+2)**5/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEasing(Mn.easeInSine,(t=>1-Math.cos(t*Math.PI/2)),!1),await t.addEasing(Mn.easeOutSine,(t=>Math.sin(t*Math.PI/2)),!1),await t.addEasing(Mn.easeInOutSine,(t=>-(Math.cos(Math.PI*t)-1)/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.8.1"),i.addEmitterShapeGenerator?.("canvas",new No),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.8.1"),i.addEmitterShapeGenerator?.("path",new Xo),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.8.1"),i.addEmitterShapeGenerator?.("polygon",new ia),await i.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new Yn,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1");const i=new cl;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>Promise.resolve(new hl(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new Tl(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new Od(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new au(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new na(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new aa(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new la(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalParticle",(t=>Promise.resolve(new pa(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalPop",(t=>Promise.resolve(new ga(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("externalLight",(e=>Promise.resolve(new xl(e,t))),e),await t.addInteractor("particlesLight",(e=>Promise.resolve(new Pl(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addInteractor("particlesRepulse",(t=>Promise.resolve(new $l(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("gradient",(()=>Promise.resolve(new Kh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("orbit",(e=>Promise.resolve(new Nl(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(bo,new wo,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(mo,new yo,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(Kl,new Jl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPlugin(new nd(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(Td,new kd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(Id,new Gd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(uu,new du,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addPathGenerator(Hd,new Dd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEffect("bubble",new Dn,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Ln,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new no,e),await t.addShape(new so,e),await t.addShape(new io,e),await t.addShape(new eo,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new co,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new tl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new ul,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Ql,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new Ad,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new zd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new ru,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addEffect("trail",new hu,e)}(t,!1),await t.refresh(e)}return e})()));
|
|
2
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var s in i)("object"==typeof exports?exports:t)[s]=i[s]}}(this,(()=>(()=>{var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{AlterType:()=>di,AnimatableColor:()=>ks,AnimationMode:()=>Ce,AnimationOptions:()=>xs,AnimationStatus:()=>Oe,AnimationValueWithRandom:()=>Es,Background:()=>rs,BackgroundMask:()=>hs,BackgroundMaskCover:()=>cs,BaseRange:()=>pn,Circle:()=>gn,ClickEvent:()=>ds,CollisionMode:()=>vi,Collisions:()=>Gs,CollisionsAbsorb:()=>Ts,CollisionsOverlap:()=>Vs,ColorAnimation:()=>Cs,DestroyType:()=>ke,DivEvent:()=>us,DivType:()=>gi,EasingType:()=>Mn,EventType:()=>pi,Events:()=>ys,ExternalInteractorBase:()=>On,FullScreen:()=>ls,GradientType:()=>Vn,HoverEvent:()=>gs,HslAnimation:()=>Os,Interactivity:()=>ws,InteractivityDetect:()=>ui,InteractorType:()=>_i,LimitMode:()=>mi,ManualParticle:()=>ms,Modes:()=>vs,Move:()=>js,MoveAngle:()=>Ds,MoveAttract:()=>Ls,MoveCenter:()=>Hs,MoveDirection:()=>Ut,MoveGravity:()=>Fs,MovePath:()=>Bs,MoveTrail:()=>Us,Opacity:()=>Ws,OpacityAnimation:()=>Qs,Options:()=>cn,OptionsColor:()=>as,OutMode:()=>wi,OutModeDirection:()=>Te,OutModes:()=>qs,Parallax:()=>ps,ParticleOutType:()=>bi,ParticlesBounce:()=>Rs,ParticlesBounceFactor:()=>zs,ParticlesDensity:()=>Zs,ParticlesInteractorBase:()=>kn,ParticlesNumber:()=>Ys,ParticlesNumberLimit:()=>Xs,ParticlesOptions:()=>on,PixelMode:()=>Ve,Point:()=>un,RangedAnimationOptions:()=>Ps,RangedAnimationValueWithRandom:()=>As,Rectangle:()=>fn,ResizeEvent:()=>fs,Responsive:()=>_s,ResponsiveMode:()=>fi,RotateDirection:()=>Tn,Shadow:()=>Js,Shape:()=>Ks,Size:()=>en,SizeAnimation:()=>tn,Spin:()=>$s,StartValueType:()=>Me,Stroke:()=>sn,Theme:()=>Ss,ThemeDefault:()=>bs,ThemeMode:()=>yi,ValueWithRandom:()=>Ms,Vector:()=>Jt,Vector3d:()=>Yt,ZIndex:()=>nn,alterHsl:()=>ts,animate:()=>ne,areBoundsInside:()=>$e,arrayRandomIndex:()=>Ne,calcExactPositionOrRandomFromSize:()=>Se,calcExactPositionOrRandomFromSizeRanged:()=>xe,calcPositionFromSize:()=>me,calcPositionOrRandomFromSize:()=>_e,calcPositionOrRandomFromSizeRanged:()=>be,calculateBounds:()=>je,cancelAnimation:()=>oe,canvasFirstIndex:()=>at,canvasTag:()=>T,circleBounce:()=>Ke,circleBounceDataFromParticle:()=>Je,clamp:()=>ae,clear:()=>Qi,clickRadius:()=>K,cloneStyle:()=>hi,collisionVelocity:()=>we,colorMix:()=>Ii,colorToHsl:()=>Oi,colorToRgb:()=>Ci,countOffset:()=>_t,decayOffset:()=>dt,deepExtend:()=>Qe,defaultAlpha:()=>C,defaultAngle:()=>Vt,defaultDensityFactor:()=>Ct,defaultFps:()=>P,defaultFpsLimit:()=>nt,defaultLoops:()=>Bt,defaultOpacity:()=>J,defaultRadius:()=>yt,defaultRatio:()=>z,defaultReduceFactor:()=>R,defaultRemoveQuantity:()=>A,defaultRetryCount:()=>V,defaultRgbMin:()=>Ht,defaultTime:()=>Nt,defaultTransform:()=>m,defaultTransformValue:()=>W,defaultVelocity:()=>Ft,degToRad:()=>fe,deleteCount:()=>Ot,divMode:()=>Ye,divModeExecute:()=>Ze,double:()=>S,doublePI:()=>x,drawEffect:()=>Zi,drawLine:()=>qi,drawParticle:()=>Wi,drawParticlePlugin:()=>Ki,drawPlugin:()=>Ji,drawShape:()=>Xi,drawShapeAfterDraw:()=>Yi,empty:()=>q,errorPrefix:()=>g,executeOnSingleOrMultiple:()=>ei,findItemFromSingleOrMultiple:()=>si,generatedAttribute:()=>i,generatedFalse:()=>k,generatedTrue:()=>O,getDistance:()=>ge,getDistances:()=>pe,getFullScreenStyle:()=>li,getHslAnimationFromHsl:()=>Fi,getHslFromAnimation:()=>Hi,getLinkColor:()=>Di,getLinkRandomColor:()=>Li,getLogger:()=>ze,getParticleBaseVelocity:()=>ve,getParticleDirectionAngle:()=>ye,getPosition:()=>ai,getRandom:()=>ie,getRandomRgbColor:()=>zi,getRangeMax:()=>de,getRangeMin:()=>le,getRangeValue:()=>he,getSize:()=>ri,getStyleFromHsl:()=>Gi,getStyleFromRgb:()=>Ri,hMax:()=>L,hMin:()=>B,hPhase:()=>U,half:()=>y,hasMatchMedia:()=>Ie,hslToRgb:()=>Ei,hslaToRgba:()=>Ai,identity:()=>Mt,initParticleNumericAnimationValue:()=>ni,inverseFactorNumerator:()=>I,isArray:()=>Zt,isBoolean:()=>qt,isDivModeEnabled:()=>We,isFunction:()=>Qt,isInArray:()=>Fe,isNull:()=>Xt,isNumber:()=>jt,isObject:()=>Wt,isPointInside:()=>qe,isSsr:()=>Ge,isString:()=>$t,itemFromArray:()=>Ue,itemFromSingleOrMultiple:()=>ii,lFactor:()=>At,lMax:()=>F,lMin:()=>zt,lengthOffset:()=>Pt,loadAll:()=>iu,loadFont:()=>Be,loadMinIndex:()=>ct,loadOptions:()=>an,loadParticlesOptions:()=>rn,loadRandomFactor:()=>rt,manualCount:()=>xt,manualDefaultPosition:()=>Tt,midColorValue:()=>b,millisecondsToSeconds:()=>v,minCoordinate:()=>et,minCount:()=>bt,minFpsLimit:()=>ot,minIndex:()=>St,minLimit:()=>mt,minRetries:()=>pt,minStrokeWidth:()=>Et,minVelocity:()=>Q,minZ:()=>ft,minimumLength:()=>X,minimumSize:()=>Z,mix:()=>re,mouseDownEvent:()=>s,mouseLeaveEvent:()=>o,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>n,none:()=>lt,one:()=>ht,originPoint:()=>w,paintBase:()=>$i,paintImage:()=>ji,parseAlpha:()=>Pe,percentDenominator:()=>f,phaseNumerator:()=>Lt,posOffset:()=>vt,qTreeCapacity:()=>E,quarter:()=>$,randomColorValue:()=>_,randomInRange:()=>ce,rangeColorToHsl:()=>ki,rangeColorToRgb:()=>Pi,rectBounce:()=>ti,removeDeleteCount:()=>it,removeMinIndex:()=>st,resizeEvent:()=>u,rgbFactor:()=>Rt,rgbMax:()=>D,rgbToHsl:()=>Ti,rollFactor:()=>gt,sMax:()=>H,sMin:()=>N,sNormalizedOffset:()=>Dt,safeIntersectionObserver:()=>Le,safeMatchMedia:()=>De,safeMutationObserver:()=>He,setAnimationFunctions:()=>se,setLogger:()=>Ae,setRandom:()=>ee,setRangeValue:()=>ue,sextuple:()=>It,singleDivModeExecute:()=>Xe,sizeFactor:()=>wt,squareExp:()=>M,stringToAlpha:()=>Vi,stringToRgb:()=>Mi,subdivideCount:()=>G,threeQuarter:()=>j,touchCancelEvent:()=>d,touchDelay:()=>kt,touchEndEvent:()=>h,touchEndLengthOffset:()=>tt,touchMoveEvent:()=>l,touchStartEvent:()=>c,triple:()=>Gt,tryCountIncrement:()=>ut,tsParticles:()=>En,updateAnimation:()=>ci,updateColor:()=>Ui,updateColorValue:()=>Ni,visibilityChangeEvent:()=>p,zIndexFactorOffset:()=>Y});const i="generated",s="pointerdown",n="pointerup",o="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",g="tsParticles - Error",f=100,y=.5,v=1e3,w={x:0,y:0,z:0},m={a:1,b:0,c:0,d:1},_="random",b="mid",S=2,x=Math.PI*S,P=60,C=1,O="true",k="false",T="canvas",V=0,M=2,E=4,A=1,z=1,R=1,G=4,I=1,D=255,L=360,H=100,F=100,B=0,N=0,U=60,q=0,$=.25,j=y+$,Q=0,W=1,Z=0,X=0,Y=1,J=1,K=1,tt=1,et=0,it=1,st=0,nt=120,ot=0,at=0,rt=1e4,ct=0,ht=1,lt=0,dt=1,ut=1,pt=0,gt=1,ft=0,yt=0,vt=-$,wt=1.5,mt=0,_t=1,bt=0,St=0,xt=0,Pt=1,Ct=1,Ot=1,kt=500,Tt=50,Vt=0,Mt=1,Et=0,At=1,zt=0,Rt=255,Gt=3,It=6,Dt=1,Lt=1,Ht=0,Ft=0,Bt=0,Nt=0;var Ut;function qt(t){return"boolean"==typeof t}function $t(t){return"string"==typeof t}function jt(t){return"number"==typeof t}function Qt(t){return"function"==typeof t}function Wt(t){return"object"==typeof t&&null!==t}function Zt(t){return Array.isArray(t)}function Xt(t){return null==t}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(Ut||(Ut={}));class Yt{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!jt(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:w.z}else{if(void 0===t||void 0===e)throw new Error(`${g} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??w.z}}static get origin(){return Yt.create(w.x,w.y,w.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return Yt.create(t.x,t.y,t.z)}static create(t,e,i){return new Yt(t,e,i)}add(t){return Yt.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return Yt.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return Yt.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**M+this.y**M}mult(t){return Yt.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;t!=lt&&this.multTo(I/t)}rotate(t){return Yt.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),w.z)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:w.z}sub(t){return Yt.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}}class Jt extends Yt{constructor(t,e){super(t,e,w.z)}static get origin(){return Jt.create(w.x,w.y)}static clone(t){return Jt.create(t.x,t.y)}static create(t,e){return new Jt(t,e)}}let Kt=Math.random;const te={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)};function ee(t=Math.random){Kt=t}function ie(){return ae(Kt(),0,1-Number.EPSILON)}function se(t,e){te.nextFrame=e=>t(e),te.cancel=t=>e(t)}function ne(t){return te.nextFrame(t)}function oe(t){te.cancel(t)}function ae(t,e,i){return Math.min(Math.max(t,e),i)}function re(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function ce(t){const e=de(t);let i=le(t);return e===i&&(i=0),ie()*(e-i)+i}function he(t){return jt(t)?t:ce(t)}function le(t){return jt(t)?t:t.min}function de(t){return jt(t)?t:t.max}function ue(t,e){if(t===e||void 0===e&&jt(t))return t;const i=le(t),s=de(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:ue(i,s)}function pe(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i**2+s**2)}}function ge(t,e){return pe(t,e).distance}function fe(t){return t*Math.PI/180}function ye(t,e,i){if(jt(t))return fe(t);switch(t){case Ut.top:return-Math.PI*y;case Ut.topRight:return-Math.PI*$;case Ut.right:return q;case Ut.bottomRight:return Math.PI*$;case Ut.bottom:return Math.PI*y;case Ut.bottomLeft:return Math.PI*j;case Ut.left:return Math.PI;case Ut.topLeft:return-Math.PI*j;case Ut.inside:return Math.atan2(i.y-e.y,i.x-e.x);case Ut.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return ie()*x}}function ve(t){const e=Jt.origin;return e.length=1,e.angle=t,e}function we(t,e,i,s){return Jt.create(t.x*(i-s)/(i+s)+e.x*S*s/(i+s),t.y)}function me(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/f,y:t.position.y*t.size.height/f}:void 0}function _e(t){return{x:(t.position?.x??ie()*f)*t.size.width/f,y:(t.position?.y??ie()*f)*t.size.height/f}}function be(t){const e={x:void 0!==t.position?.x?he(t.position.x):void 0,y:void 0!==t.position?.y?he(t.position.y):void 0};return _e({size:t.size,position:e})}function Se(t){return{x:t.position?.x??ie()*t.size.width,y:t.position?.y??ie()*t.size.height}}function xe(t){const e={x:void 0!==t.position?.x?he(t.position.x):void 0,y:void 0!==t.position?.y?he(t.position.y):void 0};return Se({size:t.size,position:e})}function Pe(t){return t?t.endsWith("%")?parseFloat(t)/f:parseFloat(t):1}var Ce,Oe,ke,Te,Ve,Me;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Ce||(Ce={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Oe||(Oe={})),function(t){t.none="none",t.max="max",t.min="min"}(ke||(ke={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Te||(Te={})),function(t){t.precise="precise",t.percent="percent"}(Ve||(Ve={})),function(t){t.max="max",t.min="min",t.random="random"}(Me||(Me={}));const Ee={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function Ae(t){Ee.debug=t.debug||Ee.debug,Ee.error=t.error||Ee.error,Ee.info=t.info||Ee.info,Ee.log=t.log||Ee.log,Ee.verbose=t.verbose||Ee.verbose,Ee.warning=t.warning||Ee.warning}function ze(){return Ee}function Re(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:o,velocity:a,factor:r}=t;return s.min<o.min||s.min>o.max||s.max<o.min||s.max>o.max||(i.max>=n.min&&i.max<=(n.max+n.min)*y&&a>Q||i.min<=n.max&&i.min>(n.max+n.min)*y&&a<Q)&&(e.velocity=a*-r,e.bounced=!0),e}function Ge(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function Ie(){return!Ge()&&"undefined"!=typeof matchMedia}function De(t){if(Ie())return matchMedia(t)}function Le(t){if(!Ge()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function He(t){if(!Ge()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function Fe(t,e){return t===e||Zt(e)&&e.indexOf(t)>-1}async function Be(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function Ne(t){return Math.floor(ie()*t.length)}function Ue(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Ne(t)]}function qe(t,e,i,s,n){return $e(je(t,s??0),e,i,n)}function $e(t,e,i,s){let n=!0;return s&&s!==Te.bottom||(n=t.top<e.height+i.x),!n||s&&s!==Te.left||(n=t.right>i.x),!n||s&&s!==Te.right||(n=t.left<e.width+i.y),!n||s&&s!==Te.top||(n=t.bottom>i.y),n}function je(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Qe(t,...e){for(const i of e){if(null==i)continue;if(!Wt(i)){t=i;continue}const e=Array.isArray(i);!e||!Wt(t)&&t&&Array.isArray(t)?e||!Wt(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],n=t;n[e]=Wt(s)&&Array.isArray(s)?s.map((t=>Qe(n[e],t))):Qe(n[e],s)}}return t}function We(t,e){return!!si(e,(e=>e.enable&&Fe(t,e.mode)))}function Ze(t,e,i){ei(e,(e=>{const s=e.mode;e.enable&&Fe(t,s)&&Xe(e,i)}))}function Xe(t,e){ei(t.selectors,(i=>{e(i,t)}))}function Ye(t,e){if(e&&t)return si(t,(t=>function(t,e){const i=ei(e,(e=>t.matches(e)));return Zt(i)?i.some((t=>t)):i}(e,t.selectors)))}function Je(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:Jt.create(he(t.options.bounce.horizontal.value),he(t.options.bounce.vertical.value))}}function Ke(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=pe(o,n);if(i*a+s*r<0)return;const c=-Math.atan2(r,a),h=t.mass,l=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=we(d,u,h,l),g=we(u,d,h,l),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function ti(t,e){const i=je(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Re({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:he(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const o=Re({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:he(s.vertical.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}function ei(t,e){return Zt(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function ii(t,e,i){return Zt(t)?Ue(t,e,i):t}function si(t,e){if(Zt(t))return t.find(((t,i)=>e(t,i)));return e(t,0)?t:void 0}function ni(t,e){const i=t.value,s=t.animation,n={delayTime:he(s.delay)*v,enable:s.enable,value:he(t.value)*e,max:de(i)*e,min:le(i)*e,loops:0,maxLoops:he(s.count),time:0};if(s.enable){switch(n.decay=1-he(s.decay),s.mode){case Ce.increase:n.status=Oe.increasing;break;case Ce.decrease:n.status=Oe.decreasing;break;case Ce.random:n.status=ie()>=y?Oe.increasing:Oe.decreasing}const t=s.mode===Ce.auto;switch(s.startValue){case Me.min:n.value=n.min,t&&(n.status=Oe.increasing);break;case Me.max:n.value=n.max,t&&(n.status=Oe.decreasing);break;case Me.random:default:n.value=ce(n),t&&(n.status=ie()>=y?Oe.increasing:Oe.decreasing)}}return n.initialValue=n.value,n}function oi(t,e){if(!(t.mode===Ve.percent)){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/f*e.width,y:t.y/f*e.height}:{width:t.width/f*e.width,height:t.height/f*e.height}}function ai(t,e){return oi(t,e)}function ri(t,e){return oi(t,e)}function ci(t,e,i,s,n){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const o=(e.velocity??0)*n.factor,a=e.min,r=e.max,c=e.decay??1;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case Oe.increasing:e.value>=r?(i?e.status=Oe.decreasing:e.value-=r,e.loops||(e.loops=0),e.loops++):e.value+=o;break;case Oe.decreasing:e.value<=a?(i?e.status=Oe.increasing:e.value+=r,e.loops||(e.loops=0),e.loops++):e.value-=o}e.velocity&&1!==c&&(e.velocity*=c),function(t,e,i,s,n){switch(e){case ke.max:i>=n&&t.destroy();break;case ke.min:i<=s&&t.destroy()}}(t,s,e.value,a,r),t.destroyed||(e.value=ae(e.value,a,r))}}function hi(t){const e=document.createElement("div").style;if(!t)return e;for(const i in t){const s=t[i];if(!Object.prototype.hasOwnProperty.call(t,i)||Xt(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty?.(s,n,o):e.setProperty?.(s,n)}return e}const li=function(t){const e=new Map;return(...i)=>{const s=JSON.stringify(i);if(e.has(s))return e.get(s);const n=t(...i);return e.set(s,n),n}}((function(t){const e=document.createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0"};for(const t in i){const s=i[t];e.setProperty(t,s)}return e}));var di,ui,pi,gi,fi,yi,vi,wi,mi,_i,bi,Si;function xi(t,e){if(e)for(const i of t.colorManagers.values())if(e.startsWith(i.stringPrefix))return i.parseString(e)}function Pi(t,e,i,s=!0){if(!e)return;const n=$t(e)?{value:e}:e;if($t(n.value))return Ci(t,n.value,i,s);if(Zt(n.value))return Pi(t,{value:Ue(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Ci(t,e,i,s=!0){if(!e)return;const n=$t(e)?{value:e}:e;if($t(n.value))return n.value===_?zi():Mi(t,n.value);if(Zt(n.value))return Ci(t,{value:Ue(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Oi(t,e,i,s=!0){const n=Ci(t,e,i,s);return n?Ti(n):void 0}function ki(t,e,i,s=!0){const n=Pi(t,e,i,s);return n?Ti(n):void 0}function Ti(t){const e=t.r/D,i=t.g/D,s=t.b/D,n=Math.max(e,i,s),o=Math.min(e,i,s),a={h:B,l:(n+o)*y,s:N};return n!==o&&(a.s=a.l<y?(n-o)/(n+o):(n-o)/(S-n-o),a.h=e===n?(i-s)/(n-o):a.h=i===n?S+(s-e)/(n-o):S*S+(e-i)/(n-o)),a.l*=F,a.s*=H,a.h*=U,a.h<B&&(a.h+=L),a.h>=L&&(a.h-=L),a}function Vi(t,e){return xi(t,e)?.a}function Mi(t,e){return xi(t,e)}function Ei(t){const e=(t.h%L+L)%L,i=Math.max(N,Math.min(H,t.s)),s=Math.max(zt,Math.min(F,t.l)),n=e/L,o=i/H,a=s/F;if(i===N){const t=Math.round(a*Rt);return{r:t,g:t,b:t}}const r=(t,e,i)=>{if(i<0&&i++,i>1&&i--,i*It<1)return t+(e-t)*It*i;if(i*S<1)return e;if(i*Gt<1*S){return t+(e-t)*(S/Gt-i)*It}return t},c=a<y?a*(Dt+o):a+o-a*o,h=S*a-c,l=Lt/Gt,d=Math.min(Rt,Rt*r(h,c,n+l)),u=Math.min(Rt,Rt*r(h,c,n)),p=Math.min(Rt,Rt*r(h,c,n-l));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ai(t){const e=Ei(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function zi(t){const e=t??Ht,i=D+Mt;return{b:Math.floor(ce(ue(e,i))),g:Math.floor(ce(ue(e,i))),r:Math.floor(ce(ue(e,i)))}}function Ri(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??J})`}function Gi(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??J})`}function Ii(t,e,i,s){let n=t,o=e;return void 0===n.r&&(n=Ei(t)),void 0===o.r&&(o=Ei(e)),{b:re(n.b,o.b,i,s),g:re(n.g,o.g,i,s),r:re(n.r,o.r,i,s)}}function Di(t,e,i){if(i===_)return zi();if(i!==b)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ii(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ei(t)}}}function Li(t,e,i,s){const n=$t(e)?e:e.value;return n===_?s?Pi(t,{value:n}):i?_:b:n===b?b:Pi(t,{value:n})}function Hi(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function Fi(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(Bi(s.h,e.h,i),Bi(s.s,e.s,i),Bi(s.l,e.l,i)),s}function Bi(t,e,i){t.enable=e.enable,t.enable?(t.velocity=he(e.speed)/f*i,t.decay=dt-he(e.decay),t.status=Oe.increasing,t.loops=Bt,t.maxLoops=he(e.count),t.time=Nt,t.delayTime=he(e.delay)*v,e.sync||(t.velocity*=ie(),t.value*=ie()),t.initialValue=t.value,t.offset=ue(e.offset)):t.velocity=Ft}function Ni(t,e,i,s){if(!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=s.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?ce(t.offset):0,o=(t.velocity??0)*s.factor+3.6*n,a=t.decay??1,r=de(e),c=le(e);if(i&&t.status!==Oe.increasing){t.value-=o;const e=0;t.value<e&&(t.loops||(t.loops=0),t.loops++,t.status=Oe.increasing)}else t.value+=o,t.value>r&&(t.loops||(t.loops=0),t.loops++,i?t.status=Oe.decreasing:t.value-=r);t.velocity&&1!==a&&(t.velocity*=a),t.value=ae(t.value,c,r)}function Ui(t,e){if(!t)return;const{h:i,s,l:n}=t,o={min:0,max:100},a={min:0,max:100};i&&Ni(i,{min:0,max:360},!1,e),s&&Ni(s,o,!0,e),n&&Ni(n,a,!0,e)}function qi(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function $i(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(w.x,w.y,e.width,e.height)}function ji(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,w.x,w.y,e.width,e.height),t.globalAlpha=1)}function Qi(t,e){t.clearRect(w.x,w.y,e.width,e.height)}function Wi(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:Vt),g=Math.sin(p),f=Math.cos(p),y=!!p,v={a:f*(d.a??m.a),b:y?g*(d.b??Mt):d.b??m.b,c:y?-g*(d.c??Mt):d.c??m.c,d:f*(d.d??m.d)};i.setTransform(v.a,v.b,v.c,v.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const w=s.shadowColor;l.enable&&w&&(i.shadowBlur=l.blur,i.shadowColor=Ri(w),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),o.fill&&(i.fillStyle=o.fill);const _=s.strokeWidth??Et;i.lineWidth=_,o.stroke&&(i.strokeStyle=o.stroke);const b={container:e,context:i,particle:s,radius:c,opacity:h,delta:n,transformData:v,strokeWidth:_};Xi(b),Yi(b),Zi(b),i.globalCompositeOperation="source-over",i.resetTransform()}function Zi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);c&&c.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Xi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,strokeWidth:r,transformData:c}=t;if(!s.shape)return;const h=e.shapeDrawers.get(s.shape);h&&(i.beginPath(),h.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),s.shapeClose&&i.closePath(),r>Et&&i.stroke(),s.shapeFill&&i.fill())}function Yi(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.shape)return;const c=e.shapeDrawers.get(s.shape);c?.afterDraw&&c.afterDraw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Ji(t,e,i){e.draw&&e.draw(t,i)}function Ki(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function ts(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===di.darken?-At:At)*i}}function es(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??W)*s)}function is(t,e,i=!1){if(!e)return;if(!t)return;const s=t.style;if(!s)return;const n=new Set;for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&n.add(s[t]);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.add(e[t]);for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}!function(t){t.darken="darken",t.enlighten="enlighten"}(di||(di={}));class ss{constructor(t,e){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,e,i,s,n,o)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)es(o,t,e)}a.beforeDraw?.(e)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=ki(this._engine,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ki(this._engine,s.particleStrokeColor(t))),e&&i)break;return[e,i]},this._initCover=async()=>{const t=this.container.actualOptions.backgroundMask.cover,e=t.color;if(e){const i=Pi(this._engine,e);if(i){const e={...i,a:t.opacity};this._coverColorStyle=Ri(e,e.a)}}else await new Promise(((e,i)=>{if(!t.image)return;const s=document.createElement("img");s.addEventListener("load",(()=>{this._coverImage={image:s,opacity:t.opacity},e()})),s.addEventListener("error",(t=>{i(t.error)})),s.src=t.image}))},this._initStyle=()=>{const t=this.element,e=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style||!Object.prototype.hasOwnProperty.call(e.style,i))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions.particles.move.trail,e=t.fill;if(!t.enable)return;const i=I/t.length;if(e.color){const t=Pi(this._engine,e.color);if(!t)return;this._trailFill={color:{...t},opacity:i}}else await new Promise(((t,s)=>{if(!e.image)return;const n=document.createElement("img");n.addEventListener("load",(()=>{this._trailFill={image:n,opacity:i},t()})),n.addEventListener("error",(t=>{s(t.error)})),n.src=e.image}))},this._paintBase=t=>{this.draw((e=>$i(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>ji(i,this.size,t,e)))},this._repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.setAttribute("pointer-events",e),this._safeMutationObserver((e=>{t&&t instanceof Node&&e.observe(t,{attributes:!0})}))},this._resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&is(t,e,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&is(t,li(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=e,this._standardSize={height:0,width:0};const i=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._pointerEvents="none"}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,e=t.particles.move.trail,i=this._trailFill;t.backgroundMask.enable?this.paint():e.enable&&e.length>X&&i?i.color?this._paintBase(Ri(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Qi(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawAsync(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=Z)return;const s=t.getFillColor(),n=t.getStrokeColor()??s;let[o,a]=this._getPluginParticleColors(t);o||(o=s),a||(a=n),(o||a)&&this.draw((s=>{const n=this.container,r=n.actualOptions,c=t.options.zIndex,h=Y-t.zIndexFactor,l=h**c.opacityRate,d=t.bubble.opacity??t.opacity?.value??J,u=d*l,p=(t.strokeOpacity??d)*l,g={},f={fill:o?Gi(o,u):void 0};f.stroke=a?Gi(a,p):f.fill,this._applyPreDrawUpdaters(s,t,i,u,f,g),Wi({container:n,context:s,particle:t,delta:e,colorStyles:f,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*h**c.sizeRate,opacity:u,shadow:t.options.shadow,transform:g}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>Ki(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>Ji(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=He((t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(t){ze().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element;if(!e)return;const i=e.style;if(i){if(t.color){const e=Pi(this._engine,t.color);i.backgroundColor=e?Ri(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins.values())t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&i in t.dataset?"true"===t.dataset[i]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=hi(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const s=this.container.retina.pixelRatio,n=this.size;t.height=n.height=e.height*s,t.width=n.width=e.width*s,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>t.disconnect())),this.container.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Qi(e,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const o={...e};e.height=i.height,e.width=i.width;const a=this.size;return this.element.width=a.width=n.width,this.element.height=a.height=n.height,this.container.started&&t.particles.setResizeFactor({width:e.width/o.width,height:e.height/o.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Qi(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}}function ns(t,e,i,s,n){if(s){let s={passive:!0};qt(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ui||(ui={}));class os{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const e=this.container,i=e.actualOptions;if(this._canPush){const t=e.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=(new Date).getTime();ei(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),kt)},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,n=s.defaultThemes,o=e.matches?n.dark:n.light,a=s.themes.find((t=>t.name===o));a?.default.auto&&i.loadTheme(o)},this._handleVisibilityChange=()=>{const t=this.container,e=t.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(document?.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await(t?.windowResize())};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*v)},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,o=this.container,a=o.actualOptions,u=o.interactivity.element;if(!u)return;const p=u,g=o.canvas;g.setPointerEvents(p===g.element?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(ns(u,r,i.mouseMove,e),ns(u,c,i.touchStart,e),ns(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(ns(u,h,i.touchEndClick,e),ns(u,n,i.mouseUp,e),ns(u,s,i.mouseDown,e)):ns(u,h,i.touchEnd,e),ns(u,t,i.mouseLeave,e),ns(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,n=i.canvas.element;let r=o;s===ui.window?(i.interactivity.element=window,r=a):s===ui.parent&&n?i.interactivity.element=n.parentElement??n.parentNode:i.interactivity.element=n,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&ns(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=De("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):ns(i,"change",e.themeChange,t))},this._manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void ns(window,u,e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this.container,i=e.actualOptions,{mouse:s}=e.interactivity;s.inside=!0;let n=!1;const o=s.position;if(o&&i.interactivity.events.onClick.enable){for(const t of e.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=o,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,n=e.canvas.element;if(!s?.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(n){const t=n.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(i.interactivity.detectsOn===ui.parent){const t=e.target,i=e.currentTarget;if(t&&i&&n){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=n.getBoundingClientRect();o={x:e.offsetX+S*s.left-(a.left+r.left),y:e.offsetY+S*s.top-(a.top+r.top)}}else o={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===n&&(o={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,n){const e=t,i=e.touches[e.touches.length-Pt],s=n.getBoundingClientRect();o={x:i.clientX-(s.left??et),y:i.clientY-(s.top??et)}}const a=e.retina.pixelRatio;o&&(o.x*=a,o.y*=a),s.mouse.position=o,s.status=r},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(pi||(pi={}));class as{constructor(){this.value=""}static create(t,e){const i=new as;return i.load(t),void 0!==e&&($t(e)||Zt(e)?i.load({value:e}):i.load(e)),i}load(t){Xt(t)||Xt(t.value)||(this.value=t.value)}}class rs{constructor(){this.color=new as,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class cs{constructor(){this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.opacity&&(this.opacity=t.opacity))}}class hs{constructor(){this.composite="destination-out",this.cover=new cs,this.enable=!1}load(t){if(!Xt(t)){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=$t(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color||void 0!==e.image?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class ls{constructor(){this.enable=!0,this.zIndex=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class ds{constructor(){this.enable=!1,this.mode=[]}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}!function(t){t.circle="circle",t.rectangle="rectangle"}(gi||(gi={}));class us{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=gi.circle}load(t){Xt(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class ps{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class gs{constructor(){this.enable=!1,this.mode=[],this.parallax=new ps}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class fs{constructor(){this.delay=.5,this.enable=!0}load(t){Xt(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ys{constructor(){this.onClick=new ds,this.onDiv=new us,this.onHover=new gs,this.resize=new fs}load(t){if(Xt(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=ei(e,(t=>{const e=new us;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class vs{constructor(t,e){this._engine=t,this._container=e}load(t){if(Xt(t))return;if(!this._container)return;const e=this._engine.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class ws{constructor(t,e){this.detectsOn=ui.window,this.events=new ys,this.modes=new vs(t,e)}load(t){if(Xt(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class ms{load(t){Xt(t)||(t.position&&(this.position={x:t.position.x??Tt,y:t.position.y??Tt,mode:t.position.mode??Ve.percent}),t.options&&(this.options=Qe({},t.options)))}}!function(t){t.screen="screen",t.canvas="canvas"}(fi||(fi={}));class _s{constructor(){this.maxWidth=1/0,this.options={},this.mode=fi.canvas}load(t){Xt(t)||(Xt(t.maxWidth)||(this.maxWidth=t.maxWidth),Xt(t.mode)||(t.mode===fi.screen?this.mode=fi.screen:this.mode=fi.canvas),Xt(t.options)||(this.options=Qe({},t.options)))}}!function(t){t.any="any",t.dark="dark",t.light="light"}(yi||(yi={}));class bs{constructor(){this.auto=!1,this.mode=yi.any,this.value=!1}load(t){Xt(t)||(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ss{constructor(){this.name="",this.default=new bs}load(t){Xt(t)||(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=Qe({},t.options)))}}class xs{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ps extends xs{constructor(){super(),this.mode=Ce.auto,this.startValue=Me.random}load(t){super.load(t),Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Cs extends xs{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),Xt(t)||void 0!==t.offset&&(this.offset=ue(t.offset))}}class Os{constructor(){this.h=new Cs,this.s=new Cs,this.l=new Cs}load(t){Xt(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ks extends as{constructor(){super(),this.animation=new Os}static create(t,e){const i=new ks;return i.load(t),void 0!==e&&($t(e)||Zt(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(vi||(vi={}));class Ts{constructor(){this.speed=2}load(t){Xt(t)||void 0!==t.speed&&(this.speed=t.speed)}}class Vs{constructor(){this.enable=!0,this.retries=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Ms{constructor(){this.value=0}load(t){Xt(t)||Xt(t.value)||(this.value=ue(t.value))}}class Es extends Ms{constructor(){super(),this.animation=new xs}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class As extends Es{constructor(){super(),this.animation=new Ps}load(t){super.load(t)}}class zs extends Ms{constructor(){super(),this.value=1}}class Rs{constructor(){this.horizontal=new zs,this.vertical=new zs}load(t){Xt(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Gs{constructor(){this.absorb=new Ts,this.bounce=new Rs,this.enable=!1,this.maxSpeed=50,this.mode=vi.bounce,this.overlap=new Vs}load(t){Xt(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=ue(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class Is{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(Xt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Qe(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class Ds{constructor(){this.offset=0,this.value=90}load(t){Xt(t)||(void 0!==t.offset&&(this.offset=ue(t.offset)),void 0!==t.value&&(this.value=ue(t.value)))}}class Ls{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(!Xt(t)&&(void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.enable&&(this.enable=t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class Hs{constructor(){this.x=50,this.y=50,this.mode=Ve.percent,this.radius=0}load(t){Xt(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class Fs{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){Xt(t)||(void 0!==t.acceleration&&(this.acceleration=ue(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=ue(t.maxSpeed)))}}class Bs{constructor(){this.clamp=!0,this.delay=new Ms,this.enable=!1,this.options={}}load(t){Xt(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Qe(this.options,t.options)))}}class Ns{load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class Us{constructor(){this.enable=!1,this.length=10,this.fill=new Ns}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.fill&&this.fill.load(t.fill),void 0!==t.length&&(this.length=t.length))}}!function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(wi||(wi={}));class qs{constructor(){this.default=wi.out}load(t){Xt(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class $s{constructor(){this.acceleration=0,this.enable=!1}load(t){Xt(t)||(void 0!==t.acceleration&&(this.acceleration=ue(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Qe({},t.position)))}}class js{constructor(){this.angle=new Ds,this.attract=new Ls,this.center=new Hs,this.decay=0,this.distance={},this.direction=Ut.none,this.drift=0,this.enable=!1,this.gravity=new Fs,this.path=new Bs,this.outModes=new qs,this.random=!1,this.size=!1,this.speed=2,this.spin=new $s,this.straight=!1,this.trail=new Us,this.vibrate=!1,this.warp=!1}load(t){if(Xt(t))return;this.angle.load(jt(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=jt(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=ue(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(Wt(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=ue(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Qs extends Ps{constructor(){super(),this.destroy=ke.none,this.speed=2}load(t){super.load(t),Xt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ws extends As{constructor(){super(),this.animation=new Qs,this.value=1}load(t){if(Xt(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Zs{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(Xt(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}!function(t){t.delete="delete",t.wait="wait"}(mi||(mi={}));class Xs{constructor(){this.mode=mi.delete,this.value=0}load(t){Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ys{constructor(){this.density=new Zs,this.limit=new Xs,this.value=0}load(t){Xt(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Js{constructor(){this.blur=0,this.color=new as,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){Xt(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=as.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class Ks{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(Xt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Qe(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class tn extends Ps{constructor(){super(),this.destroy=ke.none,this.speed=5}load(t){super.load(t),Xt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class en extends As{constructor(){super(),this.animation=new tn,this.value=3}load(t){if(super.load(t),Xt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class sn{constructor(){this.width=0}load(t){Xt(t)||(void 0!==t.color&&(this.color=ks.create(this.color,t.color)),void 0!==t.width&&(this.width=ue(t.width)),void 0!==t.opacity&&(this.opacity=ue(t.opacity)))}}class nn extends Ms{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),Xt(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class on{constructor(t,e){this._engine=t,this._container=e,this.bounce=new Rs,this.collisions=new Gs,this.color=new ks,this.color.value="#fff",this.effect=new Is,this.groups={},this.move=new js,this.number=new Ys,this.opacity=new Ws,this.reduceDuplicates=!1,this.shadow=new Js,this.shape=new Ks,this.size=new en,this.stroke=new sn,this.zIndex=new nn}load(t){if(Xt(t))return;if(void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!Object.hasOwn(t.groups,e))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Qe(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(ks.create(this.color,t.color)),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=Qe({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=ei(e,(t=>{const e=new sn;return e.load(t),e}))),this._container){const e=this._engine.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function an(t,...e){for(const i of e)t.load(i)}function rn(t,e,...i){const s=new on(t,e);return an(s,...i),s}class cn{constructor(t,e){this._findDefaultTheme=t=>this.themes.find((e=>e.default.value&&e.default.mode===t))??this.themes.find((t=>t.default.value&&t.default.mode===yi.any)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new rs,this.backgroundMask=new hs,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new ls,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new ws(t,e),this.manualParticles=[],this.particles=rn(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(t){if(Xt(t))return;void 0!==t.preset&&ei(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=ue(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=ue(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;qt(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new ms;return e.load(t),e}))),this.particles.load(t.particles),this.style=Qe(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const n=this._engine.interactors.get(this._container);if(n)for(const e of n)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new _s;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=this.themes.find((t=>t.name===e.name));if(t)t.load(e);else{const t=new Ss;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme(yi.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(yi.light)?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>i.mode===fi.screen&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=De("(prefers-color-scheme: dark)"),e=t?.matches,i=this._findDefaultTheme(e?yi.dark:yi.light);i&&this.load(i.options)}}}!function(t){t.external="external",t.particles="particles"}(_i||(_i={}));class hn{constructor(t,e){this.container=e,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode?.(t)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case _i.external:this._externalInteractors.push(t);break;case _i.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&i.interact(t,e)}reset(t){for(const e of this._externalInteractors)e.isEnabled()&&e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&e.reset(t)}}function ln(t){if(!Fe(t.outMode,t.checkModes))return;const e=t.radius*S;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}!function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(bi||(bi={}));class dn{constructor(t,e){this.container=e,this._calcPosition=(t,e,i,s=V)=>{for(const s of t.plugins.values()){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return Yt.create(t.x,t.y,i)}const n=Se({size:t.canvas.size,position:e}),o=Yt.create(n.x,n.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{ln({outMode:e,checkModes:[wi.bounce],coord:o.x,maxCoord:t.canvas.size.width,setCb:t=>o.x+=t,radius:a})},h=e=>{ln({outMode:e,checkModes:[wi.bounce],coord:o.y,maxCoord:t.canvas.size.height,setCb:t=>o.y+=t,radius:a})};return c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(o,s)?this._calcPosition(t,void 0,i,s+ut):o},this._calculateVelocity=()=>{const t=ve(this.direction).copy(),e=this.options.move;if(e.direction===Ut.inside||e.direction===Ut.outside)return t;const i=fe(he(e.angle.value)),s=fe(he(e.angle.offset)),n={left:s-i*y,right:s+i*y};return e.straight||(t.angle+=ce(ue(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=ie()),t},this._checkOverlap=(t,e=V)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const n=i.overlap;if(n.enable)return!1;const o=n.retries;if(o>=pt&&e>o)throw new Error(`${g} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>ge(t,e.position)<s+e.getRadius()))},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?S*gt:gt,i=this.roll.horizontal?Math.PI*y:lt;return Math.floor(((this.roll.angle??lt)+i)/(Math.PI/e))%S?this.backColor?this.backColor:this.roll.alter?ts(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=he(this.options.zIndex.value);this.position=this._calcPosition(e,t,ae(i,ft,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...ai(this.options.move.center,s),radius:this.options.move.center.radius??yt,mode:this.options.move.center.mode??Ve.percent},this.direction=ye(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case Ut.inside:this.outType=bi.inside;break;case Ut.outside:this.outType=bi.outside}this.offset=Jt.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,i=this.pathGenerator,s=e.shapeDrawers.get(this.shape);s?.particleDestroy?.(this);for(const i of e.plugins.values())i.particleDestroyed?.(this,t);for(const i of e.particles.updaters)i.particleDestroyed?.(this,t);i?.reset(this),this._engine.dispatchEvent(pi.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const e=this.container,i=e.canvas;for(const s of e.plugins.values())i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??Hi(this.color))}getMass(){return this.getRadius()**M*Math.PI*y}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??Hi(this.strokeColor))}init(t,e,i,s){const n=this.container,o=this._engine;this.id=t,this.group=s,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=bi.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,r=n.actualOptions,c=rn(this._engine,n,r.particles),{reduceDuplicates:h}=c,l=c.effect.type,d=c.shape.type;this.effect=ii(l,this.id,h),this.shape=ii(d,this.id,h);const u=c.effect,p=c.shape;if(i){if(i.effect?.type){const t=ii(i.effect.type,this.id,h);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=ii(i.shape.type,this.id,h);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===_){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(ie()*t.length)]}if(this.shape===_){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(ie()*t.length)]}this.effectData=function(t,e,i,s){const n=e.options[t];if(n)return Qe({close:e.close,fill:e.fill},ii(n,i,s))}(this.effect,u,this.id,h),this.shapeData=function(t,e,i,s){const n=e.options[t];if(n)return Qe({close:e.close,fill:e.fill},ii(n,i,s))}(this.shape,p,this.id,h),c.load(i);const g=this.effectData;g&&c.load(g.particles);const f=this.shapeData;f&&c.load(f.particles);const y=new ws(o,n);y.load(n.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=g?.fill??c.effect.fill,this.effectClose=g?.close??c.effect.close,this.shapeFill=f?.fill??c.shape.fill,this.shapeClose=f?.close??c.shape.close,this.options=c;const w=this.options.move.path;this.pathDelay=he(w.delay.value)*v,w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&n.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(n)),n.retina.initParticle(this),this.size=ni(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=dt-he(this.options.move.decay);const m=n.particles;m.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24;let b=n.effectDrawers.get(this.effect);b||(b=this._engine.getEffectDrawer(this.effect),b&&n.effectDrawers.set(this.effect,b)),b?.loadEffect&&b.loadEffect(this);let S=n.shapeDrawers.get(this.shape);S||(S=this._engine.getShapeDrawer(this.shape),S&&n.shapeDrawers.set(this.shape,S)),S?.loadShape&&S.loadShape(this);const x=S?.getSidesCount;x&&(this.sides=x(this)),this.spawning=!1,this.shadowColor=Pi(this._engine,this.options.shadow.color);for(const t of m.updaters)t.init(this);for(const t of m.movers)t.init?.(this);b?.particleInit?.(n,this),S?.particleInit?.(n,this);for(const t of n.plugins.values())t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}class un{constructor(t,e){this.position=t,this.particle=e}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Si||(Si={}));class pn{constructor(t,e,i){this.position={x:t,y:e},this.type=i}}class gn extends pn{constructor(t,e,i){super(t,e,Si.circle),this.radius=i}contains(t){return ge(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),o=this.radius;if(t instanceof gn||t.type===Si.circle){return o+t.radius>Math.sqrt(s**M+n**M)}if(t instanceof fn||t.type===Si.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,M)+Math.pow(n-a,M)<=o**M||s<=o+i&&n<=o+a||s<=i||n<=a}return!1}}class fn extends pn{constructor(t,e,i,s){super(t,e,Si.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof gn)return t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t instanceof fn?t.size:{width:0,height:0},a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}}class yn{constructor(t,e){this.rectangle=t,this.capacity=e,this._subdivide=()=>{const{x:t,y:e}=this.rectangle.position,{width:i,height:s}=this.rectangle.size,{capacity:n}=this;for(let o=0;o<G;o++){const a=o%S;this._subs.push(new yn(new fn(t+i*y*a,e+s*y*(Math.round(o*y)-a),i*y,s*y),n))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((e=>e.insert(t)))))}query(t,e){const i=[];if(!t.intersects(this.rectangle))return[];for(const s of this._points)!t.contains(s.position)&&ge(t.position,s.position)>s.particle.getRadius()&&(!e||e(s.particle))||i.push(s.particle);if(this._divided)for(const s of this._subs)i.push(...s.query(t,e));return i}queryCircle(t,e,i){return this.query(new gn(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new fn(t.x,t.y,e.width,e.height),i)}}const vn=t=>{const{height:e,width:i}=t;return new fn(vt*i,vt*e,wt*i,wt*e)};class wn{constructor(t,e){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,e,i,s)=>{const n=t.number;if(!t.number.density?.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit?.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit?.value??n.limit.value));const o=this._initDensityFactor(n.density),a=n.value,r=n.limit.value>mt?n.limit.value:a,c=Math.min(a,r)*o+e,h=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=n.limit.value*o:this._groupLimits.set(i,n.limit.value*o),h<c?this.push(Math.abs(c-h),void 0,t,i):h>c&&this.removeQuantity(h-c,i)},this._initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return Ct;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**M)},this._pushParticle=(t,e,i,s)=>{try{let n=this._pool.pop();n||(n=new dn(this._engine,this._container)),n.init(this._nextId,t,e,i);let o=!0;if(s&&(o=s(n)),!o)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(pi.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){ze().warning(`${g} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,Ot),this._zArray.splice(n,Ot),s.destroy(i),this._engine.dispatchEvent(pi.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new hn(t,e),this._pluginsInitialized=!1;const i=e.canvas.size;this.quadTree=new yn(vn(i),E),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((e=>this.addParticle(e.position?ai(e.position,t.canvas.size):void 0,e.options)))}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,o=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(o>mt)switch(n){case mi.delete:{const t=a+_t-o;t>bt&&this.removeQuantity(t);break}case mi.wait:if(a>=o)return}return this._pushParticle(t,e,i,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(t){const e=this._container,i=e.canvas;i.clear(),this.update(t);for(const s of e.plugins.values())i.drawPlugin(s,t);for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,e=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let i=!1;for(const e of t.plugins.values())if(i=e.particlesInitialization?.()??i,i)break;if(this.addManualParticles(),!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];for(let i=this.count,n=0;n<s.number?.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const e of t.pathGenerators.values())e.init(t)}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e?.position,i,s)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=A,i,s){if(t<St||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this._removeParticle(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(St,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups,i=t.manualParticles.length;for(const t in e)this._applyDensity(e[t],i,t);this._applyDensity(t.particles,i)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const e=this._container,i=new Set;this.quadTree=new yn(vn(e.canvas.size),E);for(const t of e.pathGenerators.values())t.update();for(const i of e.plugins.values())i.update?.(t);const s=this._resizeFactor;for(const e of this._array){s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height,e.initialPosition.x*=s.width,e.initialPosition.y*=s.height),e.ignoresResizeRatio=!1,this._interactionManager.reset(e);for(const i of this._container.plugins.values()){if(e.destroyed)break;i.particleUpdate?.(e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?i.add(e):this.quadTree.insert(new un(e.getPosition(),e))}if(i.size){const t=t=>!i.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of i)this._engine.dispatchEvent(pi.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...i)}this._interactionManager.externalInteract(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||this._interactionManager.particlesInteract(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this._lastZIndex=t[t.length-Pt].position.z,this._needsSort=!1}}}class mn{constructor(t){this.container=t,this.pixelRatio=z,this.reduceFactor=R}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||Ge()?z:devicePixelRatio,this.reduceFactor=R;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}const n=e.particles,o=n.move;this.maxSpeed=he(o.gravity.maxSpeed)*i,this.sizeAnimationSpeed=he(n.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.moveDrift=he(s.drift)*i,o.moveSpeed=he(s.speed)*i,o.sizeAnimationSpeed=he(e.size.animation.speed)*i;const a=o.maxDistance;a.horizontal=void 0!==n.horizontal?n.horizontal*i:void 0,a.vertical=void 0!==n.vertical?n.vertical*i:void 0,o.maxSpeed=he(s.gravity.maxSpeed)*i}}function _n(t){return t&&!t.destroyed}function bn(t,e,...i){const s=new cn(t,e);return an(s,...i),s}class Sn{constructor(t,e,i){this._intersectionManager=t=>{if(_n(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+v/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const e=function(t,e=P,i=!1){return{value:t,factor:i?P/e:P*t/v}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>v)return void this.draw(!1);if(this.particles.draw(e),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){ze().error(`${g} in animation loop`,t)}},this._engine=t,this.id=Symbol(e),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new mn(this),this.canvas=new ss(this,this._engine),this.particles=new wn(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=bn(this._engine,this),this.actualOptions=bn(this._engine,this),this._eventListeners=new os(this),this._intersectionObserver=Le((t=>this._intersectionManager(t))),this._engine.dispatchEvent(pi.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&_n(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!_n(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!_n(this))return;const n=this.retina.pixelRatio,o={x:i.x*n,y:i.y*n},a=this.particles.quadTree.queryCircle(o,s*n);t(e,a)};let s=!1,n=!1;this._clickHandlers.set("click",(t=>{if(!_n(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,K)})),this._clickHandlers.set("touchstart",(()=>{_n(this)&&(s=!0,n=!1)})),this._clickHandlers.set("touchmove",(()=>{_n(this)&&(n=!0)})),this._clickHandlers.set("touchend",(t=>{if(_n(this)){if(s&&!n){const e=t;let s=e.touches[e.touches.length-tt];if(!s&&(s=e.changedTouches[e.changedTouches.length-tt],!s))return;const n=this.canvas.element,o=n?n.getBoundingClientRect():void 0,a={x:s.clientX-(o?o.left:et),y:s.clientY-(o?o.top:et)};i(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,n=!1}})),this._clickHandlers.set("touchcancel",(()=>{_n(this)&&(s=!1,n=!1)}));for(const[t,i]of this._clickHandlers)e.addEventListener(t,i)}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!_n(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(_n(this)){for(const[t,e]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,e);this._clickHandlers.clear()}}destroy(t=!0){if(_n(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);for(const t of this.shapeDrawers.values())t.destroy?.(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);if(this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,e=t.findIndex((t=>t===this));e>=st&&t.splice(e,it)}this._engine.dispatchEvent(pi.containerDestroyed,{container:this})}}draw(t){if(!_n(this))return;let e=t;const i=t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)};this._drawAnimationFrame=ne((t=>i(t)))}async export(t,e={}){for(const i of this.plugins.values()){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}ze().error(`${g} - Export plugin with type ${t} not found`)}handleClickMode(t){if(_n(this)){this.particles.handleClickMode(t);for(const e of this.plugins.values())e.handleClickMode?.(t)}}async init(){if(!_n(this))return;const t=this._engine.getSupportedEffects();for(const e of t){const t=this._engine.getEffectDrawer(e);t&&this.effectDrawers.set(e,t)}const e=this._engine.getSupportedShapes();for(const t of e){const e=this._engine.getShapeDrawer(t);e&&this.shapeDrawers.set(t,e)}await this.particles.initPlugins(),this._options=bn(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=bn(this._engine,this,this._options);const i=await this._engine.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{zLayers:s,duration:n,delay:o,fpsLimit:a,smooth:r}=this.actualOptions;this.zLayers=s,this._duration=he(n)*v,this._delay=he(o)*v,this._lifeTime=0,this.fpsLimit=a>ot?a:nt,this._smooth=r;for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));for(const t of this.plugins.values())await(t.init?.());this._engine.dispatchEvent(pi.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(pi.particlesSetup,{container:this})}async loadTheme(t){_n(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(_n(this)&&(void 0!==this._drawAnimationFrame&&(oe(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(pi.containerPaused,{container:this})}}play(t){if(!_n(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(pi.containerPlay,{container:this}),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(_n(this))return this.stop(),this.start()}async reset(t){if(_n(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=bn(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=bn(this._engine,this,this._options),this.refresh()}async start(){_n(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const e=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values())await(t.start?.());this._engine.dispatchEvent(pi.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{e()}),this._delay)})))}stop(){if(_n(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const t of this.plugins.values())t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(pi.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}class xn{constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach((t=>t(e)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<St||(s===Ot?this._listeners.delete(t):i.splice(n,Ot))}}async function Pn(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map((e=>e(t)))),e.set(t,n)),n}class Cn{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new xn,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}get items(){return this._domArray}get version(){return"3.9.1"}async addColorManager(t,e=!0){this.colorManagers.set(t.key,t),await this.refresh(e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent(pi.configAdded,{data:{name:e,config:t}})}async addEasing(t,e,i=!0){this.getEasing(t)||(this.easingFunctions.set(t,e),await this.refresh(i))}async addEffect(t,e,i=!0){ei(t,(t=>{this.getEffectDrawer(t)||this.effectDrawers.set(t,e)})),await this.refresh(i)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e,i=!0){this._initializers.interactors.set(t,e),await this.refresh(i)}async addMover(t,e,i=!0){this._initializers.movers.set(t,e),await this.refresh(i)}async addParticleUpdater(t,e,i=!0){this._initializers.updaters.set(t,e),await this.refresh(i)}async addPathGenerator(t,e,i=!0){this.getPathGenerator(t)||this.pathGenerators.set(t,e),await this.refresh(i)}async addPlugin(t,e=!0){this.getPlugin(t.id)||this.plugins.push(t),await this.refresh(e)}async addPreset(t,e,i=!1,s=!0){!i&&this.getPreset(t)||this.presets.set(t,e),await this.refresh(s)}async addShape(t,e=!0){for(const e of t.validTypes)this.getShapeDrawer(e)||this.shapeDrawers.set(e,t);await this.refresh(e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this.items}domItem(t){return this.item(t)}async getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,await i.getPlugin(t));return e}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,e=!1){return Pn(t,this.interactors,this._initializers.interactors,e)}async getMovers(t,e=!1){return Pn(t,this.movers,this._initializers.movers,e)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((e=>e.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(t,e=!1){return Pn(t,this.updaters,this._initializers.updaters,e)}init(){this._initialized||(this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(i&&!i.destroyed)return i;e.splice(t,it)}async load(t){const e=t.id??t.element?.id??`tsparticles${Math.floor(ie()*rt)}`,{index:s,url:n}=t,o=n?await async function(t){const e=ii(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ze().error(`${g} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:n,index:s}):t.options,a=ii(o,s),{items:r}=this,c=r.findIndex((t=>t.id.description===e)),h=new Sn(this,e,a);if(c>=ct){const t=this.item(c),e=t?ht:lt;t&&!t.destroyed&&t.destroy(!1),r.splice(c,e,h)}else r.push(h);const l=((t,e)=>{let s=e??document.getElementById(t);return s||(s=document.createElement("div"),s.id=t,s.dataset[i]=O,document.body.append(s),s)})(e,t.element),d=(t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===T)e=t,e.dataset[i]||(e.dataset[i]=k);else{const s=t.getElementsByTagName(T);s.length?(e=s[at],e.dataset[i]=k):(e=document.createElement(T),e.dataset[i]=O,t.appendChild(e))}const s="100%";return e.style.width||(e.style.width=s),e.style.height||(e.style.height=s),e})(l);return h.canvas.loadCanvas(d),await h.start(),h}loadOptions(t,e){this.plugins.forEach((i=>i.loadOptions?.(t,e)))}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach((t=>t.loadOptions?.(e,...i)))}async refresh(t=!0){t&&await Promise.all(this.items.map((t=>t.refresh())))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}setOnClickHandler(t){const{items:e}=this;if(!e.length)throw new Error(`${g} can only set click handlers after calling tsParticles.load()`);e.forEach((e=>e.addClickHandler(t)))}}class On{constructor(t){this.type=_i.external,this.container=t}}class kn{constructor(t){this.type=_i.particles,this.container=t}}var Tn,Vn,Mn;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Tn||(Tn={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Vn||(Vn={})),function(t){t.easeInBack="ease-in-back",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInExpo="ease-in-expo",t.easeInSine="ease-in-sine",t.easeOutBack="ease-out-back",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutExpo="ease-out-expo",t.easeOutSine="ease-out-sine",t.easeInOutBack="ease-in-out-back",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutExpo="ease-in-out-expo",t.easeInOutSine="ease-in-out-sine"}(Mn||(Mn={}));const En=function(){const t=new Cn;return t.init(),t}();Ge()||(window.tsParticles=En);class An{static init(t){const e=new An,i=t.selector;if(!i)throw new Error("No selector provided");const s=document.querySelector(i);if(!s)throw new Error("No element found for selector");return En.load({element:s,id:i.replace(".","").replace("!",""),options:{fullScreen:{enable:!1},particles:{color:{value:t.color??"!000000"},links:{color:"random",distance:t.minDistance??120,enable:t.connectParticles??!1},move:{enable:!0,speed:t.speed??.5},number:{value:t.maxParticles??100},size:{value:{min:1,max:t.sizeVariations??3}}},responsive:t.responsive?.map((e=>({maxWidth:e.breakpoint,options:{particles:{color:{value:e.options?.color},links:{distance:e.options?.minDistance,enable:e.options?.connectParticles},number:{value:t.maxParticles},move:{enable:!0,speed:e.options?.speed},size:{value:e.options?.sizeVariations}}}})))}}).then((t=>{e._container=t})),e}destroy(){const t=this._container;t?.destroy()}pauseAnimation(){const t=this._container;t?.pause()}resumeAnimation(){const t=this._container;t?.play()}}const zn={particles:{number:{value:400,density:{enable:!0,value_area:800}},color:{value:"#fff"},shape:{type:"circle",stroke:{width:0,color:"#ff0000"},polygon:{nb_sides:5},image:{src:"",width:100,height:100}},opacity:{value:1,random:!1,anim:{enable:!1,speed:2,opacity_min:0,sync:!1}},size:{value:20,random:!1,anim:{enable:!1,speed:20,size_min:0,sync:!1}},line_linked:{enable:!0,distance:100,color:"#fff",opacity:1,width:1},move:{enable:!0,speed:2,direction:"none",random:!1,straight:!1,out_mode:"out",bounce:!1,attract:{enable:!1,rotateX:3e3,rotateY:3e3}}},interactivity:{detect_on:"canvas",events:{onhover:{enable:!0,mode:"grab"},onclick:{enable:!0,mode:"push"},resize:!0},modes:{grab:{distance:100,line_linked:{opacity:1}},bubble:{distance:200,size:80,duration:.4,opacity:1,speed:3},repulse:{distance:200,duration:.4},push:{particles_nb:4},remove:{particles_nb:2}}},retina_detect:!1},Rn=t=>{t.checkVersion("3.9.1");const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>{const s=Qe(zn,i);return t.load({id:e,options:{fullScreen:{enable:!1},detectRetina:s.retina_detect,smooth:!0,interactivity:{detectsOn:s.interactivity.detect_on,events:{onHover:{enable:s.interactivity.events.onhover.enable,mode:s.interactivity.events.onhover.mode},onClick:{enable:s.interactivity.events.onclick.enable,mode:s.interactivity.events.onclick.mode},resize:{enable:s.interactivity.events.resize}},modes:{grab:{distance:s.interactivity.modes.grab.distance,links:{opacity:s.interactivity.modes.grab.line_linked.opacity}},bubble:{distance:s.interactivity.modes.bubble.distance,size:s.interactivity.modes.bubble.size,duration:s.interactivity.modes.bubble.duration,opacity:s.interactivity.modes.bubble.opacity,speed:s.interactivity.modes.bubble.speed},repulse:{distance:s.interactivity.modes.repulse.distance,duration:s.interactivity.modes.repulse.duration},push:{quantity:s.interactivity.modes.push.particles_nb},remove:{quantity:s.interactivity.modes.remove.particles_nb}}},particles:{collisions:{enable:s.particles.move.bounce},number:{value:s.particles.number.value,density:{enable:s.particles.number.density.enable,width:s.particles.number.density.value_area}},color:{value:s.particles.color.value},stroke:{width:s.particles.shape.stroke.width,color:{value:s.particles.shape.stroke.color}},shape:{type:s.particles.shape.type,options:{polygon:{sides:s.particles.shape.polygon.nb_sides},image:{src:s.particles.shape.image.src,width:s.particles.shape.image.width,height:s.particles.shape.image.height}}},opacity:{value:s.particles.opacity.random?{min:s.particles.opacity.anim.enable?s.particles.opacity.anim.opacity_min:0,max:s.particles.opacity.value}:s.particles.opacity.value,animation:{enable:s.particles.opacity.anim.enable,speed:s.particles.opacity.anim.speed,sync:s.particles.opacity.anim.sync}},size:{value:s.particles.size.random?{min:s.particles.size.anim.enable?s.particles.size.anim.size_min:0,max:s.particles.size.value}:s.particles.size.value,animation:{enable:s.particles.size.anim.enable,speed:s.particles.size.anim.speed,sync:s.particles.size.anim.sync}},links:{enable:s.particles.line_linked.enable,distance:s.particles.line_linked.distance,color:s.particles.line_linked.color,opacity:s.particles.line_linked.opacity,width:s.particles.line_linked.width},move:{enable:s.particles.move.enable,speed:s.particles.move.speed/3,direction:s.particles.move.direction,random:s.particles.move.random,straight:s.particles.move.straight,outModes:s.particles.move.out_mode,attract:{enable:s.particles.move.attract.enable,rotate:{x:s.particles.move.attract.rotateX,y:s.particles.move.attract.rotateY}}}}}})};return e.load=(e,i,s)=>{t.load({id:e,url:i}).then((t=>{t&&s(t)})).catch((()=>{s(void 0)}))},e.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:e,pJSDom:t.dom()}})(t);return window.particlesJS=e,window.pJSDom=i,window.Particles=An,{particlesJS:e,pJSDom:i,Particles:An}},Gn=.5,In=0;class Dn{constructor(){this.validTypes=["arrow"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=2*s,o=n*(i.heightFactor??.5),a=n*(i.headWidthFactor??.2),r=o*(i.bodyHeightFactor??.5);e.moveTo(-n*Gn,In),e.lineTo(-n*Gn,-r*Gn),e.lineTo(n*Gn-a,-r*Gn),e.lineTo(n*Gn-a,-o*Gn),e.lineTo(n*Gn+a,In),e.lineTo(n*Gn-a,o*Gn),e.lineTo(n*Gn-a,r*Gn),e.lineTo(-n*Gn,r*Gn),e.lineTo(-n*Gn,In)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=he(i?.heightFactor??.5),e.headWidthFactor=he(i?.headWidthFactor??.2),e.bodyHeightFactor=he(i?.bodyHeightFactor??.5)}}class Ln{draw(t){const{context:e,radius:i}=t,s=i/3;e.beginPath(),e.arc(s,-s,s,Vt,x,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class Hn{constructor(){this.color=!0,this.opacity=!1}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Fn{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(!Xt(t)){if(void 0!==t.filter)if($t(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];Qt(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Bn{constructor(){this.src=""}load(t){Xt(t)||void 0!==t.src&&(this.src=t.src)}}class Nn{constructor(){this.family="sans-serif",this.size=100}load(t){Xt(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class Un{constructor(){this.separator="\n",this.spacing=10}load(t){Xt(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class qn{constructor(){this.color="#000000",this.font=new Nn,this.lines=new Un,this.text=""}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class $n{constructor(){this.enable=!1,this.override=new Hn,this.pixels=new Fn,this.position={x:50,y:50},this.scale=1}load(t){Xt(t)||(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),void 0!==t.enable&&(this.enable=t.enable),t.image&&(this.image||(this.image=new Bn),this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),t.text&&(this.text||(this.text=new qn),this.text.load(t.text)))}}const jn=0,Qn=0;function Wn(t,e,i,s,n,o){const{height:a,width:r}=e,c=a*r,h=function(t){const e=1,i=0;for(let s=t.length-e;s>=i;s--){const e=Math.floor(ie()*s);[t[s],t[e]]=[t[e],t[s]]}return t}(Xn(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/f-r*s*.5,g=d.height*i.y/f-a*s*.5;for(;u<l&&h.length;){const i=0,a=h.pop()??i,c={x:a%r,y:Math.floor(a/r)},l=e.pixels[c.y][c.x];if(!o(l))continue;const d={x:c.x*s+p,y:c.y*s+g},f={};n.color&&(f.color={value:l}),n.opacity&&(f.opacity={value:l.a}),t.particles.addParticle(d,f),u++}}function Zn(t,e,i,s=!0){const n=t.getImageData(jn,Qn,e.width,e.height).data;s&&t.clearRect(jn,Qn,e.width,e.height);const o=[];for(let t=0;t<n.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};o[a.y]||(o[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;o[a.y][a.x]={r:n[t+r.r],g:n[t+r.g],b:n[t+r.b],a:n[t+r.a]/c}}return{pixels:o,width:Math.min(...o.map((t=>t.length))),height:o.length}}const Xn=t=>[...Array(t).keys()];class Yn{constructor(t){this._container=t}async init(){const t=this._container,e=t.actualOptions.canvasMask;if(!e?.enable)return;let i={pixels:[],height:0,width:0};const s=e.pixels.offset;if(e.image){const t=e.image.src;if(!t)return;i=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const n=document.createElement("canvas");n.width=i.width,n.height=i.height;const o=n.getContext("2d");if(!o)return s(new Error(`${g} Could not get canvas context`));o.drawImage(i,jn,Qn,i.width,i.height,jn,Qn,n.width,n.height),t(Zn(o,n,e))}}));return i.src=t,s}(t,s)}else if(e.text){const t=function(t,e){const i=document.createElement("canvas"),s=i.getContext("2d"),{font:n,text:o,lines:a,color:r}=t;if(!o||!s)return;const c=o.split(a.separator),h=jt(n.size)?`${n.size}px`:n.size,l=[];let d=0,u=0;for(const t of c){s.font=`${n.style??""} ${n.variant??""} ${n.weight??""} ${h} ${n.family}`;const e=s.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};d=Math.max(d||0,i.width),u+=i.height+a.spacing,l.push(i)}i.width=d,i.height=u;let p=0;for(const t of l)s.font=`${n.style??""} ${n.variant??""} ${n.weight??""} ${h} ${n.family}`,s.fillStyle=r,s.fillText(t.text,jn,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return Zn(s,i,e)}(e.text,s);if(Xt(t))return;i=t}else if(e.element??e.selector){const t=e.element??(e.selector&&document.querySelector(e.selector));if(!t)return;const n=t.getContext("2d");if(!n)return;i=Zn(n,t,s)}Wn(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class Jn{constructor(){this.id="canvasMask"}getPlugin(t){return Promise.resolve(new Yn(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new $n),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function Kn(t,e){if(!e.segments.length||!e.segments[0].values.length)return;const{context:i,radius:s}=t;i.moveTo(e.segments[0].values[0].x*s,e.segments[0].values[0].y*s);for(const t of e.segments)i.bezierCurveTo(t.values[1].x*s,t.values[1].y*s,t.values[2].x*s,t.values[2].y*s,t.values[3].x*s,t.values[3].y*s);for(let t=e.segments.length-1;t>=0;t--){const n=e.segments[t];i.bezierCurveTo(-n.values[2].x*s,n.values[2].y*s,-n.values[1].x*s,n.values[1].y*s,-n.values[0].x*s,n.values[0].y*s)}}const to=.5,eo={heart:{segments:[{values:[{x:0,y:to},{x:0,y:to},{x:to,y:0},{x:to,y:-to/2}]},{values:[{x:to,y:-to/2},{x:to,y:-to/2},{x:to,y:-to},{x:to/2,y:-to}]},{values:[{x:to/2,y:-to},{x:to/2,y:-to},{x:0,y:-to},{x:0,y:-to/2}]}]},diamond:{segments:[{values:[{x:0,y:to},{x:0,y:to},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-to},{x:0,y:-to}]}]},club:{segments:[{values:[{x:0,y:-to},{x:0,y:-to},{x:to/2,y:-to},{x:to/2,y:-to/2}]},{values:[{x:to/2,y:-to/2},{x:to/2,y:-to/2},{x:to,y:-to/2},{x:to,y:0}]},{values:[{x:to,y:0},{x:to,y:0},{x:to,y:to/2},{x:to/2,y:to/2}]},{values:[{x:to/2,y:to/2},{x:to/2,y:to/2},{x:to/8,y:to/2},{x:to/8,y:to/8}]},{values:[{x:to/8,y:to/8},{x:to/8,y:to/2},{x:to/2,y:to},{x:to/2,y:to}]},{values:[{x:to/2,y:to},{x:to/2,y:to},{x:0,y:to},{x:0,y:to}]}]},spade:{segments:[{values:[{x:0,y:-to},{x:0,y:-to},{x:to,y:-to/2},{x:to,y:0}]},{values:[{x:to,y:0},{x:to,y:0},{x:to,y:to/2},{x:to/2,y:to/2}]},{values:[{x:to/2,y:to/2},{x:to/2,y:to/2},{x:to/8,y:to/2},{x:to/8,y:to/8}]},{values:[{x:to/8,y:to/8},{x:to/8,y:to/2},{x:to/2,y:to},{x:to/2,y:to}]},{values:[{x:to/2,y:to},{x:to/2,y:to},{x:0,y:to},{x:0,y:to}]}]}};class io{constructor(){this.validTypes=["club","clubs"]}draw(t){Kn(t,eo.club)}}class so{constructor(){this.validTypes=["diamond","diamonds"]}draw(t){Kn(t,eo.diamond)}}class no{constructor(){this.validTypes=["heart","hearts"]}draw(t){Kn(t,eo.heart)}}class oo{constructor(){this.validTypes=["spade","spades"]}draw(t){Kn(t,eo.spade)}}const ao=2*Math.PI,ro=0,co=0;class ho{constructor(){this.validTypes=["cog"]}afterDraw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const n=s*i.cogHoleRadius/f;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(n,co),e.arc(ro,co,n,0,ao),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(t)}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const n=ao/(2*i.cogNotches),o=n*i.cogInnerTaper*.005,a=n*i.cogOuterTaper*.005,r=s*i.cogInnerRadius/f;let c=n,h=!1;for(e.moveTo(s*Math.cos(a),s*Math.sin(a));c<=ao;c+=n)h?(e.lineTo(r*Math.cos(c-o),r*Math.sin(c-o)),e.lineTo(s*Math.cos(c+a),s*Math.sin(c+a))):(e.lineTo(s*Math.cos(c-a),s*Math.sin(c-a)),e.lineTo(r*Math.cos(c+o),r*Math.sin(c+o))),h=!h}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=he(i?.holeRadius??44),e.cogInnerRadius=he(i?.innerRadius??72),e.cogInnerTaper=he(i?.innerTaper??35),e.cogNotches=he(i?.notches??7),e.cogOuterTaper=he(i?.outerTaper??50)}}function lo(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class uo{constructor(){this._NORM_2D=1/47,this._SQUISH_2D=(Math.sqrt(3)-1)/2,this._STRETCH_2D=(1/Math.sqrt(3)-1)/2,this._base2D=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this._gradients2D=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this._lookup=[],this._lookupPairs2D=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this._p2D=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256)}noise(t,e){const{_gradients2D:i,_NORM_2D:s,_SQUISH_2D:n,_STRETCH_2D:o,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*o,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),g=(u+p)*n,f=t-(u+g),y=e-(p+g),v=l-u,w=d-p,m=v+w;let _=0;for(let t=a[v-w+1|m<<1|m+w<<2|m+v<<4];void 0!==t;t=t.next){const e=f+t.dx,s=y+t.dy,n=2-e*e-s*s;if(n>0){const o=u+t.xsb,a=p+t.ysb,h=c[r[255&o]+a&255];_+=n*n*n*n*(i[h]*e+i[h+1]*s)}}return _*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,n=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let o=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===o?n[t/4]=a:o.next=a,o=a;a&&(a.next=this._contribution2D(e[t+1],e[t+2],e[t+3]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=n[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=lo(lo(lo(a)));for(let t=255;t>=0;t--){a=lo(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm2D[t]=14&this._perm[t],o[e[0]]=o[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class po{constructor(){this._NORM_3D=1/103,this._SQUISH_3D=(Math.sqrt(4)-1)/3,this._STRETCH_3D=(1/Math.sqrt(4)-1)/3,this._base3D=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this._gradients3D=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this._lookup=[],this._lookupPairs3D=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this._p3D=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256)}noise(t,e,i){const{_STRETCH_3D:s,_NORM_3D:n,_SQUISH_3D:o,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),v=(g+f+y)*o,w=t-(g+v),m=e-(f+v),_=i-(y+v),b=d-g,S=u-f,x=p-y,P=b+S+x;let C=0;for(let t=a[S-x+1|b-S+1<<1|b-x+1<<2|P<<3|P+x<<5|P+S<<7|P+b<<9];void 0!==t;t=t.next){const e=w+t.dx,i=m+t.dy,s=_+t.dz,n=2-e*e-i*i-s*s;if(n>0){const o=g+t.xsb,a=f+t.ysb,l=y+t.zsb,d=c[r[r[255&o]+a&255]+l&255];C+=n*n*n*n*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*n}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,n=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let o=null,a=null;for(let e=0;e<i.length;e+=4)a=this._contribution3D(i[e],i[e+1],i[e+2],i[e+3]),null===o?n[t/9]=a:o.next=a,o=a;a&&(a.next=this._contribution3D(s[t+1],s[t+2],s[t+3],s[t+4]),a.next.next=this._contribution3D(s[t+5],s[t+6],s[t+7],s[t+8]))}this._lookup=[];for(let t=0;t<i.length;t+=2)this._lookup[i[t]]=n[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=lo(lo(lo(a)));for(let t=255;t>=0;t--){a=lo(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm3D[t]=this._perm[t]%24*3,o[e[0]]=o[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,xsb:e,ysb:i,zsb:s}}}class go{constructor(){this._NORM_4D=1/30,this._SQUISH_4D=.25*(Math.sqrt(5)-1),this._STRETCH_4D=.25*(1/Math.sqrt(5)-1),this._lookup=[],this._perm=new Uint8Array(0),this._perm4D=new Uint8Array(0),this._base4D=[[0,0,0,0,0,1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,4,1,1,1,1],[1,1,0,0,0,1,0,1,0,0,1,0,0,1,0,1,0,0,0,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1],[3,1,1,1,0,3,1,1,0,1,3,1,0,1,1,3,0,1,1,1,2,1,1,0,0,2,1,0,1,0,2,1,0,0,1,2,0,1,1,0,2,0,1,0,1,2,0,0,1,1]],this._gradients4D=[3,1,1,1,1,3,1,1,1,1,3,1,1,1,1,3,-3,1,1,1,-1,3,1,1,-1,1,3,1,-1,1,1,3,3,-1,1,1,1,-3,1,1,1,-1,3,1,1,-1,1,3,-3,-1,1,1,-1,-3,1,1,-1,-1,3,1,-1,-1,1,3,3,1,-1,1,1,3,-1,1,1,1,-3,1,1,1,-1,3,-3,1,-1,1,-1,3,-1,1,-1,1,-3,1,-1,1,-1,3,3,-1,-1,1,1,-3,-1,1,1,-1,-3,1,1,-1,-1,3,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,3,1,1,-1,1,3,1,-1,1,1,3,-1,1,1,1,-3,-3,1,1,-1,-1,3,1,-1,-1,1,3,-1,-1,1,1,-3,3,-1,1,-1,1,-3,1,-1,1,-1,3,-1,1,-1,1,-3,-3,-1,1,-1,-1,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,3,1,-1,-1,1,3,-1,-1,1,1,-3,-1,1,1,-1,-3,-3,1,-1,-1,-1,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,3,-1,-1,-1,1,-3,-1,-1,1,-1,-3,-1,1,-1,-1,-3,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3,-1,-1,-1,-1,-3],this._lookupPairs4D=[0,3,1,2,2,3,5,2,6,1,7,1,8,3,9,2,10,3,13,2,16,3,18,3,22,1,23,1,24,3,26,3,33,2,37,2,38,1,39,1,41,2,45,2,54,1,55,1,56,0,57,0,58,0,59,0,60,0,61,0,62,0,63,0,256,3,258,3,264,3,266,3,272,3,274,3,280,3,282,3,2049,2,2053,2,2057,2,2061,2,2081,2,2085,2,2089,2,2093,2,2304,9,2305,9,2312,9,2313,9,16390,1,16391,1,16406,1,16407,1,16422,1,16423,1,16438,1,16439,1,16642,8,16646,8,16658,8,16662,8,18437,6,18439,6,18469,6,18471,6,18688,9,18689,9,18690,8,18693,6,18694,8,18695,6,18696,9,18697,9,18706,8,18710,8,18725,6,18727,6,131128,0,131129,0,131130,0,131131,0,131132,0,131133,0,131134,0,131135,0,131352,7,131354,7,131384,7,131386,7,133161,5,133165,5,133177,5,133181,5,133376,9,133377,9,133384,9,133385,9,133400,7,133402,7,133417,5,133421,5,133432,7,133433,5,133434,7,133437,5,147510,4,147511,4,147518,4,147519,4,147714,8,147718,8,147730,8,147734,8,147736,7,147738,7,147766,4,147767,4,147768,7,147770,7,147774,4,147775,4,149509,6,149511,6,149541,6,149543,6,149545,5,149549,5,149558,4,149559,4,149561,5,149565,5,149566,4,149567,4,149760,9,149761,9,149762,8,149765,6,149766,8,149767,6,149768,9,149769,9,149778,8,149782,8,149784,7,149786,7,149797,6,149799,6,149801,5,149805,5,149814,4,149815,4,149816,7,149817,5,149818,7,149821,5,149822,4,149823,4,149824,37,149825,37,149826,36,149829,34,149830,36,149831,34,149832,37,149833,37,149842,36,149846,36,149848,35,149850,35,149861,34,149863,34,149865,33,149869,33,149878,32,149879,32,149880,35,149881,33,149882,35,149885,33,149886,32,149887,32,150080,49,150082,48,150088,49,150098,48,150104,47,150106,47,151873,46,151877,45,151881,46,151909,45,151913,44,151917,44,152128,49,152129,46,152136,49,152137,46,166214,43,166215,42,166230,43,166247,42,166262,41,166263,41,166466,48,166470,43,166482,48,166486,43,168261,45,168263,42,168293,45,168295,42,168512,31,168513,28,168514,31,168517,28,168518,25,168519,25,280952,40,280953,39,280954,40,280957,39,280958,38,280959,38,281176,47,281178,47,281208,40,281210,40,282985,44,282989,44,283001,39,283005,39,283208,30,283209,27,283224,30,283241,27,283256,22,283257,22,297334,41,297335,41,297342,38,297343,38,297554,29,297558,24,297562,29,297590,24,297594,21,297598,21,299365,26,299367,23,299373,26,299383,23,299389,20,299391,20,299584,31,299585,28,299586,31,299589,28,299590,25,299591,25,299592,30,299593,27,299602,29,299606,24,299608,30,299610,29,299621,26,299623,23,299625,27,299629,26,299638,24,299639,23,299640,22,299641,22,299642,21,299645,20,299646,21,299647,20,299648,61,299649,60,299650,61,299653,60,299654,59,299655,59,299656,58,299657,57,299666,55,299670,54,299672,58,299674,55,299685,52,299687,51,299689,57,299693,52,299702,54,299703,51,299704,56,299705,56,299706,53,299709,50,299710,53,299711,50,299904,61,299906,61,299912,58,299922,55,299928,58,299930,55,301697,60,301701,60,301705,57,301733,52,301737,57,301741,52,301952,79,301953,79,301960,76,301961,76,316038,59,316039,59,316054,54,316071,51,316086,54,316087,51,316290,78,316294,78,316306,73,316310,73,318085,77,318087,77,318117,70,318119,70,318336,79,318337,79,318338,78,318341,77,318342,78,318343,77,430776,56,430777,56,430778,53,430781,50,430782,53,430783,50,431e3,75,431002,72,431032,75,431034,72,432809,74,432813,69,432825,74,432829,69,433032,76,433033,76,433048,75,433065,74,433080,75,433081,74,447158,71,447159,68,447166,71,447167,68,447378,73,447382,73,447386,72,447414,71,447418,72,447422,71,449189,70,449191,70,449197,69,449207,68,449213,69,449215,68,449408,67,449409,67,449410,66,449413,64,449414,66,449415,64,449416,67,449417,67,449426,66,449430,66,449432,65,449434,65,449445,64,449447,64,449449,63,449453,63,449462,62,449463,62,449464,65,449465,63,449466,65,449469,63,449470,62,449471,62,449472,19,449473,19,449474,18,449477,16,449478,18,449479,16,449480,19,449481,19,449490,18,449494,18,449496,17,449498,17,449509,16,449511,16,449513,15,449517,15,449526,14,449527,14,449528,17,449529,15,449530,17,449533,15,449534,14,449535,14,449728,19,449729,19,449730,18,449734,18,449736,19,449737,19,449746,18,449750,18,449752,17,449754,17,449784,17,449786,17,451520,19,451521,19,451525,16,451527,16,451528,19,451529,19,451557,16,451559,16,451561,15,451565,15,451577,15,451581,15,451776,19,451777,19,451784,19,451785,19,465858,18,465861,16,465862,18,465863,16,465874,18,465878,18,465893,16,465895,16,465910,14,465911,14,465918,14,465919,14,466114,18,466118,18,466130,18,466134,18,467909,16,467911,16,467941,16,467943,16,468160,13,468161,13,468162,13,468163,13,468164,13,468165,13,468166,13,468167,13,580568,17,580570,17,580585,15,580589,15,580598,14,580599,14,580600,17,580601,15,580602,17,580605,15,580606,14,580607,14,580824,17,580826,17,580856,17,580858,17,582633,15,582637,15,582649,15,582653,15,582856,12,582857,12,582872,12,582873,12,582888,12,582889,12,582904,12,582905,12,596982,14,596983,14,596990,14,596991,14,597202,11,597206,11,597210,11,597214,11,597234,11,597238,11,597242,11,597246,11,599013,10,599015,10,599021,10,599023,10,599029,10,599031,10,599037,10,599039,10,599232,13,599233,13,599234,13,599235,13,599236,13,599237,13,599238,13,599239,13,599240,12,599241,12,599250,11,599254,11,599256,12,599257,12,599258,11,599262,11,599269,10,599271,10,599272,12,599273,12,599277,10,599279,10,599282,11,599285,10,599286,11,599287,10,599288,12,599289,12,599290,11,599293,10,599294,11,599295,10],this._p4D=[0,0,1,-1,0,0,0,1,0,-1,0,0,1,0,0,-1,0,0,-1,1,0,0,0,0,1,-1,0,0,0,1,0,-1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,-1,0,0,-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,2,1,1,0,0,1,1,1,-1,0,1,1,1,0,-1,0,2,1,0,1,0,1,1,-1,1,0,1,1,0,1,-1,0,2,0,1,1,0,1,-1,1,1,0,1,0,1,1,-1,0,2,1,0,0,1,1,1,-1,0,1,1,1,0,-1,1,0,2,0,1,0,1,1,-1,1,0,1,1,0,1,-1,1,0,2,0,0,1,1,1,-1,0,1,1,1,0,-1,1,1,1,4,2,1,1,0,4,1,2,1,0,4,1,1,2,0,1,4,2,1,0,1,4,1,2,0,1,4,1,1,0,2,1,4,2,0,1,1,4,1,0,2,1,4,1,0,1,2,1,4,0,2,1,1,4,0,1,2,1,4,0,1,1,2,1,2,1,1,0,0,3,2,1,0,0,3,1,2,0,0,1,2,1,0,1,0,3,2,0,1,0,3,1,0,2,0,1,2,0,1,1,0,3,0,2,1,0,3,0,1,2,0,1,2,1,0,0,1,3,2,0,0,1,3,1,0,0,2,1,2,0,1,0,1,3,0,2,0,1,3,0,1,0,2,1,2,0,0,1,1,3,0,0,2,1,3,0,0,1,2,2,3,1,1,1,0,2,1,1,1,-1,2,2,0,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,2,0,0,0,2,3,1,0,1,1,2,1,-1,1,1,2,2,0,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,2,0,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,2,0,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,2,0,0,2,3,1,1,1,0,2,1,1,1,-1,2,0,0,2,0,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,2,0,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,2,0,2,3,1,1,0,1,2,1,1,-1,1,2,0,0,0,2,2,3,1,0,1,1,2,1,-1,1,1,2,0,0,0,2,2,3,0,1,1,1,2,-1,1,1,1,2,0,0,0,2,2,1,1,1,-1,0,1,1,1,0,-1,0,0,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,0,0,0,0,0,2,1,-1,1,1,0,1,0,1,1,-1,0,0,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,0,0,0,0,0,2,1,-1,1,0,1,1,0,1,-1,1,0,0,0,0,0,2,1,-1,0,1,1,1,0,-1,1,1,0,0,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,2,0,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,2,0,0,0,2,1,1,-1,0,1,1,1,0,-1,1,2,2,0,0,0,2,1,1,1,-1,0,1,1,1,0,-1,2,0,2,0,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,2,0,0,2,1,-1,1,0,1,1,0,1,-1,1,2,0,2,0,0,2,1,1,-1,1,0,1,1,0,1,-1,2,0,0,2,0,2,1,-1,1,1,0,1,0,1,1,-1,2,0,0,2,0,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,2,0,2,1,1,-1,0,1,1,1,0,-1,1,2,0,0,0,2,2,1,-1,1,0,1,1,0,1,-1,1,2,0,0,0,2,2,1,-1,0,1,1,1,0,-1,1,1,2,0,0,0,2,3,1,1,0,0,0,2,2,0,0,0,2,1,1,1,-1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,1,-1,3,1,0,0,1,0,2,0,0,2,0,2,1,1,1,-1,3,1,1,0,0,0,2,2,0,0,0,2,1,1,-1,1,3,1,0,1,0,0,2,0,2,0,0,2,1,1,-1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,1,-1,1,3,1,1,0,0,0,2,2,0,0,0,2,1,-1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,1,-1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,1,-1,1,1,3,1,0,1,0,0,2,0,2,0,0,2,-1,1,1,1,3,1,0,0,1,0,2,0,0,2,0,2,-1,1,1,1,3,1,0,0,0,1,2,0,0,0,2,2,-1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,4,1,1,1,1,3,3,2,0,1,0,3,1,0,2,0,4,1,1,1,1,3,3,0,2,1,0,3,0,1,2,0,4,1,1,1,1,3,3,2,0,0,1,3,1,0,0,2,4,1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,4,1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,4,1,1,1,1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,1,-1,3,3,2,0,1,0,3,1,0,2,0,2,1,1,1,-1,3,3,0,2,1,0,3,0,1,2,0,2,1,1,1,-1,3,3,2,1,0,0,3,1,2,0,0,2,1,1,-1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,1,-1,1,3,3,0,2,0,1,3,0,1,0,2,2,1,1,-1,1,3,3,2,0,1,0,3,1,0,2,0,2,1,-1,1,1,3,3,2,0,0,1,3,1,0,0,2,2,1,-1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,1,-1,1,1,3,3,0,2,1,0,3,0,1,2,0,2,-1,1,1,1,3,3,0,2,0,1,3,0,1,0,2,2,-1,1,1,1,3,3,0,0,2,1,3,0,0,1,2,2,-1,1,1,1]}noise(t,e,i,s){const{_perm:n,_perm4D:o,_lookup:a,_STRETCH_4D:r,_SQUISH_4D:c,_gradients4D:h,_NORM_4D:l}=this,d=(t+e+i+s)*r,u=t+d,p=e+d,g=i+d,f=s+d,y=Math.floor(u),v=Math.floor(p),w=Math.floor(g),m=Math.floor(f),_=(y+v+w+m)*c,b=t-(y+_),S=e-(v+_),x=i-(w+_),P=s-(m+_),C=u-y,O=p-v,k=g-w,T=f-m,V=C+O+k+T;let M=0;for(let t=a[k-T+1|O-k+1<<1|O-T+1<<2|C-O+1<<3|C-k+1<<4|C-T+1<<5|V<<6|V+T<<8|V+k<<11|V+O<<14|V+C<<17];void 0!==t;t=t.next){const e=b+t.dx,i=S+t.dy,s=x+t.dz,a=P+t.dw,r=2-e*e-i*i-s*s-a*a;if(r>0){const c=y+t.xsb,l=v+t.ysb,d=w+t.zsb,u=m+t.wsb,p=o[n[n[n[255&c]+l&255]+d&255]+u&255];M+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return M*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,n=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let o=null,a=null;for(let e=0;e<s.length;e+=5)a=this._contribution4D(s[e],s[e+1],s[e+2],s[e+3],s[e+4]),null===o?n[t/16]=a:o.next=a,o=a;a&&(a.next=this._contribution4D(e[t+1],e[t+2],e[t+3],e[t+4],e[t+5]),a.next.next=this._contribution4D(e[t+6],e[t+7],e[t+8],e[t+9],e[t+10]),a.next.next.next=this._contribution4D(e[t+11],e[t+12],e[t+13],e[t+14],e[t+15]))}this._lookup=[];for(let t=0;t<s.length;t+=2)this._lookup[s[t]]=n[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=lo(lo(lo(a)));for(let t=255;t>=0;t--){a=lo(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=o[e[0]],this._perm4D[t]=252&this._perm[t],o[e[0]]=o[t]}}_contribution4D(t,e,i,s,n){const{_SQUISH_4D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,dw:-n-t*o,xsb:e,ysb:i,zsb:s,wsb:n}}}class fo{constructor(){this.noise2d=new uo,this.noise3d=new po,this.noise4d=new go}}const yo={speed:.2,step:250};class vo{constructor(){const t=new fo;this._simplex=t.noise2d,this.options=Qe({},yo)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,n=e.x/s,o=e.y/s,a=.001,r=(this._simplex.noise(n,o+a)-this._simplex.noise(n,o-a))/.002,c=(this._simplex.noise(n+a,o)-this._simplex.noise(n-a,o))/.002;return t.velocity.x=0,t.velocity.y=0,Jt.create(i*r,i*-c)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.seed=e?.seed,this.options.speed=(e?.speed??yo.speed)*t.retina.pixelRatio,this.options.step=e?.step??yo.step,this._simplex.seed(this.options.seed??ie())}reset(){}update(){}}const wo="curlNoise";const mo=2*Math.PI;class _o{constructor(){this.options={rndFunc:null,period:100,nbHarmonics:2,attenHarmonics:.8,lowValue:-.03,highValue:.03}}generate(t){if(!t.pathGen){const e=this.options;t.pathGen=function(t,e,i,s,n=0,o=1){const a=[],r=[],c=[],h=[],l=[],d=t??ie;let u=0;i<1&&(i=1);for(let t=1;t<=i;++t)a[t]=d(),r[t]=d(),c[t]=1===t?1:c[t-1]*s,u+=c[t],h[t]=t/e,l[t]=d();return c.forEach(((t,e)=>c[e]=t/u*(o-n))),()=>{let t,e,s=0;for(let n=i;n>=1;--n)t=l[n]+=h[n],l[n]>=1&&(t=l[n]-=1,a[n]=r[n],r[n]=d()),e=t**2*(3-2*t),s+=(a[n]*(1-e)+r[n]*e)*c[n];return s+n}}(e.rndFunc,e.period,e.nbHarmonics,e.attenHarmonics,e.lowValue,e.highValue)}return t.curveVelocity?(t.curveVelocity.length+=.01,t.curveVelocity.angle=(t.curveVelocity.angle+t.pathGen())%mo):(t.curveVelocity=Jt.origin,t.curveVelocity.length=.6*ie()+.8,t.curveVelocity.angle=ie()*mo),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;Qt(e.rndFunc)?i.rndFunc=e.rndFunc:$t(e.rndFunc)&&(i.rndFunc=window[e.rndFunc]??this.options.rndFunc),i.period=e.period??i.period,i.nbHarmonics=e.nbHarmonics??i.nbHarmonics,i.attenHarmonics=e.attenHarmonics??i.attenHarmonics,i.lowValue=e.lowValue??i.lowValue,i.highValue=e.highValue??i.highValue}reset(t){delete t.pathGen,delete t.curveVelocity}update(){}}const bo="curvesPathGenerator";class So{constructor(){this.wait=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.duration&&(this.duration=ue(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class xo{constructor(){this.quantity=1,this.delay=.1}load(t){Xt(t)||(void 0!==t.quantity&&(this.quantity=ue(t.quantity)),void 0!==t.delay&&(this.delay=ue(t.delay)))}}class Po{constructor(){this.color=!1,this.opacity=!1}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Co{constructor(){this.options={},this.replace=new Po,this.type="square"}load(t){Xt(t)||(void 0!==t.options&&(this.options=Qe({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class Oo{constructor(){this.mode=Ve.percent,this.height=0,this.width=0}load(t){Xt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ko{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new So,this.rate=new xo,this.shape=new Co,this.startCount=0}load(t){Xt(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new Oo),this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=ei(t.particles,(t=>Qe({},t))),this.rate.load(t.rate),this.shape.load(t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=ue(t.position.x)),void 0!==t.position.y&&(this.position.y=ue(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new ks),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var To;!function(t){t.emitter="emitter"}(To||(To={}));function Vo(t,e){t.color?t.color.value=e:t.color={value:e}}class Mo{constructor(t,e,i,s,n){this.emitters=e,this.container=i,this._destroy=()=>{this._mutationObserver?.disconnect(),this._mutationObserver=void 0,this._resizeObserver?.disconnect(),this._resizeObserver=void 0,this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})},this._prepareToDie=()=>{if(this._paused)return;const t=void 0!==this.options.life?.duration?he(this.options.life.duration):void 0;(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*v)},this._setColorAnimation=(t,e,i,s=1)=>{const n=this.container;if(!t.enable)return e;const o=ce(t.offset),a=he(this.options.rate.delay),r=n.retina.reduceFactor?a*v/n.retina.reduceFactor:1/0;return(e+he(t.speed??0)*n.fpsLimit/r+o*s)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,s instanceof ko?this.options=s:(this.options=new ko,this.options.load(s)),this._spawnDelay=i.retina.reduceFactor?he(this.options.life.delay??0)*v/i.retina.reduceFactor:1/0,this.position=this._initialPosition??this._calcPosition(),this.name=this.options.name,this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let o=Qe({},this.options.particles);if(o??={},o.move??={},o.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=ki(this._engine,this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=o,this._size=this._calcSize(),this.size=ri(this._size,this.container.canvas.size),this._lifeCount=this.options.life.count??-1,this._immortal=this._lifeCount<=0,this.options.domId){const t=document.getElementById(this.options.domId);t&&(this._mutationObserver=new MutationObserver((()=>{this.resize()})),this._resizeObserver=new ResizeObserver((()=>{this.resize()})),this._mutationObserver.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this._resizeObserver.observe(t))}const a=this.options.shape,r=this._engine.emitterShapeManager?.getShapeGenerator(a.type);r&&(this._shape=r.generate(this.position,this.size,this.fill,a.options)),this._engine.dispatchEvent("emitterCreated",{container:i,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}async init(){await(this._shape?.init())}pause(){this._paused||delete this._emitDelay}play(){if(this._paused)return;if(!(this._lifeCount>0||this._immortal)&&this.options.life.count||!(this._firstSpawn||this._currentSpawnDelay>=(this._spawnDelay??0)))return;const t=this.container;if(void 0===this._emitDelay){const e=he(this.options.rate.delay);this._emitDelay=t.retina.reduceFactor?e*v/t.retina.reduceFactor:1/0}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}resize(){const t=this._initialPosition,e=this.container;this.position=t&&qe(t,e.canvas.size,Jt.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=ri(this._size,e.canvas.size),this._shape?.resize(this.position,this.size)}update(t){if(this._paused)return;const e=this.container;this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=this._spawnDelay??0,this._currentEmitDelay=this._emitDelay??0),this._startParticlesAdded||(this._startParticlesAdded=!0,this._emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this._calcPosition(),this._shape?.resize(this.position,this.size),this._spawnDelay=e.retina.reduceFactor?he(this.options.life.delay??0)*v/e.retina.reduceFactor:1/0):this._destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this._emit(),this._currentEmitDelay-=this._emitDelay))}_calcPosition(){const t=this.container;if(this.options.domId){const e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+.5*i.width)*s,y:(i.y+.5*i.height)*s}}}return be({size:t.canvas.size,position:this.options.position})}_calcSize(){const t=this.container;if(this.options.domId){const e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Ve.precise}}}return this.options.size??(()=>{const t=new Oo;return t.load({height:0,mode:Ve.percent,width:0}),t})()}_emit(){if(this._paused)return;const t=he(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=ii(this._particlesOptions),i=this.container.retina.reduceFactor;for(let s=0;s<t*i;s++){const t=Qe({},e);if(this.spawnColor){const e=this.options.spawnColor?.animation;if(e){const t={h:360,s:100,l:100},i=3.6;this.spawnColor.h=this._setColorAnimation(e.h,this.spawnColor.h,t.h,i),this.spawnColor.s=this._setColorAnimation(e.s,this.spawnColor.s,t.s),this.spawnColor.l=this._setColorAnimation(e.l,this.spawnColor.l,t.l)}Vo(t,this.spawnColor)}const i=this.options.shape;let s=this.position;if(this._shape){const e=this._shape.randomPosition();if(e){s=e.position;const n=i.replace;n.color&&e.color&&Vo(t,e.color),n.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class Eo{constructor(t,e){this.container=e,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]};e.getEmitter=t=>void 0===t||jt(t)?this.array[t??0]:this.array.find((e=>e.name===t)),e.addEmitter=async(t,e)=>this.addEmitter(t,e),e.removeEmitter=t=>{const i=e.getEmitter(t);i&&this.removeEmitter(i)},e.playEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPlay()},e.pauseEmitter=t=>{const i=e.getEmitter(t);i&&i.externalPause()}}async addEmitter(t,e){const i=new ko;i.load(t);const s=new Mo(this._engine,this,this.container,i,e);return await s.init(),this.array.push(s),s}handleClickMode(t){const e=this.emitters,i=this.interactivityEmitters;if(t!==To.emitter)return;let s;if(i&&Zt(i.value)){const t=0;if(i.value.length>t&&i.random.enable){s=[];const t=[];for(let e=0;e<i.random.count;e++){const n=Ne(i.value);t.includes(n)&&t.length<i.value.length?e--:(t.push(n),s.push(Ue(i.value,n)))}}else s=i.value}else s=i?.value;const n=s??e,o=this.container.interactivity.mouse.clickPosition;ei(n,(async t=>{await this.addEmitter(t,o)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(Zt(this.emitters))for(const t of this.emitters)await this.addEmitter(t);else await this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}update(t){for(const e of this.array)e.update(t)}}class Ao{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return Promise.resolve(new Eo(this._engine,t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=ei(e.emitters,(t=>{const e=new ko;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(Zt(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new ko;return e.load(t),e}))};else{const e=i;if(void 0!==e.value){const i=1;if(Zt(e.value))t.interactivity.modes.emitters={random:{count:e.random.count??i,enable:e.random.enable??!1},value:e.value.map((t=>{const e=new ko;return e.load(t),e}))};else{const s=new ko;s.load(e.value),t.interactivity.modes.emitters={random:{count:e.random.count??i,enable:e.random.enable??!1},value:s}}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new ko}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return Zt(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&Fe(To.emitter,t.interactivity.events.onClick.mode)}}const zo=new Map;class Ro{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||zo.set(t,e)}getShapeGenerator(t){return zo.get(t)}getSupportedShapeGenerators(){return zo.keys()}}class Go{constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}const Io=0,Do=0;function Lo(t,e,i,s=!0){const n=t.getImageData(Io,Do,e.width,e.height).data;s&&t.clearRect(Io,Do,e.width,e.height);const o=[];for(let t=0;t<n.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};o[a.y]||(o[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;o[a.y][a.x]={r:n[t+r.r],g:n[t+r.g],b:n[t+r.b],a:n[t+r.a]/c}}return{pixels:o,width:Math.min(...o.map((t=>t.length))),height:o.length}}class Ho extends Go{constructor(t,e,i,s){super(t,e,i,s);const n=s.filter;let o=t=>t.a>0;if(void 0!==n)if($t(n)){if(Object.hasOwn(window,n)){const t=window[n];Qt(t)&&(o=t)}}else o=n;this.filter=o,this.scale=s.scale,this.pixelData={pixels:[],height:0,width:0}}async init(){let t;const e=this.options,i=e.selector,s=e.pixels,n=e.image,o=e.element,a=e.text,r=s.offset;if(n){const e=n.src;if(!e)return;t=await function(t,e){const i=new Image;i.crossOrigin="Anonymous";const s=new Promise(((t,s)=>{i.onerror=s,i.onload=()=>{const n=document.createElement("canvas");n.width=i.width,n.height=i.height;const o=n.getContext("2d");if(!o)return s(new Error(`${g} Could not get canvas context`));o.drawImage(i,Io,Do,i.width,i.height,Io,Do,n.width,n.height),t(Lo(o,n,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),n=s.getContext("2d"),{font:o,text:a,lines:r,color:c}=t;if(!a||!n)return;const h=a.split(r.separator),l=jt(o.size)?`${o.size}px`:o.size,d=[];let u=0,p=0;for(const t of h){n.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${l} ${o.family}`;const e=n.measureText(t),i={measure:e,text:t,height:e.actualBoundingBoxAscent+e.actualBoundingBoxDescent,width:e.width};u=Math.max(u||0,i.width),p+=i.height+r.spacing,d.push(i)}s.width=u,s.height=p;let g=0;for(const t of d)n.font=`${o.style||""} ${o.variant||""} ${o.weight||""} ${l} ${o.family}`,i?(n.fillStyle=c,n.fillText(t.text,Io,g+t.measure.actualBoundingBoxAscent)):(n.strokeStyle=c,n.strokeText(t.text,Io,g+t.measure.actualBoundingBoxAscent)),g+=t.height+r.spacing;return Lo(n,s,e)}(a,r,this.fill);if(Xt(e))return;t=e}else if(o??i){const e=o??(i&&document.querySelector(i));if(!e)return;const s=e.getContext("2d");if(!s)return;t=Lo(s,e,r)}t&&(this.pixelData=t)}randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,n=this.scale,o=s.x-e*n*.5,a=s.y-t*n*.5;for(let s=0;s<100;s++){const s=Math.floor(ie()*e*t),r={x:s%e,y:Math.floor(s/e)},c=i.pixels[r.y][r.x];if(this.filter(c))return{position:{x:r.x*n+o,y:r.y*n+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class Fo{constructor(){this.offset=4}load(t){Xt(t)||void 0!==t.offset&&(this.offset=t.offset)}}class Bo{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){Xt(t)||(void 0!==t.family&&(this.family=t.family),void 0!==t.size&&(this.size=t.size),void 0!==t.style&&(this.style=t.style),void 0!==t.variant&&(this.variant=t.variant),void 0!==t.weight&&(this.weight=t.weight))}}class No{constructor(){this.separator="\n",this.spacing=0}load(t){Xt(t)||(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Uo{constructor(){this.color="#000000",this.font=new Bo,this.lines=new No,this.text=""}load(t){Xt(t)||(void 0!==t.color&&(this.color=t.color),this.font.load(t.font),this.lines.load(t.lines),void 0!==t.text&&(this.text=t.text))}}class qo{constructor(){this.filter=t=>t.a>0,this.pixels=new Fo,this.scale=1,this.selector="",this.text=new Uo}load(t){Xt(t)||(void 0!==t.element&&(this.element=t.element),void 0!==t.filter&&(this.filter=t.filter),this.pixels.load(t.pixels),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.selector&&(this.selector=t.selector),void 0!==t.image&&(this.image=t.image),this.text.load(t.text))}}class $o{generate(t,e,i,s){const n=new qo;return n.load(s),new Ho(t,e,i,n)}}const jo=.5;const Qo=.5;class Wo extends Go{constructor(t,e,i,s){super(t,e,i,s);const n=document.createElement("canvas").getContext("2d");if(!n)throw new Error(`${g} No 2d context available`);this.checkContext=n,this.points=s.points;const o=this.points,a=new Path2D,r=t.x-e.width*Qo,c=t.y-e.height*Qo;for(const[t,i]of o.entries()){const s={x:r+i.x*e.width/f,y:c+i.y*e.height/f};t?a.lineTo(s.x,s.y):a.moveTo(s.x,s.y)}const h=o[0];if(h){const t={x:r+h.x*e.width/f,y:c+h.y*e.height/f};a.lineTo(t.x,t.y)}this.path=a}async init(){}randomPosition(){const t=this.checkContext,e=this.position,i=this.size,s=this.fill,n=this.path,o=s?function(t,e,i,s){let n=null;for(let o=0;o<100;o++){const o={x:i.x+ie()*s.width-s.width*jo,y:i.y+ie()*s.height-s.height*jo};if(t.isPointInPath(e,o.x,o.y)){n=o;break}}return n}(t,n,e,i):function(t,e,i,s){let n=null;for(let o=0;o<100;o++){const o={x:i.x+ie()*s.width-s.width*jo,y:i.y+ie()*s.height-s.height*jo};if(t.isPointInStroke(e,o.x,o.y)){n=o;break}}return n}(t,n,e,i);return o?{position:o}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,n=t.x-e.width*Qo,o=t.y-e.height*Qo;for(const[t,a]of i.entries()){const i={x:n+a.x*e.width/f,y:o+a.y*e.height/f};t?s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)}const a=i[0];if(a){const t={x:n+a.x*e.width/f,y:o+a.y*e.height/f};s.lineTo(t.x,t.y)}this.path=s}}const Zo=50,Xo=50;class Yo{constructor(){this.points=[]}load(t){Xt(t)||void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??Zo,y:t.y??Xo}))))}}class Jo{generate(t,e,i,s){const n=new Yo;return n.load(s),new Wo(t,e,i,n)}}const Ko=2*Math.PI;function ta(t,e,i,s=0){const n=[],o=Ko/e;for(let a=0;a<e;a++){const e=o*a+s;n.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return n}function ea(t,e){let i=!1;for(let s=0,n=e.length-1;s<e.length;n=s++){const o=e[s],a=e[n];o.y>t.y!=a.y>t.y&&t.x<(a.x-o.x)*(t.y-o.y)/(a.y-o.y)+o.x&&(i=!i)}return i}class ia extends Go{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=fe(s.angle),this.polygon=ta(t,this.sides,.5*e.width,this.angle)}async init(){}randomPosition(){const t=this.fill,e=this.polygon,i=t?function(t){const e=t[0],i={...e},s={...e};for(const e of t)e.x<i.x&&(i.x=e.x),e.x>s.x&&(s.x=e.x),e.y<i.y&&(i.y=e.y),e.y>s.y&&(s.y=e.y);let n=null;for(let e=0;e<100;e++){const e={x:i.x+ie()*(s.x-i.x),y:i.y+ie()*(s.y-i.y)};if(ea(e,t)){n=e;break}}return n}(e):function(t){const e=Math.floor(ie()*t.length),i=t[e],s=t[(e+1)%t.length],n=ie();return{x:i.x+(s.x-i.x)*n,y:i.y+(s.y-i.y)*n}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=ta(t,this.sides,.5*e.width,this.angle)}}class sa{constructor(){this.angle=0,this.sides=5}load(t){Xt(t)||(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class na{generate(t,e,i,s){const n=new sa;return n.load(s),new ia(t,e,i,n)}}class oa{constructor(t,e){this._exportImage=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{e.toBlob((t=>{i(t||void 0)}),t.type??"image/png",t.quality)}))},this._container=t,this._engine=e}async export(t,e){const i={supported:!1};if("image"===t)i.supported=!0,i.blob=await this._exportImage(e);return i}}class aa{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return Promise.resolve(new oa(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class ra{constructor(t,e){this._exportJSON=async()=>{const t=JSON.stringify(this._container.actualOptions,((t,e)=>{if(!t.startsWith("_"))return e}),2);return Promise.resolve(new Blob([t],{type:"application/json"}))},this._container=t,this._engine=e}async export(t){const e={supported:!1};if("json"===t)e.supported=!0,e.blob=await this._exportJSON();return e}}class ca{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return Promise.resolve(new ra(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}const ha=["webm","ogg","mp4","x-matroska"],la=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class da{constructor(t,e){this._supportedTypes=[],this._exportVideo=async t=>{const e=this._container.canvas.element;if(e)return new Promise((i=>{const s=e.captureStream(t.fps??this._container.actualOptions.fpsLimit),n=t.mimeType??this._supportedTypes[0],o=new MediaRecorder(s,{mimeType:n}),a=[];o.addEventListener("dataavailable",(t=>{a.push(t.data)})),o.addEventListener("stop",(()=>{i(new Blob(a,{type:n}))})),o.start(),setTimeout((()=>{o.stop()}),t.duration??5*v)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=t=>MediaRecorder.isTypeSupported(t),e=[];return ha.forEach((i=>{const s=`video/${i}`;la.forEach((i=>[`${s};codecs=${i}`,`${s};codecs=${i.toUpperCase()}`].forEach((i=>{t(i)&&e.push(i)})))),t(s)&&e.push(s)})),e}()}async export(t,e){const i={supported:!1};if("video"===t)i.supported=!0,i.blob=await this._exportVideo(e);return i}}class ua{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return Promise.resolve(new da(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class pa{constructor(){this.replaceCursor=!1,this.pauseOnStop=!1,this.stopDelay=0}load(t){Xt(t)||(void 0!==t.options&&(this.options=Qe({},t.options)),void 0!==t.replaceCursor&&(this.replaceCursor=t.replaceCursor),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop),void 0!==t.stopDelay&&(this.stopDelay=t.stopDelay))}}const ga="particle";class fa extends On{constructor(t){super(t)}clear(){}init(){}interact(){const t=this.container,{interactivity:e}=t,i=t.actualOptions;if(!t.retina.reduceFactor)return;const s=e.mouse.position,n=i.interactivity.modes.particle;if(!n)return;const o=n.pauseOnStop&&(e.mouse.position===this._lastPosition||e.mouse.position?.x===this._lastPosition?.x&&e.mouse.position?.y===this._lastPosition?.y),a=n.stopDelay;if(s?this._lastPosition={...s}:delete this._lastPosition,this._lastPosition)if(o){if(this._clearTimeout)return;this._clearTimeout=setTimeout((()=>{if(this._particle){if(n.replaceCursor){const t=e.element;t&&(t instanceof Window?document.body.style.cursor="":t.style.cursor="")}this.container.particles.remove(this._particle,void 0,!0),delete this._particle}}),a)}else{if(this._clearTimeout&&(clearTimeout(this._clearTimeout),delete this._clearTimeout),!this._particle){const i=Qe(n.options,{move:{enable:!1}});if(this._particle=t.particles.addParticle(this._lastPosition,i),n.replaceCursor){const t=e.element;t&&(t instanceof Window?document.body.style.cursor="none":t.style.cursor="none")}}this._particle&&(this._particle.position.x=this._lastPosition.x,this._particle.position.y=this._lastPosition.y)}}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&Fe(ga,n.onClick.mode)||s.inside&&!!s.position&&Fe(ga,n.onHover.mode)}loadModeOptions(t,...e){t.particle||(t.particle=new pa);for(const i of e)t.particle.load(i?.particle)}reset(){}}class ya extends On{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container;if("pop"!==t)return;const i=e.interactivity.mouse.clickPosition;if(!i)return;const s=e.particles.quadTree.queryCircle(i,e.retina.pixelRatio);if(s.length)for(const t of s)e.particles.remove(t)}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}const va=(t,e,i)=>t+i*(e-t),wa=t=>t*t*(3-2*t),ma=t=>t-Math.floor(t);class _a{constructor(){this._coeffW=29.537,this._coeffX=127.1,this._coeffY=311.7,this._coeffZ=78.233,this._coeffZW=37.719,this._scaleFactor=43758.5453}noise2d(t,e){const i=Math.floor(t),s=Math.floor(e),n=i+1,o=s+1,a=wa(t-i),r=wa(e-s),c=this._valueNoise2D(i,s),h=this._valueNoise2D(n,s),l=this._valueNoise2D(i,o),d=this._valueNoise2D(n,o),u=va(c,h,a),p=va(l,d,a);return va(u,p,r)}noise3d(t,e,i){const s=Math.floor(t),n=Math.floor(e),o=Math.floor(i),a=s+1,r=n+1,c=o+1,h=wa(t-s),l=wa(e-n),d=wa(i-o),u=this._valueNoise3D(s,n,o),p=this._valueNoise3D(a,n,o),g=this._valueNoise3D(s,r,o),f=this._valueNoise3D(a,r,o),y=this._valueNoise3D(s,n,c),v=this._valueNoise3D(a,n,c),w=this._valueNoise3D(s,r,c),m=this._valueNoise3D(a,r,c),_=va(u,p,h),b=va(g,f,h),S=va(y,v,h),x=va(w,m,h),P=va(_,b,l),C=va(S,x,l);return va(P,C,d)}noise4d(t,e,i,s){const n=Math.floor(t),o=Math.floor(e),a=Math.floor(i),r=Math.floor(s),c=n+1,h=o+1,l=a+1,d=r+1,u=wa(t-n),p=wa(e-o),g=wa(i-a),f=wa(s-r),y=this._valueNoise4D(n,o,a,r),v=this._valueNoise4D(c,o,a,r),w=this._valueNoise4D(n,h,a,r),m=this._valueNoise4D(c,h,a,r),_=this._valueNoise4D(n,o,l,r),b=this._valueNoise4D(c,o,l,r),S=this._valueNoise4D(n,h,l,r),x=this._valueNoise4D(c,h,l,r),P=this._valueNoise4D(n,o,a,d),C=this._valueNoise4D(c,o,a,d),O=this._valueNoise4D(n,h,a,d),k=this._valueNoise4D(c,h,a,d),T=this._valueNoise4D(n,o,l,d),V=this._valueNoise4D(c,o,l,d),M=this._valueNoise4D(n,h,l,d),E=this._valueNoise4D(c,h,l,d),A=va(y,v,u),z=va(w,m,u),R=va(_,b,u),G=va(S,x,u),I=va(P,C,u),D=va(O,k,u),L=va(T,V,u),H=va(M,E,u),F=va(A,z,p),B=va(R,G,p),N=va(I,D,p),U=va(L,H,p),q=va(F,B,g),$=va(N,U,g);return va(q,$,f)}seed(t){const e=1e4*Math.sin(t);this._coeffX=ma(15731*e),this._coeffY=ma(789221*e),this._coeffZ=ma(1376312589*e),this._coeffZW=ma(974634777*e),this._coeffW=ma(592558533*e),this._scaleFactor=43758.5453}_valueNoise2D(t,e){const i=Math.sin(t*this._coeffX+e*this._coeffY)*this._scaleFactor;return 2*(i-Math.floor(i))-1}_valueNoise3D(t,e,i){const s=Math.sin(t*this._coeffX+e*this._coeffY+i*this._coeffZ)*this._scaleFactor;return 2*(s-Math.floor(s))-1}_valueNoise4D(t,e,i,s){const n=Math.sin(t*this._coeffX+e*this._coeffY+i*this._coeffZW+s*this._coeffW)*this._scaleFactor;return 2*(n-Math.floor(n))-1}}class ba{constructor(){this._smoothValueNoise=new _a}noise2d(t,e,i=5,s=.5,n=2){let o=0,a=1,r=1,c=0;for(let h=0;h<i;h++)o+=this._smoothValueNoise.noise2d(t*a,e*a)*r,c+=r,r*=s,a*=n;return o/c}noise3d(t,e,i,s=5,n=.5,o=2){let a=0,r=1,c=1,h=0;for(let l=0;l<s;l++)a+=this._smoothValueNoise.noise3d(t*r,e*r,i*r)*c,h+=c,c*=n,r*=o;return a/h}noise4d(t,e,i,s,n=5,o=.5,a=2){let r=0,c=1,h=1,l=0;for(let d=0;d<n;d++)r+=this._smoothValueNoise.noise4d(t*c,e*c,i*c,s*c)*h,l+=h,h*=o,c*=a;return r/l}seed(t){this._smoothValueNoise.seed(t)}}const Sa={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class xa{constructor(){this._fractal=new ba,this.field=[],this.noiseW=0,this.options=Qe({},Sa)}generate(t){const e=t.getPosition(),i=Math.max(Math.floor(e.x/this.options.size),0),s=Math.max(Math.floor(e.y/this.options.size),0),n=Math.max(Math.floor(e.z/this.options.size),0),o=Jt.origin;return this.field?.[i]?.[s]?.[n]?(o.setTo(this.field[i][s][n]),o):o}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment)}_calculateField(){const t=this.options;for(let e=0;e<t.columns;e++)for(let i=0;i<t.rows;i++)for(let s=0;s<t.layers;s++)this.field[e][i][s].angle=this._fractal.noise4d(e/50,i/50,s/50,this.noiseW)*Math.PI*2,this.field[e][i][s].length=this._fractal.noise4d(e/100+t.offset.x,i/100+t.offset.y,s/100+t.offset.z,this.noiseW)}_initField(){this.field=new Array(this.options.columns);for(let t=0;t<this.options.columns;t++){this.field[t]=new Array(this.options.rows);for(let e=0;e<this.options.rows;e++){this.field[t][e]=new Array(this.options.layers);for(let i=0;i<this.options.layers;i++)this.field[t][e][i]=Jt.origin}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options;this.options.size=e.size>0?e.size:Sa.size,this.options.increment=e.increment>0?e.increment:Sa.increment,this.options.width=t.canvas.size.width,this.options.height=t.canvas.size.height;const i=e.offset;this.options.offset.x=i?.x??Sa.offset.x,this.options.offset.y=i?.y??Sa.offset.y,this.options.offset.z=i?.z??Sa.offset.z,this.options.seed=e.seed,this._fractal.seed(this.options.seed??ie()),this.options.columns=Math.floor(this.options.width/this.options.size)+1,this.options.rows=Math.floor(this.options.height/this.options.size)+1,this.options.layers=Math.floor(t.zLayers/this.options.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Pa="fractalNoise";class Ca{constructor(){this.radius=0,this.mass=0}load(t){Xt(t)||(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class Oa extends Ms{constructor(){super(),this.density=5,this.value=50,this.limit=new Ca}load(t){Xt(t)||(super.load(t),void 0!==t.density&&(this.density=t.density),jt(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class ka{constructor(){this.color=new as,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new Oa}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.draggable&&(this.draggable=t.draggable),this.name=t.name,void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=ue(t.position.x)),void 0!==t.position.y&&(this.position.y=ue(t.position.y))),void 0!==t.size&&this.size.load(t.size),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.orbits&&(this.orbits=t.orbits))}}var Ta;!function(t){t.absorber="absorber"}(Ta||(Ta={}));const Va=2*Math.PI;class Ma{constructor(t,e,i,s,n){this._calcPosition=()=>{const t=be({size:this._container.canvas.size,position:this.options.position});return Jt.create(t.x,t.y)},this._updateParticlePosition=(t,e)=>{if(t.destroyed)return;const i=this._container,s=i.canvas.size;if(t.needsNewPosition){const e=_e({size:s});t.position.setTo(e),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1}if(this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=Jt.origin,t.absorberOrbit.length=ge(t.getPosition(),this.position),t.absorberOrbit.angle=ie()*Va),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height),i=1,n=.1,o=.2;t.absorberOrbit.length=e*(i+(ie()*o-n))}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?Tn.clockwise:Tn.counterClockwise);const n=t.absorberOrbit.length,o=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(Jt.origin);const r={x:a===Tn.clockwise?Math.cos:Math.sin,y:a===Tn.clockwise?Math.sin:Math.cos};t.position.x=this.position.x+n*r.x(o),t.position.y=this.position.y+n*r.y(o),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/f*i.retina.reduceFactor}else{const i=Jt.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this._absorbers=t,this._container=e,this._engine=i,this.initialPosition=n?Jt.create(n.x,n.y):void 0,s instanceof ka?this.options=s:(this.options=new ka,this.options.load(s)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=he(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const o=this.options.size.limit;this.limit={radius:o.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:o.mass},this.color=Pi(this._engine,this.options.color)??{b:0,g:0,r:0},this.position=this.initialPosition?.copy()??this._calcPosition()}attract(t){const e=this._container,i=this.options;if(i.draggable){const t=e.interactivity.mouse;if(t.clicking&&t.downPosition){ge(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const s=t.getPosition(),{dx:n,dy:o,distance:a}=pe(this.position,s),r=Jt.create(n,o);if(r.length=this.mass/Math.pow(a,2)*e.retina.reduceFactor,a<this.size+t.getRadius()){const s=.033*t.getRadius()*e.retina.pixelRatio;this.size>t.getRadius()&&a<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?i.destroy?t.destroy():(t.needsNewPosition=!0,this._updateParticlePosition(t,r)):(i.destroy&&(t.size.value-=s),this._updateParticlePosition(t,r)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=s),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=s*this.options.size.density*e.retina.reduceFactor)}else this._updateParticlePosition(t,r)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(w.x,w.y,this.size,0,Va,!1),t.closePath(),t.fillStyle=Ri(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&qe(t,this._container.canvas.size,Jt.origin)?t:this._calcPosition()}}class Ea{constructor(t,e){this._container=t,this._engine=e,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||jt(t)?this.array[t??0]:this.array.find((e=>e.name===t)),t.addAbsorber=async(t,e)=>this.addAbsorber(t,e)}async addAbsorber(t,e){const i=new Ma(this,this._container,this._engine,t,e);return this.array.push(i),Promise.resolve(i)}draw(t){for(const e of this.array)e.draw(t)}handleClickMode(t){const e=this.absorbers,i=this.interactivityAbsorbers;if(t===Ta.absorber){const t=ii(i)??ii(e),s=this._container.interactivity.mouse.clickPosition;this.addAbsorber(t,s)}}async init(){this.absorbers=this._container.actualOptions.absorbers,this.interactivityAbsorbers=this._container.actualOptions.interactivity.modes.absorbers;const t=ei(this.absorbers,(async t=>{await this.addAbsorber(t)}));t instanceof Array?await Promise.all(t):await t}particleUpdate(t){for(const e of this.array)if(e.attract(t),t.destroyed)break}removeAbsorber(t){const e=this.array.indexOf(t);e>=0&&this.array.splice(e,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}}class Aa{constructor(t){this.id="absorbers",this._engine=t}async getPlugin(t){return Promise.resolve(new Ea(t,this._engine))}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=ei(e.absorbers,(t=>{const e=new ka;return e.load(t),e}))),t.interactivity.modes.absorbers=ei(e?.interactivity?.modes?.absorbers,(t=>{const e=new ka;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return Zt(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!Fe(Ta.absorber,t.interactivity.events.onClick.mode))}}class za{load(t){Xt(t)||(void 0!==t.bottom&&(this.bottom=ue(t.bottom)),void 0!==t.left&&(this.left=ue(t.left)),void 0!==t.right&&(this.right=ue(t.right)),void 0!==t.top&&(this.top=ue(t.top)))}}var Ra;!function(t){t.none="none",t.split="split"}(Ra||(Ra={}));class Ga extends Ms{constructor(){super(),this.value=3}}class Ia extends Ms{constructor(){super(),this.value={min:4,max:9}}}class Da{constructor(){this.count=1,this.factor=new Ga,this.rate=new Ia,this.sizeOffset=!0}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=ei(t.particles,(t=>Qe({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset),t.colorOffset&&(this.colorOffset=this.colorOffset??{},void 0!==t.colorOffset.h&&(this.colorOffset.h=t.colorOffset.h),void 0!==t.colorOffset.s&&(this.colorOffset.s=t.colorOffset.s),void 0!==t.colorOffset.l&&(this.colorOffset.l=t.colorOffset.l)))}}class La{constructor(){this.bounds=new za,this.mode=Ra.none,this.split=new Da}load(t){Xt(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}function Ha(t,e,i,s){const n=i.options.destroy;if(!n)return;const o=n.split,a=rn(t,e,i.options),r=he(o.factor.value),c=i.getFillColor();o.color?a.color.load(o.color):o.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+he(o.colorOffset.h??0),s:c.s+he(o.colorOffset.s??0),l:c.l+he(o.colorOffset.l??0)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:Ve.precise}}),jt(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=o.sizeOffset?ue(-i.size.value,i.size.value):0,l={x:i.position.x+ce(h),y:i.position.y+ce(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<.5)&&(t.velocity.length=ce(ue(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),500),!0)))}class Fa{constructor(t,e){this.container=e,this.engine=t}init(t){const e=this.container,i=t.options.destroy;if(!i)return;t.splitCount=0;const s=i.bounds;t.destroyBounds||(t.destroyBounds={});const{bottom:n,left:o,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;n&&(c.bottom=he(n)*h.height/f),o&&(c.left=he(o)*h.width/f),a&&(c.right=he(a)*h.width/f),r&&(c.top=he(r)*h.height/f)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new La);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&i.mode===Ra.split&&function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0&&(void 0===i.splitCount||i.splitCount++>n.count))return;const o=he(n.rate.value),a=ii(n.particles);for(let s=0;s<o;s++)Ha(t,e,i,a)}(this.engine,this.container,t)}update(t){if(!this.isEnabled(t))return;const e=t.getPosition(),i=t.destroyBounds;i&&(void 0!==i.bottom&&e.y>=i.bottom||void 0!==i.left&&e.x<=i.left||void 0!==i.right&&e.x>=i.right||void 0!==i.top&&e.y<=i.top)&&t.destroy()}}const Ba=.25,Na=2*Math.PI;class Ua extends Go{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[.5*t.width,.5*t.height],o=((t,e)=>{const i=ie()*Ba,s=Math.atan(e/t*Math.tan(Na*i)),n=ie();return n<Ba?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),a=(l=o,(c=s)*(h=n)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(ie()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(o),y:i.y+r*Math.sin(o)}}}}class qa{generate(t,e,i,s){return new Ua(t,e,i,s)}}var $a;function ja(t,e){return t+e*(ie()-y)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}($a||($a={}));class Qa extends Go{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:ja(e.x,i.width),y:ja(e.y,i.height)}};{const t=i.width*y,s=i.height*y,n=Math.floor(4*ie()),o=(ie()-y)*S;switch(n){case $a.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case $a.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case $a.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case $a.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class Wa{generate(t,e,i,s){return new Qa(t,e,i,s)}}class Za{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){Xt(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=Qe({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const Xa="trail";class Ya extends On{constructor(t){super(t),this._delay=0}clear(){}init(){}interact(t){const e=this.container,{interactivity:i}=e;if(!e.retina.reduceFactor)return;const s=e.actualOptions.interactivity.modes.trail;if(!s)return;const n=s.delay*v/this.container.retina.reduceFactor;if(this._delay<n&&(this._delay+=t.value),this._delay<n)return;const o=!(s.pauseOnStop&&(i.mouse.position===this._lastPosition||i.mouse.position?.x===this._lastPosition?.x&&i.mouse.position?.y===this._lastPosition?.y)),a=e.interactivity.mouse.position;a?this._lastPosition={...a}:delete this._lastPosition,o&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=n}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&Fe(Xa,n.onClick.mode)||s.inside&&!!s.position&&Fe(Xa,n.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new Za);for(const i of e)t.trail.load(i?.trail)}reset(){}}var Ja;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(Ja||(Ja={}));const Ka=2*Math.PI;class tr{constructor(){this.enable=!1,this.value=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=ue(t.value)))}}class er{constructor(){this.darken=new tr,this.enable=!1,this.enlighten=new tr,this.mode=Ja.vertical,this.speed=25}load(t){Xt(t)||(void 0!==t.backColor&&(this.backColor=as.create(this.backColor,t.backColor)),this.darken.load(t.darken),void 0!==t.enable&&(this.enable=t.enable),this.enlighten.load(t.enlighten),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.speed&&(this.speed=ue(t.speed)))}}class ir{constructor(t){this._engine=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t,e){const i=e.options.roll;if(i?.enable)if(e.roll={enable:i.enable,horizontal:i.mode===Ja.horizontal||i.mode===Ja.both,vertical:i.mode===Ja.vertical||i.mode===Ja.both,angle:ie()*Ka,speed:he(i.speed)/360},i.backColor)e.backColor=ki(t,i.backColor);else if(i.darken.enable&&i.enlighten.enable){const t=ie()>=y?di.darken:di.enlighten;e.roll.alter={type:t,value:he(t===di.darken?i.darken.value:i.enlighten.value)}}else i.darken.enable?e.roll.alter={type:di.darken,value:he(i.darken.value)}:i.enlighten.enable&&(e.roll.alter={type:di.enlighten,value:he(i.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._engine,t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new er);for(const i of e)t.roll.load(i?.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,o=Ka;s.angle+=n,s.angle>o&&(s.angle-=o)}(t,e)}}const sr=2*Math.PI;function nr(t,e,i,s,n,o,a){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const n=t.pathGenerator?.generate(t,e);n&&t.velocity.addTo(n);s.clamp&&(t.velocity.x=ae(t.velocity.x,-1,1),t.velocity.y=ae(t.velocity.y,-1,1));t.lastPathTime-=t.pathDelay}(t,a);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*a.factor)/(60*i));const h=t.moveDecay;t.velocity.multTo(h);const l=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&l.y>=0&&l.y>=s||r.inverse&&l.y<=0&&l.y<=-s)&&(l.y=c*s,i&&(t.velocity.y=l.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;l.multTo(u),l.multTo(o);const{position:p}=t;p.addTo(l),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}class or{init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:he(e.acceleration),inverse:e.inverse},function(t){const e=t.container,i=t.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=ge(t.getPosition(),n),a=he(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:n,direction:t.velocity.x>=0?Tn.clockwise:Tn.counterClockwise,angle:ie()*sr,radius:o,acceleration:t.retina.spinAcceleration}}(t)}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){const i=t.options,s=i.move;if(!s.enable)return;const n=t.container,o=n.retina.pixelRatio;t.retina.moveSpeed??=he(s.speed)*o,t.retina.moveDrift??=he(t.options.move.drift)*o;const a=function(t){return t.slow.inRange?t.slow.factor:1}(t),r=n.retina.reduceFactor,c=t.retina.moveSpeed,h=t.retina.moveDrift,l=de(i.size.value)*o,d=c*(s.size?t.getRadius()/l:1)*a*(e.factor||1)/2,u=t.retina.maxSpeed??n.retina.maxSpeed;s.spin.enable?function(t,e,i){const s=t.container;if(!t.spin)return;const n=t.spin.direction===Tn.clockwise,o={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*o.x(t.spin.angle)*i,t.position.y=t.spin.center.y+t.spin.radius*o.y(t.spin.angle)*i,t.spin.radius+=t.spin.acceleration*i;const a=Math.max(s.canvas.size.width,s.canvas.size.height),r=.5*a;t.spin.radius>r?(t.spin.radius=r,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=.01*e*(1-t.spin.radius/a)}(t,d,r):nr(t,s,d,u,h,r,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=pe(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(!r&&!c)return;if((r&&n>=r||c&&o>=c)&&!t.misplaced)t.misplaced=!!r&&n>r||!!c&&o>c,r&&(t.velocity.x=.5*t.velocity.y-t.velocity.x),c&&(t.velocity.y=.5*t.velocity.x-t.velocity.y);else if((!r||n<r)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;r&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-ie()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-ie())}}(t)}}const ar=2*Math.PI,rr=0,cr=0;class hr{constructor(){this.validTypes=["circle"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:ar});const n=i.circleRange;e.arc(rr,cr,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=Wt(s)?{min:fe(s.min),max:fe(s.max)}:{min:0,max:fe(s)}}}class lr{constructor(t,e){this._container=t,this._engine=e}init(t){const e=ki(this._engine,t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=Fi(e,t.options.color.animation,this._container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:n}=t;return!t.destroyed&&!t.spawning&&(void 0!==n?.h.value&&e.enable||void 0!==n?.s.value&&i.enable||void 0!==n?.l.value&&s.enable)}update(t,e){Ui(t.color,e)}}var dr;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(dr||(dr={}));const ur=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,pr=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class gr{constructor(){this.key="hex",this.stringPrefix="#"}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t)return;if(!t?.startsWith(this.stringPrefix))return;const e=t.replace(ur,((t,e,i,s,n)=>e+e+i+i+s+s+(void 0!==n?n+n:""))),i=pr.exec(e);return i?{a:void 0!==i[dr.a]?parseInt(i[dr.a],16)/255:1,b:parseInt(i[dr.b],16),g:parseInt(i[dr.g],16),r:parseInt(i[dr.r],16)}:void 0}}var fr;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(fr||(fr={}));class yr{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return Ei(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return Ei({h:he(e.h),l:he(e.l),s:he(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?Ai({a:e.length>4?Pe(e[fr.a]):1,h:parseInt(e[fr.h],10),l:parseInt(e[fr.l],10),s:parseInt(e[fr.s],10)}):void 0}}class vr{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=ni(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=he(i.speed)/f*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=ie()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&ci(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}class wr{constructor(t){this.container=t,this.modes=[wi.bounce,wi.split]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let o=!1;for(const s of n.plugins.values())if(void 0!==s.particleBounce&&(o=s.particleBounce(t,i,e)),o)break;if(o)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=je(a,c),l=n.canvas.size;!function(t){if(t.outMode!==wi.bounce&&t.outMode!==wi.split||t.direction!==Te.left&&t.direction!==Te.right)return;t.bounds.right<0&&t.direction===Te.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Te.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===Te.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===Te.left&&t.bounds.left<=0&&e<0){const e=he(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===Te.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===Te.left&&(t.particle.position.x=s),t.outMode===wi.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if(t.outMode!==wi.bounce&&t.outMode!==wi.split||t.direction!==Te.bottom&&t.direction!==Te.top)return;t.bounds.bottom<0&&t.direction===Te.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Te.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===Te.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===Te.top&&t.bounds.top<=0&&e<0){const e=he(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===Te.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===Te.top&&(t.particle.position.y=s),t.outMode===wi.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class mr{constructor(t){this.container=t,this.modes=[wi.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case bi.normal:case bi.outside:if(qe(t.position,n.canvas.size,Jt.origin,t.getRadius(),e))return;break;case bi.inside:{const{dx:e,dy:i}=pe(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}n.particles.remove(t,t.group,!0)}}class _r{constructor(t){this.container=t,this.modes=[wi.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Te.left||e===Te.right))??(t.options.move.distance.vertical&&(e===Te.top||e===Te.bottom)))return;const n=t.options.move.gravity,o=this.container,a=o.canvas.size,r=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>a.height+r&&e===Te.bottom||n.inverse&&i.y<-r&&e===Te.top)&&o.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=a.height+r||t.velocity.y<0&&t.position.y>=-r||t.velocity.x>0&&t.position.x<=a.width+r||t.velocity.x<0&&t.position.x>=-r)return;qe(t.position,o.canvas.size,Jt.origin,r,e)||o.particles.remove(t)}}}class br{constructor(t){this.container=t,this.modes=[wi.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case bi.inside:{const{x:e,y:i}=t.velocity,s=Jt.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(Jt.create(t.moveCenter));const{dx:o,dy:a}=pe(t.position,s);if(e<=0&&o>=0||i<=0&&a>=0||e>=0&&o<=0||i>=0&&a<=0)return;t.position.x=Math.floor(ce({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(ce({min:0,max:n.canvas.size.height}));const{dx:r,dy:c}=pe(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(qe(t.position,n.canvas.size,Jt.origin,t.getRadius(),e))return;switch(t.outType){case bi.outside:{t.position.x=Math.floor(ce({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(ce({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=pe(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case bi.normal:{const i=t.options.move.warp,s=n.canvas.size,o={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),r=je(t.position,a);e===Te.right&&r.left>s.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,i||(t.position.y=ie()*s.height,t.initialPosition.y=t.position.y)):e===Te.left&&r.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,i||(t.position.y=ie()*s.height,t.initialPosition.y=t.position.y)),e===Te.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=ie()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y):e===Te.top&&r.bottom<-t.offset.y&&(i||(t.position.x=ie()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y);break}}}}}class Sr{constructor(t){this._addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))},this._updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)},this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,wi.bounce,(t=>new wr(t))),this._addUpdaterIfMissing(t,wi.out,(t=>new br(t))),this._addUpdaterIfMissing(t,wi.destroy,(t=>new mr(t))),this._addUpdaterIfMissing(t,wi.none,(t=>new _r(t)))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,Te.bottom),this._updateOutMode(t,e,i.left??i.default,Te.left),this._updateOutMode(t,e,i.right??i.default,Te.right),this._updateOutMode(t,e,i.top??i.default,Te.top)}}var xr;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(xr||(xr={}));class Pr{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return{r:he(e.r),g:he(e.g),b:he(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?{a:e.length>4?Pe(e[xr.a]):1,b:parseInt(e[xr.b],10),g:parseInt(e[xr.g],10),r:parseInt(e[xr.r],10)}:void 0}}class Cr{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/f*e.retina.reduceFactor,i.sync||(t.size.velocity*=ie()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.loops=0}update(t,e){this.isEnabled(t)&&ci(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Or(t,e=!0){t.checkVersion("3.9.1"),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new gr,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new yr,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new Pr,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addMover("base",(()=>Promise.resolve(new or)),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new hr,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("color",(e=>Promise.resolve(new lr(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("opacity",(t=>Promise.resolve(new vr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("outModes",(t=>Promise.resolve(new Sr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("size",(()=>Promise.resolve(new Cr)),e)}(t,!1),await t.refresh(e)}const kr='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';class Tr{constructor(){this.validTypes=["emoji"],this._emojiShapeDict=new Map}destroy(){for(const[t,e]of this._emojiShapeDict)e instanceof ImageBitmap&&e?.close(),this._emojiShapeDict.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this._emojiShapeDict.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha;if(!e)return;const o=e.width,a=.5*o;i.globalAlpha=s,i.drawImage(e,-a,-a,o,o),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(!i.find((t=>Fe(t,e.particles.shape.type))))return;const s=[Be(kr)],n=i.map((t=>e.particles.shape.options[t])).find((t=>!!t));n&&ei(n,(t=>{t.font&&s.push(Be(t.font))})),await Promise.all(s)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i?.value)return;const s=ii(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??kr,padding:i.padding??0,value:s}:{font:kr,padding:0,...i,...s},o=n.font,a=n.value,r=`${a}_${o}`;if(this._emojiShapeDict.has(r))return void(e.emojiDataKey=r);const c=2*n.padding,h=de(e.size.value),l=h+c,d=2*l;let u;if("undefined"!=typeof OffscreenCanvas){const t=new OffscreenCanvas(d,d),e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(a,l,l),u=t.transferToImageBitmap()}else{const t=document.createElement("canvas");t.width=d,t.height=d;const e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(a,l,l),u=t}this._emojiShapeDict.set(r,u),e.emojiDataKey=r}}function Vr(t,e,i,s,n,o){const a=e.actualOptions.interactivity.modes.attract;if(!a)return;const r=e.particles.quadTree.query(n,o);for(const e of r){const{dx:n,dy:o,distance:r}=pe(e.position,i),c=a.speed*a.factor,h=ae(t.getEasing(a.easing)(1-r/s)*c,1,a.maxSpeed),l=Jt.create(r?n/r*h:c,r?o/r*h:c);e.position.subFrom(l)}}class Mr{constructor(){this.distance=200,this.duration=.4,this.easing=Mn.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed))}}const Er="attract";class Ar extends On{constructor(t,e){super(e),this._engine=t,e.attract||(e.attract={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&t===Er){e.attract||(e.attract={particles:[]}),e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout((()=>{e.destroyed||(e.attract||(e.attract={particles:[]}),e.attract.clicking=!1)}),i.duration*v)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.attract;e&&(t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,{enable:n,mode:o}=s.onHover,{enable:a,mode:c}=s.onClick;i&&n&&Fe(Er,o)?function(t,e,i){const s=e.interactivity.mouse.position,n=e.retina.attractModeDistance;!n||n<0||!s||Vr(t,e,s,n,new gn(s.x,s.y,n),(t=>i(t)))}(this._engine,this.container,(t=>this.isEnabled(t))):a&&Fe(Er,c)&&function(t,e,i){e.attract||(e.attract={particles:[]});const{attract:s}=e;if(s.finish||(s.count||(s.count=0),s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const s=e.interactivity.mouse.clickPosition,n=e.retina.attractModeDistance;if(!n||n<0||!s)return;Vr(t,e,s,n,new gn(s.x,s.y,n),(t=>i(t)))}else!1===s.clicking&&(s.particles=[])}(this._engine,this.container,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events;if(!(s.position&&n.onHover.enable||s.clickPosition&&n.onClick.enable))return!1;const o=n.onHover.mode,a=n.onClick.mode;return Fe(Er,o)||Fe(Er,a)}loadModeOptions(t,...e){t.attract||(t.attract=new Mr);for(const i of e)t.attract.load(i?.attract)}reset(){}}const zr=.5,Rr=Math.PI*zr;function Gr(t,e,i,s,n){const o=t.particles.quadTree.query(s,n);for(const t of o)s instanceof gn?Ke(Je(t),{position:e,radius:i,mass:i**2*Rr,velocity:Jt.origin,factor:Jt.origin}):s instanceof fn&&ti(t,je(e,i))}function Ir(t,e,i,s){Ze(i,e,((e,i)=>function(t,e,i,s){const n=document.querySelectorAll(e);n.length&&n.forEach((e=>{const n=e,o=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*zr)*o,y:(n.offsetTop+n.offsetHeight*zr)*o},r=n.offsetWidth*zr*o,c=10*o,h=i.type===gi.circle?new gn(a.x,a.y,r+c):new fn(n.offsetLeft*o-c,n.offsetTop*o-c,n.offsetWidth*o+2*c,n.offsetHeight*o+2*c);s(a,r,h)}))}(t,e,i,((e,i,n)=>Gr(t,e,i,n,s)))))}class Dr{constructor(){this.distance=200}load(t){Xt(t)||void 0!==t.distance&&(this.distance=t.distance)}}const Lr="bounce";class Hr extends On{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bounce;e&&(t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions.interactivity.events,i=t.interactivity.status===r,s=e.onHover.enable,n=e.onHover.mode,o=e.onDiv;i&&s&&Fe(Lr,n)?function(t,e){const i=10*t.retina.pixelRatio,s=t.interactivity.mouse.position,n=t.retina.bounceModeDistance;!n||n<0||!s||Gr(t,s,n,new gn(s.x,s.y,n+i),e)}(this.container,(t=>this.isEnabled(t))):Ir(this.container,o,Lr,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,o=n.onDiv;return!!s.position&&n.onHover.enable&&Fe(Lr,n.onHover.mode)||We(Lr,o)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Dr);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class Fr{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(!Xt(t)){if(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color){const e=Zt(this.color)?void 0:this.color;this.color=ei(t.color,(t=>as.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class Br extends Fr{constructor(){super(),this.selectors=[]}load(t){super.load(t),Xt(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class Nr extends Fr{load(t){super.load(t),Xt(t)||(this.divs=ei(t.divs,(t=>{const e=new Br;return e.load(t),e})))}}var Ur;function qr(t,e,i,s){if(e>=i){return ae(t+(e-i)*s,t,e)}if(e<i){return ae(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Ur||(Ur={}));const $r="bubble";class jr extends On{constructor(t,e){super(t),this._clickBubble=()=>{const t=this.container,e=t.actualOptions,i=t.interactivity.mouse.clickPosition,s=e.interactivity.modes.bubble;if(!s||!i)return;t.bubble||(t.bubble={});const n=t.retina.bubbleModeDistance;if(!n||n<0)return;const o=t.particles.quadTree.queryCircle(i,n,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of o){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const o=ge(e.getPosition(),i),r=((new Date).getTime()-(t.interactivity.mouse.clickTime??0))/v;r>s.duration&&(a.durationEnd=!0),r>2*s.duration&&(a.clicking=!1,a.durationEnd=!1);const c={bubbleObj:{optValue:t.retina.bubbleModeSize,value:e.bubble.radius},particlesObj:{optValue:de(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:Ur.size};this._process(e,o,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:de(e.options.opacity.value),value:e.opacity?.value??1},type:Ur.opacity};this._process(e,o,r,h),!a.durationEnd&&o<=n?this._hoverBubbleColor(e,o):delete e.bubble.color}},this._hoverBubble=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.bubbleModeDistance;if(!i||i<0||!e)return;const s=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));for(const n of s){n.bubble.inRange=!0;const s=ge(n.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(n,a),this._hoverBubbleOpacity(n,a),this._hoverBubbleColor(n,a)):this.reset(n),t.interactivity.status===o&&this.reset(n)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,n=i??s.interactivity.modes.bubble;if(n){if(!t.bubble.finalColor){const e=n.color;if(!e)return;const i=ii(e);t.bubble.finalColor=ki(this._engine,i)}if(t.bubble.finalColor)if(n.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?Ti(Ii(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}},this._hoverBubbleOpacity=(t,e,i)=>{const s=this.container.actualOptions,n=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!n)return;const o=t.options.opacity.value,a=qr(t.opacity?.value??1,n,de(o),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const o=de(t.options.size.value)*s.retina.pixelRatio,a=qr(t.size.value,n,o,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const n=this.container,o=s.bubbleObj.optValue,a=n.actualOptions.interactivity.modes.bubble;if(!a||void 0===o)return;const r=a.duration,c=n.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value??0,u=s.type;if(c&&!(c<0)&&o!==h)if(n.bubble||(n.bubble={}),n.bubble.durationEnd)l&&(u===Ur.size&&delete t.bubble.radius,u===Ur.opacity&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==o){const e=d-i*(d-o)/r;u===Ur.size&&(t.bubble.radius=e),u===Ur.opacity&&(t.bubble.opacity=e)}}else u===Ur.size&&delete t.bubble.radius,u===Ur.opacity&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,n=document.querySelectorAll(e),o=s.actualOptions.interactivity.modes.bubble;o&&n.length&&n.forEach((e=>{const n=e,a=s.retina.pixelRatio,r={x:(n.offsetLeft+.5*n.offsetWidth)*a,y:(n.offsetTop+.5*n.offsetHeight)*a},c=.5*n.offsetWidth*a,h=i.type===gi.circle?new gn(r.x,r.y,c):new fn(n.offsetLeft*a,n.offsetTop*a,n.offsetWidth*a,n.offsetHeight*a),l=s.particles.quadTree.query(h,(t=>this.isEnabled(t)));for(const e of l){if(!h.contains(e.getPosition()))continue;e.bubble.inRange=!0;const i=Ye(o.divs,n);e.bubble.div&&e.bubble.div===n||(this.clear(e,t,!0),e.bubble.div=n),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},this._engine=e,t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===$r&&(t.bubble||(t.bubble={}),t.bubble.clicking=!0)}}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.bubble;e&&(t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t){const e=this.container.actualOptions.interactivity.events,i=e.onHover,s=e.onClick,n=i.enable,o=i.mode,a=s.enable,r=s.mode,c=e.onDiv;n&&Fe($r,o)?this._hoverBubble():a&&Fe($r,r)?this._clickBubble():Ze($r,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,{onClick:o,onDiv:a,onHover:r}=n,c=We($r,a);return!!(c||r.enable&&s.position||o.enable&&s.clickPosition)&&(Fe($r,r.mode)||Fe($r,o.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new Nr);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class Qr{constructor(){this.opacity=.5}load(t){Xt(t)||void 0!==t.opacity&&(this.opacity=t.opacity)}}class Wr{constructor(){this.distance=80,this.links=new Qr,this.radius=60}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}function Zr(t,e,i,s){const n=t.actualOptions.interactivity.modes.connect;if(n)return function(t,e,i,s){const n=Math.floor(i.getRadius()/e.getRadius()),o=e.getFillColor(),a=i.getFillColor();if(!o||!a)return;const r=e.getPosition(),c=i.getPosition(),h=Ii(o,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(0,Gi(o,s)),l.addColorStop(ae(n,0,1),Ri(h,s)),l.addColorStop(1,Gi(a,s)),l}(e,i,s,n.links.opacity)}function Xr(t,e,i){t.canvas.draw((s=>{const n=Zr(t,s,e,i);if(!n)return;const o=e.getPosition(),a=i.getPosition();!function(t,e,i,s,n){qi(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,o,a)}))}class Yr extends On{constructor(t){super(t)}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.connect;e&&(t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const e=t.interactivity.mouse.position,{connectModeDistance:i,connectModeRadius:s}=t.retina;if(!i||i<0||!s||s<0||!e)return;const n=Math.abs(s),o=t.particles.quadTree.queryCircle(e,n,(t=>this.isEnabled(t)));o.forEach(((e,s)=>{const n=e.getPosition();for(const a of o.slice(s+1)){const s=a.getPosition(),o=Math.abs(i),r=Math.abs(n.x-s.x),c=Math.abs(n.y-s.y);r<o&&c<o&&Xr(t,e,a)}}))}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return!(!s.onHover.enable||!i.position)&&Fe("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Wr);for(const i of e)t.connect.load(i?.connect)}reset(){}}class Jr{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){Xt(t)||(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Kr{constructor(){this.distance=100,this.links=new Jr}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function tc(t,e,i,s,n){t.canvas.draw((t=>{const o=e.getPosition();!function(t,e,i,s,n,o){qi(t,i,s),t.strokeStyle=Ri(n,o),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,o,n,i,s)}))}class ec extends On{constructor(t,e){super(t),this._engine=e}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.grab;e&&(t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions.interactivity;if(!e.modes.grab||!e.events.onHover.enable||t.interactivity.status!==r)return;const i=t.interactivity.mouse.position;if(!i)return;const s=t.retina.grabModeDistance;if(!s||s<0)return;const n=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const o of n){const n=ge(o.getPosition(),i);if(n>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-n*r/s;if(c<=0)continue;const h=a.color??o.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=Li(this._engine,h,i.blink,i.consent)}const l=Di(o,void 0,t.particles.grabLineColor);l&&tc(t,o,l,c,i)}}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&Fe("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new Kr);for(const i of e)t.grab.load(i?.grab)}reset(){}}class ic extends On{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}}class sc{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(Xt(t))return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map((t=>t))),this.groups.length||(this.default=!0);const e=t.quantity;void 0!==e&&(this.quantity=ue(e)),this.particles=ei(t.particles,(t=>Qe({},t)))}}class nc extends On{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const e=this.container,i=e.actualOptions.interactivity.modes.push;if(!i)return;const s=he(i.quantity);if(s<=0)return;const n=Ue([void 0,...i.groups]),o=Qe(void 0!==n?e.actualOptions.particles.groups[n]:void 0,ii(i.particles));e.particles.push(s,e.interactivity.mouse,o,n)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new sc);for(const i of e)t.push.load(i?.push)}reset(){}}class oc{constructor(){this.quantity=2}load(t){if(Xt(t))return;const e=t.quantity;void 0!==e&&(this.quantity=ue(e))}}class ac extends On{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=he(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new oc);for(const i of e)t.remove.load(i?.remove)}reset(){}}class rc{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=Mn.easeOutQuad}load(t){Xt(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed))}}class cc extends rc{constructor(){super(),this.selectors=[]}load(t){super.load(t),Xt(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class hc extends rc{load(t){super.load(t),Xt(t)||(this.divs=ei(t.divs,(t=>{const e=new cc;return e.load(t),e})))}}const lc="repulse";class dc extends On{constructor(t,e){super(e),this._clickRepulse=()=>{const t=this.container,e=t.actualOptions.interactivity.modes.repulse;if(!e)return;const i=t.repulse??{particles:[]};if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const s=t.retina.repulseModeDistance;if(!s||s<0)return;const n=Math.pow(s/6,3),o=t.interactivity.mouse.clickPosition;if(void 0===o)return;const a=new gn(o.x,o.y,n),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=pe(o,t.position),c=r**2,h=-n*e.speed/c;if(c<=n){i.particles.push(t);const e=Jt.create(s,a);e.length=h,t.velocity.setTo(e)}}}else if(!1===i.clicking){for(const t of i.particles)t.velocity.setTo(t.initialVelocity);i.particles=[]}},this._hoverRepulse=()=>{const t=this.container,e=t.interactivity.mouse.position,i=t.retina.repulseModeDistance;!i||i<0||!e||this._processRepulse(e,i,new gn(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const n=this.container,o=n.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=n.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=this._engine.getEasing(r),u=(s?.speed??c)*h;for(const i of o){const{dx:s,dy:n,distance:o}=pe(i.position,t),a=ae(d(1-o/e)*u,0,l),r=Jt.create(o?s/o*a:u,o?n/o*a:u);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const n=document.querySelectorAll(t);n.length&&n.forEach((t=>{const n=t,o=i.retina.pixelRatio,a={x:(n.offsetLeft+.5*n.offsetWidth)*o,y:(n.offsetTop+.5*n.offsetHeight)*o},r=.5*n.offsetWidth*o,c=e.type===gi.circle?new gn(a.x,a.y,r):new fn(n.offsetLeft*o,n.offsetTop*o,n.offsetWidth*o,n.offsetHeight*o),h=Ye(s.divs,n);this._processRepulse(a,r,c,h)}))},this._engine=t,e.repulse||(e.repulse={particles:[]}),this.handleClickMode=t=>{const i=this.container.actualOptions.interactivity.modes.repulse;if(!i||t!==lc)return;e.repulse||(e.repulse={particles:[]});const s=e.repulse;s.clicking=!0,s.count=0;for(const t of e.repulse.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);s.particles=[],s.finish=!1,setTimeout((()=>{e.destroyed||(s.clicking=!1)}),i.duration*v)}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;e&&(t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===r,s=e.interactivity.events,n=s.onHover,o=n.enable,a=n.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&o&&Fe(lc,a)?this._hoverRepulse():h&&Fe(lc,l)?this._clickRepulse():Ze(lc,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,n=(t?.interactivity??i.interactivity).events,o=n.onDiv,a=n.onHover,r=n.onClick,c=We(lc,o);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return Fe(lc,h)||Fe(lc,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new hc);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class uc{constructor(){this.factor=3,this.radius=200}load(t){Xt(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class pc extends On{constructor(t){super(t)}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity.modes.slow;e&&(t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=(t?.interactivity??e.actualOptions.interactivity).events;return s.onHover.enable&&!!i.position&&Fe("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new uc);for(const i of e)t.slow.load(i?.slow)}reset(t){t.slow.inRange=!1;const e=this.container,i=e.actualOptions,s=e.interactivity.mouse.position,n=e.retina.slowModeRadius,o=i.interactivity.modes.slow;if(!o||!n||n<0||!s)return;const a=ge(s,t.getPosition()),r=a/n,c=o.factor,{slow:h}=t;a>n||(h.inRange=!0,h.factor=r/c)}}const gc=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function fc(t){return new Promise((e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",(()=>{t.loading=!1,e()})),i.addEventListener("error",(()=>{t.element=void 0,t.error=!0,t.loading=!1,ze().error(`${g} loading image: ${t.source}`),e()})),i.src=t.source}))}async function yc(t){if("svg"!==t.type)return void await fc(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(ze().error(`${g} Image not found`),t.error=!0),t.loading=!1}function vc(t,e,i,s){const n=function(t,e,i){const{svgData:s}=t;if(!s)return"";const n=Gi(e,i);if(s.includes("fill"))return s.replace(gc,(()=>n));const o=s.indexOf(">");return`${s.substring(0,o)} fill="${n}"${s.substring(o)}`}(t,i,s.opacity?.value??1),o={color:i,gif:e.gif,data:{...t,svgData:n},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([n],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{o.loaded=!0,o.element=r,e(o),s.revokeObjectURL(a)}));r.addEventListener("error",(()=>{(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await fc(i),o.loaded=!0,o.element=i.element,e(o)})()})),r.src=a}))}const wc=[0,4,2,1],mc=[8,8,4,2];class _c{constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce(((t,e)=>t+String.fromCharCode(e)),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t="",e=0;do{e=this.data[this.pos++];for(let i=e;--i>=0;t+=String.fromCharCode(this.data[this.pos++]));}while(0!==e);return t}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var bc,Sc;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(bc||(bc={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Sc||(Sc={}));const xc=0,Pc=0,Cc=0;function Oc(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}async function kc(t,e,i,s,n,o){switch(t.nextByte()){case Sc.EndOfFile:return!0;case Sc.Image:await async function(t,e,i,s,n,o){const a=e.frames[s(!0)];a.left=t.nextTwoBytes(),a.top=t.nextTwoBytes(),a.width=t.nextTwoBytes(),a.height=t.nextTwoBytes();const r=t.nextByte(),c=!(128&~r),h=!(64&~r);a.sortFlag=!(32&~r),a.reserved=(24&r)>>>3;const l=1<<1+(7&r);c&&(a.localColorTable=Oc(t,l));const d=t=>{const{r:s,g:o,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:o,b:r,a:255}:{r:s,g:o,b:r,a:i?~~((s+o+r)/3):0}},u=(()=>{try{return new ImageData(a.width,a.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(g[i]+(g[i+1]<<8)+(g[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,n=p+1,r=0,c=[[0]],h=0;h<4;h++){if(wc[h]<a.height){let t=0,e=0,s=!1;for(;!s;){const o=i;if(i=y(r,n),r+=n+1,i===f){n=p+1,c.length=f+2;for(let t=0;t<c.length;t++)c[t]=t<f?[t]:[]}else{i>=c.length?c.push(c[o].concat(c[o][0])):o!==f&&c.push(c[o].concat(c[i][0]));for(const s of c[i]){const{r:i,g:n,b:o,a:r}=d(s);u.data.set([i,n,o,r],wc[h]*a.width+mc[h]*e+t%(4*a.width)),t+=4}c.length===1<<n&&n<12&&n++}t===4*a.width*(e+1)&&(e++,wc[h]+mc[h]*e>=a.height&&(s=!0))}}o?.(t.pos/(t.data.length-1),s(!1)+1,u,{x:a.left,y:a.top},{width:e.width,height:e.height})}a.image=u,a.bitmap=await createImageBitmap(u)}else{let i=0,n=p+1,r=0,c=-4,h=!1;const l=[[0]];for(;!h;){const t=i;if(i=y(r,n),r+=n,i===f){n=p+1,l.length=f+2;for(let t=0;t<l.length;t++)l[t]=t<f?[t]:[]}else{if(i===f+1){h=!0;break}i>=l.length?l.push(l[t].concat(l[t][0])):t!==f&&l.push(l[t].concat(l[i][0]));for(const t of l[i]){const{r:e,g:i,b:s,a:n}=d(t);u.data.set([e,i,s,n],c+=4)}l.length>=1<<n&&n<12&&n++}}a.image=u,a.bitmap=await createImageBitmap(u),o?.((t.pos+1)/t.data.length,s(!1)+1,a.image,{x:a.left,y:a.top},{width:e.width,height:e.height})}}(t,e,i,s,n,o);break;case Sc.Extension:!function(t,e,i,s){switch(t.nextByte()){case Sc.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const o=t.nextByte();n.GCreserved=(224&o)>>>5,n.disposalMethod=(28&o)>>>2,n.userInputDelayFlag=!(2&~o);const a=!(1&~o);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case Sc.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Sc.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Sc.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function Tc(t){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i){i||(i=!1);const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const n=await s.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},a=new _c(new Uint8ClampedArray(n));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");o.width=a.nextTwoBytes(),o.height=a.nextTwoBytes();const r=a.nextByte(),c=!(128&~r);o.colorRes=(112&r)>>>4,o.sortFlag=!(8&~r);const h=1<<1+(7&r),l=a.nextByte();o.pixelAspectRatio=a.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),c&&(o.globalColorTable=Oc(a,h));const d=(()=>{try{return new ImageData(o.width,o.height,{colorSpace:"srgb"})}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==d)throw new Error("GIF frame size is to large");const{r:u,g:p,b:g}=o.globalColorTable[l];d.data.set(c?[u,p,g,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);o.backgroundImage=d;let f=-1,y=!0,v=-1;const w=t=>(t&&(y=!0),f),m=t=>(null!=t&&(v=t),v);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:bc.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),f++,v=-1,y=!1)}while(!await kc(a,o,i,w,m,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${f} "${t.message}"`);throw t}}(t.source),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return NaN}(t.gifData)??Cc,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await fc(t)}class Vc{constructor(t){this.validTypes=["image","images"],this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${g} image shape not initialized`);await this._engine.loadImage({gif:t.gif,name:t.name,replaceColor:t.replaceColor??!1,src:t.src})},this._engine=t}addImage(t){this._engine.images||(this._engine.images=[]),this._engine.images.push(t)}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,o=s.image,a=o?.element;if(o){if(e.globalAlpha=n,o.gif&&o.gifData)!function(t){const{context:e,radius:i,particle:s,delta:n}=t,o=s.image;if(!o?.gifData||!o.gif)return;const a=new OffscreenCanvas(o.gifData.width,o.gifData.height),r=a.getContext("2d");if(!r)throw new Error("could not create offscreen canvas context");r.imageSmoothingQuality="low",r.imageSmoothingEnabled=!1,r.clearRect(xc,Pc,a.width,a.height),void 0===s.gifLoopCount&&(s.gifLoopCount=o.gifLoopCount??Cc);let c=s.gifFrame??0;const h={x:.5*-o.gifData.width,y:.5*-o.gifData.height},l=o.gifData.frames[c];if(void 0===s.gifTime&&(s.gifTime=0),l.bitmap){switch(e.scale(i/o.gifData.width,i/o.gifData.height),l.disposalMethod){case bc.UndefinedA:case bc.UndefinedB:case bc.UndefinedC:case bc.UndefinedD:case bc.Replace:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(xc,Pc,a.width,a.height);break;case bc.Combine:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y);break;case bc.RestoreBackground:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(xc,Pc,a.width,a.height),o.gifData.globalColorTable.length?r.putImageData(o.gifData.backgroundImage,h.x,h.y):r.putImageData(o.gifData.frames[0].image,h.x+l.left,h.y+l.top);break;case bc.RestorePrevious:{const t=r.getImageData(xc,Pc,a.width,a.height);r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(xc,Pc,a.width,a.height),r.putImageData(t,xc,Pc)}}if(s.gifTime+=n.value,s.gifTime>l.delayTime){if(s.gifTime-=l.delayTime,++c>=o.gifData.frames.length){if(--s.gifLoopCount<=Cc)return;c=0,r.clearRect(xc,Pc,a.width,a.height)}s.gifFrame=c}e.scale(o.gifData.width/i,o.gifData.height/i)}}(t);else if(a){const t=o.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(a,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(e.preload&&this._engine.loadImage)for(const t of e.preload)await this._engine.loadImage(t)}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;this._engine.images||(this._engine.images=[]);const e=t.shapeData;if(!e)return;this._engine.images.find((t=>t.name===e.name||t.source===e.src))||this.loadImageShape(e).then((()=>{this.loadShape(t)}))}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;this._engine.images||(this._engine.images=[]);const i=this._engine.images,s=e.shapeData;if(!s)return;const n=e.getFillColor(),o=i.find((t=>t.name===s.name||t.source===s.src));if(!o)return;const a=s.replaceColor??o.replaceColor;o.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=o.svgData&&n?await vc(o,s,n,e):{color:n,data:o,element:o.element,gif:o.gif,gifData:o.gifData,gifLoopCount:o.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:o.ratio??1,replaceColor:a,source:s.src},t.ratio||(t.ratio=1);const i={image:t,fill:s.fill??e.shapeFill,close:s.close??e.shapeClose};e.image=i.image,e.shapeFill=i.fill,e.shapeClose=i.close})()}}class Mc{constructor(){this.src="",this.gif=!1}load(t){Xt(t)||(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class Ec{constructor(t){this.id="imagePreloader",this._engine=t}async getPlugin(){return await Promise.resolve(),{}}loadOptions(t,e){if(!e?.preload)return;t.preload||(t.preload=[]);const i=t.preload;for(const t of e.preload){const e=i.find((e=>e.name===t.name||e.src===t.src));if(e)e.load(t);else{const e=new Mc;e.load(t),i.push(e)}}}needsPlugin(){return!0}}const Ac=3;async function zc(t,e=!0){t.checkVersion("3.9.1"),function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${g} no image source provided`);if(t.images||(t.images=[]),!t.images.find((t=>t.name===e.name||t.source===e.src)))try{const i={gif:e.gif??!1,name:e.name??e.src,source:e.src,type:e.src.substring(e.src.length-Ac),error:!1,loading:!0,replaceColor:e.replaceColor,ratio:e.width&&e.height?e.width/e.height:void 0};let s;t.images.push(i),s=e.gif?Tc:e.replaceColor?yc:fc,await s(i)}catch{throw new Error(`${g} ${e.name??e.src} not found`)}})}(t);const i=new Ec(t);await t.addPlugin(i,e),await t.addShape(new Vc(t),e)}class Rc extends Ms{constructor(){super(),this.sync=!1}load(t){Xt(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Gc extends Ms{constructor(){super(),this.sync=!1}load(t){Xt(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Ic{constructor(){this.count=0,this.delay=new Rc,this.duration=new Gc}load(t){Xt(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Dc{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?he(i.delay.value)*(i.delay.sync?1:ie())/e.retina.reduceFactor*v:0,delayTime:0,duration:e.retina.reduceFactor?he(i.duration.value)*(i.duration.sync?1:ie())/e.retina.reduceFactor*v:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.life&&(t.spawning=t.life.delay>0))}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life||(t.life=new Ic);for(const i of e)t.life.load(i?.life)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(t.spawning)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=ue(0,i.width),a=ue(0,i.width);t.position.x=ce(o),t.position.y=ce(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=he(r.delay.value)*v,s.duration=he(r.duration.value)*v)}(t,e,this.container.canvas.size)}}class Lc{constructor(){this.validTypes=["line"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}class Hc{init(){}isEnabled(t){return!Ge()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if(Ge()||!i.enable)return;const s=i.force,n=e.interactivity.mouse.position;if(!n)return;const o=e.canvas.size,a=.5*o.width,r=.5*o.height,c=i.smooth,h=t.getRadius()/s,l=(n.x-a)*h,d=(n.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class Fc extends kn{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=he(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),n=e.particles.quadTree.queryCircle(s,i);for(const e of n){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:o}=pe(s,i),a=t.options.move.attract.rotate,r=n/(1e3*a.x),c=o/(1e3*a.y),h=e.size.value/t.size.value,l=1/h;t.velocity.x-=r*h,t.velocity.y-=c*h,e.velocity.x+=r*l,e.velocity.y+=c*l}}isEnabled(t){return t.options.move.attract.enable}reset(){}}function Bc(t,e,i,s,n,o){const a=ae(t.options.collisions.absorb.speed*n.factor/10,0,s);t.size.value+=.5*a,i.size.value-=a,s<=o&&(i.size.value=0,i.destroy())}const Nc=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=he(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Uc(t,e){Ke(Je(t),Je(e)),Nc(t),Nc(e)}function qc(t,e,i,s){switch(t.options.collisions.mode){case vi.absorb:!function(t,e,i,s){const n=t.getRadius(),o=e.getRadius();void 0===n&&void 0!==o?t.destroy():void 0!==n&&void 0===o?e.destroy():void 0!==n&&void 0!==o&&(n>=o?Bc(t,0,e,o,i,s):Bc(e,0,t,n,i,s))}(t,e,i,s);break;case vi.bounce:Uc(t,e);break;case vi.destroy:!function(t,e){t.unbreakable||e.unbreakable||Uc(t,e),void 0===t.getRadius()&&void 0!==e.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===e.getRadius()?e.destroy():void 0!==t.getRadius()&&void 0!==e.getRadius()&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class $c extends kn{constructor(t){super(t)}clear(){}init(){}interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),n=t.getRadius(),o=i.particles.quadTree.queryCircle(s,2*n);for(const a of o){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const o=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(o.z))>n+r)continue;ge(s,o)>n+r||qc(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class jc extends gn{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize={...s}}contains(t){const{width:e,height:i}=this.canvasSize,{x:s,y:n}=t;return super.contains(t)||super.contains({x:s-e,y:n})||super.contains({x:s-e,y:n-i})||super.contains({x:s,y:n-i})}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new gn(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new fn(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class Qc{constructor(){this.blur=5,this.color=new as,this.color.value="#000",this.enable=!1}load(t){Xt(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=as.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Wc{constructor(){this.enable=!1,this.frequency=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Zc{constructor(){this.blink=!1,this.color=new as,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Qc,this.triangles=new Wc,this.width=1,this.warp=!1}load(t){Xt(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=as.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}const Xc=0,Yc=0;function Jc(t,e,i,s,n){const{dx:o,dy:a,distance:r}=pe(t,e);if(!n||r<=i)return r;const c={x:Math.abs(o),y:Math.abs(a)},h=Math.min(c.x,s.width-c.x),l=Math.min(c.y,s.height-c.y);return Math.sqrt(h**2+l**2)}class Kc extends kn{constructor(t,e){super(t),this._setColor=t=>{if(!t.options.links)return;const e=this._linkContainer,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(s)return;const n=i.color;s=Li(this._engine,n,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this._linkContainer=t,this._engine=e}clear(){}init(){this._linkContainer.particles.linksColor=void 0,this._linkContainer.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[];const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<Xc||e.y<Yc||e.x>s.width||e.y>s.height)return;const n=t.options.links,o=n.opacity,a=t.retina.linksDistance??0,r=n.warp;let c;c=r?new jc(e.x,e.y,a,s):new gn(e.x,e.y,a);const h=i.particles.quadTree.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some((t=>t.destination===i))||i.links.some((e=>e.destination===t)))continue;const h=i.getPosition();if(h.x<Xc||h.y<Yc||h.x>s.width||h.y>s.height)continue;const l=Jc(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*o;this._setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links||(t.links=new Zc);for(const i of e)t.links.load(i?.links)}reset(){}}function th(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let n=e.get(i);return void 0===n&&(n=ie(),e.set(i,n)),n}class eh{constructor(t,e){this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this._container,n=s.actualOptions,o=e.destination,a=t.getPosition(),r=o.getPosition();let c=e.opacity;s.canvas.draw((e=>{let h;const l=t.options.twinkle?.lines;if(l?.enable){const t=l.frequency,e=Pi(this._engine,l.color);ie()<t&&e&&(h=e,c=he(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=Di(t,o,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=n;!function(t){let e=!1;const{begin:i,end:s,engine:n,maxDistance:o,context:a,canvasSize:r,width:c,backgroundMask:h,colorLine:l,opacity:d,links:u}=t;if(ge(i,s)<=o)qi(a,i,s),e=!0;else if(u.warp){let t,n;const c=pe(i,{x:s.x-r.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},n={x:r.width,y:e}}else{const e=pe(i,{x:s.x,y:s.y-r.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},n={x:s,y:r.height}}else{const e=pe(i,{x:s.x-r.width,y:s.y-r.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},n={x:t.x+r.width,y:t.y+r.height}}}}t&&n&&(qi(a,i,t),qi(a,s,n),e=!0)}if(!e)return;a.lineWidth=c,h.enable&&(a.globalCompositeOperation=h.composite),a.strokeStyle=Ri(l,d);const{shadow:p}=u;if(p.enable){const t=Pi(n,p.color);t&&(a.shadowBlur=p.blur,a.shadowColor=Ri(t))}a.stroke()}({context:e,width:d,begin:a,end:r,engine:this._engine,maxDistance:u,canvasSize:s.canvas.size,links:i,backgroundMask:p,colorLine:h,opacity:c})}))},this._drawLinkTriangle=(t,e,i)=>{const s=t.options.links;if(!s?.enable)return;const n=s.triangles;if(!n.enable)return;const o=this._container,a=o.actualOptions,r=e.destination,c=i.destination,h=n.opacity??.5*(e.opacity+i.opacity);h<=0||o.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(ge(i,l)>u||ge(d,l)>u||ge(d,i)>u)return;let p=Pi(this._engine,n.color);if(!p){const e=void 0!==s.id?o.particles.linksColors.get(s.id):o.particles.linksColor;p=Di(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:n,backgroundMask:o,colorTriangle:a,opacityTriangle:r}=t;!function(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}(e,i,s,n),o.enable&&(e.globalCompositeOperation=o.composite),e.fillStyle=Ri(a,r),e.fill()}({context:e,pos1:i,pos2:l,pos3:d,backgroundMask:a.backgroundMask,colorTriangle:p,opacityTriangle:h})}))},this._drawTriangles=(t,e,i,s)=>{const n=i.destination;if(!t.links?.triangles.enable||!n.options.links?.triangles.enable)return;const o=n.links?.filter((t=>{const e=this._getLinkFrequency(n,t.destination);return n.options.links&&e<=n.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(o?.length)for(const s of o){const o=s.destination;this._getTriangleFrequency(e,n,o)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>th([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>th([t,e,i],this._freqs.triangles),this._container=t,this._engine=e,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length)return;const n=i.filter((t=>s.links&&(s.links.frequency>=1||this._getLinkFrequency(e,t.destination)<=s.links.frequency)));for(const t of n)this._drawTriangles(s,e,t,n),t.opacity>0&&(e.retina.linksWidth??0)>0&&this._drawLinkLine(e,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this._container.retina.pixelRatio,{retina:i}=t,{distance:s,width:n}=t.options.links;i.linksDistance=s*e,i.linksWidth=n*e}particleDestroyed(t){t.links=[]}}class ih{constructor(t){this.id="links",this._engine=t}getPlugin(t){return Promise.resolve(new eh(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}async function sh(t,e=!0){t.checkVersion("3.9.1"),await async function(t,e=!0){await t.addInteractor("particlesLinks",(async e=>Promise.resolve(new Kc(e,t))),e)}(t,e),await async function(t,e=!0){const i=new ih(t);await t.addPlugin(i,e)}(t,e)}const nh=0,oh=0;class ah{draw(t){const{particle:e,radius:i}=t;!function(t,e,i){const{context:s}=t,n=i.count.numerator*i.count.denominator,o=i.count.numerator/i.count.denominator,a=180*(o-2)/o,r=Math.PI-fe(a);if(s){s.beginPath(),s.translate(e.x,e.y),s.moveTo(nh,oh);for(let t=0;t<n;t++)s.lineTo(i.length,oh),s.translate(i.length,oh),s.rotate(r)}}(t,this.getCenter(e,i),this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}}class rh extends ah{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(t,e){return{x:-e/(t.sides/3.5),y:-e/.76}}getSidesData(t,e){const i=t.sides;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class ch extends ah{constructor(){super(...arguments),this.validTypes=["triangle"]}getCenter(t,e){return{x:-e,y:e/1.66}}getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:2,numerator:3},length:2*e}}}async function hh(t,e=!0){t.checkVersion("3.9.1"),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new rh,e)}(t,e),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new ch,e)}(t,e)}class lh{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class dh extends Ms{constructor(){super(),this.animation=new lh,this.direction=Tn.clockwise,this.path=!1,this.value=0}load(t){Xt(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}const uh=2*Math.PI;class ph{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:fe(he(e.value)),min:0,max:uh},t.pathRotation=e.path;let i=e.direction;if(i===Tn.random){i=Math.floor(2*ie())>0?Tn.counterClockwise:Tn.clockwise}switch(i){case Tn.counterClockwise:case"counterClockwise":t.rotate.status=Oe.decreasing;break;case Tn.clockwise:t.rotate.status=Oe.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-he(s.decay),t.rotate.velocity=he(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=ie())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){t.rotate||(t.rotate=new dh);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(ci(t,t.rotate,!1,ke.none,e),t.rotation=t.rotate.value))}}const gh=Math.sqrt(2);class fh{constructor(){this.validTypes=["edge","square"]}draw(t){!function(t){const{context:e,radius:i}=t,s=i/gh,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}const yh=0,vh=0;class wh{constructor(){this.validTypes=["star"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,o=i.starInset??2;e.moveTo(yh,vh-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(yh,vh-s*o),e.rotate(Math.PI/n),e.lineTo(yh,vh-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=he(i?.inset??2)}}class mh{constructor(t,e){this._container=t,this._engine=e}init(t){const e=this._container,i=t.options,s=ii(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=he(s.width)*e.retina.pixelRatio,t.strokeOpacity=he(s.opacity??1),t.strokeAnimation=s.color?.animation;const n=ki(this._engine,s.color)??t.getFillColor();n&&(t.strokeColor=Fi(n,t.strokeAnimation,e.retina.reduceFactor))}isEnabled(t){const e=t.strokeAnimation,{strokeColor:i}=t;return!t.destroyed&&!t.spawning&&!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable)}update(t,e){this.isEnabled(t)&&Ui(t.strokeColor,e)}}async function _h(t,e=!0){t.checkVersion("3.9.1"),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addMover("parallax",(()=>Promise.resolve(new Hc)),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalAttract",(e=>Promise.resolve(new Ar(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalBounce",(t=>Promise.resolve(new Hr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalBubble",(e=>Promise.resolve(new jr(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalConnect",(t=>Promise.resolve(new Yr(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalGrab",(e=>Promise.resolve(new ec(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalPause",(t=>Promise.resolve(new ic(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalPush",(t=>Promise.resolve(new nc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalRemove",(t=>Promise.resolve(new ac(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalRepulse",(e=>Promise.resolve(new dc(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalSlow",(t=>Promise.resolve(new pc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("particlesAttract",(t=>Promise.resolve(new Fc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("particlesCollisions",(t=>Promise.resolve(new $c(t))),e)}(t,!1),await sh(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInQuad,(t=>t**2),!1),await t.addEasing(Mn.easeOutQuad,(t=>1-(1-t)**2),!1),await t.addEasing(Mn.easeInOutQuad,(t=>t<.5?2*t**2:1-(-2*t+2)**2/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Tr,e)}(t,!1),await zc(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Lc,e)}(t,!1),await hh(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new fh,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new wh,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("life",(async t=>Promise.resolve(new Dc(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("rotate",(t=>Promise.resolve(new ph(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("strokeColor",(e=>Promise.resolve(new mh(e,t))),e)}(t,!1),await Or(t,e)}function bh(t,e,i,s,n,o){const a={x:-(e.length*i*.5),y:.5*i},r=2*i;o?t.fillText(e,a.x,a.y+r*n):t.strokeText(e,a.x,a.y+r*n)}class Sh{constructor(){this.validTypes=["text","character","char","multiline-text"]}draw(t){!function(t){const{context:e,particle:i,radius:s,opacity:n}=t,o=i.shapeData;if(!o)return;const a=o.value;if(void 0===a)return;void 0===i.text&&(i.text=ii(a,i.randomIndexData));const r=i.text,c=o.style??"",h=o.weight??"400",l=2*Math.round(s),d=o.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=n;for(let t=0;t<p.length;t++)bh(e,p[t],s,0,t,u);e.globalAlpha=1}}(t)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(i.find((t=>Fe(t,e.particles.shape.type)))){const t=i.map((t=>e.particles.shape.options[t])).find((t=>!!t)),s=[];ei(t,(t=>{s.push(Be(t.font,t.weight))})),await Promise.all(s)}}particleInit(t,e){if(!e.shape||!this.validTypes.includes(e.shape))return;const i=e.shapeData;if(void 0===i)return;const s=i.value;void 0!==s&&(e.text=ii(s,e.randomIndexData))}}var xh;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(xh||(xh={}));class Ph{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ch extends Ms{constructor(){super(),this.animation=new Ph,this.direction=xh.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),Xt(t)||(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}const Oh=2*Math.PI;class kh{constructor(t){this.container=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:fe(he(e.value)),sinDirection:ie()>=y?1:-1,cosDirection:ie()>=y?1:-1,min:0,max:Oh};let i=e.direction;if(i===xh.random){i=Math.floor(2*ie())>0?xh.counterClockwise:xh.clockwise}switch(i){case xh.counterClockwise:case"counterClockwise":t.tilt.status=Oe.decreasing;break;case xh.clockwise:t.tilt.status=Oe.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-he(s.decay),t.tilt.velocity=he(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=ie()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new Ch);for(const i of e)t.tilt.load(i?.tilt)}async update(t,e){this.isEnabled(t)&&t.tilt&&(ci(t,t.tilt,!1,ke.none,e),await Promise.resolve())}}class Th{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=ue(t.opacity)))}}class Vh{constructor(){this.lines=new Th,this.particles=new Th}load(t){Xt(t)||(this.lines.load(t.lines),this.particles.load(t.particles))}}class Mh{constructor(t){this._engine=t}getColorStyles(t,e,i,s){const n=t.options.twinkle;if(!n)return{};const o=n.particles,a=o.enable&&ie()<o.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?he(o.opacity)*c:s,l=ki(this._engine,o.color),d=l?Gi(l,h):void 0,u={},p=a&&d;return u.fill=p?d:void 0,u.stroke=p?d:void 0,u}async init(){await Promise.resolve()}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){t.twinkle||(t.twinkle=new Vh);for(const i of e)t.twinkle.load(i?.twinkle)}async update(){await Promise.resolve()}}class Eh{constructor(){this.angle=50,this.move=10}load(t){Xt(t)||(void 0!==t.angle&&(this.angle=ue(t.angle)),void 0!==t.move&&(this.move=ue(t.move)))}}class Ah{constructor(){this.distance=5,this.enable=!1,this.speed=new Eh}load(t){if(!Xt(t)&&(void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(jt(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;void 0!==e.min?this.speed.load({angle:e}):this.speed.load(t.speed)}}}const zh=2*Math.PI;const Rh=2*Math.PI;class Gh{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:ie()*Rh,angleSpeed:he(e.speed.angle)/360,moveSpeed:he(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=he(e?.distance??0)*this.container.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){t.wobble||(t.wobble=new Ah);for(const i of e)t.wobble.load(i?.wobble)}update(t,e){this.isEnabled(t)&&function(t,e){const{wobble:i}=t.options,{container:s,wobble:n}=t;if(!i?.enable||!n)return;const o=s.retina.reduceFactor,a=n.angleSpeed*e.factor*o,r=n.moveSpeed*e.factor*o*(t.retina.wobbleDistance??0)/(v/60),c=zh,{position:h}=t;n.angle+=a,n.angle>c&&(n.angle-=c),h.x+=r*Math.cos(n.angle),h.y+=r*Math.abs(Math.sin(n.angle))}(t,e)}}async function Ih(t,e=!0){t.checkVersion("3.9.1"),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("destroy",(e=>Promise.resolve(new Fa(t,e))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("roll",(()=>Promise.resolve(new ir(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("tilt",(t=>Promise.resolve(new kh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("twinkle",(()=>Promise.resolve(new Mh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("wobble",(t=>Promise.resolve(new Gh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Sh,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalTrail",(t=>Promise.resolve(new Ya(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new Aa(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),t.emitterShapeManager||(t.emitterShapeManager=new Ro(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new Ao(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.9.1"),i.addEmitterShapeGenerator?.("circle",new qa),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.9.1"),i.addEmitterShapeGenerator?.("square",new Wa),await i.refresh(e)}(t,!1),await _h(t,e)}class Dh{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue=Me.random}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)))}}class Lh{constructor(){this.value=0,this.animation=new Dh}load(t){Xt(t)||(this.animation.load(t.animation),void 0!==t.value&&(this.value=ue(t.value)))}}class Hh{constructor(){this.stop=0,this.value=new ks}load(t){Xt(t)||(void 0!==t.stop&&(this.stop=t.stop),this.value=ks.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Lh,jt(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Fh{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){Xt(t)||(void 0!==t.count&&(this.count=ue(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ue(t.speed)),void 0!==t.decay&&(this.decay=ue(t.decay)),void 0!==t.delay&&(this.delay=ue(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Bh{constructor(){this.value=0,this.animation=new Fh,this.direction=Tn.clockwise}load(t){Xt(t)||(this.animation.load(t.animation),void 0!==t.value&&(this.value=ue(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Nh{constructor(){this.angle=new Bh,this.colors=[],this.type=Vn.random}load(t){Xt(t)||(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new Hh;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}const Uh=2*Math.PI;class qh{constructor(t){this._engine=t}getColorStyles(t,e,i,s){const n=t.gradient;if(!n)return{};const o=n.angle.value,a=0,r=0,c=n.type===Vn.radial?e.createRadialGradient(a,r,0,a,r,i):e.createLinearGradient(Math.cos(o)*-i,Math.sin(o)*-i,Math.cos(o)*i,Math.sin(o)*i);for(const{stop:t,value:e,opacity:i}of n.colors)c.addColorStop(t,Gi({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:c}}init(t){const e=ii(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:he(i.value),enable:i.animation.enable,velocity:he(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-he(i.animation.decay),delayTime:he(i.animation.delay)*v,max:Uh,min:0,time:0},type:e.type,colors:[]};let s=e.angle.direction;switch(s===Tn.random&&(s=ie()>y?Tn.counterClockwise:Tn.clockwise),s){case Tn.counterClockwise:case"counterClockwise":t.gradient.angle.status=Oe.decreasing;break;case Tn.clockwise:t.gradient.angle.status=Oe.increasing}const n=t.options.reduceDuplicates;for(const i of e.colors){const e=ki(this._engine,i.value,t.id,n);if(!e)continue;const s=Fi(e,i.value.animation,t.container.retina.reduceFactor),o={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:de(i.opacity.value),min:le(i.opacity.value),status:Oe.increasing,value:he(i.opacity.value),velocity:he(i.opacity.animation.speed)/f*t.container.retina.reduceFactor,decay:1-he(i.opacity.animation.decay),delayTime:he(i.opacity.animation.delay)*v,time:0}:void 0},{opacity:a}=o;if(i.opacity&&a){const t=i.opacity.value;a.min=le(t),a.max=de(t);switch(i.opacity.animation.startValue){case Me.min:a.value=a.min,a.status=Oe.increasing;break;case Me.max:a.value=a.max,a.status=Oe.decreasing;break;case Me.random:default:a.value=ce(a),a.status=ie()>=y?Oe.increasing:Oe.decreasing}}t.gradient.colors.push(o)}}isEnabled(t){return!t.destroyed&&!t.spawning&&(!!t.gradient?.angle.enable||(t.gradient?.colors.some((t=>t.value.h.enable||t.value.s.enable||t.value.l.enable))??!1))}loadOptions(t,...e){for(const i of e){if(!i?.gradient)continue;const e=i.gradient;e&&(t.gradient=ei(e,(t=>{const e=new Nh;return e.load(t),e})))}}update(t,e){!function(t,e){const{gradient:i}=t;if(i){ci(t,i.angle,!1,ke.none,e);for(const s of i.colors)Ui(s.value,e),s.opacity&&ci(t,s.opacity,!0,ke.none,e)}}(t,e)}}class $h{constructor(){this.validTypes=["heart"]}draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,n=.5*i,o=i+n,a=-i,r=-i;e.moveTo(a,r+n),e.quadraticCurveTo(a,r,a+n,r),e.quadraticCurveTo(a+i,r,a+i,r+n),e.quadraticCurveTo(a+i,r,a+o,r),e.quadraticCurveTo(a+s,r,a+s,r+n),e.quadraticCurveTo(a+s,r+i,a+o,r+o),e.lineTo(a+i,r+s),e.lineTo(a+n,r+o),e.quadraticCurveTo(a,r+i,a,r+n)}(t)}}const jh=255;function Qh(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/f,n=t.v/f,o=n*s,a=o*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:o,g:a,b:0}:i>1&&i<=2?r={r:a,g:o,b:0}:i>2&&i<=3?r={r:0,g:o,b:a}:i>3&&i<=4?r={r:0,g:a,b:o}:i>4&&i<=5?r={r:a,g:0,b:o}:i>5&&i<=6&&(r={r:o,g:0,b:a}),r){const t=n-o;e.r=Math.floor((r.r+t)*jh),e.g=Math.floor((r.g+t)*jh),e.b=Math.floor((r.b+t)*jh)}return e}class Wh{constructor(){this.key="hsv",this.stringPrefix="hsv"}handleColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Qh(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Qh({h:he(e.h),s:he(e.s),v:he(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t),i=1,s=2,n=3,o=5;return e?{a:(a={a:e.length>4?Pe(e[o]):1,h:parseInt(e[i],10),s:parseInt(e[s],10),v:parseInt(e[n],10)}).a,...Qh(a)}:void 0;var a}}class Zh{constructor(){this.color=new as,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){Xt(t)||(void 0!==t.color&&(this.color=as.create(this.color,t.color)),this.duration=t.duration,this.infectedStage=t.infectedStage,void 0!==t.radius&&(this.radius=t.radius),void 0!==t.rate&&(this.rate=t.rate))}}class Xh{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){Xt(t)||(void 0!==t.cure&&(this.cure=t.cure),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.infections&&(this.infections=t.infections),void 0!==t.stages&&(this.stages=t.stages.map((t=>{const e=new Zh;return e.load(t),e}))))}}class Yh{constructor(t){this._nextInfectionStage=t=>{const e=this._container.actualOptions.infection,{infection:i}=t;if(!e||!i)return;const s=e.stages.length;s<=0||void 0===i.stage||(i.time=0,s<=++i.stage&&(e.cure?(delete i.stage,delete i.time):(i.stage=0,i.time=0)))},this._container=t}startInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;e>i.stages.length||e<0||(s.delay=0,s.delayStage=e)}updateInfection(t,e){const i=this._container.actualOptions.infection,{infection:s}=t;if(!i||!s)return;const n=i.stages,o=n.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>o||t<0)return;s.delay>=i.delay*v?(s.stage=t,s.time=0,delete s.delay,delete s.delayStage):s.delay+=e}else delete s.delay,delete s.delayStage;if(void 0!==s.stage&&void 0!==s.time){const i=n[s.stage];void 0!==i.duration&&i.duration>=0&&s.time>i.duration*v?this._nextInfectionStage(t):s.time+=e}else delete s.stage,delete s.time}updateInfectionStage(t,e){const i=this._container.actualOptions,{infection:s}=t;if(!i.infection||!s)return;e>i.infection.stages.length||e<0||void 0!==s.stage&&s.stage>e||(s.stage=e,s.time=0)}}class Jh{constructor(t){this._container=t,this._container.infecter=new Yh(this._container)}particleFillColor(t){const e=this._container.actualOptions;if(!t.infection||!e.infection)return;const i=t.infection.stage,s=e.infection.stages;return void 0!==i?s[i].color:void 0}particleStrokeColor(t){return this.particleFillColor(t)}particlesSetup(){const t=this._container.actualOptions;if(t.infection)for(let e=0;e<t.infection.infections;e++){const t=Ue(this._container.particles.filter((t=>{const e=t;return e.infection||(e.infection={}),void 0===e.infection.stage})));this._container.infecter?.startInfection(t,0)}}}class Kh{constructor(){this.id="infection"}getPlugin(t){return Promise.resolve(new Jh(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new Xh),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}class tl extends kn{constructor(t){super(t)}clear(){}init(){}interact(t,e){const i=this.container.infecter;if(!i)return;if(i.updateInfection(t,e.value),void 0===t.infection?.stage)return;const s=this.container,n=s.actualOptions.infection;if(!n?.enable||n.stages.length<1)return;const o=n.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+o.radius*a,c=t.getPosition(),h=o.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=o.rate,u=l.length;for(const e of l){const s=e;if(!(s===t||s.destroyed||s.spawning||void 0!==s.infection?.stage&&s.infection.stage===t.infection.stage||ie()>=d/u))if(void 0===s.infection?.stage)i.startInfection(s,h);else if(s.infection.stage<t.infection.stage)i.updateInfectionStage(s,h);else if(s.infection.stage>t.infection.stage){const e=n.stages[s.infection.stage],o=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,o)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}const el=0,il=0;class sl{constructor(){this.validTypes=["infinity"]}draw(t){!function(t){const{context:e,radius:i}=t,s=.55*i;e.moveTo(el,il),e.bezierCurveTo(s,-i,s,i,el,il),e.moveTo(el,il),e.bezierCurveTo(-s,-i,el-s,i,el,il)}(t)}}const nl=1,ol=0,al=.5*Math.PI,rl=2*Math.PI,cl=.25*Math.PI,hl="light";class ll{constructor(){this.start=new as,this.stop=new as,this.start.value="#ffffff",this.stop.value="#000000"}load(t){Xt(t)||(this.start=as.create(this.start,t.start),this.stop=as.create(this.stop,t.stop))}}class dl{constructor(){this.gradient=new ll,this.radius=1e3}load(t){Xt(t)||(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class ul{constructor(){this.color=new as,this.color.value="#000000",this.length=2e3}load(t){Xt(t)||(this.color=as.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class pl{constructor(){this.area=new dl,this.shadow=new ul}load(t){Xt(t)||(this.area.load(t.area),this.shadow.load(t.shadow))}}class gl extends On{constructor(t,e){super(t),this._engine=e}clear(){}init(){}interact(){const t=this.container,e=t.actualOptions,i=t.interactivity;if(!e.interactivity.events.onHover.enable||"pointermove"!==i.status)return;const s=i.mouse.position;s&&t.canvas.draw((e=>{!function(t,e,i){const s=t.actualOptions.interactivity.modes.light?.area;if(!s)return;e.beginPath(),e.arc(i.x,i.y,s.radius,0,rl);const n=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),o=t.canvas.mouseLight;o?.start&&o.stop&&(n.addColorStop(ol,Ri(o.start)),n.addColorStop(nl,Ri(o.stop)),e.fillStyle=n,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,n=s.events;if(!n.onHover.enable||!i.position)return!1;const o=Fe(hl,n.onHover.mode);if(o&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Pi(this._engine,t.start),stop:Pi(this._engine,t.stop)}}return o}loadModeOptions(t,...e){t.light||(t.light=new pl);for(const i of e)t.light.load(i?.light)}reset(){}}class fl extends kn{constructor(t,e){super(t),this._engine=e}clear(){}init(){}interact(t){const e=this.container,i=e.actualOptions,s=e.interactivity;if(!i.interactivity.events.onHover.enable||"pointermove"!==s.status)return;const n=s.mouse.position;n&&e.canvas.draw((i=>{!function(t,e,i,s){const n=i.getPosition(),o=t.actualOptions.interactivity.modes.light?.shadow;if(!o)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=rl/c,l=-i.rotation+cl,d=[];for(let t=0;t<c;t++)d.push({x:n.x+r*Math.sin(l+h*t)*1,y:n.y+r*Math.cos(l+h*t)*1});const u=[],p=o.length;for(const t of d){const e=Math.atan2(s.y-t.y,s.x-t.x),i={x:t.x+p*Math.sin(-e-al),y:t.y+p*Math.cos(-e-al)};u.push({end:i,start:t})}const g=Ri(a);for(let t=u.length-1,i=0;t>=0;i=t--)e.beginPath(),e.moveTo(u[t].start.x,u[t].start.y),e.lineTo(u[i].start.x,u[i].start.y),e.lineTo(u[i].end.x,u[i].end.y),e.lineTo(u[t].end.x,u[t].end.y),e.fillStyle=g,e.fill()}(e,i,t,n)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,n=i.events;if(!n.onHover.enable||!s.position)return!1;const o=Fe(hl,n.onHover.mode);if(o&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Pi(this._engine,e.color)}return o}reset(){}}class yl{constructor(){this.factor=4,this.value=!0}load(t){Xt(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class vl{constructor(){this.disable=!0,this.reduce=new yl}load(t){Xt(t)||(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class wl{constructor(t,e){this._handleMotionChange=t=>{const e=this._container,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)},this._container=t,this._engine=e}async init(){const t=this._container,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=De("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this._handleMotionChange(i);const s=()=>{(async()=>{this._handleMotionChange(i);try{await t.refresh()}catch{}})()};void 0!==i.addEventListener?i.addEventListener("change",s):void 0!==i.addListener&&i.addListener(s),await Promise.resolve()}}class ml{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return Promise.resolve(new wl(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new vl),i.load(e?.motion)}needsPlugin(){return!0}}const _l=new Map([["aliceblue",{r:240,g:248,b:255}],["antiquewhite",{r:250,g:235,b:215}],["aqua",{r:0,g:255,b:255}],["aquamarine",{r:127,g:255,b:212}],["azure",{r:240,g:255,b:255}],["beige",{r:245,g:245,b:220}],["bisque",{r:255,g:228,b:196}],["black",{r:0,g:0,b:0}],["blanchedalmond",{r:255,g:235,b:205}],["blue",{r:0,g:0,b:255}],["blueviolet",{r:138,g:43,b:226}],["brown",{r:165,g:42,b:42}],["burlywood",{r:222,g:184,b:135}],["cadetblue",{r:95,g:158,b:160}],["chartreuse",{r:127,g:255,b:0}],["chocolate",{r:210,g:105,b:30}],["coral",{r:255,g:127,b:80}],["cornflowerblue",{r:100,g:149,b:237}],["cornsilk",{r:255,g:248,b:220}],["crimson",{r:220,g:20,b:60}],["cyan",{r:0,g:255,b:255}],["darkblue",{r:0,g:0,b:139}],["darkcyan",{r:0,g:139,b:139}],["darkgoldenrod",{r:184,g:134,b:11}],["darkgray",{r:169,g:169,b:169}],["darkgreen",{r:0,g:100,b:0}],["darkgrey",{r:169,g:169,b:169}],["darkkhaki",{r:189,g:183,b:107}],["darkmagenta",{r:139,g:0,b:139}],["darkolivegreen",{r:85,g:107,b:47}],["darkorange",{r:255,g:140,b:0}],["darkorchid",{r:153,g:50,b:204}],["darkred",{r:139,g:0,b:0}],["darksalmon",{r:233,g:150,b:122}],["darkseagreen",{r:143,g:188,b:143}],["darkslateblue",{r:72,g:61,b:139}],["darkslategray",{r:47,g:79,b:79}],["darkslategrey",{r:47,g:79,b:79}],["darkturquoise",{r:0,g:206,b:209}],["darkviolet",{r:148,g:0,b:211}],["deeppink",{r:255,g:20,b:147}],["deepskyblue",{r:0,g:191,b:255}],["dimgray",{r:105,g:105,b:105}],["dimgrey",{r:105,g:105,b:105}],["dodgerblue",{r:30,g:144,b:255}],["firebrick",{r:178,g:34,b:34}],["floralwhite",{r:255,g:250,b:240}],["forestgreen",{r:34,g:139,b:34}],["fuchsia",{r:255,g:0,b:255}],["gainsboro",{r:220,g:220,b:220}],["ghostwhite",{r:248,g:248,b:255}],["gold",{r:255,g:215,b:0}],["goldenrod",{r:218,g:165,b:32}],["gray",{r:128,g:128,b:128}],["green",{r:0,g:128,b:0}],["greenyellow",{r:173,g:255,b:47}],["grey",{r:128,g:128,b:128}],["honeydew",{r:240,g:255,b:240}],["hotpink",{r:255,g:105,b:180}],["indianred",{r:205,g:92,b:92}],["indigo",{r:75,g:0,b:130}],["ivory",{r:255,g:255,b:240}],["khaki",{r:240,g:230,b:140}],["lavender",{r:230,g:230,b:250}],["lavenderblush",{r:255,g:240,b:245}],["lawngreen",{r:124,g:252,b:0}],["lemonchiffon",{r:255,g:250,b:205}],["lightblue",{r:173,g:216,b:230}],["lightcoral",{r:240,g:128,b:128}],["lightcyan",{r:224,g:255,b:255}],["lightgoldenrodyellow",{r:250,g:250,b:210}],["lightgray",{r:211,g:211,b:211}],["lightgreen",{r:144,g:238,b:144}],["lightgrey",{r:211,g:211,b:211}],["lightpink",{r:255,g:182,b:193}],["lightsalmon",{r:255,g:160,b:122}],["lightseagreen",{r:32,g:178,b:170}],["lightskyblue",{r:135,g:206,b:250}],["lightslategray",{r:119,g:136,b:153}],["lightslategrey",{r:119,g:136,b:153}],["lightsteelblue",{r:176,g:196,b:222}],["lightyellow",{r:255,g:255,b:224}],["lime",{r:0,g:255,b:0}],["limegreen",{r:50,g:205,b:50}],["linen",{r:250,g:240,b:230}],["magenta",{r:255,g:0,b:255}],["maroon",{r:128,g:0,b:0}],["mediumaquamarine",{r:102,g:205,b:170}],["mediumblue",{r:0,g:0,b:205}],["mediumorchid",{r:186,g:85,b:211}],["mediumpurple",{r:147,g:112,b:219}],["mediumseagreen",{r:60,g:179,b:113}],["mediumslateblue",{r:123,g:104,b:238}],["mediumspringgreen",{r:0,g:250,b:154}],["mediumturquoise",{r:72,g:209,b:204}],["mediumvioletred",{r:199,g:21,b:133}],["midnightblue",{r:25,g:25,b:112}],["mintcream",{r:245,g:255,b:250}],["mistyrose",{r:255,g:228,b:225}],["moccasin",{r:255,g:228,b:181}],["navajowhite",{r:255,g:222,b:173}],["navy",{r:0,g:0,b:128}],["oldlace",{r:253,g:245,b:230}],["olive",{r:128,g:128,b:0}],["olivedrab",{r:107,g:142,b:35}],["orange",{r:255,g:165,b:0}],["orangered",{r:255,g:69,b:0}],["orchid",{r:218,g:112,b:214}],["palegoldenrod",{r:238,g:232,b:170}],["palegreen",{r:152,g:251,b:152}],["paleturquoise",{r:175,g:238,b:238}],["palevioletred",{r:219,g:112,b:147}],["papayawhip",{r:255,g:239,b:213}],["peachpuff",{r:255,g:218,b:185}],["peru",{r:205,g:133,b:63}],["pink",{r:255,g:192,b:203}],["plum",{r:221,g:160,b:221}],["powderblue",{r:176,g:224,b:230}],["purple",{r:128,g:0,b:128}],["rebeccapurple",{r:102,g:51,b:153}],["red",{r:255,g:0,b:0}],["rosybrown",{r:188,g:143,b:143}],["royalblue",{r:65,g:105,b:225}],["saddlebrown",{r:139,g:69,b:19}],["salmon",{r:250,g:128,b:114}],["sandybrown",{r:244,g:164,b:96}],["seagreen",{r:46,g:139,b:87}],["seashell",{r:255,g:245,b:238}],["sienna",{r:160,g:82,b:45}],["silver",{r:192,g:192,b:192}],["skyblue",{r:135,g:206,b:235}],["slateblue",{r:106,g:90,b:205}],["slategray",{r:112,g:128,b:144}],["slategrey",{r:112,g:128,b:144}],["snow",{r:255,g:250,b:250}],["springgreen",{r:0,g:255,b:127}],["steelblue",{r:70,g:130,b:180}],["tan",{r:210,g:180,b:140}],["teal",{r:0,g:128,b:128}],["thistle",{r:216,g:191,b:216}],["tomato",{r:255,g:99,b:71}],["turquoise",{r:64,g:224,b:208}],["violet",{r:238,g:130,b:238}],["wheat",{r:245,g:222,b:179}],["white",{r:255,g:255,b:255}],["whitesmoke",{r:245,g:245,b:245}],["yellow",{r:255,g:255,b:0}],["yellowgreen",{r:154,g:205,b:50}]]);class bl{constructor(){this.key="named",this.stringPrefix=""}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if(!t||"string"!=typeof t)return;const e=_l.get(t.toLowerCase());if(e)return{...e,a:255};ze().error("Color not found",t)}}const Sl=255;function xl(t){const e=t.l/f,i=t.c,s=t.h/360,n={r:0,g:0,b:0};return n.r=Math.floor(e*Sl),n.g=Math.floor(i*Sl),n.b=Math.floor(s*Sl),n}function Pl(t){const e=t.l/f,i=t.c/f,s=t.h/360,n={r:0,g:0,b:0};return n.r=Math.floor(e*Sl),n.g=Math.floor(i*Sl),n.b=Math.floor(s*Sl),n}class Cl{constructor(){this.key="lch",this.stringPrefix="lch"}handleColor(t){const e=t.value.lch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return xl(e)}handleRangeColor(t){const e=t.value.lch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return xl({l:he(e.l),c:he(e.c),h:he(e.h)})}parseString(t){if(!t.startsWith("lch"))return;const e=/lch\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i.exec(t),i=1,s=3,n=5,o=7;return e?{a:(a={a:e[o]?Pe(e[o]):1,c:parseFloat(e[s]),h:parseFloat(e[n]),l:parseFloat(e[i])}).a,...xl(a)}:void 0;var a}}class Ol{constructor(){this.key="oklch",this.stringPrefix="oklch"}handleColor(t){const e=t.value.oklch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return Pl(e)}handleRangeColor(t){const e=t.value.oklch??t.value;if(void 0!==e.l&&void 0!==e.c&&void 0!==e.h)return Pl({l:he(e.l),c:he(e.c),h:he(e.h)})}parseString(t){if(!t.startsWith("oklch"))return;const e=/oklch\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(°)?(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i.exec(t),i=1,s=3,n=5,o=7;return e?{a:(a={a:e[o]?Pe(e[o]):1,c:parseFloat(e[s]),h:parseFloat(e[n]),l:parseFloat(e[i])}).a,...Pl(a)}:void 0;var a}}class kl extends Ms{constructor(){super(),this.value=45}load(t){Xt(t)||super.load(t)}}class Tl{constructor(){this.animation=new xs,this.enable=!1,this.opacity=1,this.rotation=new kl,this.width=1}load(t){Xt(t)||(this.animation.load(t.animation),this.rotation.load(t.rotation),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=ue(t.opacity)),void 0!==t.width&&(this.width=ue(t.width)),void 0!==t.radius&&(this.radius=ue(t.radius)),void 0!==t.color&&(this.color=as.create(this.color,t.color)))}}var Vl;!function(t){t.front="front",t.back="back"}(Vl||(Vl={}));const Ml=2*Math.PI,El=.5*Math.PI,Al=Math.PI+El;class zl{constructor(t,e){this._engine=e,this._container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Vl.front)}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Vl.back)}drawOrbit(t,e){const i=this._container;let s,n;switch(e){case Vl.back:s=El,n=Al;break;case Vl.front:s=Al,n=El;break;default:s=0,n=Ml}i.canvas.draw((e=>{!function(t,e,i,s,n,o,a,r,c){if(o<=0)return;const h=e.getPosition();i&&(t.strokeStyle=Gi(i,n)),t.lineWidth=o;const l=fe(a);t.beginPath(),t.ellipse(h.x,h.y,.5*s,2*s,l,r,c),t.stroke()}(e,t,t.orbitColor??t.getFillColor(),t.retina.orbitRadius??i.retina.orbitRadius??t.getRadius(),t.orbitOpacity??1,t.orbitWidth??1,(t.orbitRotation??0)*i.retina.pixelRatio,s,n)}))}init(t){const e=this._container,i=t.options.orbit;i?.enable&&(t.orbitRotation=he(i.rotation.value),t.orbitColor=ki(this._engine,i.color),t.retina.orbitRadius=void 0!==i.radius?he(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?he(i.animation.speed):0,t.orbitWidth=he(i.width),t.orbitOpacity=he(i.opacity))}isEnabled(t){const e=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.orbit||(t.orbit=new Tl);for(const i of e)t.orbit.load(i?.orbit)}update(t,e){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/Ml)*e.factor)}}class Rl extends Ms{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),Xt(t)||(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=ue(t.distance)),void 0!==t.duration&&(this.duration=ue(t.duration)),void 0!==t.factor&&(this.factor=ue(t.factor)),void 0!==t.speed&&(this.speed=ue(t.speed)))}}class Gl extends kn{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;if(!t.repulse){const i=t.options.repulse;if(!i)return;t.repulse={distance:he(i.distance)*e.retina.pixelRatio,speed:he(i.speed),factor:he(i.factor)}}const i=t.getPosition(),s=e.particles.quadTree.queryCircle(i,t.repulse.distance);for(const e of s){if(t===e||e.destroyed)continue;const s=e.getPosition(),{dx:n,dy:o,distance:a}=pe(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=ae((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=Jt.create(n/a*i,o/a*i);e.position.addTo(s)}else{const t=Jt.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new Rl);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}var Il;!function(t){t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Il||(Il={}));class Dl{constructor(){this.validTypes=["path"]}draw(t){const{context:e,particle:i,radius:s}=t;i.pathData&&function(t,e,i){const s=i.segments[0].values[0];t.moveTo(s.x*e,s.y*e);for(const s of i.segments){const i=s.values[0],n=1,o=2,a=3;switch(s.type){case Il.line:t.lineTo(i.x*e,i.y*e);break;case Il.bezier:t.bezierCurveTo(s.values[n].x*e,s.values[n].y*e,s.values[o].x*e,s.values[o].y*e,s.values[a].x*e,s.values[a].y*e);break;case Il.quadratic:t.quadraticCurveTo(s.values[n].x*e,s.values[n].y*e,s.values[o].x*e,s.values[o].y*e);break;case Il.arc:t.arc(i.x*e,i.y*e,s.values[n].x*e,s.values[o].x,s.values[o].y);break;case Il.ellipse:t.ellipse(i.x*e,i.y*e,s.values[n].x*e,s.values[n].y*e,s.values[o].x,s.values[a].x,s.values[a].y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const n=i.segments[s],o=n.values[0],a=1,r=2;switch(n.type){case Il.line:t.lineTo(o.x*-e,o.y*e);break;case Il.bezier:t.bezierCurveTo(-n.values[r].x*e,n.values[r].y*e,-n.values[a].x*e,n.values[a].y*e,o.x*e,o.y*e);break;case Il.quadratic:t.quadraticCurveTo(-n.values[a].x*e,n.values[a].y*e,-n.values[r].x*e,n.values[r].y*e);case Il.arc:case Il.ellipse:}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=Qe({},i))}}class Ll{constructor(t,e,i,s){this.x=t,this.y=e,this.z=i,this.w=s}dot2(t,e){return this.x*t+this.y*e}dot3(t,e,i){return this.dot2(t,e)+this.z*i}dot4(t,e,i,s){return this.dot3(t,e,i)+this.w*s}}class Hl{constructor(){this._grad4=[new Ll(0,1,1,1),new Ll(0,1,1,-1),new Ll(0,1,-1,1),new Ll(0,1,-1,-1),new Ll(0,-1,1,1),new Ll(0,-1,1,-1),new Ll(0,-1,-1,1),new Ll(0,-1,-1,-1),new Ll(1,0,1,1),new Ll(1,0,1,-1),new Ll(1,0,-1,1),new Ll(1,0,-1,-1),new Ll(-1,0,1,1),new Ll(-1,0,1,-1),new Ll(-1,0,-1,1),new Ll(-1,0,-1,-1),new Ll(1,1,0,1),new Ll(1,1,0,-1),new Ll(1,-1,0,1),new Ll(1,-1,0,-1),new Ll(-1,1,0,1),new Ll(-1,1,0,-1),new Ll(-1,-1,0,1),new Ll(-1,-1,0,-1),new Ll(1,1,1,0),new Ll(1,1,-1,0),new Ll(1,-1,1,0),new Ll(1,-1,-1,0),new Ll(-1,1,1,0),new Ll(-1,1,-1,0),new Ll(-1,-1,1,0),new Ll(-1,-1,-1,0)],this._p=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],this._gradP=new Array(512),this._perm=new Array(512)}noise2d(t,e){const{_gradP:i,_perm:s}=this;let n=Math.floor(t),o=Math.floor(e);t-=n,e-=o,n&=255,o&=255;const a=i[n+s[o]].dot2(t,e),r=i[n+s[o+1]].dot2(t,e-1),c=i[n+1+s[o]].dot2(t-1,e),h=i[n+1+s[o+1]].dot2(t-1,e-1),l=this._fade(t);return this._lerp(this._lerp(a,c,l),this._lerp(r,h,l),this._fade(e))}noise3d(t,e,i){const{_gradP:s,_perm:n}=this;let o=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=o,e-=a,i-=r,o&=255,a&=255,r&=255;const c=s[o+n[a+n[r]]].dot3(t,e,i),h=s[o+n[a+n[r+1]]].dot3(t,e,i-1),l=s[o+n[a+1+n[r]]].dot3(t,e-1,i),d=s[o+n[a+1+n[r+1]]].dot3(t,e-1,i-1),u=s[o+1+n[a+n[r]]].dot3(t-1,e,i),p=s[o+1+n[a+n[r+1]]].dot3(t-1,e,i-1),g=s[o+1+n[a+1+n[r]]].dot3(t-1,e-1,i),f=s[o+1+n[a+1+n[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),v=this._fade(e),w=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),w),this._lerp(this._lerp(l,g,y),this._lerp(d,f,y),w),v)}noise4d(t,e,i,s){const{_gradP:n,_perm:o}=this;let a=Math.floor(t),r=Math.floor(e),c=Math.floor(i),h=Math.floor(s);t-=a,e-=r,i-=c,s-=h,a&=255,r&=255,c&=255,h&=255;const l=this._fade(t),d=this._fade(e),u=this._fade(i),p=this._fade(s),g=(t,e,i,s)=>n[a+t+o[r+e+o[c+i+o[h+s]]]],f=g(0,0,0,0).dot4(t,e,i,s),y=g(0,0,0,1).dot4(t,e,i,s-1),v=g(0,0,1,0).dot4(t,e,i-1,s),w=g(0,0,1,1).dot4(t,e,i-1,s-1),m=g(0,1,0,0).dot4(t,e-1,i,s),_=g(0,1,0,1).dot4(t,e-1,i,s-1),b=g(0,1,1,0).dot4(t,e-1,i-1,s),S=g(0,1,1,1).dot4(t,e-1,i-1,s-1),x=g(1,0,0,0).dot4(t-1,e,i,s),P=g(1,0,0,1).dot4(t-1,e,i,s-1),C=g(1,0,1,0).dot4(t-1,e,i-1,s),O=g(1,0,1,1).dot4(t-1,e,i-1,s-1),k=g(1,1,0,0).dot4(t-1,e-1,i,s),T=g(1,1,0,1).dot4(t-1,e-1,i,s-1),V=g(1,1,1,0).dot4(t-1,e-1,i-1,s),M=g(1,1,1,1).dot4(t-1,e-1,i-1,s-1),E=this._lerp(f,x,l),A=this._lerp(y,P,l),z=this._lerp(v,C,l),R=this._lerp(w,O,l),G=this._lerp(E,z,u),I=this._lerp(A,R,u),D=this._lerp(m,k,l),L=this._lerp(_,T,l),H=this._lerp(b,V,l),F=this._lerp(S,M,l),B=this._lerp(D,H,u),N=this._lerp(L,F,u),U=this._lerp(G,B,d),q=this._lerp(I,N,d);return this._lerp(U,q,p)}seed(t){const{_grad4:e,_gradP:i,_perm:s,_p:n}=this;let o=t;o>0&&o<1&&(o*=65536),o=Math.floor(o),o<256&&(o|=o<<8);const a=e.length;for(let t=0;t<256;t++){const r=1&t?n[t]^255&o:n[t]^o>>8&255;s[t]=s[t+256]=r,i[t]=i[t+256]=e[r%a]}}_fade(t){return t*t*t*(t*(6*t-15)+10)}_lerp(t,e,i){return(1-i)*t+i*e}}const Fl=2*Math.PI,Bl={draw:!1,size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4,z:4e4}};class Nl{constructor(){this.noiseGen=new Hl,this.field=[],this.noiseW=0,this.options=Qe({},Bl)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),n=Math.max(Math.floor(e.y/i),0),o=Math.max(Math.floor(e.z/i),0),a=Jt.origin,{field:r}=this;return r?.[s]?.[n]?.[o]?r[s][n][o].copy():a}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_calculateField(){const{field:t,noiseGen:e,options:i,noiseW:s}=this,n=i.factor.length,o=i.factor.angle;for(let a=0;a<i.columns;a++)for(let r=0;r<i.rows;r++)for(let c=0;c<i.layers;c++){const h=t[a][r][c];h.length=e.noise4d(a*n+i.offset.x,r*n+i.offset.y,c*n+i.offset.z,s),h.angle=e.noise4d(a*o,r*o,c*o,s)*Fl}}_drawField(t){const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const n=e[s];for(let e=0;e<i.rows;e++){const i=n[e][0],{angle:o,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(o),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*a),t.stroke(),t.setTransform(1,0,0,1,0,0)}}}_initField(){const{columns:t,rows:e,layers:i}=this.options;this.field=new Array(t);for(let s=0;s<t;s++){this.field[s]=new Array(e);for(let t=0;t<e;t++){this.field[s][t]=new Array(i);for(let e=0;e<i;e++)this.field[s][t][e]=Jt.origin}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options,{options:i}=this;i.width=t.canvas.size.width,i.height=t.canvas.size.height,i.size=e.size>0?e.size:Bl.size,i.increment=e.increment>0?e.increment:Bl.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??Bl.offset.x,i.offset.y=s?.y??Bl.offset.y,i.offset.z=s?.z??Bl.offset.z;const n=e.factor;i.factor.angle=n?.angle??Bl.factor.angle,i.factor.length=n?.length??Bl.factor.length,i.seed=e.seed,this.noiseGen.seed(i.seed??ie()),i.columns=Math.floor(i.width/i.size)+1,i.rows=Math.floor(i.height/i.size)+1,i.layers=Math.floor(t.zLayers/i.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Ul="perlinNoise";class ql{constructor(){this.enable=!1,this.dimensions=2,this.radius=0,this.retries=30,this.steps=0}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.dimensions&&(this.dimensions=t.dimensions),void 0!==t.radius&&(this.radius=t.radius),void 0!==t.retries&&(this.retries=t.retries))}}const $l=2*Math.PI;class jl{constructor(t,e,i,s,n){this.size={...t},this.radius=e,this.retries=i,this.dimensions=s,this.cellSize=Math.floor(this.radius/Math.sqrt(this.dimensions)),this.cols=Math.floor(this.size.width/this.cellSize),this.rows=Math.floor(this.size.height/this.cellSize),this.points=[],this.active=[],this.grid=[],this.firstPoint=n?{...n}:void 0,this.reset()}addPoint(t){const e={position:{...t},gridPosition:{x:Math.floor(t.x/this.cellSize),y:Math.floor(t.y/this.cellSize)}},i=this.points.length;this.points.push(e),this.grid[e.gridPosition.y][e.gridPosition.x]=i,this.active.push(i)}getRandom(t,e){return Math.floor(ie()*(e-t))+t}initialiseGrid(){for(let t=0;t<=this.rows;t++){this.grid[t]=[];for(let e=0;e<=this.cols;e++)this.grid[t][e]=-1}}reset(){if(this.points=[],this.active=[],this.grid=[],this.initialiseGrid(),this.firstPoint)this.addPoint(this.firstPoint);else{const t=0;this.addPoint({x:this.getRandom(t,this.size.width),y:this.getRandom(t,this.size.height)})}}async run(){this.reset();for(;this.active.length>0;)await this.steps(1)}async steps(t){for(let e=0;e<t;e++)this.active.length<=0||await this._step()}_getNewPoint(t,e){const i=e*($l/this.retries),s=this.getRandom(this.radius,2*this.radius),n=Math.cos(i)*s,o=Math.sin(i)*s,a={x:Math.floor(t.position.x+n),y:Math.floor(t.position.y+o)},r=Math.floor(a.x/this.cellSize),c=Math.floor(a.y/this.cellSize);if(a.x>0&&a.x<this.size.width&&a.y>0&&a.y<this.size.height&&this.grid[c][r]<0){for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++){const i={x:r+e,y:c+t};if(i.x>=0&&i.y>=0&&i.x<this.cols&&i.y<this.rows&&(i.x!==r||i.y!==c)&&this.grid[i.y][i.x]>=0){const t=this.grid[i.y][i.x];if(ge(a,this.points[t].position)<this.radius)return}}return a}}async _step(){const t=this.getRandom(0,this.active.length);return new Promise((e=>{let i=!1;for(let e=0;e<this.retries;e++){const s=this._getNewPoint(this.points[this.active[t]],e);if(s){i=!0,this.addPoint(s);break}}if(!i){const e=1;this.active.splice(t,e)}e()}))}}class Ql{constructor(t,e){this._container=t,this._engine=e,this._currentIndex=0}async init(){await this._initData()}particlePosition(t){const e=this._container.actualOptions.poisson;if(this.poissonDisc&&e?.enable&&!(this._currentIndex>=this.poissonDisc.points.length))return t??this.poissonDisc?.points[this._currentIndex++]?.position}resize(){const t=this._container,e=t.actualOptions.poisson;if(!e?.enable)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout((()=>{(async()=>{await this._initData(),await t.particles.redraw()})()}),250)}stop(){delete this.poissonDisc}async _initData(){const t=this._container,e=t.actualOptions.poisson,i=t.actualOptions.particles,s=t.canvas.size,n=t.retina.pixelRatio;if(!e?.enable)return;this._currentIndex=0,this.poissonDisc=new jl(s,e.radius?e.radius*n:Math.max(de(i.size.value)*n,Math.sqrt(s.width*s.height/i.number.value)),e.retries,e.dimensions);e.steps>0?await this.poissonDisc.steps(e.steps):await this.poissonDisc.run()}}class Wl{constructor(t){this.id="poisson",this._engine=t}getPlugin(t){return Promise.resolve(new Ql(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.poisson;void 0===i?.load&&(t.poisson=i=new ql),i.load(e?.poisson)}needsPlugin(t){return t?.poisson?.enable??!1}}!function(){try{if("undefined"==typeof window)return;"SVGPathSeg"in window||(window.SVGPathSeg=function(t,e,i){this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=i},window.SVGPathSeg.prototype.classname="SVGPathSeg",window.SVGPathSeg.PATHSEG_UNKNOWN=0,window.SVGPathSeg.PATHSEG_CLOSEPATH=1,window.SVGPathSeg.PATHSEG_MOVETO_ABS=2,window.SVGPathSeg.PATHSEG_MOVETO_REL=3,window.SVGPathSeg.PATHSEG_LINETO_ABS=4,window.SVGPathSeg.PATHSEG_LINETO_REL=5,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS=6,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL=7,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS=8,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL=9,window.SVGPathSeg.PATHSEG_ARC_ABS=10,window.SVGPathSeg.PATHSEG_ARC_REL=11,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS=12,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL=13,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS=14,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL=15,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19,window.SVGPathSeg.prototype._segmentChanged=function(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)},window.SVGPathSegClosePath=function(t){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CLOSEPATH,"z",t)},window.SVGPathSegClosePath.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegClosePath.prototype.toString=function(){return"[object SVGPathSegClosePath]"},window.SVGPathSegClosePath.prototype._asPathString=function(){return this.pathSegTypeAsLetter},window.SVGPathSegClosePath.prototype.clone=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathSegMovetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_ABS,"M",t),this._x=e,this._y=i},window.SVGPathSegMovetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoAbs.prototype.toString=function(){return"[object SVGPathSegMovetoAbs]"},window.SVGPathSegMovetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoAbs.prototype.clone=function(){return new window.SVGPathSegMovetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegMovetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_MOVETO_REL,"m",t),this._x=e,this._y=i},window.SVGPathSegMovetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegMovetoRel.prototype.toString=function(){return"[object SVGPathSegMovetoRel]"},window.SVGPathSegMovetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegMovetoRel.prototype.clone=function(){return new window.SVGPathSegMovetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegMovetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_ABS,"L",t),this._x=e,this._y=i},window.SVGPathSegLinetoAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoAbs.prototype.toString=function(){return"[object SVGPathSegLinetoAbs]"},window.SVGPathSegLinetoAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoAbs.prototype.clone=function(){return new window.SVGPathSegLinetoAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_REL,"l",t),this._x=e,this._y=i},window.SVGPathSegLinetoRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoRel.prototype.toString=function(){return"[object SVGPathSegLinetoRel]"},window.SVGPathSegLinetoRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegLinetoRel.prototype.clone=function(){return new window.SVGPathSegLinetoRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegLinetoRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicAbs=function(t,e,i,s,n,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=n,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicAbs]"},window.SVGPathSegCurvetoCubicAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicAbs(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicRel=function(t,e,i,s,n,o,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=n,this._x2=o,this._y2=a},window.SVGPathSegCurvetoCubicRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicRel]"},window.SVGPathSegCurvetoCubicRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicRel(void 0,this._x,this._y,this._x1,this._y1,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticAbs=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=n},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=n},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x1} ${this._y1} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,s,n,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=n,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcAbs.prototype.toString=function(){return"[object SVGPathSegArcAbs]"},window.SVGPathSegArcAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcAbs.prototype.clone=function(){return new window.SVGPathSegArcAbs(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcAbs.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcRel=function(t,e,i,s,n,o,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=n,this._angle=o,this._largeArcFlag=a,this._sweepFlag=r},window.SVGPathSegArcRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegArcRel.prototype.toString=function(){return"[object SVGPathSegArcRel]"},window.SVGPathSegArcRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._r1} ${this._r2} ${this._angle} ${this._largeArcFlag?"1":"0"} ${this._sweepFlag?"1":"0"} ${this._x} ${this._y}`},window.SVGPathSegArcRel.prototype.clone=function(){return new window.SVGPathSegArcRel(void 0,this._x,this._y,this._r1,this._r2,this._angle,this._largeArcFlag,this._sweepFlag)},Object.defineProperty(window.SVGPathSegArcRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r1",{get:function(){return this._r1},set:function(t){this._r1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"r2",{get:function(){return this._r2},set:function(t){this._r2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"angle",{get:function(){return this._angle},set:function(t){this._angle=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"largeArcFlag",{get:function(){return this._largeArcFlag},set:function(t){this._largeArcFlag=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegArcRel.prototype,"sweepFlag",{get:function(){return this._sweepFlag},set:function(t){this._sweepFlag=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS,"H",t),this._x=e},window.SVGPathSegLinetoHorizontalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalAbs]"},window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalAbs(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoHorizontalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL,"h",t),this._x=e},window.SVGPathSegLinetoHorizontalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoHorizontalRel.prototype.toString=function(){return"[object SVGPathSegLinetoHorizontalRel]"},window.SVGPathSegLinetoHorizontalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x}`},window.SVGPathSegLinetoHorizontalRel.prototype.clone=function(){return new window.SVGPathSegLinetoHorizontalRel(void 0,this._x)},Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalAbs=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS,"V",t),this._y=e},window.SVGPathSegLinetoVerticalAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalAbs.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalAbs]"},window.SVGPathSegLinetoVerticalAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalAbs.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalAbs(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegLinetoVerticalRel=function(t,e){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL,"v",t),this._y=e},window.SVGPathSegLinetoVerticalRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegLinetoVerticalRel.prototype.toString=function(){return"[object SVGPathSegLinetoVerticalRel]"},window.SVGPathSegLinetoVerticalRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._y}`},window.SVGPathSegLinetoVerticalRel.prototype.clone=function(){return new window.SVGPathSegLinetoVerticalRel(void 0,this._y)},Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=n},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=n},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x2} ${this._y2} ${this._x} ${this._y}`},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return`${this.pathSegTypeAsLetter} ${this._x} ${this._y}`},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,s,n,o){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,n,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,n,o){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,n,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,s){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,s,n,o,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,n,o,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,n,o,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,n,o,a)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs=function(t){return new window.SVGPathSegLinetoHorizontalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel=function(t){return new window.SVGPathSegLinetoHorizontalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs=function(t){return new window.SVGPathSegLinetoVerticalAbs(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel=function(t){return new window.SVGPathSegLinetoVerticalRel(void 0,t)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,s){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel=function(t,e){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,t,e)},"getPathSegAtLength"in window.SVGPathElement.prototype||(window.SVGPathElement.prototype.getPathSegAtLength=function(t){if(void 0===t||!isFinite(t))throw"Invalid arguments.";const e=document.createElementNS("http://www.w3.org/2000/svg","path");e.setAttribute("d",this.getAttribute("d"));let i=e.pathSegList.numberOfItems-1;if(i<=0)return 0;do{if(e.pathSegList.removeItem(i),t>e.getTotalLength())break;i--}while(i>0);return i})),"SVGPathSegList"in window&&"appendItem"in window.SVGPathSegList.prototype||(window.SVGPathSegList=function(t){this._pathElement=t,this._list=this._parsePath(this._pathElement.getAttribute("d")),this._mutationObserverConfig={attributes:!0,attributeFilter:["d"]},this._pathElementMutationObserver=new MutationObserver(this._updateListFromPathMutations.bind(this)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.classname="SVGPathSegList",Object.defineProperty(window.SVGPathSegList.prototype,"numberOfItems",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathSegList.prototype,"length",{get:function(){return this._checkPathSynchronizedToList(),this._list.length},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"pathSegList",{get:function(){return this._pathSegList||(this._pathSegList=new window.SVGPathSegList(this)),this._pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"normalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),Object.defineProperty(window.SVGPathElement.prototype,"animatedNormalizedPathSegList",{get:function(){return this.pathSegList},enumerable:!0}),window.SVGPathSegList.prototype._checkPathSynchronizedToList=function(){this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords())},window.SVGPathSegList.prototype._updateListFromPathMutations=function(t){if(!this._pathElement)return;let e=!1;t.forEach((function(t){"d"==t.attributeName&&(e=!0)})),e&&(this._list=this._parsePath(this._pathElement.getAttribute("d")))},window.SVGPathSegList.prototype._writeListToPath=function(){this._pathElementMutationObserver.disconnect(),this._pathElement.setAttribute("d",window.SVGPathSegList._pathSegArrayAsString(this._list)),this._pathElementMutationObserver.observe(this._pathElement,this._mutationObserverConfig)},window.SVGPathSegList.prototype.segmentChanged=function(){this._writeListToPath()},window.SVGPathSegList.prototype.clear=function(){this._checkPathSynchronizedToList(),this._list.forEach((function(t){t._owningPathSegList=null})),this._list=[],this._writeListToPath()},window.SVGPathSegList.prototype.initialize=function(t){return this._checkPathSynchronizedToList(),this._list=[t],t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype._checkValidIndex=function(t){if(isNaN(t)||t<0||t>=this.numberOfItems)throw"INDEX_SIZE_ERR"},window.SVGPathSegList.prototype.getItem=function(t){return this._checkPathSynchronizedToList(),this._checkValidIndex(t),this._list[t]},window.SVGPathSegList.prototype.insertItemBefore=function(t,e){return this._checkPathSynchronizedToList(),e>this.numberOfItems&&(e=this.numberOfItems),t._owningPathSegList&&(t=t.clone()),this._list.splice(e,0,t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.replaceItem=function(t,e){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._checkValidIndex(e),this._list[e]=t,t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList.prototype.removeItem=function(t){this._checkPathSynchronizedToList(),this._checkValidIndex(t);const e=this._list[t];return this._list.splice(t,1),this._writeListToPath(),e},window.SVGPathSegList.prototype.appendItem=function(t){return this._checkPathSynchronizedToList(),t._owningPathSegList&&(t=t.clone()),this._list.push(t),t._owningPathSegList=this,this._writeListToPath(),t},window.SVGPathSegList._pathSegArrayAsString=function(t){let e="",i=!0;return t.forEach((function(t){i?(i=!1,e+=t._asPathString()):e+=` ${t._asPathString()}`})),e},window.SVGPathSegList.prototype._parsePath=function(t){if(!t||!t.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const s=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};s.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},s.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},s.prototype._skipOptionalSpacesOrDelimiter=function(){return!(this._currentIndex<this._endIndex&&!this._isCurrentSpace()&&","!=this._string.charAt(this._currentIndex))&&(this._skipOptionalSpaces()&&this._currentIndex<this._endIndex&&","==this._string.charAt(this._currentIndex)&&(this._currentIndex++,this._skipOptionalSpaces()),this._currentIndex<this._endIndex)},s.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},s.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},s.prototype._pathSegTypeFromChar=function(t){switch(t){case"Z":case"z":return window.SVGPathSeg.PATHSEG_CLOSEPATH;case"M":return window.SVGPathSeg.PATHSEG_MOVETO_ABS;case"m":return window.SVGPathSeg.PATHSEG_MOVETO_REL;case"L":return window.SVGPathSeg.PATHSEG_LINETO_ABS;case"l":return window.SVGPathSeg.PATHSEG_LINETO_REL;case"C":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS;case"c":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL;case"Q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS;case"q":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL;case"A":return window.SVGPathSeg.PATHSEG_ARC_ABS;case"a":return window.SVGPathSeg.PATHSEG_ARC_REL;case"H":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS;case"h":return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL;case"V":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS;case"v":return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL;case"S":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS;case"s":return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL;case"T":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS;case"t":return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL;default:return window.SVGPathSeg.PATHSEG_UNKNOWN}},s.prototype._nextCommandHelper=function(t,e){return("+"==t||"-"==t||"."==t||t>="0"&&t<="9")&&e!=window.SVGPathSeg.PATHSEG_CLOSEPATH?e==window.SVGPathSeg.PATHSEG_MOVETO_ABS?window.SVGPathSeg.PATHSEG_LINETO_ABS:e==window.SVGPathSeg.PATHSEG_MOVETO_REL?window.SVGPathSeg.PATHSEG_LINETO_REL:e:window.SVGPathSeg.PATHSEG_UNKNOWN},s.prototype.initialCommandIsMoveTo=function(){if(!this.hasMoreData())return!0;const t=this.peekSegmentType();return t==window.SVGPathSeg.PATHSEG_MOVETO_ABS||t==window.SVGPathSeg.PATHSEG_MOVETO_REL},s.prototype._parseNumber=function(){let t=0,e=0,i=1,s=0,n=1,o=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,n=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,s+=(this._string.charAt(this._currentIndex)-"0")/i,this._currentIndex+=1}if(this._currentIndex!=a&&this._currentIndex+1<this._endIndex&&("e"==this._string.charAt(this._currentIndex)||"E"==this._string.charAt(this._currentIndex))&&"x"!=this._string.charAt(this._currentIndex+1)&&"m"!=this._string.charAt(this._currentIndex+1)){if(this._currentIndex++,"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,o=-1),this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)t*=10,t+=this._string.charAt(this._currentIndex)-"0",this._currentIndex++}let c=e+s;return c*=n,t&&(c*=Math.pow(10,o*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),c):void 0},s.prototype._parseArcFlag=function(){if(this._currentIndex>=this._endIndex)return;let t=!1;const e=this._string.charAt(this._currentIndex++);if("0"==e)t=!1;else{if("1"!=e)return;t=!0}return this._skipOptionalSpacesOrDelimiter(),t},s.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,s=this._pathSegTypeFromChar(t);if(s==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(s=this._nextCommandHelper(t,this._previousCommand),s==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=s,s){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const n=new i,o=new s(t);if(!o.initialCommandIsMoveTo())return[];for(;o.hasMoreData();){const t=o.parseSegment();if(!t)return[];n.appendSegment(t)}return n.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/tsparticles/tsparticles",t)}}();class Zl{constructor(t){this._engine=t,this.color=new as,this.width=.5,this.opacity=1}load(t){Xt(t)||(this.color=as.create(this.color,t.color),$t(this.color.value)&&(this.opacity=Vi(this._engine,this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class Xl{constructor(t){this.enable=!1,this.stroke=new Zl(t)}load(t){if(Xt(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}var Yl,Jl,Kl;!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(Yl||(Yl={}));class td{constructor(){this.arrangement=Yl.onePerPoint}load(t){Xt(t)||void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class ed{constructor(){this.path=[],this.size={height:0,width:0}}load(t){Xt(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.size&&(void 0!==t.size.width&&(this.size.width=t.size.width),void 0!==t.size.height&&(this.size.height=t.size.height)))}}!function(t){t.path="path",t.radius="radius"}(Jl||(Jl={}));class id{constructor(){this.radius=10,this.type=Jl.path}load(t){Xt(t)||(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}!function(t){t.inline="inline",t.inside="inside",t.outside="outside",t.none="none"}(Kl||(Kl={}));class sd{constructor(t){this.draw=new Xl(t),this.enable=!1,this.inline=new td,this.move=new id,this.scale=1,this.type=Kl.none}load(t){Xt(t)||(this.draw.load(t.draw),this.inline.load(t.inline),this.move.load(t.move),void 0!==t.scale&&(this.scale=t.scale),void 0!==t.type&&(this.type=t.type),void 0!==t.enable?this.enable=t.enable:this.enable=this.type!==Kl.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&($t(t.data)?this.data=t.data:(this.data=new ed,this.data.load(t.data))),void 0!==t.position&&(this.position=Qe({},t.position)))}}const nd=0,od=1;function ad(t,e,i,s){const n=Pi(t,s.color);if(!n)return;const o=i[0];e.beginPath(),e.moveTo(o.x,o.y);for(const t of i)e.lineTo(t.x,t.y);e.closePath(),e.strokeStyle=Ri(n),e.lineWidth=s.width,e.stroke()}function rd(t,e,i,s,n){const o=1,a=0,r=0,c=1;e.setTransform(o,a,r,c,n.x,n.y);const h=Pi(t,s.color);h&&(e.strokeStyle=Ri(h,s.opacity),e.lineWidth=s.width,e.stroke(i),e.resetTransform())}function cd(t,e,i){const{dx:s,dy:n}=pe(i,t),{dx:o,dy:a}=pe(e,t),r=(s*o+n*a)/(o**2+a**2),c={x:t.x+o*r,y:t.y+a*r,isOnSegment:r>=nd&&r<=od};return r<nd?(c.x=t.x,c.y=t.y):r>od&&(c.x=e.x,c.y=e.y),c}function hd(t,e,i){const{dx:s,dy:n}=pe(t,e),o=Math.atan2(n,s),a=Jt.create(Math.sin(o),-Math.cos(o)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const ld=`${g} No polygon data loaded.`,dd=`${g} No polygon found, you need to specify SVG url in config.`,ud=0,pd=0,gd=.5;class fd{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||i.type===Kl.none||i.type===Kl.inline)return!0;if(!this.raw)throw new Error(dd);const s=e.canvas.size,n=t?.x??ie()*s.width,o=t?.y??ie()*s.height;let a=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],s=this.raw[e];i.y>o!=s.y>o&&n<(s.x-i.x)*(o-i.y)/(s.y-i.y)+i.x&&(a=!a)}return i.type===Kl.inside?a:i.type===Kl.outside&&!a},this._createPath2D=()=>{if(this._container.actualOptions.polygon&&this.paths?.length)for(const t of this.paths){const e=t.element?.getAttribute("d");if(e){const i=new Path2D(e),s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),n=new Path2D,o=s.scale(this._scale);n.addPath?(n.addPath(i,o),t.path2d=n):delete t.path2d}else delete t.path2d;if(t.path2d??!this.raw)continue;t.path2d=new Path2D;const i=0,s=this.raw[i];t.path2d.moveTo(s.x,s.y),this.raw.forEach(((e,s)=>{s>i&&t.path2d?.lineTo(e.x,e.y)})),t.path2d.closePath()}},this._downloadSvgPath=async(t,e)=>{const i=this._container.actualOptions.polygon;if(!i)return;const s=t??i.url,n=e??!1;if(!s||void 0!==this.paths&&!n)return this.raw;const o=await fetch(s);if(!o.ok)throw new Error(`${g} occurred during polygon mask download`);return this._parseSvgPath(await o.text(),e)},this._drawPoints=()=>{if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})},this._getEquidistantPointByIndex=t=>{const e=this._container.actualOptions;if(!e.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(ld);let i,s=0;const n=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const o=n*t-s;if(o<=e.length){i=e.element.getPointAtLength(o);break}s+=e.length}const o=this._scale;return{x:(i?.x??ud)*o+(this.offset?.x??ud),y:(i?.y??pd)*o+(this.offset?.y??pd)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(ld);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(ld);const t=Ue(this.raw);return{x:t.x,y:t.y}},this._getRandomPointByLength=()=>{if(!this._container.actualOptions.polygon)return;if(!this.raw?.length||!this.paths?.length)throw new Error(ld);const t=Ue(this.paths),e=Math.floor(ie()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x??ud),y:i.y*s+(this.offset?.y??pd)}},this._initRawData=async t=>{const e=this._container.actualOptions.polygon;if(e){if(e.url)this.raw=await this._downloadSvgPath(e.url,t);else if(e.data){const i=e.data;let s;if($t(i))s=i;else{const t=t=>`<path d="${t}" />`,e=Zt(i.path)?i.path.map(t).join(""):t(i.path);s=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width}" height="${i.size.height}">${e}</svg>`}this.raw=this._parseSvgPath(s,t)}this._createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}},this._parseSvgPath=(t,e)=>{const i=e??!1;if(void 0!==this.paths&&!i)return this.raw;const s=this._container,n=s.actualOptions.polygon;if(!n)return;const o=(new DOMParser).parseFromString(t,"image/svg+xml"),a=o.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=o.getElementsByTagName("path")),this.paths=[];for(let t=0;t<r.length;t++){const e=r.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const c=this._scale;this.dimension.width=parseFloat(a.getAttribute("width")??"0")*c,this.dimension.height=parseFloat(a.getAttribute("height")??"0")*c;const h=n.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/f-this.dimension.width*gd,y:l.height*h.y/f-this.dimension.height*gd},function(t,e,i){const s=[];for(const n of t){const t=n.element.pathSegList,o=t?.numberOfItems??0,a={x:0,y:0};for(let n=0;n<o;n++){const o=t?.getItem(n),r=window.SVGPathSeg;switch(o?.pathSegType){case r.PATHSEG_MOVETO_ABS:case r.PATHSEG_LINETO_ABS:case r.PATHSEG_CURVETO_CUBIC_ABS:case r.PATHSEG_CURVETO_QUADRATIC_ABS:case r.PATHSEG_ARC_ABS:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=o;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=o.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=o.y;break;case r.PATHSEG_LINETO_REL:case r.PATHSEG_MOVETO_REL:case r.PATHSEG_CURVETO_CUBIC_REL:case r.PATHSEG_CURVETO_QUADRATIC_REL:case r.PATHSEG_ARC_REL:case r.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case r.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=o;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=o.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=o.y;break;case r.PATHSEG_UNKNOWN:case r.PATHSEG_CLOSEPATH:continue}s.push({x:a.x*e+i.x,y:a.y*e+i.y})}}return s}(this.paths,c,this.offset)},this._polygonBounce=(t,e,i)=>{const s=this._container.actualOptions.polygon;if(!this.raw||!s?.enable||i!==Te.top)return!1;if(s.type===Kl.inside||s.type===Kl.outside){let e,i,s;const n=t.getPosition(),o=t.getRadius(),a=1;for(let r=0,c=this.raw.length-a;r<this.raw.length;c=r++){const a=this.raw[r],h=this.raw[c];e=cd(a,h,n);const l=pe(n,e);if([i,s]=[l.dx,l.dy],l.distance<o)return hd(a,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(n)){const i={x:1,y:1},s=2*o,a=-1;return n.x>=e.x&&(i.x=-1),n.y>=e.y&&(i.y=-1),t.position.x=e.x+s*i.x,t.position.y=e.y+s*i.y,t.velocity.mult(a),!0}}else if(s.type===Kl.inline&&t.initialPosition){const e=ge(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y*gd-i.x,i.y=i.x*gd-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if(e.type===Kl.inline)switch(e.inline.arrangement){case Yl.randomPoint:i=this._getRandomPoint();break;case Yl.randomLength:i=this._getRandomPointByLength();break;case Yl.equidistant:i=this._getEquidistantPointByIndex(t.particles.count);break;case Yl.onePerPoint:case Yl.perPoint:default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:ie()*e.width,y:ie()*e.height}}return this._checkInsidePolygon(i)?i:this._randomPoint()},this._container=t,this._engine=e,this.dimension={height:0,width:0},this._moveRadius=0,this._scale=1}clickPositionValid(t){const e=this._container.actualOptions.polygon;return!!e?.enable&&e.type!==Kl.none&&e.type!==Kl.inline&&this._checkInsidePolygon(t)}draw(t){if(!this.paths?.length)return;const e=this._container.actualOptions.polygon;if(!e?.enable)return;const i=e.draw;if(!i.enable)return;const s=this.raw;for(const e of this.paths){const n=e.path2d;t&&(n&&this.offset?rd(this._engine,t,n,i.stroke,this.offset):s&&ad(this._engine,t,s,i.stroke))}}async init(){const t=this._container,e=t.actualOptions.polygon,i=t.retina.pixelRatio;e&&(this._moveRadius=e.move.radius*i,this._scale=e.scale*i,e.enable&&await this._initRawData())}particleBounce(t,e,i){return this._polygonBounce(t,e,i)}particlePosition(t){const e=this._container.actualOptions.polygon;if(e?.enable&&(this.raw?.length??0)>0)return Qe({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==Kl.inline||t.inline.arrangement!==Yl.onePerPoint&&t.inline.arrangement!==Yl.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===Kl.none)return;this.redrawTimeout&&clearTimeout(this.redrawTimeout);this.redrawTimeout=setTimeout((()=>{(async()=>{await this._initRawData(!0),await t.particles.redraw()})()}),250)}stop(){delete this.raw,delete this.paths}}class yd{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new fd(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.polygon;void 0===i?.load&&(t.polygon=i=new sd(this._engine)),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==Kl.none)}}class vd{constructor(){this._createDirs=()=>{this.dirsList=[];for(let t=0;t<360;t+=360/this.options.sides){const e=this.options.angle+t;this.dirsList.push(Jt.create(Math.cos(e*Math.PI/180),Math.sin(e*Math.PI/180)))}},this.dirsList=[],this.options={sides:6,turnSteps:20,angle:30}}generate(t){const{sides:e}=this.options;void 0===t.hexStep&&(t.hexStep=0),void 0===t.hexDirection&&(t.hexDirection=6===e?2*(3*ie()|0):ie()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=ie()>.5?(t.hexDirection+1)%e:(t.hexDirection+e-1)%e),t.velocity.x=0,t.velocity.y=0,t.hexStep++;const i=this.dirsList[t.hexDirection];return Jt.create(i.x*t.hexSpeed,i.y*t.hexSpeed)}init(t){const e=t.actualOptions.particles.move.path.options;this.options.sides=e.sides>0?e.sides:6,this.options.angle=e.angle??30,this.options.turnSteps=e.turnSteps>=0?e.turnSteps:20,this._createDirs()}reset(t){delete t.hexStep,delete t.hexDirection,delete t.hexSpeed}update(){}}const wd="polygonPathGenerator";const md=2*Math.PI,_d=.5;class bd{constructor(){this.validTypes=["rounded-polygon"]}draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],n=e[1];const o=e.length;t.moveTo((s.x+n.x)*_d,(s.y+n.y)*_d);for(let a=1;a<=o;a++)s=n,n=e[(a+1)%o],t.arcTo(s.x,s.y,(s.x+n.x)*_d,(s.y+n.y)*_d,i)}(e,function(t,e,i=0){const s=md/t,n=[];for(let o=0;o<t;o++)n.push({x:Math.cos(o*s+i)*e,y:Math.sin(o*s+i)*e});return n}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round(he(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round(he(i?.radius??5))*t.retina.pixelRatio}}const Sd=Math.sqrt(2);class xd{constructor(){this.validTypes=["rounded-rect"]}draw(t){const{context:e,particle:i,radius:s}=t,n=s/Sd,o=2*n,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-n,-n,o,o,a):function(t,e,i,s){const n={x:-e,y:-e,height:i,width:i},o=s,a=s,r=s,c=s,{x:h,y:l,width:d,height:u}=n,p=h+d,g=l+u;t.moveTo(h+o,l),t.lineTo(p-a,l),t.quadraticCurveTo(p,l,p,l+a),t.lineTo(p,l+u-c),t.quadraticCurveTo(p,g,p-c,g),t.lineTo(h+r,g),t.quadraticCurveTo(h,g,h,g-r),t.lineTo(h,l+o),t.quadraticCurveTo(h,l,h+o,l)}(e,n,o,a)}particleInit(t,e){const i=e.shapeData;e.borderRadius=he(i?.radius??5)*t.retina.pixelRatio}}var Pd;!function(t){t[t.normal=0]="normal",t[t.reverse=1]="reverse"}(Pd||(Pd={}));class Cd{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:Ve.percent},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=ie()>y?Pd.normal:Pd.reverse),void 0===t.svgPathIndex&&(t.svgPathIndex=Math.floor(ie()*this._paths.length)),void 0===t.svgSpeed&&(t.svgSpeed=t.velocity.mult((t.retina.moveSpeed??1)*y).length),void 0===t.svgStep&&(t.svgStep=ce({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:ce({min:-this._width*y,max:this._width*y})*i,height:ce({min:-this._width*y,max:this._width*y})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,t.svgDirection===Pd.normal?t.svgStep+=t.svgSpeed*e.factor:t.svgStep-=t.svgSpeed*e.factor;let s=this._paths[t.svgPathIndex];if(s){const e=s.length,i=1;t.svgStep>=e?(t.svgPathIndex=t.svgPathIndex+i,t.svgPathIndex>=this._paths.length&&(this._reverse?(t.svgPathIndex=this._paths.length-i,t.svgDirection=Pd.reverse):(t.svgPathIndex=0,t.svgStep=0))):t.svgStep<=0&&(t.svgPathIndex=t.svgPathIndex-i,t.svgPathIndex<0&&(this._reverse?(t.svgPathIndex=0,t.svgDirection=Pd.normal):(t.svgPathIndex=this._paths.length-i,s=this._paths[t.svgPathIndex],t.svgStep=s.length))),s=this._paths[t.svgPathIndex]}if(s){const e=s.element.getPointAtLength(t.svgStep),n=t.container.canvas.size,o=ai(this._offset,n),a=this._scale*i;t.position.x=(e.x-this._size.width*y)*a+t.svgInitialPosition.x+o.x+t.svgOffset.width,t.position.y=(e.y-this._size.height*y)*a+t.svgInitialPosition.y+o.y+t.svgOffset.height}return Jt.origin}init(t){const e=t.actualOptions.particles.move.path.options,i=e.position??this._offset;if(this._reverse=e.reverse??this._reverse,this._scale=e.scale??1,this._offset.x=i.x,this._offset.y=i.y,this._offset.mode=i.mode,this._width=e.width??0,e.url&&!e.path){const t=e.url;(async()=>{const e=await fetch(t),i=await e.text(),s=(new DOMParser).parseFromString(i,"image/svg+xml"),n=s.getElementsByTagName("svg")[0];let o=n.getElementsByTagName("path");o.length||(o=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<o.length;t++){const e=o.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(n.getAttribute("height")??"0"),this._size.width=parseFloat(n.getAttribute("width")??"0")})()}else if(e.path){const t=e.path;this._paths=[];for(const e of t.data){const t=document.createElementNS("http://www.w3.org/2000/svg","path");t.setAttribute("d",e),this._paths.push({element:t,length:t.getTotalLength()})}this._size.height=t.size.height,this._size.width=t.size.width}}reset(){}update(){}}const Od="svgPathGenerator";const kd={draw:!1,size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,factor:{angle:.02,length:.01},offset:{x:4e4,y:4e4,z:4e4}};class Td{constructor(){const t=new fo;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=Qe({},kd)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),n=Math.max(Math.floor(e.y/i),0),o=Math.max(Math.floor(e.z/i),0),a=Jt.origin,{field:r}=this;return r?.[s]?.[n]?.[o]?r[s][n][o].copy():a}init(t){this.container=t,this._setup()}reset(){}update(){this.container&&(this._calculateField(),this.noiseW+=this.options.increment,this.options.draw&&this.container.canvas.draw((t=>this._drawField(t))))}_calculateField(){const{options:t,field:e,_simplex:i,noiseW:s}=this,n=t.factor.length,o=t.factor.angle;for(let a=0;a<t.columns;a++)for(let r=0;r<t.rows;r++)for(let c=0;c<t.layers;c++){const h=e[a][r][c];h.length=i.noise(a*n+t.offset.x,r*n+t.offset.y,c*n+t.offset.z,s),h.angle=i.noise(a*o,r*o,c*o,s)*Math.PI*2}}_drawField(t){const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const n=e[s];for(let e=0;e<i.rows;e++){const i=n[e][0],{angle:o,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(o),t.strokeStyle="white",t.beginPath(),t.moveTo(0,0),t.lineTo(0,this.options.size*a),t.stroke(),t.setTransform(1,0,0,1,0,0)}}}_initField(){const{columns:t,rows:e,layers:i}=this.options;this.field=new Array(t);for(let s=0;s<t;s++){this.field[s]=new Array(e);for(let t=0;t<e;t++){this.field[s][t]=new Array(i);for(let e=0;e<i;e++)this.field[s][t][e]=Jt.origin}}}_resetField(){const t=this.container;if(!t)return;const e=t.actualOptions.particles.move.path.options,{options:i}=this;i.width=t.canvas.size.width,i.height=t.canvas.size.height,i.size=e.size>0?e.size:kd.size,i.increment=e.increment>0?e.increment:kd.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??kd.offset.x,i.offset.y=s?.y??kd.offset.y,i.offset.z=s?.z??kd.offset.z;const n=e.factor;i.factor.angle=n?.angle??kd.factor.angle,i.factor.length=n?.length??kd.factor.length,i.seed=e.seed,this._simplex.seed(i.seed??ie()),i.columns=Math.floor(i.width/i.size)+1,i.rows=Math.floor(i.height/i.size)+1,i.layers=Math.floor(t.zLayers/i.size)+1,this._initField()}_setup(){this.noiseW=0,this._resetField(),addEventListener("resize",(()=>this._resetField()))}}const Vd="simplexNoise";class Md{constructor(){this.loop=!1,this.source=""}load(t){Xt(t)||(Wt(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Ed{constructor(){this.duration=500,this.value=[]}load(t){Xt(t)||(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class Ad{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){Xt(t)||(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ad;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Ed;return e.load(t),e}))))}}class zd{constructor(){this.event=[],this.notes=[]}load(t){if(!Xt(t)&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(Zt(t.audio)?this.audio=t.audio.map((t=>{const e=new Md;return e.load(t),e})):(this.audio=new Md,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Ed;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ad;return e.load(t),e}))),t.filter))if($t(t.filter)){const e=window[t.filter];Qt(e)&&(this.filter=e)}else this.filter=t.filter}}class Rd{constructor(){this.width=24,this.height=24,this.style=""}load(t){Xt(t)||(void 0!==t.path&&(this.path=t.path),void 0!==t.svg&&(this.svg=t.svg),void 0!==t.width&&(this.width=t.width),void 0!==t.height&&(this.height=t.height))}}class Gd{constructor(){this.mute=new Rd,this.unmute=new Rd,this.volumeDown=new Rd,this.volumeUp=new Rd,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n xmlns:xlink="http://www.w3.org/1999/xlink">\n <g id="Layer_1">\n <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n </g>\n</svg>'}load(t){Xt(t)||(void 0!==t.enable&&(this.enable=t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class Id{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){Xt(t)||(Wt(t)?(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.step&&(this.step=t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class Dd{constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new Gd,this.volume=new Id}load(t){Xt(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.events&&(this.events=t.events.map((t=>{const e=new zd;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}var Ld,Hd;!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(Ld||(Ld={})),function(t){t.Block="block",t.None="none"}(Hd||(Hd={}));const Fd=new Map;function Bd(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]||e[0],s=Fd.get(i);return s?s[parseInt(e[3]||"0")]:void 0}Fd.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Fd.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Fd.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Fd.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Fd.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Fd.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Fd.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Fd.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Fd.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Fd.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Fd.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Fd.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Fd.set("pause",[0]);let Nd=!0;const Ud=()=>Nd,qd=()=>{Nd=!1};function $d(t){const e=document.createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,style:u,svg:p}=o;!function(t,e,i,s,n,o,a,r){t.style.userSelect="none",t.style.webkitUserSelect="none",t.style.position="absolute",t.style.top=`${e+a}px`,t.style.left=i-a-o+"px",t.style.display=s,t.style.zIndex=`${n+1}`,t.style.cssText+=r}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),n,r.fullScreen.zIndex+1,l,a,u),e.src=d??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.element?.parentNode??document.body).append(e),e.addEventListener("click",(()=>{i()})),e}function jd(t){t&&t.remove()}class Qd{constructor(t,e){this._addBuffer=t=>{const e=t.createBufferSource();return this._audioSources.push(e),e},this._addOscillator=t=>{const e=t.createOscillator();return this._audioSources.push(e),e},this._initEvents=()=>{const t=this._container,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.element)for(const t of e.events){const e=i=>{(async()=>{const s=t.filter&&!t.filter(i);if(this._container!==i.container)return;if(!this._container||this._container.muted||this._container.destroyed)return void ei(t.event,(t=>{this._engine.removeEventListener(t,e)}));if(s)return;if(t.audio)this._playBuffer(ii(t.audio));else if(t.melodies){const e=Ue(t.melodies);e.melodies.length?await Promise.allSettled(e.melodies.map((t=>this._playNote(t.notes,0,e.loop)))):await this._playNote(e.notes,0,e.loop)}else if(t.notes){const e=Ue(t.notes);await this._playNote([e],0,!1)}})()};ei(t.event,(t=>{this._engine.addEventListener(t,e)}))}},this._mute=async()=>{const t=this._container,e=this._getAudioContext();for(const t of this._audioSources)this._removeAudioSource(t);this._gain&&this._gain.disconnect(),await e.close(),t.audioContext=void 0,this._engine.dispatchEvent(Ld.mute,{container:this._container})},this._playBuffer=t=>{const e=this._audioMap.get(t.source);if(!e)return;const i=this._container.audioContext;if(!i)return;const s=this._addBuffer(i);s.loop=t.loop,s.buffer=e,s.connect(this._gain??i.destination),s.start()},this._playFrequency=async(t,e)=>{if(!this._gain||this._container.muted)return;const i=this._getAudioContext(),s=this._addOscillator(i);return s.connect(this._gain),s.type="sine",s.frequency.value=t,s.start(),new Promise((t=>{setTimeout((()=>{this._removeAudioSource(s),t()}),e)}))},this._playMuteSound=()=>{if(this._container.muted)return;const t=this._getAudioContext(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout((()=>{i.stop(),i.disconnect(),e.disconnect()}))},this._playNote=async(t,e,i)=>{if(this._container.muted)return;const s=t[e];if(!s)return;const n=ei(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(Zt(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),this._container.muted||await this._playNote(t,o,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const n=ii(s.value,i,!0);try{const t=Bd(n);if(!jt(t))return;await this._playFrequency(t,s.duration)}catch(t){ze().error(t)}},this._removeAudioSource=t=>{t.stop(),t.disconnect();this._audioSources.splice(this._audioSources.indexOf(t),1)},this._unmute=()=>{const t=this._container.actualOptions.sounds;if(!t)return;const e=this._getAudioContext();this._audioSources||(this._audioSources=[]);const i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/f,this._gain=i,this._initEvents(),this._engine.dispatchEvent(Ld.unmute,{container:this._container})},this._updateMuteIcons=()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this._muteImg,s=this._unmuteImg;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")},this._updateMuteStatus=async()=>{const t=this._container,e=this._getAudioContext();t.muted?(await(e?.suspend()),await this._mute()):(await(e?.resume()),this._unmute(),this._playMuteSound())},this._updateVolume=async()=>{const t=this._container,e=t.actualOptions.sounds;if(!e?.enable)return;ae(this._volume,e.volume.min,e.volume.max);let i=!1;this._volume<=0&&!t.muted?(this._volume=0,t.muted=!0,i=!0):this._volume>0&&t.muted&&(t.muted=!1,i=!0),i&&(this._updateMuteIcons(),await this._updateMuteStatus()),this._gain?.gain&&(this._gain.gain.value=this._volume/f)},this._container=t,this._engine=e,this._volume=0,this._audioSources=[],this._audioMap=new Map}async init(){const t=this._container.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&Ud()){const t=()=>{removeEventListener(s,t),removeEventListener(c,t),qd(),this.unmute()},e={capture:!0,once:!0};addEventListener(s,t,e),addEventListener(c,t,e)}this._volume=t.volume.value;const e=t.events;this._audioMap=new Map;for(const t of e){if(!t.audio)continue;const e=ei(t.audio,(async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),n=await s.decodeAudioData(i);this._audioMap.set(t.source,n)}));e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this._container.muted||await this.toggleMute()}async start(){const t=this._container,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.element)return;t.muted=!0;const s=t.canvas.element,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:o,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=async()=>{await this.toggleMute()},l=i.icons.enable?Hd.Block:Hd.None;this._muteImg=$d({container:t,options:e,pos:n,display:l,iconOptions:o,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=$d({container:t,options:e,pos:n,display:Hd.None,iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=$d({container:t,options:e,pos:n,display:l,iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=$d({container:t,options:e,pos:n,display:l,iconOptions:c,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Ud()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),jd(this._muteImg),jd(this._unmuteImg),jd(this._volumeDownImg),jd(this._volumeUpImg)})()}async toggleMute(){const t=this._container;t.muted=!t.muted,this._updateMuteIcons(),await this._updateMuteStatus()}async unmute(){this._container.muted&&await this.toggleMute()}async volumeDown(){const t=this._container,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this._volume=0),this._volume-=e.volume.step,await this._updateVolume())}async volumeUp(){const t=this._container.actualOptions.sounds;t?.enable&&(this._volume+=t.volume.step,await this._updateVolume())}_getAudioContext(){const t=this._container;return t.audioContext||(t.audioContext=new AudioContext),t.audioContext}}const Wd=()=>{removeEventListener(s,Wd),removeEventListener(c,Wd),qd()};class Zd{constructor(t){this.id="sounds",this._engine=t;const e={capture:!0,once:!0};addEventListener(s,Wd,e),addEventListener(c,Wd,e)}getPlugin(t){return Promise.resolve(new Qd(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.sounds;void 0===i?.load&&(t.sounds=i=new Dd),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class Xd{constructor(){this.validTypes=["spiral"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;if(void 0===i.spiralInnerRadius||void 0===i.spiralLineSpacing||void 0===i.spiralWidthFactor)return;const n=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*n;t++){const s=t/10,n=i.spiralInnerRadius+i.spiralLineSpacing*s,o={x:n*Math.cos(s),y:n*Math.sin(s)};e.lineTo(o.x,o.y)}}(t)}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=he(s?.innerRadius??1)*i,e.spiralLineSpacing=he(s?.lineSpacing??1)*i,e.spiralWidthFactor=he(s?.widthFactor??10)}}const Yd={a:1,b:0,c:0,d:1};class Jd{draw(t){const{context:e,radius:i,particle:s,transformData:n}=t,o=i*S,a=s.container.retina.pixelRatio,r=s.getPosition(),c=s.trail;if(!c||!s.trailLength)return;const h=s.trailLength+i;if(c.push({color:e.fillStyle??e.strokeStyle,position:{x:r.x,y:r.y},transformData:{...t.transformData}}),c.length<2)return;for(;c.length>h;)c.shift();const l=Math.min(c.length,h),d=s.container.canvas.size.width+o,u=s.container.canvas.size.height+o;let p=c[l-1].position;for(let t=l;t>lt;t--){const i=c[t-1],n=i.position,r=s.trailTransform?i.transformData??Yd:Yd;e.setTransform(r.a,r.b,r.c,r.d,n.x,n.y),e.beginPath(),e.moveTo(p.x-n.x,p.y-n.y);const h={x:(p.x+d)%d,y:(p.y+u)%u};if(Math.abs(p.x-n.x)>d*y||Math.abs(p.y-n.y)>u*y){p=n;continue}e.lineTo(Math.abs(p.x-n.x)>d*y?h.x:w.x,Math.abs(p.y-n.y)>u*y?h.y:w.y);const g=Math.max(t/l*o,a,s.trailMinWidth??-1),f=e.globalAlpha;e.globalAlpha=s.trailFade?t/l:C,e.lineWidth=s.trailMaxWidth?Math.min(g,s.trailMaxWidth):g,e.strokeStyle=i.color,e.stroke(),e.globalAlpha=f,p=n}e.setTransform(n.a,n.b,n.c,n.d,r.x,r.y)}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=he(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?he(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?he(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}const Kd=.5*Math.PI;class tu{constructor(){this.options={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}}}generate(t,e){void 0===t.zigzag&&(t.zigzag={counter:ie(),waveHeight:he(this.options.waveHeight),waveLength:he(this.options.waveLength)});const i=.5/t.zigzag.waveLength*e.factor;t.zigzag.counter+=i;const s=t.zigzag.waveHeight*Math.sin(t.zigzag.counter);return t.position.x+=s*Math.cos(t.velocity.angle+Kd),t.position.y+=s*Math.sin(t.velocity.angle+Kd),Jt.origin}init(t){const e=t.actualOptions.particles.move.path.options;this.options.waveLength=e.waveLength??this.options.waveLength,this.options.waveHeight=e.waveHeight??this.options.waveHeight}reset(){}update(){}}const eu="zigZagPathGenerator";async function iu(t,e=!0){t.checkVersion("3.9.1"),Rn(t),await Ih(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new Wh,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new bl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addColorManager(new Ol,e),await t.addColorManager(new Cl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInBack,(t=>2.70158*t**3-1.70158*t**2),!1),await t.addEasing(Mn.easeOutBack,(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),!1),await t.addEasing(Mn.easeInOutBack,(t=>{const e=2.5949095;return t<.5?(2*t)**2*(7.189819*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2}),!1),await t.refresh(e)}(t,!1),await async function(t,e){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInCirc,(t=>1-Math.sqrt(1-t**2)),!1),await t.addEasing(Mn.easeOutCirc,(t=>Math.sqrt(1-(t-1)**2)),!1),await t.addEasing(Mn.easeInOutCirc,(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInCubic,(t=>t**3),!1),await t.addEasing(Mn.easeOutCubic,(t=>1-(1-t)**3),!1),await t.addEasing(Mn.easeInOutCubic,(t=>t<.5?4*t**3:1-(-2*t+2)**3/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInExpo,(t=>t?2**(10*t-10):0),!1),await t.addEasing(Mn.easeOutExpo,(t=>1===t?1:1-Math.pow(2,-10*t)),!1),await t.addEasing(Mn.easeInOutExpo,(t=>1===t?t?1:0:t?t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInLinear,(t=>t),!1),await t.addEasing(Mn.easeOutLinear,(t=>t),!1),await t.addEasing(Mn.easeInOutLinear,(t=>t),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInQuart,(t=>t**4),!1),await t.addEasing(Mn.easeOutQuart,(t=>1-(1-t)**4),!1),await t.addEasing(Mn.easeInOutQuart,(t=>t<.5?8*t**4:1-(-2*t+2)**4/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInQuint,(t=>t**5),!1),await t.addEasing(Mn.easeOutQuint,(t=>1-(1-t)**5),!1),await t.addEasing(Mn.easeInOutQuint,(t=>t<.5?16*t**5:1-(-2*t+2)**5/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEasing(Mn.easeInSine,(t=>1-Math.cos(t*Math.PI/2)),!1),await t.addEasing(Mn.easeOutSine,(t=>Math.sin(t*Math.PI/2)),!1),await t.addEasing(Mn.easeInOutSine,(t=>-(Math.cos(Math.PI*t)-1)/2),!1),await t.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.9.1"),i.addEmitterShapeGenerator?.("canvas",new $o),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.9.1"),i.addEmitterShapeGenerator?.("path",new Jo),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.checkVersion("3.9.1"),i.addEmitterShapeGenerator?.("polygon",new na),await i.refresh(e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new Jn,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1");const i=new Kh;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>Promise.resolve(new tl(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new ml(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new yd(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new Zd(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new aa(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new ca(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new ua(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalParticle",(t=>Promise.resolve(new fa(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalPop",(t=>Promise.resolve(new ya(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("externalLight",(e=>Promise.resolve(new gl(e,t))),e),await t.addInteractor("particlesLight",(e=>Promise.resolve(new fl(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addInteractor("particlesRepulse",(t=>Promise.resolve(new Gl(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("gradient",(()=>Promise.resolve(new qh(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addParticleUpdater("orbit",(e=>Promise.resolve(new zl(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(bo,new _o,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(wo,new vo,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(Pa,new xa,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(Ul,new Nl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPlugin(new Wl(t),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(wd,new vd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(Od,new Cd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(eu,new tu,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addPathGenerator(Vd,new Td,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEffect("bubble",new Ln,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Dn,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new oo,e),await t.addShape(new no,e),await t.addShape(new so,e),await t.addShape(new io,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new ho,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new $h,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new sl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Dl,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new bd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new xd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addShape(new Xd,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.9.1"),await t.addEffect("trail",new Jd,e)}(t,!1),await t.refresh(e)}return e})()));
|