@tsparticles/all 3.5.0 → 3.6.0-beta.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.
|
@@ -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:()=>$t,AnimatableColor:()=>ui,AnimationMode:()=>at,AnimationOptions:()=>ci,AnimationStatus:()=>rt,AnimationValueWithRandom:()=>yi,Background:()=>He,BackgroundMask:()=>Fe,BackgroundMaskCover:()=>Be,BaseRange:()=>ts,Circle:()=>es,ClickEvent:()=>Ne,CollisionMode:()=>ti,Collisions:()=>_i,CollisionsAbsorb:()=>pi,CollisionsOverlap:()=>fi,ColorAnimation:()=>li,DestroyType:()=>ct,DivEvent:()=>$e,DivType:()=>Le,EasingType:()=>bs,EventType:()=>Ie,Events:()=>We,ExternalInteractorBase:()=>Ps,FullScreen:()=>Ue,GradientType:()=>_s,HoverEvent:()=>je,HslAnimation:()=>di,HslColorManager:()=>Ss,Interactivity:()=>Xe,InteractivityDetect:()=>ze,InteractorType:()=>si,LimitMode:()=>ii,ManualParticle:()=>Ye,Modes:()=>Ze,Move:()=>Vi,MoveAngle:()=>Si,MoveAttract:()=>xi,MoveCenter:()=>Pi,MoveDirection:()=>m,MoveGravity:()=>Ci,MovePath:()=>Oi,MoveTrail:()=>Ai,Opacity:()=>zi,OpacityAnimation:()=>ki,Options:()=>ji,OptionsColor:()=>De,OutMode:()=>ei,OutModeDirection:()=>ht,OutModes:()=>Mi,Parallax:()=>qe,ParticleOutType:()=>oi,ParticlesBounce:()=>wi,ParticlesBounceFactor:()=>mi,ParticlesDensity:()=>Gi,ParticlesInteractorBase:()=>Cs,ParticlesNumber:()=>Ii,ParticlesNumberLimit:()=>Ri,ParticlesOptions:()=>Ni,PixelMode:()=>lt,Point:()=>Ji,RangedAnimationOptions:()=>hi,RangedAnimationValueWithRandom:()=>vi,Rectangle:()=>is,ResizeEvent:()=>Qe,Responsive:()=>ni,ResponsiveMode:()=>Je,RgbColorManager:()=>xs,RotateDirection:()=>ws,Shadow:()=>Li,Shape:()=>Di,Size:()=>Bi,SizeAnimation:()=>Hi,Spin:()=>Ei,StartValueType:()=>dt,Stroke:()=>Fi,Theme:()=>ri,ThemeDefault:()=>ai,ThemeMode:()=>Ke,ValueWithRandom:()=>gi,Vector:()=>M,Vector3d:()=>A,ZIndex:()=>Ui,addColorManager:()=>Zt,addEasing:()=>G,alterHsl:()=>Me,animate:()=>H,areBoundsInside:()=>Ot,arrayRandomIndex:()=>xt,calcExactPositionOrRandomFromSize:()=>st,calcExactPositionOrRandomFromSizeRanged:()=>ot,calcPositionFromSize:()=>tt,calcPositionOrRandomFromSize:()=>et,calcPositionOrRandomFromSizeRanged:()=>it,calculateBounds:()=>Tt,cancelAnimation:()=>B,circleBounce:()=>Gt,circleBounceDataFromParticle:()=>zt,clamp:()=>F,clear:()=>Se,collisionVelocity:()=>K,colorMix:()=>he,colorToHsl:()=>Kt,colorToRgb:()=>Jt,deepExtend:()=>At,degToRad:()=>X,divMode:()=>kt,divModeExecute:()=>Et,drawEffect:()=>Pe,drawLine:()=>we,drawParticle:()=>xe,drawParticlePlugin:()=>Ae,drawPlugin:()=>Te,drawShape:()=>Ce,drawShapeAfterDraw:()=>Oe,errorPrefix:()=>f,executeOnSingleOrMultiple:()=>It,findItemFromSingleOrMultiple:()=>Dt,generatedAttribute:()=>i,getDistance:()=>Z,getDistances:()=>W,getEasing:()=>R,getHslAnimationFromHsl:()=>pe,getHslFromAnimation:()=>ue,getLinkColor:()=>le,getLinkRandomColor:()=>de,getLogger:()=>ft,getParticleBaseVelocity:()=>J,getParticleDirectionAngle:()=>Y,getPosition:()=>Ft,getRandom:()=>L,getRandomRgbColor:()=>ae,getRangeMax:()=>j,getRangeMin:()=>q,getRangeValue:()=>$,getSize:()=>Ut,getStyleFromHsl:()=>ce,getStyleFromRgb:()=>re,halfRandom:()=>y,hasMatchMedia:()=>vt,hslToRgb:()=>oe,hslaToRgba:()=>ne,initParticleNumericAnimationValue:()=>Ht,isArray:()=>P,isBoolean:()=>w,isDivModeEnabled:()=>Mt,isFunction:()=>S,isInArray:()=>bt,isNumber:()=>b,isObject:()=>x,isPointInside:()=>Ct,isSsr:()=>yt,isString:()=>_,itemFromArray:()=>Pt,itemFromSingleOrMultiple:()=>Lt,loadAll:()=>ed,loadFont:()=>St,loadOptions:()=>$i,loadParticlesOptions:()=>qi,millisecondsToSeconds:()=>v,mix:()=>U,mouseDownEvent:()=>s,mouseLeaveEvent:()=>n,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>o,paintBase:()=>_e,paintImage:()=>be,parseAlpha:()=>nt,percentDenominator:()=>g,randomInRange:()=>N,rangeColorToHsl:()=>te,rangeColorToRgb:()=>Yt,rectBounce:()=>Rt,resizeEvent:()=>u,rgbToHsl:()=>ee,safeIntersectionObserver:()=>wt,safeMatchMedia:()=>mt,safeMutationObserver:()=>_t,setAnimationFunctions:()=>D,setLogger:()=>pt,setRandom:()=>I,setRangeValue:()=>Q,singleDivModeExecute:()=>Vt,stringToAlpha:()=>ie,stringToRgb:()=>se,touchCancelEvent:()=>d,touchEndEvent:()=>h,touchMoveEvent:()=>l,touchStartEvent:()=>c,tsParticles:()=>Os,updateAnimation:()=>Nt,updateColor:()=>ye,updateColorValue:()=>ge,visibilityChangeEvent:()=>p});const i="generated",s="pointerdown",o="pointerup",n="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",f="tsParticles - Error",g=100,y=.5,v=1e3;var m;function w(t){return"boolean"==typeof t}function _(t){return"string"==typeof t}function b(t){return"number"==typeof t}function S(t){return"function"==typeof t}function x(t){return"object"==typeof t&&null!==t}function P(t){return Array.isArray(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"}(m||(m={}));const C=0,O=0,T=0;class A{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!b(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:T}else{if(void 0===t||void 0===e)throw new Error(`${f} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??T}}static get origin(){return A.create(C,O,T)}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 A.create(t.x,t.y,t.z)}static create(t,e,i){return new A(t,e,i)}add(t){return A.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 A.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return A.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**2+this.y**2}mult(t){return A.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;0!=t&&this.multTo(1/t)}rotate(t){return A.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),T)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:T}sub(t){return A.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 M extends A{constructor(t,e){super(t,e,T)}static get origin(){return M.create(C,O)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return new M(t,e)}}let E=Math.random;const V={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)},k=new Map,z=2*Math.PI;function G(t,e){k.get(t)||k.set(t,e)}function R(t){return k.get(t)??(t=>t)}function I(t=Math.random){E=t}function L(){return F(E(),0,1-Number.EPSILON)}function D(t,e){V.nextFrame=e=>t(e),V.cancel=t=>e(t)}function H(t){return V.nextFrame(t)}function B(t){V.cancel(t)}function F(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function N(t){const e=j(t);let i=q(t);return e===i&&(i=0),L()*(e-i)+i}function $(t){return b(t)?t:N(t)}function q(t){return b(t)?t:t.min}function j(t){return b(t)?t:t.max}function Q(t,e){if(t===e||void 0===e&&b(t))return t;const i=q(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:Q(i,s)}function W(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 Z(t,e){return W(t,e).distance}function X(t){return t*Math.PI/180}function Y(t,e,i){if(b(t))return X(t);const s=.25;switch(t){case m.top:return.5*-Math.PI;case m.topRight:return-Math.PI*s;case m.right:return 0;case m.bottomRight:return Math.PI*s;case m.bottom:return.5*Math.PI;case m.bottomLeft:return.75*Math.PI;case m.left:return Math.PI;case m.topLeft:return.75*-Math.PI;case m.inside:return Math.atan2(i.y-e.y,i.x-e.x);case m.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return L()*z}}function J(t){const e=M.origin;return e.length=1,e.angle=t,e}function K(t,e,i,s){return M.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/g,y:t.position.y*t.size.height/g}:void 0}function et(t){return{x:(t.position?.x??L()*g)*t.size.width/g,y:(t.position?.y??L()*g)*t.size.height/g}}function it(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){return{x:t.position?.x??L()*t.size.width,y:t.position?.y??L()*t.size.height}}function ot(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return st({size:t.size,position:e})}function nt(t){return t?t.endsWith("%")?parseFloat(t)/g:parseFloat(t):1}var at,rt,ct,ht,lt,dt;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(at||(at={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(rt||(rt={})),function(t){t.none="none",t.max="max",t.min="min"}(ct||(ct={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ht||(ht={})),function(t){t.precise="precise",t.percent="percent"}(lt||(lt={})),function(t){t.max="max",t.min="min",t.random="random"}(dt||(dt={}));const ut={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function pt(t){ut.debug=t.debug||ut.debug,ut.error=t.error||ut.error,ut.info=t.info||ut.info,ut.log=t.log||ut.log,ut.verbose=t.verbose||ut.verbose,ut.warning=t.warning||ut.warning}function ft(){return ut}function gt(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:o,rectOtherSide:n,velocity:a,factor:r}=t;return s.min<n.min||s.min>n.max||s.max<n.min||s.max>n.max||(i.max>=o.min&&i.max<=.5*(o.max+o.min)&&a>0||i.min<=o.max&&i.min>.5*(o.max+o.min)&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function yt(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function vt(){return!yt()&&"undefined"!=typeof matchMedia}function mt(t){if(vt())return matchMedia(t)}function wt(t){if(!yt()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function _t(t){if(!yt()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function bt(t,e){return t===e||P(e)&&e.indexOf(t)>-1}async function St(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function xt(t){return Math.floor(L()*t.length)}function Pt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:xt(t)]}function Ct(t,e,i,s,o){return Ot(Tt(t,s??0),e,i,o)}function Ot(t,e,i,s){let o=!0;return s&&s!==ht.bottom||(o=t.top<e.height+i.x),!o||s&&s!==ht.left||(o=t.right>i.x),!o||s&&s!==ht.right||(o=t.left<e.width+i.y),!o||s&&s!==ht.top||(o=t.bottom>i.y),o}function Tt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function At(t,...e){for(const i of e){if(null==i)continue;if(!x(i)){t=i;continue}const e=Array.isArray(i);!e||!x(t)&&t&&Array.isArray(t)?e||!x(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],o=t;o[e]=x(s)&&Array.isArray(s)?s.map((t=>At(o[e],t))):At(o[e],s)}}return t}function Mt(t,e){return!!Dt(e,(e=>e.enable&&bt(t,e.mode)))}function Et(t,e,i){It(e,(e=>{const s=e.mode;e.enable&&bt(t,s)&&Vt(e,i)}))}function Vt(t,e){It(t.selectors,(i=>{e(i,t)}))}function kt(t,e){if(e&&t)return Dt(t,(t=>function(t,e){const i=It(e,(e=>t.matches(e)));return P(i)?i.some((t=>t)):i}(e,t.selectors)))}function zt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:M.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}}function Gt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[o,n]=[t.position,e.position],{dx:a,dy:r}=W(n,o);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=K(d,u,h,l),f=K(u,d,h,l),g=p.rotate(-c),y=f.rotate(-c);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function Rt(t,e){const i=Tt(t.getPosition(),t.getRadius()),s=t.options.bounce,o=gt({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:$(s.horizontal.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const n=gt({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:$(s.vertical.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function It(t,e){return P(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function Lt(t,e,i){return P(t)?Pt(t,e,i):t}function Dt(t,e){if(P(t))return t.find(((t,i)=>e(t,i)));return e(t,0)?t:void 0}function Ht(t,e){const i=t.value,s=t.animation,o={delayTime:$(s.delay)*v,enable:s.enable,value:$(t.value)*e,max:j(i)*e,min:q(i)*e,loops:0,maxLoops:$(s.count),time:0};if(s.enable){switch(o.decay=1-$(s.decay),s.mode){case at.increase:o.status=rt.increasing;break;case at.decrease:o.status=rt.decreasing;break;case at.random:o.status=L()>=y?rt.increasing:rt.decreasing}const t=s.mode===at.auto;switch(s.startValue){case dt.min:o.value=o.min,t&&(o.status=rt.increasing);break;case dt.max:o.value=o.max,t&&(o.status=rt.decreasing);break;case dt.random:default:o.value=N(o),t&&(o.status=L()>=y?rt.increasing:rt.decreasing)}}return o.initialValue=o.value,o}function Bt(t,e){if(!(t.mode===lt.percent)){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/g*e.width,y:t.y/g*e.height}:{width:t.width/g*e.width,height:t.height/g*e.height}}function Ft(t,e){return Bt(t,e)}function Ut(t,e){return Bt(t,e)}function Nt(t,e,i,s,o){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const n=(e.velocity??0)*o.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+=o.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case rt.increasing:e.value>=r?(i?e.status=rt.decreasing:e.value-=r,e.loops||(e.loops=0),e.loops++):e.value+=n;break;case rt.decreasing:e.value<=a?(i?e.status=rt.increasing:e.value+=r,e.loops||(e.loops=0),e.loops++):e.value-=n}e.velocity&&1!==c&&(e.velocity*=c),function(t,e,i,s,o){switch(e){case ct.max:i>=o&&t.destroy();break;case ct.min:i<=s&&t.destroy()}}(t,s,e.value,a,r),t.destroyed||(e.value=F(e.value,a,r))}}var $t,qt;!function(t){t.darken="darken",t.enlighten="enlighten"}($t||($t={})),function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(qt||(qt={}));const jt="random",Qt="mid",Wt=new Map;function Zt(t){Wt.set(t.key,t)}function Xt(t){for(const[,e]of Wt)if(t.startsWith(e.stringPrefix))return e.parseString(t);const e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,e,i,s,o)=>e+e+i+i+s+s+(void 0!==o?o+o:""))),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);return i?{a:void 0!==i[qt.a]?parseInt(i[qt.a],16)/255:1,b:parseInt(i[qt.b],16),g:parseInt(i[qt.g],16),r:parseInt(i[qt.r],16)}:void 0}function Yt(t,e,i=!0){if(!t)return;const s=_(t)?{value:t}:t;if(_(s.value))return Jt(s.value,e,i);if(P(s.value))return Yt({value:Pt(s.value,e,i)});for(const[,t]of Wt){const e=t.handleRangeColor(s);if(e)return e}}function Jt(t,e,i=!0){if(!t)return;const s=_(t)?{value:t}:t;if(_(s.value))return s.value===jt?ae():se(s.value);if(P(s.value))return Jt({value:Pt(s.value,e,i)});for(const[,t]of Wt){const e=t.handleColor(s);if(e)return e}}function Kt(t,e,i=!0){const s=Jt(t,e,i);return s?ee(s):void 0}function te(t,e,i=!0){const s=Yt(t,e,i);return s?ee(s):void 0}function ee(t){const e=t.r/255,i=t.g/255,s=t.b/255,o=Math.max(e,i,s),n=Math.min(e,i,s),a={h:0,l:.5*(o+n),s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=e===o?(i-s)/(o-n):a.h=i===o?2+(s-e)/(o-n):4+(e-i)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function ie(t){return Xt(t)?.a}function se(t){return Xt(t)}function oe(t){const e=360,i=(t.h%e+e)%e,s=Math.max(0,Math.min(100,t.s)),o=i/e,n=s/100,a=Math.max(0,Math.min(100,t.l))/100,r=255;if(0===s){const t=Math.round(a*r);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},h=a<.5?a*(1+n):a+n-a*n,l=2*a-h,d=1/3,u=Math.min(r,r*c(l,h,o+d)),p=Math.min(r,r*c(l,h,o)),f=Math.min(r,r*c(l,h,o-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ne(t){const e=oe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ae(t){const e=t??0;return{b:Math.floor(N(Q(e,256))),g:Math.floor(N(Q(e,256))),r:Math.floor(N(Q(e,256)))}}function re(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??1})`}function ce(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??1})`}function he(t,e,i,s){let o=t,n=e;return void 0===o.r&&(o=oe(t)),void 0===n.r&&(n=oe(e)),{b:U(o.b,n.b,i,s),g:U(o.g,n.g,i,s),r:U(o.r,n.r,i,s)}}function le(t,e,i){if(i===jt)return ae();if(i!==Qt)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return he(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return oe(t)}}}function de(t,e,i){const s=_(t)?t:t.value;return s===jt?i?Yt({value:s}):e?jt:Qt:s===Qt?Qt:Yt({value:s})}function ue(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function pe(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&&(fe(s.h,e.h,i),fe(s.s,e.s,i),fe(s.l,e.l,i)),s}function fe(t,e,i){t.enable=e.enable;t.enable?(t.velocity=$(e.speed)/g*i,t.decay=1-$(e.decay),t.status=rt.increasing,t.loops=0,t.maxLoops=$(e.count),t.time=0,t.delayTime=$(e.delay)*v,e.sync||(t.velocity*=L(),t.value*=L()),t.initialValue=t.value,t.offset=Q(e.offset)):t.velocity=0}function ge(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 o=t.offset?N(t.offset):0,n=(t.velocity??0)*s.factor+3.6*o,a=t.decay??1,r=j(e),c=q(e);if(i&&t.status!==rt.increasing){t.value-=n;const e=0;t.value<e&&(t.loops||(t.loops=0),t.loops++,t.status=rt.increasing)}else t.value+=n,t.value>r&&(t.loops||(t.loops=0),t.loops++,i?t.status=rt.decreasing:t.value-=r);t.velocity&&1!==a&&(t.velocity*=a),t.value=F(t.value,c,r)}function ye(t,e){if(!t)return;const{h:i,s,l:o}=t,n={min:0,max:100},a={min:0,max:100};i&&ge(i,{min:0,max:360},!1,e),s&&ge(s,n,!0,e),o&&ge(o,a,!0,e)}const ve={x:0,y:0},me={a:1,b:0,c:0,d:1};function we(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function _e(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(ve.x,ve.y,e.width,e.height)}function be(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,ve.x,ve.y,e.width,e.height),t.globalAlpha=1)}function Se(t,e){t.clearRect(ve.x,ve.y,e.width,e.height)}function xe(t){const{container:e,context:i,particle:s,delta:o,colorStyles:n,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),f=Math.sin(p),g=Math.cos(p),y=!!p,v={a:g*(d.a??me.a),b:y?f*(d.b??1):d.b??me.b,c:y?-f*(d.c??1):d.c??me.c,d:g*(d.d??me.d)};i.setTransform(v.a,v.b,v.c,v.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const m=s.shadowColor;l.enable&&m&&(i.shadowBlur=l.blur,i.shadowColor=re(m),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),n.fill&&(i.fillStyle=n.fill);const w=s.strokeWidth??0;i.lineWidth=w,n.stroke&&(i.strokeStyle=n.stroke);const _={container:e,context:i,particle:s,radius:c,opacity:h,delta:o,transformData:v,strokeWidth:w};Ce(_),Oe(_),Pe(_),i.globalCompositeOperation="source-over",i.resetTransform()}function Pe(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);c&&c.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Ce(t){const{container:e,context:i,particle:s,radius:o,opacity:n,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:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),s.shapeClose&&i.closePath(),r>0&&i.stroke(),s.shapeFill&&i.fill())}function Oe(t){const{container:e,context:i,particle:s,radius:o,opacity:n,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:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Te(t,e,i){e.draw&&e.draw(t,i)}function Ae(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function Me(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===$t.darken?-1:1)*i}}function Ee(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}function Ve(t,e,i=!1){if(!e)return;if(!t)return;const s=t.style;if(s)for(const t in e){const o=e[t];o&&s.setProperty(t,o,i?"important":"")}}class ke{constructor(t){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,e,i,s,o,n)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:n,stroke:r}=a.getColorStyles(e,t,i,s);n&&(o.fill=n),r&&(o.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)Ee(n,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=te(s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=te(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=Yt(e);if(i){const e={...i,a:t.opacity};this._coverColorStyle=re(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._originalStyle=At({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style)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=1/t.length;if(e.color){const t=Yt(e.color);if(!t)return;this._trailFill={color:{...t},opacity:i}}else await new Promise(((t,s)=>{if(!e.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:i},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=e.image}))},this._paintBase=t=>{this.draw((e=>_e(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>be(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&&Ve(t,e)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;if(!t)return;Ve(t,{position:"fixed",zIndex:this.container.actualOptions.fullScreen.zIndex.toString(10),top:"0",left:"0",width:"100%",height:"100%"},!0)},this.size={height:0,width:0},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>0&&i?i.color?this._paintBase(re(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Se(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove()}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<=0)return;const s=t.getFillColor(),o=t.getStrokeColor()??s;let[n,a]=this._getPluginParticleColors(t);n||(n=s),a||(a=o),(n||a)&&this.draw((s=>{const o=this.container,r=o.actualOptions,c=t.options.zIndex,h=1-t.zIndexFactor,l=h**c.opacityRate,d=t.bubble.opacity??t.opacity?.value??1,u=d*l,p=(t.strokeOpacity??d)*l,f={},g={fill:n?ce(n,u):void 0};g.stroke=a?ce(a,p):g.fill,this._applyPreDrawUpdaters(s,t,i,u,g,f),xe({container:o,context:s,particle:t,delta:e,colorStyles:g,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*h**c.sizeRate,opacity:u,shadow:t.options.shadow,transform:f}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>Ae(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>Te(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=_t((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){ft().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=Yt(t.color);i.backgroundColor=e?re(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)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=At({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Se(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.retina.pixelRatio,i=t.canvas.size,s=this.element.offsetWidth*e,o=this.element.offsetHeight*e;if(o===i.height&&s===i.width&&o===this.element.height&&s===this.element.width)return!1;const n={...i};return this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&t.particles.setResizeFactor({width:i.width/n.width,height:i.height/n.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Se(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()}}var ze;!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ze||(ze={}));function Ge(t,e,i,s,o){if(s){let s={passive:!0};w(o)?s.capture=o:void 0!==o&&(s=o),t.addEventListener(e,i,s)}else{const s=o;t.removeEventListener(e,i,s)}}class Re{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();It(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}if("touchend"===t.type){setTimeout((()=>this._mouseTouchFinish()),500)}},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,o=s.defaultThemes,n=e.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a?.default.auto&&i.loadTheme(n)},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,n=this.container,a=n.actualOptions,u=n.interactivity.element;if(!u)return;const p=u,f=n.canvas.element;f&&(f.style.pointerEvents=p===f?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(Ge(u,r,i.mouseMove,e),Ge(u,c,i.touchStart,e),Ge(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(Ge(u,h,i.touchEndClick,e),Ge(u,o,i.mouseUp,e),Ge(u,s,i.mouseDown,e)):Ge(u,h,i.touchEnd,e),Ge(u,t,i.mouseLeave,e),Ge(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,o=i.canvas.element;let r=n;s===ze.window?(i.interactivity.element=window,r=a):s===ze.parent&&o?i.interactivity.element=o.parentElement??o.parentNode:i.interactivity.element=o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&Ge(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=mt("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):Ge(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 Ge(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 o=!1;const n=s.position;if(n&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||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=n,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,o=e.canvas.element;if(!s?.element)return;let n;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(o){const t=o.getBoundingClientRect();n={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(i.interactivity.detectsOn===ze.parent){const t=e.target,i=e.currentTarget;if(t&&i&&o){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=o.getBoundingClientRect();n={x:e.offsetX+2*s.left-(a.left+r.left),y:e.offsetY+2*s.top-(a.top+r.top)}}else n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===o&&(n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,o){const e=t,i=1,s=e.touches[e.touches.length-i],a=o.getBoundingClientRect(),r=0;n={x:s.clientX-(a.left??r),y:s.clientY-(a.top??r)}}const a=e.retina.pixelRatio;n&&(n.x*=a,n.y*=a),s.mouse.position=n,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)}}var Ie,Le;!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"}(Ie||(Ie={}));class De{constructor(){this.value=""}static create(t,e){const i=new De;return i.load(t),void 0!==e&&(_(e)||P(e)?i.load({value:e}):i.load(e)),i}load(t){void 0!==t?.value&&(this.value=t.value)}}class He{constructor(){this.color=new De,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.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 Be{constructor(){this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Fe{constructor(){this.composite="destination-out",this.cover=new Be,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=_(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 Ue{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Ne{constructor(){this.enable=!1,this.mode=[]}load(t){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"}(Le||(Le={}));class $e{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=Le.circle}load(t){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 qe{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){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 je{constructor(){this.enable=!1,this.mode=[],this.parallax=new qe}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class Qe{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class We{constructor(){this.onClick=new Ne,this.onDiv=new $e,this.onHover=new je,this.resize=new Qe}load(t){if(!t)return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=It(e,(t=>{const e=new $e;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class Ze{constructor(t,e){this._engine=t,this._container=e}load(t){if(!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 Xe{constructor(t,e){this.detectsOn=ze.window,this.events=new We,this.modes=new Ze(t,e)}load(t){if(!t)return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Ye{load(t){t&&(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??lt.percent}),t.options&&(this.options=At({},t.options)))}}var Je,Ke,ti,ei,ii,si,oi;!function(t){t.screen="screen",t.canvas="canvas"}(Je||(Je={}));class ni{constructor(){this.maxWidth=1/0,this.options={},this.mode=Je.canvas}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&(t.mode===Je.screen?this.mode=Je.screen:this.mode=Je.canvas),void 0!==t.options&&(this.options=At({},t.options)))}}!function(t){t.any="any",t.dark="dark",t.light="light"}(Ke||(Ke={}));class ai{constructor(){this.auto=!1,this.mode=Ke.any,this.value=!1}load(t){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 ri{constructor(){this.name="",this.default=new ai}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=At({},t.options)))}}class ci{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class hi extends ci{constructor(){super(),this.mode=at.auto,this.startValue=dt.random}load(t){super.load(t),t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class li extends ci{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),t&&void 0!==t.offset&&(this.offset=Q(t.offset))}}class di{constructor(){this.h=new li,this.s=new li,this.l=new li}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ui extends De{constructor(){super(),this.animation=new di}static create(t,e){const i=new ui;return i.load(t),void 0!==e&&(_(e)||P(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),!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"}(ti||(ti={}));class pi{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class fi{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class gi{constructor(){this.value=0}load(t){t&&void 0!==t.value&&(this.value=Q(t.value))}}class yi extends gi{constructor(){super(),this.animation=new ci}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class vi extends yi{constructor(){super(),this.animation=new hi}load(t){super.load(t)}}class mi extends gi{constructor(){super(),this.value=1}}class wi{constructor(){this.horizontal=new mi,this.vertical=new mi}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class _i{constructor(){this.absorb=new pi,this.bounce=new wi,this.enable=!1,this.maxSpeed=50,this.mode=ti.bounce,this.overlap=new fi}load(t){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=Q(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class bi{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=At(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 Si{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=Q(t.offset)),void 0!==t.value&&(this.value=Q(t.value)))}}class xi{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(t&&(void 0!==t.distance&&(this.distance=Q(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 Pi{constructor(){this.x=50,this.y=50,this.mode=lt.percent,this.radius=0}load(t){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 Ci{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=Q(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=Q(t.maxSpeed)))}}class Oi{constructor(){this.clamp=!0,this.delay=new gi,this.enable=!1,this.options={}}load(t){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=At(this.options,t.options)))}}class Ti{load(t){t&&(void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class Ai{constructor(){this.enable=!1,this.length=10,this.fill=new Ti}load(t){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"}(ei||(ei={}));class Mi{constructor(){this.default=ei.out}load(t){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 Ei{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=Q(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=At({},t.position)))}}class Vi{constructor(){this.angle=new Si,this.attract=new xi,this.center=new Pi,this.decay=0,this.distance={},this.direction=m.none,this.drift=0,this.enable=!1,this.gravity=new Ci,this.path=new Oi,this.outModes=new Mi,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ei,this.straight=!1,this.trail=new Ai,this.vibrate=!1,this.warp=!1}load(t){if(!t)return;this.angle.load(b(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=b(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=Q(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(x(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=Q(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 ki extends hi{constructor(){super(),this.destroy=ct.none,this.speed=2}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class zi extends vi{constructor(){super(),this.animation=new ki,this.value=1}load(t){if(!t)return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Gi{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(!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"}(ii||(ii={}));class Ri{constructor(){this.mode=ii.delete,this.value=0}load(t){t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ii{constructor(){this.density=new Gi,this.limit=new Ri,this.value=0}load(t){t&&(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Li{constructor(){this.blur=0,this.color=new De,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=De.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 Di{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=At(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 Hi extends hi{constructor(){super(),this.destroy=ct.none,this.speed=5}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Bi extends vi{constructor(){super(),this.animation=new Hi,this.value=3}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Fi{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=ui.create(this.color,t.color)),void 0!==t.width&&(this.width=Q(t.width)),void 0!==t.opacity&&(this.opacity=Q(t.opacity)))}}class Ui extends gi{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),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 Ni{constructor(t,e){this._engine=t,this._container=e,this.bounce=new wi,this.collisions=new _i,this.color=new ui,this.color.value="#fff",this.effect=new bi,this.groups={},this.move=new Vi,this.number=new Ii,this.opacity=new zi,this.reduceDuplicates=!1,this.shadow=new Li,this.shape=new Di,this.size=new Bi,this.stroke=new Fi,this.zIndex=new Ui}load(t){if(!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]=At(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(ui.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=At({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=It(e,(t=>{const e=new Fi;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 $i(t,...e){for(const i of e)t.load(i)}function qi(t,e,...i){const s=new Ni(t,e);return $i(s,...i),s}class ji{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===Ke.any)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new He,this.backgroundMask=new Fe,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Ue,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new Xe(t,e),this.manualParticles=[],this.particles=qi(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(!t)return;void 0!==t.preset&&It(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=Q(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=Q(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;w(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 Ye;return e.load(t),e}))),this.particles.load(t.particles),this.style=At(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const o=this._engine.interactors.get(this._container);if(o)for(const e of o)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new ni;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 ri;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme(Ke.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(Ke.light)?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>i.mode===Je.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=mt("(prefers-color-scheme: dark)"),e=t?.matches,i=this._findDefaultTheme(e?Ke.dark:Ke.light);i&&this.load(i.options)}}}!function(t){t.external="external",t.particles="particles"}(si||(si={}));class Qi{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 si.external:this._externalInteractors.push(t);break;case si.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(t){t.normal="normal",t.inside="inside",t.outside="outside"}(oi||(oi={}));const Wi=.5,Zi="random";function Xi(t){if(!bt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class Yi{constructor(t,e){this.container=e,this._calcPosition=(t,e,i,s=0)=>{for(const[,s]of t.plugins){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return A.create(t.x,t.y,i)}const o=st({size:t.canvas.size,position:e}),n=A.create(o.x,o.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{Xi({outMode:e,checkModes:[ei.bounce],coord:n.x,maxCoord:t.canvas.size.width,setCb:t=>n.x+=t,radius:a})},h=e=>{Xi({outMode:e,checkModes:[ei.bounce],coord:n.y,maxCoord:t.canvas.size.height,setCb:t=>n.y+=t,radius:a})};if(c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(n,s)){const e=1;return this._calcPosition(t,void 0,i,s+e)}return n},this._calculateVelocity=()=>{const t=J(this.direction).copy(),e=this.options.move;if(e.direction===m.inside||e.direction===m.outside)return t;const i=X($(e.angle.value)),s=X($(e.angle.offset)),o={left:s-i*Wi,right:s+i*Wi};return e.straight||(t.angle+=N(Q(o.left,o.right))),e.random&&"number"==typeof e.speed&&(t.length*=L()),t},this._checkOverlap=(t,e=0)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const o=i.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&e>n)throw new Error(`${f} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>Z(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?2:1,i=this.roll.horizontal?Math.PI*Wi:0;return Math.floor(((this.roll.angle??0)+i)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?Me(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=$(this.options.zIndex.value);this.position=this._calcPosition(e,t,F(i,0,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...Ft(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??lt.percent},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case m.inside:this.outType=oi.inside;break;case m.outside:this.outType=oi.outside}this.offset=M.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)i.particleDestroyed?.(this,t);for(const i of e.particles.updaters)i.particleDestroyed?.(this,t);i?.reset(this),this._engine.dispatchEvent(Ie.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const e=this.container,i=e.canvas;for(const[,s]of e.plugins)i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??ue(this.color))}getMass(){return this.getRadius()**2*Math.PI*Wi}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??ue(this.strokeColor))}init(t,e,i,s){const o=this.container,n=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=oi.normal,this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,c=qi(this._engine,o,r.particles),{reduceDuplicates:h}=c,l=c.effect.type,d=c.shape.type;this.effect=Lt(l,this.id,h),this.shape=Lt(d,this.id,h);const u=c.effect,p=c.shape;if(i){if(i.effect?.type){const t=Lt(i.effect.type,this.id,h);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=Lt(i.shape.type,this.id,h);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===Zi){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(Math.random()*t.length)]}if(this.shape===Zi){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(Math.random()*t.length)]}this.effectData=function(t,e,i,s){const o=e.options[t];if(o)return At({close:e.close,fill:e.fill},Lt(o,i,s))}(this.effect,u,this.id,h),this.shapeData=function(t,e,i,s){const o=e.options[t];if(o)return At({close:e.close,fill:e.fill},Lt(o,i,s))}(this.shape,p,this.id,h),c.load(i);const f=this.effectData;f&&c.load(f.particles);const g=this.shapeData;g&&c.load(g.particles);const y=new Xe(n,o);y.load(o.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=f?.fill??c.effect.fill,this.effectClose=f?.close??c.effect.close,this.shapeFill=g?.fill??c.shape.fill,this.shapeClose=g?.close??c.shape.close,this.options=c;const m=this.options.move.path;this.pathDelay=$(m.delay.value)*v,m.generator&&(this.pathGenerator=this._engine.getPathGenerator(m.generator),this.pathGenerator&&o.addPath(m.generator,this.pathGenerator)&&this.pathGenerator.init(o)),o.retina.initParticle(this),this.size=Ht(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=1-$(this.options.move.decay);const w=o.particles;w.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24;let _=o.effectDrawers.get(this.effect);_||(_=this._engine.getEffectDrawer(this.effect),_&&o.effectDrawers.set(this.effect,_)),_?.loadEffect&&_.loadEffect(this);let b=o.shapeDrawers.get(this.shape);b||(b=this._engine.getShapeDrawer(this.shape),b&&o.shapeDrawers.set(this.shape,b)),b?.loadShape&&b.loadShape(this);const S=b?.getSidesCount;S&&(this.sides=S(this)),this.spawning=!1,this.shadowColor=Yt(this.options.shadow.color);for(const t of w.updaters)t.init(this);for(const t of w.movers)t.init?.(this);_?.particleInit?.(o,this),b?.particleInit?.(o,this);for(const[,t]of o.plugins)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 Ji{constructor(t,e){this.position=t,this.particle=e}}var Ki;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ki||(Ki={}));class ts{constructor(t,e,i){this.position={x:t,y:e},this.type=i}}class es extends ts{constructor(t,e,i){super(t,e,Ki.circle),this.radius=i}contains(t){return Z(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y),n=this.radius;if(t instanceof es||t.type===Ki.circle){return n+t.radius>Math.sqrt(s**2+o**2)}if(t instanceof is||t.type===Ki.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,2)+Math.pow(o-a,2)<=n**2||s<=n+i&&o<=n+a||s<=i||o<=a}return!1}}class is extends ts{constructor(t,e,i,s){super(t,e,Ki.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 es)return t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,o=t.position,n=t instanceof is?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+e&&o.x+a>s.x&&o.y<s.y+i&&o.y+r>s.y}}const ss=.5;class os{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:o}=this;for(let n=0;n<4;n++){const a=n%2;this._subs.push(new os(new is(t+i*ss*a,e+s*ss*(Math.round(n*ss)-a),i*ss,s*ss),o))}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)&&Z(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 es(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new is(t.x,t.y,e.width,e.height),i)}}const ns=t=>{const{height:e,width:i}=t;return new is(-.25*i,-.25*e,1.5*i,1.5*e)};class as{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 o=this._initDensityFactor(s.density),n=s.value,a=s.limit.value>0?s.limit.value:n,r=Math.min(n,a)*o+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*o:this._groupLimits.set(i,s.limit.value*o),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 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)},this._pushParticle=(t,e,i,s)=>{try{let o=this._pool.pop();o||(o=new Yi(this._engine,this._container)),o.init(this._nextId,t,e,i);let n=!0;if(s&&(n=s(o)),!n)return;return this._array.push(o),this._zArray.push(o),this._nextId++,this._engine.dispatchEvent(Ie.particleAdded,{container:this._container,data:{particle:o}}),o}catch(t){ft().warning(`${f} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;const o=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(o,1),s.destroy(i),this._engine.dispatchEvent(Ie.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 Qi(t,e),this._pluginsInitialized=!1;const i=e.canvas.size;this.quadTree=new os(ns(i),4),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((e=>this.addParticle(e.position?Ft(e.position,t.canvas.size):void 0,e.options)))}addParticle(t,e,i,s){const o=this._container.actualOptions.particles.number.limit.mode,n=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(n>0)switch(o){case ii.delete:{const t=a+1-n;t>0&&this.removeQuantity(t);break}case ii.wait:if(a>=n)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)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)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,o=0;o<s.number?.value&&i<t.number.value;i++,o++)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)e.init(t)}push(t,e,i,s){for(let o=0;o<t;o++)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=1,i,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<e&&n<this.count;n++)this._removeParticle(n--,i,s)&&o++}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],0,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 os(ns(e.canvas.size),4);for(const[,t]of e.pathGenerators)t.update();for(const[,i]of e.plugins)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){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 Ji(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(Ie.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));const e=1;this._lastZIndex=t[t.length-e].position.z,this._needsSort=!1}}}class rs{constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||yt()?1:window.devicePixelRatio,this.reduceFactor=1;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 o=e.particles,n=o.move;this.maxSpeed=$(n.gravity.maxSpeed)*i,this.sizeAnimationSpeed=$(o.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,o=s.distance,n=t.retina;n.moveDrift=$(s.drift)*i,n.moveSpeed=$(s.speed)*i,n.sizeAnimationSpeed=$(e.size.animation.speed)*i;const a=n.maxDistance;a.horizontal=void 0!==o.horizontal?o.horizontal*i:void 0,a.vertical=void 0!==o.vertical?o.vertical*i:void 0,n.maxSpeed=$(s.gravity.maxSpeed)*i}}function cs(t){return t&&!t.destroyed}function hs(t,e,...i){const s=new ji(t,e);return $i(s,...i),s}class ls{constructor(t,e,i){this._intersectionManager=t=>{if(cs(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=60,i=!1){return{value:t,factor:i?60/e:60*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){ft().error(`${f} 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 rs(this),this.canvas=new ke(this),this.particles=new as(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=hs(this._engine,this),this.actualOptions=hs(this._engine,this),this._eventListeners=new Re(this),this._intersectionObserver=wt((t=>this._intersectionManager(t))),this._engine.dispatchEvent(Ie.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&cs(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!cs(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!cs(this))return;const o=this.retina.pixelRatio,n={x:i.x*o,y:i.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(e,a)};let s=!1,o=!1;this._clickHandlers.set("click",(t=>{if(!cs(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),this._clickHandlers.set("touchstart",(()=>{cs(this)&&(s=!0,o=!1)})),this._clickHandlers.set("touchmove",(()=>{cs(this)&&(o=!0)})),this._clickHandlers.set("touchend",(t=>{if(cs(this)){if(s&&!o){const e=t,s=1;let o=e.touches[e.touches.length-s];if(!o&&(o=e.changedTouches[e.changedTouches.length-s],!o))return;const n=this.canvas.element,a=n?n.getBoundingClientRect():void 0,r=0,c={x:o.clientX-(a?a.left:r),y:o.clientY-(a?a.top:r)};i(t,c,Math.max(o.radiusX,o.radiusY))}s=!1,o=!1}})),this._clickHandlers.set("touchcancel",(()=>{cs(this)&&(s=!1,o=!1)}));for(const[t,i]of this._clickHandlers)e.addEventListener(t,i)}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!cs(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(cs(this)){for(const[t,e]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,e);this._clickHandlers.clear()}}destroy(t=!0){if(cs(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)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));if(e>=0){const i=1;t.splice(e,i)}}this._engine.dispatchEvent(Ie.containerDestroyed,{container:this})}}draw(t){if(!cs(this))return;let e=t;const i=t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)};this._drawAnimationFrame=H((t=>i(t)))}async export(t,e={}){for(const[,i]of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}ft().error(`${f} - Export plugin with type ${t} not found`)}handleClickMode(t){if(cs(this)){this.particles.handleClickMode(t);for(const[,e]of this.plugins)e.handleClickMode?.(t)}}async init(){if(!cs(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=hs(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=hs(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:o,delay:n,fpsLimit:a,smooth:r}=this.actualOptions;this.zLayers=s,this._duration=$(o)*v,this._delay=$(n)*v,this._lifeTime=0;this.fpsLimit=a>0?a:120,this._smooth=r;for(const[,t]of this.effectDrawers)await(t.init?.(this));for(const[,t]of this.shapeDrawers)await(t.init?.(this));for(const[,t]of this.plugins)await(t.init?.());this._engine.dispatchEvent(Ie.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup?.();this._engine.dispatchEvent(Ie.particlesSetup,{container:this})}async loadTheme(t){cs(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(cs(this)&&(void 0!==this._drawAnimationFrame&&(B(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(Ie.containerPaused,{container:this})}}play(t){if(!cs(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)t.play&&t.play();this._engine.dispatchEvent(Ie.containerPlay,{container:this}),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(cs(this))return this.stop(),this.start()}async reset(t){if(cs(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=hs(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=hs(this._engine,this,this._options),this.refresh()}async start(){cs(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)await(t.start?.());this._engine.dispatchEvent(Ie.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{e()}),this._delay)})))}stop(){if(cs(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)t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(Ie.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 ds{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,o=i.indexOf(e);if(o<0)return;1===s?this._listeners.delete(t):i.splice(o,1)}}async function us(t,e,i,s=!1){let o=e.get(t);return o&&!s||(o=await Promise.all([...i.values()].map((e=>e(t)))),e.set(t,o)),o}const ps="true",fs="false",gs="canvas";class ys{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new ds,this._initialized=!1,this.plugins=[],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.5.0"}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent(Ie.configAdded,{data:{name:e,config:t}})}async addEffect(t,e,i=!0){It(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)}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}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,e=!1){return us(t,this.interactors,this._initializers.interactors,e)}async getMovers(t,e=!1){return us(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 us(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;{const i=1;e.splice(t,i)}}async load(t){const e=t.id??t.element?.id??`tsparticles${Math.floor(1e4*L())}`,{index:s,url:o}=t,n=o?await async function(t){const e=Lt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ft().error(`${f} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:s}):t.options,a=Lt(n,s),{items:r}=this,c=r.findIndex((t=>t.id.description===e)),h=new ls(this,e,a);if(c>=0){const t=this.item(c),e=t?1:0;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]=ps,document.body.append(s),s)})(e,t.element),d=(t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===gs)e=t,e.dataset[i]||(e.dataset[i]=fs);else{const s=t.getElementsByTagName(gs);s.length?(e=s[0],e.dataset[i]=fs):(e=document.createElement(gs),e.dataset[i]=ps,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(`${f} can only set click handlers after calling tsParticles.load()`);e.forEach((e=>e.addClickHandler(t)))}}var vs,ms,ws,_s,bs;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(vs||(vs={}));class Ss{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 oe(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return oe({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?ne({a:e.length>4?nt(e[vs.a]):1,h:parseInt(e[vs.h],10),l:parseInt(e[vs.l],10),s:parseInt(e[vs.s],10)}):void 0}}!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ms||(ms={}));class xs{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:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?nt(e[ms.a]):1,b:parseInt(e[ms.b],10),g:parseInt(e[ms.g],10),r:parseInt(e[ms.r],10)}:void 0}}class Ps{constructor(t){this.type=si.external,this.container=t}}class Cs{constructor(t){this.type=si.particles,this.container=t}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(ws||(ws={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(_s||(_s={})),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"}(bs||(bs={}));const Os=function(){const t=new xs,e=new Ss;Zt(t),Zt(e);const i=new ys;return i.init(),i}();yt()||(window.tsParticles=Os);class Ts{static init(t){const e=new Ts,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 Os.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 As={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},Ms=t=>{const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>{const s=At(As,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=Ts,{particlesJS:e,pJSDom:i,Particles:Ts}},Es=.5,Vs=0;class ks{constructor(){this.validTypes=["arrow"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=2*s,n=o*(i.heightFactor??.5),a=o*(i.headWidthFactor??.2),r=n*(i.bodyHeightFactor??.5);e.moveTo(-o*Es,Vs),e.lineTo(-o*Es,-r*Es),e.lineTo(o*Es-a,-r*Es),e.lineTo(o*Es-a,-n*Es),e.lineTo(o*Es+a,Vs),e.lineTo(o*Es-a,n*Es),e.lineTo(o*Es-a,r*Es),e.lineTo(-o*Es,r*Es),e.lineTo(-o*Es,Vs)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=$(i?.heightFactor??.5),e.headWidthFactor=$(i?.headWidthFactor??.2),e.bodyHeightFactor=$(i?.bodyHeightFactor??.5)}}const zs=2*Math.PI;class Gs{draw(t){const{context:e,radius:i}=t,s=i/3;e.beginPath(),e.arc(s,-s,s,0,zs,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class Rs{constructor(){this.color=!0,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Is{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(t){if(void 0!==t.filter)if(_(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];S(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Ls{constructor(){this.src=""}load(t){t&&void 0!==t.src&&(this.src=t.src)}}class Ds{constructor(){this.family="sans-serif",this.size=100}load(t){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 Hs{constructor(){this.separator="\n",this.spacing=10}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Bs{constructor(){this.color="#000000",this.font=new Ds,this.lines=new Hs,this.text=""}load(t){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 Fs{constructor(){this.enable=!1,this.override=new Rs,this.pixels=new Is,this.position={x:50,y:50},this.scale=1}load(t){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 Ls),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 Bs),this.text.load(t.text)))}}const Us={x:0,y:0};function Ns(t,e,i,s,o,n){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(L()*s);[t[s],t[e]]=[t[e],t[s]]}return t}(qs(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/g-r*s*.5,f=d.height*i.y/g-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(!n(l))continue;const d={x:c.x*s+p,y:c.y*s+f},g={};o.color&&(g.color={value:l}),o.opacity&&(g.opacity={value:l.a}),t.particles.addParticle(d,g),u++}}function $s(t,e,i,s=!0){const o=t.getImageData(Us.x,Us.y,e.width,e.height).data;s&&t.clearRect(Us.x,Us.y,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;n[a.y][a.x]={r:o[t+r.r],g:o[t+r.g],b:o[t+r.b],a:o[t+r.a]/c}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}const qs=t=>[...Array(t).keys()];class js{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 o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${f} Could not get canvas context`));n.drawImage(i,Us.x,Us.y,i.width,i.height,Us.x,Us.y,o.width,o.height),t($s(n,o,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:o,text:n,lines:a,color:r}=t;if(!n||!s)return;const c=n.split(a.separator),h=b(o.size)?`${o.size}px`:o.size,l=[];let d=0,u=0;for(const t of c){s.font=`${o.style??""} ${o.variant??""} ${o.weight??""} ${h} ${o.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=`${o.style??""} ${o.variant??""} ${o.weight??""} ${h} ${o.family}`,s.fillStyle=r,s.fillText(t.text,Us.x,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return $s(s,i,e)}(e.text,s);if(!t)return;i=t}else if(e.element??e.selector){const t=e.element??(e.selector&&document.querySelector(e.selector));if(!t)return;const o=t.getContext("2d");if(!o)return;i=$s(o,t,s)}Ns(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class Qs{constructor(){this.id="canvasMask"}getPlugin(t){return Promise.resolve(new js(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new Fs),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function Ws(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 o=e.segments[t];i.bezierCurveTo(-o.values[2].x*s,o.values[2].y*s,-o.values[1].x*s,o.values[1].y*s,-o.values[0].x*s,o.values[0].y*s)}}const Zs=.5,Xs={heart:{segments:[{values:[{x:0,y:Zs},{x:0,y:Zs},{x:Zs,y:0},{x:Zs,y:-Zs/2}]},{values:[{x:Zs,y:-Zs/2},{x:Zs,y:-Zs/2},{x:Zs,y:-Zs},{x:Zs/2,y:-Zs}]},{values:[{x:Zs/2,y:-Zs},{x:Zs/2,y:-Zs},{x:0,y:-Zs},{x:0,y:-Zs/2}]}]},diamond:{segments:[{values:[{x:0,y:Zs},{x:0,y:Zs},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-Zs},{x:0,y:-Zs}]}]},club:{segments:[{values:[{x:0,y:-Zs},{x:0,y:-Zs},{x:Zs/2,y:-Zs},{x:Zs/2,y:-Zs/2}]},{values:[{x:Zs/2,y:-Zs/2},{x:Zs/2,y:-Zs/2},{x:Zs,y:-Zs/2},{x:Zs,y:0}]},{values:[{x:Zs,y:0},{x:Zs,y:0},{x:Zs,y:Zs/2},{x:Zs/2,y:Zs/2}]},{values:[{x:Zs/2,y:Zs/2},{x:Zs/2,y:Zs/2},{x:Zs/8,y:Zs/2},{x:Zs/8,y:Zs/8}]},{values:[{x:Zs/8,y:Zs/8},{x:Zs/8,y:Zs/2},{x:Zs/2,y:Zs},{x:Zs/2,y:Zs}]},{values:[{x:Zs/2,y:Zs},{x:Zs/2,y:Zs},{x:0,y:Zs},{x:0,y:Zs}]}]},spade:{segments:[{values:[{x:0,y:-Zs},{x:0,y:-Zs},{x:Zs,y:-Zs/2},{x:Zs,y:0}]},{values:[{x:Zs,y:0},{x:Zs,y:0},{x:Zs,y:Zs/2},{x:Zs/2,y:Zs/2}]},{values:[{x:Zs/2,y:Zs/2},{x:Zs/2,y:Zs/2},{x:Zs/8,y:Zs/2},{x:Zs/8,y:Zs/8}]},{values:[{x:Zs/8,y:Zs/8},{x:Zs/8,y:Zs/2},{x:Zs/2,y:Zs},{x:Zs/2,y:Zs}]},{values:[{x:Zs/2,y:Zs},{x:Zs/2,y:Zs},{x:0,y:Zs},{x:0,y:Zs}]}]}};class Ys{constructor(){this.validTypes=["club","clubs"]}draw(t){Ws(t,Xs.club)}}class Js{constructor(){this.validTypes=["diamond","diamonds"]}draw(t){Ws(t,Xs.diamond)}}class Ks{constructor(){this.validTypes=["heart","hearts"]}draw(t){Ws(t,Xs.heart)}}class to{constructor(){this.validTypes=["spade","spades"]}draw(t){Ws(t,Xs.spade)}}const eo=2*Math.PI,io=0,so=0;class oo{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 o=s*i.cogHoleRadius/g;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(o,so),e.arc(io,so,o,0,eo),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 o=eo/(2*i.cogNotches),n=o*i.cogInnerTaper*.005,a=o*i.cogOuterTaper*.005,r=s*i.cogInnerRadius/g;let c=o,h=!1;for(e.moveTo(s*Math.cos(a),s*Math.sin(a));c<=eo;c+=o)h?(e.lineTo(r*Math.cos(c-n),r*Math.sin(c-n)),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+n),r*Math.sin(c+n))),h=!h}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=$(i?.holeRadius??44),e.cogInnerRadius=$(i?.innerRadius??72),e.cogInnerTaper=$(i?.innerTaper??35),e.cogNotches=$(i?.notches??7),e.cogOuterTaper=$(i?.outerTaper??50)}}function no(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class ao{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:o,_STRETCH_2D:n,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*n,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),f=(u+p)*o,g=t-(u+f),y=e-(p+f),v=l-u,m=d-p,w=v+m;let _=0;for(let t=a[v-m+1|w<<1|w+m<<2|w+v<<4];void 0!==t;t=t.next){const e=g+t.dx,s=y+t.dy,o=2-e*e-s*s;if(o>0){const n=u+t.xsb,a=p+t.ysb,h=c[r[255&n]+a&255];_+=o*o*o*o*(i[h]*e+i[h+1]*s)}}return _*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,o=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===n?o[t/4]=a:n.next=a,n=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]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm2D[t]=14&this._perm[t],n[e[0]]=n[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class ro{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:o,_SQUISH_3D:n,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,f=Math.floor(d),g=Math.floor(u),y=Math.floor(p),v=(f+g+y)*n,m=t-(f+v),w=e-(g+v),_=i-(y+v),b=d-f,S=u-g,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=m+t.dx,i=w+t.dy,s=_+t.dz,o=2-e*e-i*i-s*s;if(o>0){const n=f+t.xsb,a=g+t.ysb,l=y+t.zsb,d=c[r[r[255&n]+a&255]+l&255];C+=o*o*o*o*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*o}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,o=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let n=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===n?o[t/9]=a:n.next=a,n=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]]=o[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm3D[t]=this._perm[t]%24*3,n[e[0]]=n[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,xsb:e,ysb:i,zsb:s}}}class co{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:o,_perm4D:n,_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,f=i+d,g=s+d,y=Math.floor(u),v=Math.floor(p),m=Math.floor(f),w=Math.floor(g),_=(y+v+m+w)*c,b=t-(y+_),S=e-(v+_),x=i-(m+_),P=s-(w+_),C=u-y,O=p-v,T=f-m,A=g-w,M=C+O+T+A;let E=0;for(let t=a[T-A+1|O-T+1<<1|O-A+1<<2|C-O+1<<3|C-T+1<<4|C-A+1<<5|M<<6|M+A<<8|M+T<<11|M+O<<14|M+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=m+t.zsb,u=w+t.wsb,p=n[o[o[o[255&c]+l&255]+d&255]+u&255];E+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return E*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,o=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let n=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===n?o[t/16]=a:n.next=a,n=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]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm4D[t]=252&this._perm[t],n[e[0]]=n[t]}}_contribution4D(t,e,i,s,o){const{_SQUISH_4D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,dw:-o-t*n,xsb:e,ysb:i,zsb:s,wsb:o}}}class ho{constructor(){this.noise2d=new ao,this.noise3d=new ro,this.noise4d=new co}}const lo={speed:.2,step:250};class uo{constructor(){const t=new ho;this._simplex=t.noise2d,this.options=At({},lo)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,o=e.x/s,n=e.y/s,a=.001,r=(this._simplex.noise(o,n+a)-this._simplex.noise(o,n-a))/.002,c=(this._simplex.noise(o+a,n)-this._simplex.noise(o-a,n))/.002;return t.velocity.x=0,t.velocity.y=0,M.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??lo.speed)*t.retina.pixelRatio,this.options.step=e?.step??lo.step,this._simplex.seed(this.options.seed??L())}reset(){}update(){}}const po="curlNoise";const fo=2*Math.PI;class go{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,o=0,n=1){const a=[],r=[],c=[],h=[],l=[],d=t??L;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*(n-o))),()=>{let t,e,s=0;for(let o=i;o>=1;--o)t=l[o]+=h[o],l[o]>=1&&(t=l[o]-=1,a[o]=r[o],r[o]=d()),e=t**2*(3-2*t),s+=(a[o]*(1-e)+r[o]*e)*c[o];return s+o}}(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())%fo):(t.curveVelocity=M.origin,t.curveVelocity.length=.6*L()+.8,t.curveVelocity.angle=L()*fo),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;S(e.rndFunc)?i.rndFunc=e.rndFunc:_(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 yo="curvesPathGenerator";class vo{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.duration&&(this.duration=Q(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class mo{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=Q(t.quantity)),void 0!==t.delay&&(this.delay=Q(t.delay)))}}class wo{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class _o{constructor(){this.options={},this.replace=new wo,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=At({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class bo{constructor(){this.mode=lt.percent,this.height=0,this.width=0}load(t){void 0!==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 So{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new vo,this.rate=new mo,this.shape=new _o,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new bo),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=It(t.particles,(t=>At({},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=Q(t.position.x)),void 0!==t.position.y&&(this.position.y=Q(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new ui),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var xo;!function(t){t.emitter="emitter"}(xo||(xo={}));function Po(t,e){t.color?t.color.value=e:t.color={value:e}}class Co{constructor(t,e,i,s,o){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?$(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*v)},this._setColorAnimation=(t,e,i,s=1)=>{const o=this.container;if(!t.enable)return e;const n=N(t.offset),a=$(this.options.rate.delay)*v/o.retina.reduceFactor;return(e+$(t.speed??0)*o.fpsLimit/a+n*s)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof So?this.options=s:(this.options=new So,this.options.load(s)),this._spawnDelay=$(this.options.life.delay??0)*v/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 n=At({},this.options.particles);if(n??={},n.move??={},n.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=te(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=n,this._size=this._calcSize(),this.size=Ut(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=$(this.options.rate.delay);this._emitDelay=t*v/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&Ct(t,this.container.canvas.size,M.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=Ut(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=$(this.options.life.delay??0)*v/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 it({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:lt.precise}}}return this.options.size??(()=>{const t=new bo;return t.load({height:0,mode:lt.percent,width:0}),t})()}_emit(){if(this._paused)return;const t=$(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=Lt(this._particlesOptions);for(let i=0;i<t;i++){const t=At({},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)}Po(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 o=i.replace;o.color&&e.color&&Po(t,e.color),o.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class Oo{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||b(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 So;i.load(t);const s=new Co(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!==xo.emitter)return;let s;if(i&&P(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 o=xt(i.value);t.includes(o)&&t.length<i.value.length?e--:(t.push(o),s.push(Pt(i.value,o)))}}else s=i.value}else s=i?.value;const o=s??e,n=this.container.interactivity.mouse.clickPosition;It(o,(async t=>{await this.addEmitter(t,n)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(P(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 To{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return Promise.resolve(new Oo(this._engine,t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=It(e.emitters,(t=>{const e=new So;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(P(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new So;return e.load(t),e}))};else{const e=i;if(void 0!==e.value){const i=1;if(P(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 So;return e.load(t),e}))};else{const s=new So;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 So}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return P(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&bt(xo.emitter,t.interactivity.events.onClick.mode)}}const Ao=new Map;class Mo{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||Ao.set(t,e)}getShapeGenerator(t){return Ao.get(t)}getSupportedShapeGenerators(){return Ao.keys()}}class Eo{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 Vo={x:0,y:0};function ko(t,e,i,s=!0){const o=t.getImageData(Vo.x,Vo.y,e.width,e.height).data;s&&t.clearRect(Vo.x,Vo.y,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;n[a.y][a.x]={r:o[t+r.r],g:o[t+r.g],b:o[t+r.b],a:o[t+r.a]/c}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}class zo extends Eo{constructor(t,e,i,s){super(t,e,i,s);const o=s.filter;let n=t=>t.a>0;if(void 0!==o)if(_(o)){if(Object.hasOwn(window,o)){const t=window[o];S(t)&&(n=t)}}else n=o;this.filter=n,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,o=e.image,n=e.element,a=e.text,r=s.offset;if(o){const e=o.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 o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${f} Could not get canvas context`));n.drawImage(i,Vo.x,Vo.y,i.width,i.height,Vo.x,Vo.y,o.width,o.height),t(ko(n,o,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),o=s.getContext("2d"),{font:n,text:a,lines:r,color:c}=t;if(!a||!o)return;const h=a.split(r.separator),l=b(n.size)?`${n.size}px`:n.size,d=[];let u=0,p=0;for(const t of h){o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`;const e=o.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 f=0;for(const t of d)o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`,i?(o.fillStyle=c,o.fillText(t.text,Vo.x,f+t.measure.actualBoundingBoxAscent)):(o.strokeStyle=c,o.strokeText(t.text,Vo.x,f+t.measure.actualBoundingBoxAscent)),f+=t.height+r.spacing;return ko(o,s,e)}(a,r,this.fill);if(!e)return;t=e}else if(n??i){const e=n??(i&&document.querySelector(i));if(!e)return;const s=e.getContext("2d");if(!s)return;t=ko(s,e,r)}t&&(this.pixelData=t)}randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,o=this.scale,n=s.x-e*o*.5,a=s.y-t*o*.5;for(let s=0;s<100;s++){const s=Math.floor(L()*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*o+n,y:r.y*o+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class Go{constructor(){this.offset=4}load(t){t&&void 0!==t.offset&&(this.offset=t.offset)}}class Ro{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){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 Io{constructor(){this.separator="\n",this.spacing=0}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Lo{constructor(){this.color="#000000",this.font=new Ro,this.lines=new Io,this.text=""}load(t){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 Do{constructor(){this.filter=t=>t.a>0,this.pixels=new Go,this.scale=1,this.selector="",this.text=new Lo}load(t){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 Ho{generate(t,e,i,s){const o=new Do;return o.load(s),new zo(t,e,i,o)}}const Bo=.5;const Fo=.5;class Uo extends Eo{constructor(t,e,i,s){super(t,e,i,s);const o=document.createElement("canvas").getContext("2d");if(!o)throw new Error(`${f} No 2d context available`);this.checkContext=o,this.points=s.points;const n=this.points,a=new Path2D,r=t.x-e.width*Fo,c=t.y-e.height*Fo;for(const[t,i]of n.entries()){const s={x:r+i.x*e.width/g,y:c+i.y*e.height/g};t?a.lineTo(s.x,s.y):a.moveTo(s.x,s.y)}const h=n[0];if(h){const t={x:r+h.x*e.width/g,y:c+h.y*e.height/g};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,o=this.path,n=s?function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+L()*s.width-s.width*Bo,y:i.y+L()*s.height-s.height*Bo};if(t.isPointInPath(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i):function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+L()*s.width-s.width*Bo,y:i.y+L()*s.height-s.height*Bo};if(t.isPointInStroke(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i);return n?{position:n}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,o=t.x-e.width*Fo,n=t.y-e.height*Fo;for(const[t,a]of i.entries()){const i={x:o+a.x*e.width/g,y:n+a.y*e.height/g};t?s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)}const a=i[0];if(a){const t={x:o+a.x*e.width/g,y:n+a.y*e.height/g};s.lineTo(t.x,t.y)}this.path=s}}const No=50,$o=50;class qo{constructor(){this.points=[]}load(t){t&&void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??No,y:t.y??$o}))))}}class jo{generate(t,e,i,s){const o=new qo;return o.load(s),new Uo(t,e,i,o)}}const Qo=2*Math.PI;function Wo(t,e,i,s=0){const o=[],n=Qo/e;for(let a=0;a<e;a++){const e=n*a+s;o.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return o}function Zo(t,e){let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const n=e[s],a=e[o];n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i)}return i}class Xo extends Eo{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=X(s.angle),this.polygon=Wo(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 o=null;for(let e=0;e<100;e++){const e={x:i.x+L()*(s.x-i.x),y:i.y+L()*(s.y-i.y)};if(Zo(e,t)){o=e;break}}return o}(e):function(t){const e=Math.floor(L()*t.length),i=t[e],s=t[(e+1)%t.length],o=L();return{x:i.x+(s.x-i.x)*o,y:i.y+(s.y-i.y)*o}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=Wo(t,this.sides,.5*e.width,this.angle)}}class Yo{constructor(){this.angle=0,this.sides=5}load(t){t&&(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class Jo{generate(t,e,i,s){const o=new Yo;return o.load(s),new Xo(t,e,i,o)}}class Ko{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 tn{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return Promise.resolve(new Ko(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class en{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 sn{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return Promise.resolve(new en(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}const on=["webm","ogg","mp4","x-matroska"],nn=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class an{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),o=t.mimeType??this._supportedTypes[0],n=new MediaRecorder(s,{mimeType:o}),a=[];n.addEventListener("dataavailable",(t=>{a.push(t.data)})),n.addEventListener("stop",(()=>{i(new Blob(a,{type:o}))})),n.start(),setTimeout((()=>{n.stop()}),t.duration??5*v)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=t=>MediaRecorder.isTypeSupported(t),e=[];return on.forEach((i=>{const s=`video/${i}`;nn.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 rn{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return Promise.resolve(new an(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class cn{constructor(){this.replaceCursor=!1,this.pauseOnStop=!1,this.stopDelay=0}load(t){t&&(void 0!==t.options&&(this.options=At({},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 hn="particle";class ln extends Ps{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,o=i.interactivity.modes.particle;if(!o)return;const n=o.pauseOnStop&&(e.mouse.position===this._lastPosition||e.mouse.position?.x===this._lastPosition?.x&&e.mouse.position?.y===this._lastPosition?.y),a=o.stopDelay;if(s?this._lastPosition={...s}:delete this._lastPosition,this._lastPosition)if(n){if(this._clearTimeout)return;this._clearTimeout=setTimeout((()=>{if(this._particle){if(o.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=At(o.options,{move:{enable:!1}});if(this._particle=t.particles.addParticle(this._lastPosition,i),o.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,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&bt(hn,o.onClick.mode)||s.inside&&!!s.position&&bt(hn,o.onHover.mode)}loadModeOptions(t,...e){t.particle||(t.particle=new cn);for(const i of e)t.particle.load(i?.particle)}reset(){}}class dn extends Ps{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 un{constructor(){this.radius=0,this.mass=0}load(t){t&&(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class pn extends gi{constructor(){super(),this.density=5,this.value=50,this.limit=new un}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),b(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class fn{constructor(){this.color=new De,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new pn}load(t){void 0!==t&&(void 0!==t.color&&(this.color=De.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=Q(t.position.x)),void 0!==t.position.y&&(this.position.y=Q(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 gn;!function(t){t.absorber="absorber"}(gn||(gn={}));const yn=0,vn=0,mn=2*Math.PI;class wn{constructor(t,e,i,s){this.absorbers=t,this.container=e,this._calcPosition=()=>{const t=it({size:this.container.canvas.size,position:this.options.position});return M.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=et({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=M.origin,t.absorberOrbit.length=Z(t.getPosition(),this.position),t.absorberOrbit.angle=L()*mn),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height),i=1,o=.1,n=.2;t.absorberOrbit.length=e*(i+(L()*n-o))}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?ws.clockwise:ws.counterClockwise);const o=t.absorberOrbit.length,n=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(M.origin);const r={x:a===ws.clockwise?Math.cos:Math.sin,y:a===ws.clockwise?Math.sin:Math.cos};t.position.x=this.position.x+o*r.x(n),t.position.y=this.position.y+o*r.y(n),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/g*i.retina.reduceFactor}else{const i=M.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this.initialPosition=s?M.create(s.x,s.y):void 0,i instanceof fn?this.options=i:(this.options=new fn,this.options.load(i)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=$(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=Yt(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){Z(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:o,dy:n,distance:a}=W(this.position,s),r=M.create(o,n);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(yn,vn,this.size,0,mn,!1),t.closePath(),t.fillStyle=re(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&Ct(t,this.container.canvas.size,M.origin)?t:this._calcPosition()}}class _n{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||b(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 wn(this,this.container,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===gn.absorber){const t=Lt(i)??Lt(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=It(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 bn{constructor(){this.id="absorbers"}async getPlugin(t){return Promise.resolve(new _n(t))}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=It(e.absorbers,(t=>{const e=new fn;return e.load(t),e}))),t.interactivity.modes.absorbers=It(e?.interactivity?.modes?.absorbers,(t=>{const e=new fn;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return P(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!bt(gn.absorber,t.interactivity.events.onClick.mode))}}class Sn{load(t){t&&(void 0!==t.bottom&&(this.bottom=Q(t.bottom)),void 0!==t.left&&(this.left=Q(t.left)),void 0!==t.right&&(this.right=Q(t.right)),void 0!==t.top&&(this.top=Q(t.top)))}}var xn;!function(t){t.none="none",t.split="split"}(xn||(xn={}));class Pn extends gi{constructor(){super(),this.value=3}}class Cn extends gi{constructor(){super(),this.value={min:4,max:9}}}class On{constructor(){this.count=1,this.factor=new Pn,this.rate=new Cn,this.sizeOffset=!0}load(t){t&&(void 0!==t.color&&(this.color=De.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=It(t.particles,(t=>At({},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 Tn{constructor(){this.bounds=new Sn,this.mode=xn.none,this.split=new On}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}const An=0,Mn=.5,En=0,Vn=1,kn=500;function zn(t,e,i,s){const o=i.options.destroy;if(!o)return;const n=o.split,a=qi(t,e,i.options),r=$(n.factor.value),c=i.getFillColor();n.color?a.color.load(n.color):n.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+$(n.colorOffset.h??An),s:c.s+$(n.colorOffset.s??An),l:c.l+$(n.colorOffset.l??An)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:lt.precise}}),b(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=n.sizeOffset?Q(-i.size.value,i.size.value):An,l={x:i.position.x+N(h),y:i.position.y+N(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<Mn)&&(t.velocity.length=N(Q(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??En)+Vn,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),kn),!0)))}class Gn{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:o,left:n,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;o&&(c.bottom=$(o)*h.height/g),n&&(c.left=$(n)*h.width/g),a&&(c.right=$(a)*h.width/g),r&&(c.top=$(r)*h.height/g)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new Tn);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&i.mode===xn.split&&function(t,e,i){const s=i.options.destroy;if(!s)return;const o=s.split;if(o.count>=0&&(void 0===i.splitCount||i.splitCount++>o.count))return;const n=$(o.rate.value),a=Lt(o.particles);for(let s=0;s<n;s++)zn(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 Rn=.25,In=2*Math.PI;class Ln extends Eo{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,o]=[.5*t.width,.5*t.height],n=((t,e)=>{const i=L()*Rn,s=Math.atan(e/t*Math.tan(In*i)),o=L();return o<Rn?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),a=(l=n,(c=s)*(h=o)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(L()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(n),y:i.y+r*Math.sin(n)}}}}class Dn{generate(t,e,i,s){return new Ln(t,e,i,s)}}var Hn;function Bn(t,e){return t+e*(L()-y)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Hn||(Hn={}));class Fn extends Eo{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:Bn(e.x,i.width),y:Bn(e.y,i.height)}};{const t=.5*i.width,s=.5*i.height,o=Math.floor(4*L()),n=2*(L()-y);switch(o){case Hn.TopLeft:return{position:{x:e.x+n*t,y:e.y-s}};case Hn.TopRight:return{position:{x:e.x-t,y:e.y+n*s}};case Hn.BottomRight:return{position:{x:e.x+n*t,y:e.y+s}};case Hn.BottomLeft:default:return{position:{x:e.x+t,y:e.y+n*s}}}}}}class Un{generate(t,e,i,s){return new Fn(t,e,i,s)}}class Nn{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=At({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const $n="trail";class qn extends Ps{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 o=s.delay*v/this.container.retina.reduceFactor;if(this._delay<o&&(this._delay+=t.value),this._delay<o)return;const n=!(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,n&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=o}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&bt($n,o.onClick.mode)||s.inside&&!!s.position&&bt($n,o.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new Nn);for(const i of e)t.trail.load(i?.trail)}reset(){}}var jn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(jn||(jn={}));const Qn=2*Math.PI;class Wn{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=Q(t.value)))}}class Zn{constructor(){this.darken=new Wn,this.enable=!1,this.enlighten=new Wn,this.mode=jn.vertical,this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=De.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=Q(t.speed)))}}class Xn{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){const e=t.options.roll;if(e?.enable)if(t.roll={enable:e.enable,horizontal:e.mode===jn.horizontal||e.mode===jn.both,vertical:e.mode===jn.vertical||e.mode===jn.both,angle:L()*Qn,speed:$(e.speed)/360},e.backColor)t.backColor=te(e.backColor);else if(e.darken.enable&&e.enlighten.enable){const i=L()>=y?$t.darken:$t.enlighten;t.roll.alter={type:i,value:$(i===$t.darken?e.darken.value:e.enlighten.value)}}else e.darken.enable?t.roll.alter={type:$t.darken,value:$(e.darken.value)}:e.enlighten.enable&&(t.roll.alter={type:$t.enlighten,value:$(e.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new Zn);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 o=s.speed*e.factor,n=Qn;s.angle+=o,s.angle>n&&(s.angle-=n)}(t,e)}}const Yn=1;function Jn(t,e,i,s,o,n){!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 o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=F(t.velocity.x,-Yn,Yn),t.velocity.y=F(t.velocity.y,-Yn,Yn));t.lastPathTime-=t.pathDelay}(t,n);const a=t.gravity,r=a?.enable&&a.inverse?-Yn:Yn;o&&i&&(t.velocity.x+=o*n.factor/(60*i)),a?.enable&&i&&(t.velocity.y+=r*(a.acceleration*n.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=(Yn-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 Kn{init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:$(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},o={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},n=Z(t.getPosition(),o),a=$(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?ws.clockwise:ws.counterClockwise,angle:t.velocity.angle,radius:n,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 o=t.container,n=o.retina.pixelRatio;t.retina.moveSpeed??=$(s.speed)*n,t.retina.moveDrift??=$(t.options.move.drift)*n;const a=function(t){return t.slow.inRange?t.slow.factor:Yn}(t),r=t.retina.moveSpeed*o.retina.reduceFactor,c=t.retina.moveDrift,h=j(i.size.value)*n,l=r*(s.size?t.getRadius()/h:1)*a*(e.factor||1)/2,d=t.retina.maxSpeed??o.retina.maxSpeed;s.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const s={x:t.spin.direction===ws.clockwise?Math.cos:Math.sin,y:t.spin.direction===ws.clockwise?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(i.canvas.size.width,i.canvas.size.height),n=.5*o;t.spin.radius>n?(t.spin.radius=n,t.spin.acceleration*=-Yn):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-Yn),t.spin.angle+=.01*e*(Yn-t.spin.radius/o)}(t,l):Jn(t,s,l,d,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),o=Math.abs(i),n=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(!r&&!c)return;if((r&&o>=r||c&&n>=c)&&!t.misplaced)t.misplaced=!!r&&o>r||!!c&&n>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||o<r)&&(!c||n<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*=-L()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-L())}}(t)}}const ta=2*Math.PI,ea=0,ia=0;class sa{constructor(){this.validTypes=["circle"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:ta});const o=i.circleRange;e.arc(ea,ia,s,o.min,o.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=x(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}class oa{constructor(t){this.container=t}init(t){const e=te(t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=pe(e,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:o}=t;return!t.destroyed&&!t.spawning&&(void 0!==o?.h.value&&e.enable||void 0!==o?.s.value&&i.enable||void 0!==o?.l.value&&s.enable)}update(t,e){ye(t.color,e)}}class na{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=Ht(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/g*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=L()))}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&&Nt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}class aa{constructor(t){this.container=t,this.modes=[ei.bounce,ei.split]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const[,s]of o.plugins)if(void 0!==s.particleBounce&&(n=s.particleBounce(t,i,e)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=Tt(a,c),l=o.canvas.size;!function(t){if(t.outMode!==ei.bounce&&t.outMode!==ei.split||t.direction!==ht.left&&t.direction!==ht.right)return;t.bounds.right<0&&t.direction===ht.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===ht.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===ht.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===ht.left&&t.bounds.left<=0&&e<0){const e=$(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===ht.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===ht.left&&(t.particle.position.x=s),t.outMode===ei.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if(t.outMode!==ei.bounce&&t.outMode!==ei.split||t.direction!==ht.bottom&&t.direction!==ht.top)return;t.bounds.bottom<0&&t.direction===ht.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===ht.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===ht.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===ht.top&&t.bounds.top<=0&&e<0){const e=$(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===ht.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===ht.top&&(t.particle.position.y=s),t.outMode===ei.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class ra{constructor(t){this.container=t,this.modes=[ei.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case oi.normal:case oi.outside:if(Ct(t.position,o.canvas.size,M.origin,t.getRadius(),e))return;break;case oi.inside:{const{dx:e,dy:i}=W(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&e>t.moveCenter.radius||o<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||o>=0&&i<-t.moveCenter.radius)return;break}}o.particles.remove(t,void 0,!0)}}class ca{constructor(t){this.container=t,this.modes=[ei.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===ht.left||e===ht.right))??(t.options.move.distance.vertical&&(e===ht.top||e===ht.bottom)))return;const o=t.options.move.gravity,n=this.container,a=n.canvas.size,r=t.getRadius();if(o.enable){const i=t.position;(!o.inverse&&i.y>a.height+r&&e===ht.bottom||o.inverse&&i.y<-r&&e===ht.top)&&n.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;Ct(t.position,n.canvas.size,M.origin,r,e)||n.particles.remove(t)}}}class ha{constructor(t){this.container=t,this.modes=[ei.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case oi.inside:{const{x:e,y:i}=t.velocity,s=M.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(M.create(t.moveCenter));const{dx:n,dy:a}=W(t.position,s);if(e<=0&&n>=0||i<=0&&a>=0||e>=0&&n<=0||i>=0&&a<=0)return;t.position.x=Math.floor(N({min:0,max:o.canvas.size.width})),t.position.y=Math.floor(N({min:0,max:o.canvas.size.height}));const{dx:r,dy:c}=W(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(Ct(t.position,o.canvas.size,M.origin,t.getRadius(),e))return;switch(t.outType){case oi.outside:{t.position.x=Math.floor(N({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(N({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case oi.normal:{const i=t.options.move.warp,s=o.canvas.size,n={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=Tt(t.position,a);e===ht.right&&r.left>s.width+t.offset.x?(t.position.x=n.left,t.initialPosition.x=t.position.x,i||(t.position.y=L()*s.height,t.initialPosition.y=t.position.y)):e===ht.left&&r.right<-t.offset.x&&(t.position.x=n.right,t.initialPosition.x=t.position.x,i||(t.position.y=L()*s.height,t.initialPosition.y=t.position.y)),e===ht.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=L()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.top,t.initialPosition.y=t.position.y):e===ht.top&&r.bottom<-t.offset.y&&(i||(t.position.x=L()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.bottom,t.initialPosition.y=t.position.y);break}}}}}const la=(t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e;class da{constructor(t){this._updateOutMode=(t,e,i,s)=>{for(const o of this.updaters)o.update(t,s,e,i)},this.container=t,this.updaters=[]}init(t){this.updaters=[];const e=t.options.move.outModes;la(e,ei.bounce)?this.updaters.push(new aa(this.container)):la(e,ei.out)?this.updaters.push(new ha(this.container)):la(e,ei.destroy)?this.updaters.push(new ra(this.container)):la(e,ei.none)&&this.updaters.push(new ca(this.container))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,ht.bottom),this._updateOutMode(t,e,i.left??i.default,ht.left),this._updateOutMode(t,e,i.right??i.default,ht.right),this._updateOutMode(t,e,i.top??i.default,ht.top)}}class ua{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/g*e.retina.reduceFactor,i.sync||(t.size.velocity*=L()))}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)&&Nt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function pa(t,e=!0){await async function(t,e=!0){await t.addMover("base",(()=>Promise.resolve(new Kn)),e)}(t,!1),await async function(t,e=!0){await t.addShape(new sa,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("color",(t=>Promise.resolve(new oa(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("opacity",(t=>Promise.resolve(new na(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("outModes",(t=>Promise.resolve(new da(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("size",(()=>Promise.resolve(new ua)),e)}(t,!1),await t.refresh(e)}const fa='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';class ga{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){!function(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.emojiData,a=2*s,r=e.globalAlpha;n&&(e.globalAlpha=o,e.drawImage(n,-s,-s,a,a),e.globalAlpha=r)}(t)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(!i.find((t=>bt(t,e.particles.shape.type))))return;const s=[St(fa)],o=i.map((t=>e.particles.shape.options[t])).find((t=>!!t));o&&It(o,(t=>{t.font&&s.push(St(t.font))})),await Promise.all(s)}particleDestroy(t){delete t.emojiData}particleInit(t,e){const i=e.shapeData;if(!i?.value)return;const s=Lt(i.value,e.randomIndexData),o=i.font??fa;if(!s)return;const n=`${s}_${o}`,a=this._emojiShapeDict.get(n);if(a)return void(e.emojiData=a);const r=2*j(e.size.value);let c;const h=j(e.size.value);if("undefined"!=typeof OffscreenCanvas){const t=new OffscreenCanvas(r,r),e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(s,h,h),c=t.transferToImageBitmap()}else{const t=document.createElement("canvas");t.width=r,t.height=r;const e=t.getContext("2d");if(!e)return;e.font=`400 ${2*h}px ${o}`,e.textBaseline="middle",e.textAlign="center",e.fillText(s,h,h),c=t}this._emojiShapeDict.set(n,c),e.emojiData=c}}const ya=1,va=1;function ma(t,e,i,s,o){const n=t.actualOptions.interactivity.modes.attract;if(!n)return;const a=t.particles.quadTree.query(s,o);for(const t of a){const{dx:s,dy:o,distance:a}=W(t.position,e),r=n.speed*n.factor,c=F(R(n.easing)(va-a/i)*r,ya,n.maxSpeed),h=M.create(a?s/a*c:r,a?o/a*c:r);t.position.subFrom(h)}}class wa{constructor(){this.distance=200,this.duration=.4,this.easing=bs.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(t){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 _a="attract";class ba extends Ps{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===_a){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:o,mode:n}=s.onHover,{enable:a,mode:c}=s.onClick;i&&o&&bt(_a,n)?function(t,e){const i=t.interactivity.mouse.position,s=t.retina.attractModeDistance;!s||s<0||!i||ma(t,i,s,new es(i.x,i.y,s),(t=>e(t)))}(this.container,(t=>this.isEnabled(t))):a&&bt(_a,c)&&function(t,e){t.attract||(t.attract={particles:[]});const{attract:i}=t;if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const i=t.interactivity.mouse.clickPosition,s=t.retina.attractModeDistance;if(!s||s<0||!i)return;ma(t,i,s,new es(i.x,i.y,s),(t=>e(t)))}else!1===i.clicking&&(i.particles=[])}(this.container,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;if(!(s.position&&o.onHover.enable||s.clickPosition&&o.onClick.enable))return!1;const n=o.onHover.mode,a=o.onClick.mode;return bt(_a,n)||bt(_a,a)}loadModeOptions(t,...e){t.attract||(t.attract=new wa);for(const i of e)t.attract.load(i?.attract)}reset(){}}const Sa=2,xa=.5,Pa=Math.PI*xa,Ca=2,Oa=10;function Ta(t,e,i,s,o){const n=t.particles.quadTree.query(s,o);for(const t of n)s instanceof es?Gt(zt(t),{position:e,radius:i,mass:i**Sa*Pa,velocity:M.origin,factor:M.origin}):s instanceof is&&Rt(t,Tt(e,i))}function Aa(t,e,i,s){Et(i,e,((e,i)=>function(t,e,i,s){const o=document.querySelectorAll(e);o.length&&o.forEach((e=>{const o=e,n=t.retina.pixelRatio,a={x:(o.offsetLeft+o.offsetWidth*xa)*n,y:(o.offsetTop+o.offsetHeight*xa)*n},r=o.offsetWidth*xa*n,c=Oa*n,h=i.type===Le.circle?new es(a.x,a.y,r+c):new is(o.offsetLeft*n-c,o.offsetTop*n-c,o.offsetWidth*n+c*Ca,o.offsetHeight*n+c*Ca);s(a,r,h)}))}(t,e,i,((e,i,o)=>Ta(t,e,i,o,s)))))}class Ma{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}const Ea="bounce";class Va extends Ps{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,o=e.onHover.mode,n=e.onDiv;i&&s&&bt(Ea,o)?function(t,e){const i=t.retina.pixelRatio,s=Oa*i,o=t.interactivity.mouse.position,n=t.retina.bounceModeDistance;!n||n<0||!o||Ta(t,o,n,new es(o.x,o.y,n+s),e)}(this.container,(t=>this.isEnabled(t))):Aa(this.container,n,Ea,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv;return!!s.position&&o.onHover.enable&&bt(Ea,o.onHover.mode)||Mt(Ea,n)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Ma);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class ka{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(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=P(this.color)?void 0:this.color;this.color=It(t.color,(t=>De.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class za extends ka{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class Ga extends ka{load(t){super.load(t),t&&(this.divs=It(t.divs,(t=>{const e=new za;return e.load(t),e})))}}var Ra;function Ia(t,e,i,s){if(e>=i){return F(t+(e-i)*s,t,e)}if(e<i){return F(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Ra||(Ra={}));const La="bubble";class Da extends Ps{constructor(t){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 o=t.retina.bubbleModeDistance;if(!o||o<0)return;const n=t.particles.quadTree.queryCircle(i,o,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of n){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const n=Z(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:j(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:Ra.size};this._process(e,n,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:j(e.options.opacity.value),value:e.opacity?.value??1},type:Ra.opacity};this._process(e,n,r,h),!a.durationEnd&&n<=o?this._hoverBubbleColor(e,n):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 o of s){o.bubble.inRange=!0;const s=Z(o.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(o,a),this._hoverBubbleOpacity(o,a),this._hoverBubbleColor(o,a)):this.reset(o),t.interactivity.status===n&&this.reset(o)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,o=i??s.interactivity.modes.bubble;if(o){if(!t.bubble.finalColor){const e=o.color;if(!e)return;const i=Lt(e);t.bubble.finalColor=te(i)}if(t.bubble.finalColor)if(o.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?ee(he(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,o=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!o)return;const n=t.options.opacity.value,a=Ia(t.opacity?.value??1,o,j(n),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,o=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===o)return;const n=j(t.options.size.value)*s.retina.pixelRatio,a=Ia(t.size.value,o,n,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const o=this.container,n=s.bubbleObj.optValue,a=o.actualOptions.interactivity.modes.bubble;if(!a||void 0===n)return;const r=a.duration,c=o.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value??0,u=s.type;if(c&&!(c<0)&&n!==h)if(o.bubble||(o.bubble={}),o.bubble.durationEnd)l&&(u===Ra.size&&delete t.bubble.radius,u===Ra.opacity&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==n){const e=d-i*(d-n)/r;u===Ra.size&&(t.bubble.radius=e),u===Ra.opacity&&(t.bubble.opacity=e)}}else u===Ra.size&&delete t.bubble.radius,u===Ra.opacity&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,o=document.querySelectorAll(e),n=s.actualOptions.interactivity.modes.bubble;n&&o.length&&o.forEach((e=>{const o=e,a=s.retina.pixelRatio,r={x:(o.offsetLeft+.5*o.offsetWidth)*a,y:(o.offsetTop+.5*o.offsetHeight)*a},c=.5*o.offsetWidth*a,h=i.type===Le.circle?new es(r.x,r.y,c):new is(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.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=kt(n.divs,o);e.bubble.div&&e.bubble.div===o||(this.clear(e,t,!0),e.bubble.div=o),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===La&&(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,o=i.enable,n=i.mode,a=s.enable,r=s.mode,c=e.onDiv;o&&bt(La,n)?this._hoverBubble():a&&bt(La,r)?this._clickBubble():Et(La,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,{onClick:n,onDiv:a,onHover:r}=o,c=Mt(La,a);return!!(c||r.enable&&s.position||n.enable&&s.clickPosition)&&(bt(La,r.mode)||bt(La,n.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new Ga);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class Ha{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class Ba{constructor(){this.distance=80,this.links=new Ha,this.radius=60}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}const Fa=0,Ua=1;function Na(t,e,i,s){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,e,i,s){const o=Math.floor(i.getRadius()/e.getRadius()),n=e.getFillColor(),a=i.getFillColor();if(!n||!a)return;const r=e.getPosition(),c=i.getPosition(),h=he(n,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(Fa,ce(n,s)),l.addColorStop(F(o,Fa,Ua),re(h,s)),l.addColorStop(Ua,ce(a,s)),l}(e,i,s,o.links.opacity)}function $a(t,e,i){t.canvas.draw((s=>{const o=Na(t,s,e,i);if(!o)return;const n=e.getPosition(),a=i.getPosition();!function(t,e,i,s,o){we(t,s,o),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,o,n,a)}))}class qa extends Ps{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 o=Math.abs(s),n=t.particles.quadTree.queryCircle(e,o,(t=>this.isEnabled(t)));n.forEach(((e,s)=>{const o=e.getPosition();for(const a of n.slice(s+1)){const s=a.getPosition(),n=Math.abs(i),r=Math.abs(o.x-s.x),c=Math.abs(o.y-s.y);r<n&&c<n&&$a(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)&&bt("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Ba);for(const i of e)t.connect.load(i?.connect)}reset(){}}class ja{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){t&&(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Qa{constructor(){this.distance=100,this.links=new ja}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function Wa(t,e,i,s,o){t.canvas.draw((t=>{const n=e.getPosition();!function(t,e,i,s,o,n){we(t,i,s),t.strokeStyle=re(o,n),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,n,o,i,s)}))}class Za extends Ps{constructor(t){super(t)}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 o=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const n of o){const o=Z(n.getPosition(),i);if(o>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-o*r/s;if(c<=0)continue;const h=a.color??n.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=de(h,i.blink,i.consent)}const l=le(n,void 0,t.particles.grabLineColor);l&&Wa(t,n,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&&bt("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new Qa);for(const i of e)t.grab.load(i?.grab)}reset(){}}class Xa extends Ps{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 Ya{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(!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=Q(e))}}class Ja extends Ps{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=$(i.quantity);if(s<=0)return;const o=Pt([void 0,...i.groups]),n=void 0!==o?e.actualOptions.particles.groups[o]:void 0;e.particles.push(s,e.interactivity.mouse,n,o)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new Ya);for(const i of e)t.push.load(i?.push)}reset(){}}class Ka{constructor(){this.quantity=2}load(t){if(!t)return;const e=t.quantity;void 0!==e&&(this.quantity=Q(e))}}class tr extends Ps{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=$(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new Ka);for(const i of e)t.remove.load(i?.remove)}reset(){}}class er{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=bs.easeOutQuad}load(t){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 ir extends er{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class sr extends er{load(t){super.load(t),t&&(this.divs=It(t.divs,(t=>{const e=new ir;return e.load(t),e})))}}const or="repulse";class nr extends Ps{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 o=Math.pow(s/6,3),n=t.interactivity.mouse.clickPosition;if(void 0===n)return;const a=new es(n.x,n.y,o),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=W(n,t.position),c=r**2,h=-o*e.speed/c;if(c<=o){i.particles.push(t);const e=M.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 es(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const o=this.container,n=o.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=o.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=R(r),u=(s?.speed??c)*h;for(const i of n){const{dx:s,dy:o,distance:n}=W(i.position,t),a=F(d(1-n/e)*u,0,l),r=M.create(n?s/n*a:u,n?o/n*a:u);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=i.retina.pixelRatio,a={x:(o.offsetLeft+.5*o.offsetWidth)*n,y:(o.offsetTop+.5*o.offsetHeight)*n},r=.5*o.offsetWidth*n,c=e.type===Le.circle?new es(a.x,a.y,r):new is(o.offsetLeft*n,o.offsetTop*n,o.offsetWidth*n,o.offsetHeight*n),h=kt(s.divs,o);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!==or)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,o=s.onHover,n=o.enable,a=o.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&n&&bt(or,a)?this._hoverRepulse():h&&bt(or,l)?this._clickRepulse():Et(or,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv,a=o.onHover,r=o.onClick,c=Mt(or,n);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return bt(or,h)||bt(or,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new sr);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class ar{constructor(){this.factor=3,this.radius=200}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class rr extends Ps{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&&bt("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new ar);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,o=e.retina.slowModeRadius,n=i.interactivity.modes.slow;if(!n||!o||o<0||!s)return;const a=Z(s,t.getPosition()),r=a/o,c=n.factor,{slow:h}=t;a>o||(h.inRange=!0,h.factor=r/c)}}const cr=0,hr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function lr(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,ft().error(`${f} loading image: ${t.source}`),e()})),i.src=t.source}))}async function dr(t){if("svg"!==t.type)return void await lr(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(ft().error(`${f} Image not found`),t.error=!0),t.loading=!1}function ur(t,e,i,s){const o=function(t,e,i){const{svgData:s}=t;if(!s)return"";const o=ce(e,i);if(s.includes("fill"))return s.replace(hr,(()=>o));const n=s.indexOf(">");return`${s.substring(cr,n)} fill="${o}"${s.substring(n)}`}(t,i,s.opacity?.value??1),n={color:i,gif:e.gif,data:{...t,svgData:o},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([o],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{n.loaded=!0,n.element=r,e(n),s.revokeObjectURL(a)}));r.addEventListener("error",(()=>{(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await lr(i),n.loaded=!0,n.element=i.element,e(n)})()})),r.src=a}))}const pr=[0,4,2,1],fr=[8,8,4,2];class gr{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 yr,vr;!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"}(yr||(yr={})),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"}(vr||(vr={}));const mr=0,wr=0,_r=0;function br(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 Sr(t,e,i,s,o,n){switch(t.nextByte()){case vr.EndOfFile:return!0;case vr.Image:await async function(t,e,i,s,o,n){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=br(t,l));const d=t=>{const{r:s,g:n,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return t!==o(null)?{r:s,g:n,b:r,a:255}:{r:s,g:n,b:r,a:i?~~((s+n+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(),f=t.readSubBlocksBin(),g=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(f[i]+(f[i+1]<<8)+(f[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,o=p+1,r=0,c=[[0]],h=0;h<4;h++){if(pr[h]<a.height){let t=0,e=0,s=!1;for(;!s;){const n=i;if(i=y(r,o),r+=o+1,i===g){o=p+1,c.length=g+2;for(let t=0;t<c.length;t++)c[t]=t<g?[t]:[]}else{i>=c.length?c.push(c[n].concat(c[n][0])):n!==g&&c.push(c[n].concat(c[i][0]));for(const s of c[i]){const{r:i,g:o,b:n,a:r}=d(s);u.data.set([i,o,n,r],pr[h]*a.width+fr[h]*e+t%(4*a.width)),t+=4}c.length===1<<o&&o<12&&o++}t===4*a.width*(e+1)&&(e++,pr[h]+fr[h]*e>=a.height&&(s=!0))}}n?.(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,o=p+1,r=0,c=-4,h=!1;const l=[[0]];for(;!h;){const t=i;if(i=y(r,o),r+=o,i===g){o=p+1,l.length=g+2;for(let t=0;t<l.length;t++)l[t]=t<g?[t]:[]}else{if(i===g+1){h=!0;break}i>=l.length?l.push(l[t].concat(l[t][0])):t!==g&&l.push(l[t].concat(l[i][0]));for(const t of l[i]){const{r:e,g:i,b:s,a:o}=d(t);u.data.set([e,i,s,o],c+=4)}l.length>=1<<o&&o<12&&o++}}a.image=u,a.bitmap=await createImageBitmap(u),n?.((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,o,n);break;case vr.Extension:!function(t,e,i,s){switch(t.nextByte()){case vr.GraphicsControlExtension:{const o=e.frames[i(!1)];t.pos++;const n=t.nextByte();o.GCreserved=(224&n)>>>5,o.disposalMethod=(28&n)>>>2,o.userInputDelayFlag=2==(2&n);const a=1==(1&n);o.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case vr.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case vr.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case vr.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,o);break;default:throw new EvalError("undefined block found")}return!1}async function xr(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 o=await s.arrayBuffer(),n={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 gr(new Uint8ClampedArray(o));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");n.width=a.nextTwoBytes(),n.height=a.nextTwoBytes();const r=a.nextByte(),c=128==(128&r);n.colorRes=(112&r)>>>4,n.sortFlag=8==(8&r);const h=1<<1+(7&r),l=a.nextByte();n.pixelAspectRatio=a.nextByte(),0!==n.pixelAspectRatio&&(n.pixelAspectRatio=(n.pixelAspectRatio+15)/64),c&&(n.globalColorTable=br(a,h));const d=(()=>{try{return new ImageData(n.width,n.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:f}=n.globalColorTable[l];d.data.set(c?[u,p,f,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);n.backgroundImage=d;let g=-1,y=!0,v=-1;const m=t=>(t&&(y=!0),g),w=t=>(null!=t&&(v=t),v);try{do{y&&(n.frames.push({left:0,top:0,width:0,height:0,disposalMethod:yr.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),g++,v=-1,y=!1)}while(!await Sr(a,n,i,m,w,e));n.frames.length--;for(const t of n.frames){if(t.userInputDelayFlag&&0===t.delayTime){n.totalTime=1/0;break}n.totalTime+=t.delayTime}return n}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${g} "${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)??_r,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await lr(t)}class Pr{constructor(t){this.validTypes=["image","images"],this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${f} 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:o}=t,n=s.image,a=n?.element;if(n){if(e.globalAlpha=o,n.gif&&n.gifData)!function(t){const{context:e,radius:i,particle:s,delta:o}=t,n=s.image;if(!n?.gifData||!n.gif)return;const a=new OffscreenCanvas(n.gifData.width,n.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(mr,wr,a.width,a.height),void 0===s.gifLoopCount&&(s.gifLoopCount=n.gifLoopCount??_r);let c=s.gifFrame??0;const h={x:.5*-n.gifData.width,y:.5*-n.gifData.height},l=n.gifData.frames[c];if(void 0===s.gifTime&&(s.gifTime=0),l.bitmap){switch(e.scale(i/n.gifData.width,i/n.gifData.height),l.disposalMethod){case yr.UndefinedA:case yr.UndefinedB:case yr.UndefinedC:case yr.UndefinedD:case yr.Replace:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(mr,wr,a.width,a.height);break;case yr.Combine:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y);break;case yr.RestoreBackground:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(mr,wr,a.width,a.height),n.gifData.globalColorTable.length?r.putImageData(n.gifData.backgroundImage,h.x,h.y):r.putImageData(n.gifData.frames[0].image,h.x+l.left,h.y+l.top);break;case yr.RestorePrevious:{const t=r.getImageData(mr,wr,a.width,a.height);r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(mr,wr,a.width,a.height),r.putImageData(t,mr,wr)}}if(s.gifTime+=o.value,s.gifTime>l.delayTime){if(s.gifTime-=l.delayTime,++c>=n.gifData.frames.length){if(--s.gifLoopCount<=_r)return;c=0,r.clearRect(mr,wr,a.width,a.height)}s.gifFrame=c}e.scale(n.gifData.width/i,n.gifData.height/i)}}(t);else if(a){const t=n.ratio,s={x:-i,y:-i},o=2*i;e.drawImage(a,s.x,s.y,o,o/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 o=e.getFillColor(),n=i.find((t=>t.name===s.name||t.source===s.src));if(!n)return;const a=s.replaceColor??n.replaceColor;n.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=n.svgData&&o?await ur(n,s,o,e):{color:o,data:n,element:n.element,gif:n.gif,gifData:n.gifData,gifLoopCount:n.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:n.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 Cr{constructor(){this.src="",this.gif=!1}load(t){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 Or{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 Cr;e.load(t),i.push(e)}}}needsPlugin(){return!0}}const Tr=3;async function Ar(t,e=!0){!function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${f} 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-Tr),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?xr:e.replaceColor?dr:lr,await s(i)}catch{throw new Error(`${f} ${e.name??e.src} not found`)}})}(t);const i=new Or(t);await t.addPlugin(i,e),await t.addShape(new Pr(t),e)}class Mr extends gi{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Er extends gi{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Vr{constructor(){this.count=0,this.delay=new Mr,this.duration=new Er}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class kr{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?$(i.delay.value)*(i.delay.sync?1:L())/e.retina.reduceFactor*v:0,delayTime:0,duration:e.retina.reduceFactor?$(i.duration.value)*(i.duration.sync?1:L())/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 Vr);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 o=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;o=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(t.spawning)return;if(o?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 n=Q(0,i.width),a=Q(0,i.width);t.position.x=N(n),t.position.y=N(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=$(r.delay.value)*v,s.duration=$(r.duration.value)*v)}(t,e,this.container.canvas.size)}}class zr{constructor(){this.validTypes=["line"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=o?.cap??"butt"}(t)}getSidesCount(){return 1}}class Gr{init(){}isEnabled(t){return!yt()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if(yt()||!i.enable)return;const s=i.force,o=e.interactivity.mouse.position;if(!o)return;const n=e.canvas.size,a=.5*n.width,r=.5*n.height,c=i.smooth,h=t.getRadius()/s,l=(o.x-a)*h,d=(o.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class Rr extends Cs{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=$(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),o=e.particles.quadTree.queryCircle(s,i);for(const e of o){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:o,dy:n}=W(s,i),a=t.options.move.attract.rotate,r=o/(1e3*a.x),c=n/(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 Ir=.5,Lr=10,Dr=0;function Hr(t,e,i,s,o,n){const a=F(t.options.collisions.absorb.speed*o.factor/Lr,Dr,s);t.size.value+=a*Ir,i.size.value-=a,s<=n&&(i.size.value=0,i.destroy())}const Br=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=$(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Fr(t,e){Gt(zt(t),zt(e)),Br(t),Br(e)}function Ur(t,e,i,s){switch(t.options.collisions.mode){case ti.absorb:!function(t,e,i,s){const o=t.getRadius(),n=e.getRadius();void 0===o&&void 0!==n?t.destroy():void 0!==o&&void 0===n?e.destroy():void 0!==o&&void 0!==n&&(o>=n?Hr(t,0,e,n,i,s):Hr(e,0,t,o,i,s))}(t,e,i,s);break;case ti.bounce:Fr(t,e);break;case ti.destroy:!function(t,e){t.unbreakable||e.unbreakable||Fr(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 Nr extends Cs{constructor(t){super(t)}clear(){}init(){}interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),o=t.getRadius(),n=i.particles.quadTree.queryCircle(s,2*o);for(const a of n){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const n=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(n.z))>o+r)continue;Z(s,n)>o+r||Ur(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class $r extends es{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:o}=t;return super.contains(t)||super.contains({x:s-e,y:o})||super.contains({x:s-e,y:o-i})||super.contains({x:s,y:o-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 es(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new is(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class qr{constructor(){this.blur=5,this.color=new De,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=De.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class jr{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=De.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 Qr{constructor(){this.blink=!1,this.color=new De,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new qr,this.triangles=new jr,this.width=1,this.warp=!1}load(t){t&&(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=De.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 Wr=0,Zr=0;function Xr(t,e,i,s,o){const{dx:n,dy:a,distance:r}=W(t,e);if(!o||r<=i)return r;const c={x:Math.abs(n),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 Yr extends Cs{constructor(t){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;s=de(i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this.linkContainer=t}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<Wr||e.y<Zr||e.x>s.width||e.y>s.height)return;const o=t.options.links,n=o.opacity,a=t.retina.linksDistance??0,r=o.warp;let c;c=r?new $r(e.x,e.y,a,s):new es(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||o.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<Wr||h.y<Zr||h.x>s.width||h.y>s.height)continue;const l=Xr(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*n;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 Qr);for(const i of e)t.links.load(i?.links)}reset(){}}function Jr(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let o=e.get(i);return void 0===o&&(o=L(),e.set(i,o)),o}class Kr{constructor(t){this.container=t,this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this.container,o=s.actualOptions,n=e.destination,a=t.getPosition(),r=n.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=Yt(l.color);L()<t&&e&&(h=e,c=$(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=le(t,n,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=o;!function(t){let e=!1;const{begin:i,end:s,maxDistance:o,context:n,canvasSize:a,width:r,backgroundMask:c,colorLine:h,opacity:l,links:d}=t;if(Z(i,s)<=o)we(n,i,s),e=!0;else if(d.warp){let t,r;const c=W(i,{x:s.x-a.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},r={x:a.width,y:e}}else{const e=W(i,{x:s.x,y:s.y-a.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},r={x:s,y:a.height}}else{const e=W(i,{x:s.x-a.width,y:s.y-a.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},r={x:t.x+a.width,y:t.y+a.height}}}}t&&r&&(we(n,i,t),we(n,s,r),e=!0)}if(!e)return;n.lineWidth=r,c.enable&&(n.globalCompositeOperation=c.composite),n.strokeStyle=re(h,l);const{shadow:u}=d;if(u.enable){const t=Yt(u.color);t&&(n.shadowBlur=u.blur,n.shadowColor=re(t))}n.stroke()}({context:e,width:d,begin:a,end:r,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 o=s.triangles;if(!o.enable)return;const n=this.container,a=n.actualOptions,r=e.destination,c=i.destination,h=o.opacity??.5*(e.opacity+i.opacity);h<=0||n.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(Z(i,l)>u||Z(d,l)>u||Z(d,i)>u)return;let p=Yt(o.color);if(!p){const e=void 0!==s.id?n.particles.linksColors.get(s.id):n.particles.linksColor;p=le(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:o,backgroundMask:n,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,o),n.enable&&(e.globalCompositeOperation=n.composite),e.fillStyle=re(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 o=i.destination;if(!t.links?.triangles.enable||!o.options.links?.triangles.enable)return;const n=o.links?.filter((t=>{const e=this._getLinkFrequency(o,t.destination);return o.options.links&&e<=o.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(n?.length)for(const s of n){const n=s.destination;this._getTriangleFrequency(e,o,n)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>Jr([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>Jr([t,e,i],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length)return;const o=i.filter((t=>s.links&&(s.links.frequency>=1||this._getLinkFrequency(e,t.destination)<=s.links.frequency)));for(const t of o)this._drawTriangles(s,e,t,o),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:o}=t.options.links;i.linksDistance=s*e,i.linksWidth=o*e}particleDestroyed(t){t.links=[]}}class tc{constructor(){this.id="links"}getPlugin(t){return Promise.resolve(new Kr(t))}loadOptions(){}needsPlugin(){return!0}}async function ec(t,e=!0){await async function(t,e=!0){await t.addInteractor("particlesLinks",(async t=>Promise.resolve(new Yr(t))),e)}(t,e),await async function(t,e=!0){const i=new tc;await t.addPlugin(i,e)}(t,e)}const ic=0,sc=0;class oc{draw(t){const{particle:e,radius:i}=t;!function(t,e,i){const{context:s}=t,o=i.count.numerator*i.count.denominator,n=i.count.numerator/i.count.denominator,a=180*(n-2)/n,r=Math.PI-X(a);if(s){s.beginPath(),s.translate(e.x,e.y),s.moveTo(ic,sc);for(let t=0;t<o;t++)s.lineTo(i.length,sc),s.translate(i.length,sc),s.rotate(r)}}(t,this.getCenter(e,i),this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}}class nc extends oc{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 ac extends oc{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 rc(t,e=!0){await async function(t,e=!0){await t.addShape(new nc,e)}(t,e),await async function(t,e=!0){await t.addShape(new ac,e)}(t,e)}class cc{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class hc extends gi{constructor(){super(),this.animation=new cc,this.direction=ws.clockwise,this.path=!1,this.value=0}load(t){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 lc=2*Math.PI;class dc{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:X($(e.value)),min:0,max:lc},t.pathRotation=e.path;let i=e.direction;if(i===ws.random){i=Math.floor(2*L())>0?ws.counterClockwise:ws.clockwise}switch(i){case ws.counterClockwise:case"counterClockwise":t.rotate.status=rt.decreasing;break;case ws.clockwise:t.rotate.status=rt.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-$(s.decay),t.rotate.velocity=$(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=L())),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 hc);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Nt(t,t.rotate,!1,ct.none,e),t.rotation=t.rotate.value))}}const uc=Math.sqrt(2);class pc{constructor(){this.validTypes=["edge","square"]}draw(t){!function(t){const{context:e,radius:i}=t,s=i/uc,o=2*s;e.rect(-s,-s,o,o)}(t)}getSidesCount(){return 4}}const fc=0,gc=0;class yc{constructor(){this.validTypes=["star"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=i.sides,n=i.starInset??2;e.moveTo(fc,gc-s);for(let t=0;t<o;t++)e.rotate(Math.PI/o),e.lineTo(fc,gc-s*n),e.rotate(Math.PI/o),e.lineTo(fc,gc-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=$(i?.inset??2)}}class vc{constructor(t){this.container=t}init(t){const e=this.container,i=t.options,s=Lt(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=$(s.width)*e.retina.pixelRatio,t.strokeOpacity=$(s.opacity??1),t.strokeAnimation=s.color?.animation;const o=te(s.color)??t.getFillColor();o&&(t.strokeColor=pe(o,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)&&ye(t.strokeColor,e)}}async function mc(t,e=!0){await async function(t,e=!0){await t.addMover("parallax",(()=>Promise.resolve(new Gr)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalAttract",(e=>Promise.resolve(new ba(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBounce",(t=>Promise.resolve(new Va(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBubble",(t=>Promise.resolve(new Da(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalConnect",(t=>Promise.resolve(new qa(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalGrab",(t=>Promise.resolve(new Za(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPause",(t=>Promise.resolve(new Xa(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPush",(t=>Promise.resolve(new Ja(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRemove",(t=>Promise.resolve(new tr(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRepulse",(e=>Promise.resolve(new nr(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalSlow",(t=>Promise.resolve(new rr(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesAttract",(t=>Promise.resolve(new Rr(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesCollisions",(t=>Promise.resolve(new Nr(t))),e)}(t,!1),await ec(t,!1),await async function(){G(bs.easeInQuad,(t=>t**2)),G(bs.easeOutQuad,(t=>1-(1-t)**2)),G(bs.easeInOutQuad,(t=>t<.5?2*t**2:1-(-2*t+2)**2/2)),await Promise.resolve()}(),await async function(t,e=!0){await t.addShape(new ga,e)}(t,!1),await Ar(t,!1),await async function(t,e=!0){await t.addShape(new zr,e)}(t,!1),await rc(t,!1),await async function(t,e=!0){await t.addShape(new pc,e)}(t,!1),await async function(t,e=!0){await t.addShape(new yc,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("life",(async t=>Promise.resolve(new kr(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("rotate",(t=>Promise.resolve(new dc(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("strokeColor",(t=>Promise.resolve(new vc(t))),e)}(t,!1),await pa(t,e)}const wc=2,_c=.5;function bc(t,e,i,s,o,n){const a={x:-(e.length*i*_c),y:i*_c},r=i*wc;n?t.fillText(e,a.x,a.y+r*o):t.strokeText(e,a.x,a.y+r*o)}class Sc{constructor(){this.validTypes=["text","character","char","multiline-text"]}draw(t){!function(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.shapeData;if(!n)return;const a=n.value;if(void 0===a)return;void 0===i.text&&(i.text=Lt(a,i.randomIndexData));const r=i.text,c=n.style??"",h=n.weight??"400",l=Math.round(s)*wc,d=n.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=o;for(let t=0;t<p.length;t++)bc(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=>bt(t,e.particles.shape.type)))){const t=i.map((t=>e.particles.shape.options[t])).find((t=>!!t)),s=[];It(t,(t=>{s.push(St(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=Lt(s,e.randomIndexData))}}var xc;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(xc||(xc={}));class Pc{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Cc extends gi{constructor(){super(),this.animation=new Pc,this.direction=xc.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),t&&(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}const Oc=2*Math.PI;class Tc{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:X($(e.value)),sinDirection:L()>=y?1:-1,cosDirection:L()>=y?1:-1,min:0,max:Oc};let i=e.direction;if(i===xc.random){i=Math.floor(2*L())>0?xc.counterClockwise:xc.clockwise}switch(i){case xc.counterClockwise:case"counterClockwise":t.tilt.status=rt.decreasing;break;case xc.clockwise:t.tilt.status=rt.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-$(s.decay),t.tilt.velocity=$(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=L()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new Cc);for(const i of e)t.tilt.load(i?.tilt)}async update(t,e){this.isEnabled(t)&&t.tilt&&(Nt(t,t.tilt,!1,ct.none,e),await Promise.resolve())}}class Ac{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.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=Q(t.opacity)))}}class Mc{constructor(){this.lines=new Ac,this.particles=new Ac}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class Ec{getColorStyles(t,e,i,s){const o=t.options.twinkle;if(!o)return{};const n=o.particles,a=n.enable&&L()<n.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?$(n.opacity)*c:s,l=te(n.color),d=l?ce(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 Mc);for(const i of e)t.twinkle.load(i?.twinkle)}async update(){await Promise.resolve()}}class Vc{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=Q(t.angle)),void 0!==t.move&&(this.move=Q(t.move)))}}class kc{constructor(){this.distance=5,this.enable=!1,this.speed=new Vc}load(t){if(t&&(void 0!==t.distance&&(this.distance=Q(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(b(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 zc=2*Math.PI;const Gc=2*Math.PI;class Rc{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:L()*Gc,angleSpeed:$(e.speed.angle)/360,moveSpeed:$(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=$(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 kc);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 o=s.angleSpeed*e.factor,n=s.moveSpeed*e.factor*((t.retina.wobbleDistance??0)*e.factor)/(v/60),a=zc,{position:r}=t;s.angle+=o,s.angle>a&&(s.angle-=a),r.x+=n*Math.cos(s.angle),r.y+=n*Math.abs(Math.sin(s.angle))}(t,e)}}async function Ic(t,e=!0){await async function(t,e=!0){await t.addParticleUpdater("destroy",(e=>Promise.resolve(new Gn(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("roll",(()=>Promise.resolve(new Xn)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("tilt",(t=>Promise.resolve(new Tc(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("twinkle",(()=>Promise.resolve(new Ec)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("wobble",(t=>Promise.resolve(new Rc(t))),e)}(t,!1),await async function(t,e=!0){await t.addShape(new Sc,e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalTrail",(t=>Promise.resolve(new qn(t))),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new bn,e)}(t,!1),await async function(t,e=!0){t.emitterShapeManager||(t.emitterShapeManager=new Mo(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new To(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("circle",new Dn),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("square",new Un),await i.refresh(e)}(t,!1),await mc(t,e)}class Lc{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue=dt.random}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)))}}class Dc{constructor(){this.value=0,this.animation=new Lc}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=Q(t.value)))}}class Hc{constructor(){this.stop=0,this.value=new ui}load(t){t&&(void 0!==t.stop&&(this.stop=t.stop),this.value=ui.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Dc,b(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Bc{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Fc{constructor(){this.value=0,this.animation=new Bc,this.direction=ws.clockwise}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=Q(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Uc{constructor(){this.angle=new Fc,this.colors=[],this.type=_s.random}load(t){t&&(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new Hc;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}const Nc=2*Math.PI;class $c{getColorStyles(t,e,i,s){const o=t.gradient;if(!o)return{};const n=o.angle.value,a=0,r=0,c=o.type===_s.radial?e.createRadialGradient(a,r,0,a,r,i):e.createLinearGradient(Math.cos(n)*-i,Math.sin(n)*-i,Math.cos(n)*i,Math.sin(n)*i);for(const{stop:t,value:e,opacity:i}of o.colors)c.addColorStop(t,ce({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:c}}init(t){const e=Lt(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:$(i.value),enable:i.animation.enable,velocity:$(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-$(i.animation.decay),delayTime:$(i.animation.delay)*v,max:Nc,min:0,time:0},type:e.type,colors:[]};let s=e.angle.direction;switch(s===ws.random&&(s=L()>y?ws.counterClockwise:ws.clockwise),s){case ws.counterClockwise:case"counterClockwise":t.gradient.angle.status=rt.decreasing;break;case ws.clockwise:t.gradient.angle.status=rt.increasing}const o=t.options.reduceDuplicates;for(const i of e.colors){const e=te(i.value,t.id,o);if(!e)continue;const s=pe(e,i.value.animation,t.container.retina.reduceFactor),n={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:j(i.opacity.value),min:q(i.opacity.value),status:rt.increasing,value:$(i.opacity.value),velocity:$(i.opacity.animation.speed)/g*t.container.retina.reduceFactor,decay:1-$(i.opacity.animation.decay),delayTime:$(i.opacity.animation.delay)*v,time:0}:void 0},{opacity:a}=n;if(i.opacity&&a){const t=i.opacity.value;a.min=q(t),a.max=j(t);switch(i.opacity.animation.startValue){case dt.min:a.value=a.min,a.status=rt.increasing;break;case dt.max:a.value=a.max,a.status=rt.decreasing;break;case dt.random:default:a.value=N(a),a.status=L()>=y?rt.increasing:rt.decreasing}}t.gradient.colors.push(n)}}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=It(e,(t=>{const e=new Uc;return e.load(t),e})))}}update(t,e){!function(t,e){const{gradient:i}=t;if(i){Nt(t,i.angle,!1,ct.none,e);for(const s of i.colors)ye(s.value,e),s.opacity&&Nt(t,s.opacity,!0,ct.none,e)}}(t,e)}}class qc{constructor(){this.validTypes=["heart"]}draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,o=.5*i,n=i+o,a=-i,r=-i;e.moveTo(a,r+o),e.quadraticCurveTo(a,r,a+o,r),e.quadraticCurveTo(a+i,r,a+i,r+o),e.quadraticCurveTo(a+i,r,a+n,r),e.quadraticCurveTo(a+s,r,a+s,r+o),e.quadraticCurveTo(a+s,r+i,a+n,r+n),e.lineTo(a+i,r+s),e.lineTo(a+o,r+n),e.quadraticCurveTo(a,r+i,a,r+o)}(t)}}const jc=255;function Qc(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/g,o=t.v/g,n=o*s,a=n*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:n,g:a,b:0}:i>1&&i<=2?r={r:a,g:n,b:0}:i>2&&i<=3?r={r:0,g:n,b:a}:i>3&&i<=4?r={r:0,g:a,b:n}:i>4&&i<=5?r={r:a,g:0,b:n}:i>5&&i<=6&&(r={r:n,g:0,b:a}),r){const t=o-n;e.r=Math.floor((r.r+t)*jc),e.g=Math.floor((r.g+t)*jc),e.b=Math.floor((r.b+t)*jc)}return e}class Wc{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 Qc(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return Qc({h:$(e.h),s:$(e.s),v:$(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t),i=1,s=2,o=3,n=5;return e?{a:(a={a:e.length>4?nt(e[n]):1,h:parseInt(e[i],10),s:parseInt(e[s],10),v:parseInt(e[o],10)}).a,...Qc(a)}:void 0;var a}}function Zc(){return Zt(new Wc),Promise.resolve()}class Xc{constructor(){this.color=new De,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=De.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 Yc{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){void 0!==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 Xc;return e.load(t),e}))))}}class Jc{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 o=i.stages,n=o.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>n||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=o[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 Kc{constructor(t){this._container=t,this._container.infecter=new Jc(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=Pt(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 th{constructor(){this.id="infection"}getPlugin(t){return Promise.resolve(new Kc(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new Yc),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}class eh extends Cs{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,o=s.actualOptions.infection;if(!o?.enable||o.stages.length<1)return;const n=o.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+n.radius*a,c=t.getPosition(),h=n.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=n.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||L()>=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=o.stages[s.infection.stage],n=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,n)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}const ih=0,sh=0;class oh{constructor(){this.validTypes=["infinity"]}draw(t){!function(t){const{context:e,radius:i}=t,s=.55*i;e.moveTo(ih,sh),e.bezierCurveTo(s,-i,s,i,ih,sh),e.moveTo(ih,sh),e.bezierCurveTo(-s,-i,ih-s,i,ih,sh)}(t)}}const nh=1,ah=0,rh=.5*Math.PI,ch=2*Math.PI,hh=.25*Math.PI,lh="light";class dh{constructor(){this.start=new De,this.stop=new De,this.start.value="#ffffff",this.stop.value="#000000"}load(t){t&&(this.start=De.create(this.start,t.start),this.stop=De.create(this.stop,t.stop))}}class uh{constructor(){this.gradient=new dh,this.radius=1e3}load(t){t&&(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class ph{constructor(){this.color=new De,this.color.value="#000000",this.length=2e3}load(t){t&&(this.color=De.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class fh{constructor(){this.area=new uh,this.shadow=new ph}load(t){t&&(this.area.load(t.area),this.shadow.load(t.shadow))}}class gh extends Ps{constructor(t){super(t)}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,ch);const o=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),n=t.canvas.mouseLight;n?.start&&n.stop&&(o.addColorStop(ah,re(n.start)),o.addColorStop(nh,re(n.stop)),e.fillStyle=o,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,o=s.events;if(!o.onHover.enable||!i.position)return!1;const n=bt(lh,o.onHover.mode);if(n&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Yt(t.start),stop:Yt(t.stop)}}return n}loadModeOptions(t,...e){t.light||(t.light=new fh);for(const i of e)t.light.load(i?.light)}reset(){}}class yh extends Cs{constructor(t){super(t)}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 o=s.mouse.position;o&&e.canvas.draw((i=>{!function(t,e,i,s){const o=i.getPosition(),n=t.actualOptions.interactivity.modes.light?.shadow;if(!n)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=ch/c,l=-i.rotation+hh,d=[];for(let t=0;t<c;t++)d.push({x:o.x+r*Math.sin(l+h*t)*1,y:o.y+r*Math.cos(l+h*t)*1});const u=[],p=n.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-rh),y:t.y+p*Math.cos(-e-rh)};u.push({end:i,start:t})}const f=re(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=f,e.fill()}(e,i,t,o)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,o=i.events;if(!o.onHover.enable||!s.position)return!1;const n=bt(lh,o.onHover.mode);if(n&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Yt(e.color)}return n}reset(){}}class vh{constructor(){this.factor=4,this.value=!0}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class mh{constructor(){this.disable=!1,this.reduce=new vh}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class wh{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=mt("(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 _h{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return Promise.resolve(new wh(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new mh),i.load(e?.motion)}needsPlugin(){return!0}}class bh extends gi{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class Sh{constructor(){this.animation=new ci,this.enable=!1,this.opacity=1,this.rotation=new bh,this.width=1}load(t){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=Q(t.opacity)),void 0!==t.width&&(this.width=Q(t.width)),void 0!==t.radius&&(this.radius=Q(t.radius)),void 0!==t.color&&(this.color=De.create(this.color,t.color)))}}var xh;!function(t){t.front="front",t.back="back"}(xh||(xh={}));const Ph=2*Math.PI,Ch=.5*Math.PI,Oh=Math.PI+Ch;class Th{constructor(t){this.container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,xh.front)}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,xh.back)}drawOrbit(t,e){const i=this.container;let s,o;switch(e){case xh.back:s=Ch,o=Oh;break;case xh.front:s=Oh,o=Ch;break;default:s=0,o=Ph}i.canvas.draw((e=>{!function(t,e,i,s,o,n,a,r,c){if(n<=0)return;const h=e.getPosition();i&&(t.strokeStyle=ce(i,o)),t.lineWidth=n;const l=X(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,o)}))}init(t){const e=this.container,i=t.options.orbit;i?.enable&&(t.orbitRotation=$(i.rotation.value),t.orbitColor=te(i.color),t.retina.orbitRadius=void 0!==i.radius?$(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?$(i.animation.speed):0,t.orbitWidth=$(i.width),t.orbitOpacity=$(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 Sh);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/Ph)*e.factor)}}class Ah extends gi{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),t&&(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=Q(t.distance)),void 0!==t.duration&&(this.duration=Q(t.duration)),void 0!==t.factor&&(this.factor=Q(t.factor)),void 0!==t.speed&&(this.speed=Q(t.speed)))}}class Mh extends Cs{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:$(i.distance)*e.retina.pixelRatio,speed:$(i.speed),factor:$(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:o,dy:n,distance:a}=W(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=F((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=M.create(o/a*i,n/a*i);e.position.addTo(s)}else{const t=M.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new Ah);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}var Eh;!function(t){t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Eh||(Eh={}));class Vh{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],o=1,n=2,a=3;switch(s.type){case Eh.line:t.lineTo(i.x*e,i.y*e);break;case Eh.bezier:t.bezierCurveTo(s.values[o].x*e,s.values[o].y*e,s.values[n].x*e,s.values[n].y*e,s.values[a].x*e,s.values[a].y*e);break;case Eh.quadratic:t.quadraticCurveTo(s.values[o].x*e,s.values[o].y*e,s.values[n].x*e,s.values[n].y*e);break;case Eh.arc:t.arc(i.x*e,i.y*e,s.values[o].x*e,s.values[n].x,s.values[n].y);break;case Eh.ellipse:t.ellipse(i.x*e,i.y*e,s.values[o].x*e,s.values[o].y*e,s.values[n].x,s.values[a].x,s.values[a].y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const o=i.segments[s],n=o.values[0],a=1,r=2;switch(o.type){case Eh.line:t.lineTo(n.x*-e,n.y*e);break;case Eh.bezier:t.bezierCurveTo(-o.values[r].x*e,o.values[r].y*e,-o.values[a].x*e,o.values[a].y*e,n.x*e,n.y*e);break;case Eh.quadratic:t.quadraticCurveTo(-o.values[a].x*e,o.values[a].y*e,-o.values[r].x*e,o.values[r].y*e);case Eh.arc:case Eh.ellipse:}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=At({},i))}}class kh{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 zh{constructor(){this._grad3=[new kh(1,1,0),new kh(-1,1,0),new kh(1,-1,0),new kh(-1,-1,0),new kh(1,0,1),new kh(-1,0,1),new kh(1,0,-1),new kh(-1,0,-1),new kh(0,1,1),new kh(0,-1,1),new kh(0,1,-1),new kh(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 o=Math.floor(t),n=Math.floor(e);t-=o,e-=n,o&=255,n&=255;const a=i[o+s[n]].dot2(t,e),r=i[o+s[n+1]].dot2(t,e-1),c=i[o+1+s[n]].dot2(t-1,e),h=i[o+1+s[n+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:o}=this;let n=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=n,e-=a,i-=r,n&=255,a&=255,r&=255;const c=s[n+o[a+o[r]]].dot3(t,e,i),h=s[n+o[a+o[r+1]]].dot3(t,e,i-1),l=s[n+o[a+1+o[r]]].dot3(t,e-1,i),d=s[n+o[a+1+o[r+1]]].dot3(t,e-1,i-1),u=s[n+1+o[a+o[r]]].dot3(t-1,e,i),p=s[n+1+o[a+o[r+1]]].dot3(t-1,e,i-1),f=s[n+1+o[a+1+o[r]]].dot3(t-1,e-1,i),g=s[n+1+o[a+1+o[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),v=this._fade(e),m=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),m),this._lerp(this._lerp(l,f,y),this._lerp(d,g,y),m),v)}seed(t){const{_grad3:e,_gradP:i,_perm:s,_p:o}=this;let n=t;n>0&&n<1&&(n*=65536),n=Math.floor(n),n<256&&(n|=n<<8);for(let t=0;t<256;t++){const a=1&t?o[t]^255&n:o[t]^n>>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 Gh=2*Math.PI,Rh={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 Ih{constructor(){this._calculateField=()=>{const{field:t,noiseGen:e,options:i}=this,s=i.factor.length,o=i.factor.angle;for(let n=0;n<i.columns;n++){const a=t[n];for(let t=0;t<i.rows;t++){const r=a[t];r.length=e.noise3d(n*s+i.offset.x,t*s+i.offset.y,this.noiseZ),r.angle=e.noise3d(n*o,t*o,this.noiseZ)*Gh}}},this._drawField=t=>{const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const o=e[s];for(let e=0;e<i.rows;e++){const i=o[e],{angle:n,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(n),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]=M.origin}},this.noiseGen=new zh,this.field=[],this.noiseZ=0,this.options=At({},Rh)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),o=Math.max(Math.floor(e.y/i),0),{field:n}=this;return n?.[s]?.[o]?n[s][o].copy():M.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:Rh.size,i.increment=e.increment>0?e.increment:Rh.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??Rh.offset.x,i.offset.y=s?.y??Rh.offset.y;const o=e.factor;i.factor.angle=o?.angle??Rh.factor.angle,i.factor.length=o?.length??Rh.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??L()),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 Lh="perlinNoise";class Dh{constructor(){this.enable=!1,this.dimensions=2,this.radius=0,this.retries=30,this.steps=0}load(t){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 Hh=2*Math.PI;class Bh{constructor(t,e,i,s,o){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=o?{...o}: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(L()*(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*(Hh/this.retries),s=this.getRandom(this.radius,2*this.radius),o=Math.cos(i)*s,n=Math.sin(i)*s,a={x:Math.floor(t.position.x+o),y:Math.floor(t.position.y+n)},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(Z(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 Fh{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,o=t.retina.pixelRatio;if(!e?.enable)return;this._currentIndex=0,this.poissonDisc=new Bh(s,e.radius?e.radius*o:Math.max(j(i.size.value)*o,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 Uh{constructor(t){this.id="poisson",this._engine=t}getPlugin(t){return Promise.resolve(new Fh(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 Dh),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,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,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,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},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,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,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,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=o},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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=o},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,o,n){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,o,n)},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,o,n,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,o,n,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,o=1,n=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++,o=-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++,n=-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*=o,t&&(c*=Math.pow(10,n*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 o=new i,n=new s(t);if(!n.initialCommandIsMoveTo())return[];for(;n.hasMoreData();){const t=n.parseSegment();if(!t)return[];o.appendSegment(t)}return o.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 Nh{constructor(){this.color=new De,this.width=.5,this.opacity=1}load(t){t&&(this.color=De.create(this.color,t.color),_(this.color.value)&&(this.opacity=ie(this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class $h{constructor(){this.enable=!1,this.stroke=new Nh}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}var qh,jh,Qh;!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}(qh||(qh={}));class Wh{constructor(){this.arrangement=qh.onePerPoint}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class Zh{constructor(){this.path=[],this.size={height:0,width:0}}load(t){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"}(jh||(jh={}));class Xh{constructor(){this.radius=10,this.type=jh.path}load(t){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"}(Qh||(Qh={}));class Yh{constructor(){this.draw=new $h,this.enable=!1,this.inline=new Wh,this.move=new Xh,this.scale=1,this.type=Qh.none}load(t){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!==Qh.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&(_(t.data)?this.data=t.data:(this.data=new Zh,this.data.load(t.data))),void 0!==t.position&&(this.position=At({},t.position)))}}const Jh=0,Kh=1;function tl(t,e,i){const s=Yt(i.color);if(!s)return;const o=e[0];t.beginPath(),t.moveTo(o.x,o.y);for(const i of e)t.lineTo(i.x,i.y);t.closePath(),t.strokeStyle=re(s),t.lineWidth=i.width,t.stroke()}function el(t,e,i,s){const o=1,n=0,a=0,r=1;t.setTransform(o,n,a,r,s.x,s.y);const c=Yt(i.color);c&&(t.strokeStyle=re(c,i.opacity),t.lineWidth=i.width,t.stroke(e),t.resetTransform())}function il(t,e,i){const{dx:s,dy:o}=W(i,t),{dx:n,dy:a}=W(e,t),r=(s*n+o*a)/(n**2+a**2),c={x:t.x+n*r,y:t.y+a*r,isOnSegment:r>=Jh&&r<=Kh};return r<Jh?(c.x=t.x,c.y=t.y):r>Kh&&(c.x=e.x,c.y=e.y),c}function sl(t,e,i){const{dx:s,dy:o}=W(t,e),n=Math.atan2(o,s),a=M.create(Math.sin(n),-Math.cos(n)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const ol=`${f} No polygon data loaded.`,nl=`${f} No polygon found, you need to specify SVG url in config.`,al=0,rl=0,cl=.5;class hl{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||i.type===Qh.none||i.type===Qh.inline)return!0;if(!this.raw)throw new Error(nl);const s=e.canvas.size,o=t?.x??L()*s.width,n=t?.y??L()*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>n!=s.y>n&&o<(s.x-i.x)*(n-i.y)/(s.y-i.y)+i.x&&(a=!a)}return i.type===Qh.inside?a:i.type===Qh.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(),o=new Path2D,n=s.scale(this._scale);o.addPath?(o.addPath(i,n),t.path2d=o):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,o=e??!1;if(!s||void 0!==this.paths&&!o)return this.raw;const n=await fetch(s);if(!n.ok)throw new Error(`${f} occurred during polygon mask download`);return this._parseSvgPath(await n.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(ol);let i,s=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const n=o*t-s;if(n<=e.length){i=e.element.getPointAtLength(n);break}s+=e.length}const n=this._scale;return{x:(i?.x??al)*n+(this.offset?.x??al),y:(i?.y??rl)*n+(this.offset?.y??rl)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(ol);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(ol);const t=Pt(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(ol);const t=Pt(this.paths),e=Math.floor(L()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x??al),y:i.y*s+(this.offset?.y??rl)}},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(_(i))s=i;else{const t=t=>`<path d="${t}" />`,e=P(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,o=s.actualOptions.polygon;if(!o)return;const n=(new DOMParser).parseFromString(t,"image/svg+xml"),a=n.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=n.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=o.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/g-this.dimension.width*cl,y:l.height*h.y/g-this.dimension.height*cl},function(t,e,i){const s=[];for(const o of t){const t=o.element.pathSegList,n=t?.numberOfItems??0,a={x:0,y:0};for(let o=0;o<n;o++){const n=t?.getItem(o),r=window.SVGPathSeg;switch(n?.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=n;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=n.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=n.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=n;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=n.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=n.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!==ht.top)return!1;if(s.type===Qh.inside||s.type===Qh.outside){let e,i,s;const o=t.getPosition(),n=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=il(a,h,o);const l=W(o,e);if([i,s]=[l.dx,l.dy],l.distance<n)return sl(a,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(o)){const i={x:1,y:1},s=2*n,a=-1;return o.x>=e.x&&(i.x=-1),o.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===Qh.inline&&t.initialPosition){const e=Z(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y*cl-i.x,i.y=i.x*cl-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if(e.type===Qh.inline)switch(e.inline.arrangement){case qh.randomPoint:i=this._getRandomPoint();break;case qh.randomLength:i=this._getRandomPointByLength();break;case qh.equidistant:i=this._getEquidistantPointByIndex(t.particles.count);break;case qh.onePerPoint:case qh.perPoint:default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:L()*e.width,y:L()*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!==Qh.none&&e.type!==Qh.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 o=e.path2d;t&&(o&&this.offset?el(t,o,i.stroke,this.offset):s&&tl(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 At({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==Qh.inline||t.inline.arrangement!==qh.onePerPoint&&t.inline.arrangement!==qh.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===Qh.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 ll{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new hl(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 Yh),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==Qh.none)}}class dl{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(M.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*L()|0):L()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=L()>.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 M.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 ul="polygonPathGenerator";const pl=2*Math.PI,fl=.5;class gl{constructor(){this.validTypes=["rounded-polygon"]}draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],o=e[1];const n=e.length;t.moveTo((s.x+o.x)*fl,(s.y+o.y)*fl);for(let a=1;a<=n;a++)s=o,o=e[(a+1)%n],t.arcTo(s.x,s.y,(s.x+o.x)*fl,(s.y+o.y)*fl,i)}(e,function(t,e,i=0){const s=pl/t,o=[];for(let n=0;n<t;n++)o.push({x:Math.cos(n*s+i)*e,y:Math.sin(n*s+i)*e});return o}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round($(i?.radius??5))*t.retina.pixelRatio}}const yl=Math.sqrt(2);class vl{constructor(){this.validTypes=["rounded-rect"]}draw(t){const{context:e,particle:i,radius:s}=t,o=s/yl,n=2*o,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-o,-o,n,n,a):function(t,e,i,s){const o={x:-e,y:-e,height:i,width:i},n=s,a=s,r=s,c=s,{x:h,y:l,width:d,height:u}=o,p=h+d,f=l+u;t.moveTo(h+n,l),t.lineTo(p-a,l),t.quadraticCurveTo(p,l,p,l+a),t.lineTo(p,l+u-c),t.quadraticCurveTo(p,f,p-c,f),t.lineTo(h+r,f),t.quadraticCurveTo(h,f,h,f-r),t.lineTo(h,l+n),t.quadraticCurveTo(h,l,h+n,l)}(e,o,n,a)}particleInit(t,e){const i=e.shapeData;e.borderRadius=$(i?.radius??5)*t.retina.pixelRatio}}var ml;!function(t){t[t.normal=0]="normal",t[t.reverse=1]="reverse"}(ml||(ml={}));const wl=.5;class _l{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:lt.percent},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=L()>y?ml.normal:ml.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)*wl).length),void 0===t.svgStep&&(t.svgStep=N({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:N({min:-this._width*wl,max:this._width*wl})*i,height:N({min:-this._width*wl,max:this._width*wl})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,t.svgDirection===ml.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=ml.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=ml.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),o=t.container.canvas.size,n=Ft(this._offset,o),a=this._scale*i;t.position.x=(e.x-this._size.width*wl)*a+t.svgInitialPosition.x+n.x+t.svgOffset.width,t.position.y=(e.y-this._size.height*wl)*a+t.svgInitialPosition.y+n.y+t.svgOffset.height}return M.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"),o=s.getElementsByTagName("svg")[0];let n=o.getElementsByTagName("path");n.length||(n=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<n.length;t++){const e=n.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(o.getAttribute("height")??"0"),this._size.width=parseFloat(o.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 bl="svgPathGenerator";const Sl={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class xl{constructor(){const t=new ho;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=At({},Sl)}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),o=Math.max(Math.floor(e.z/this.options.size),0),n=M.origin;return this.field?.[i]?.[s]?.[o]?(n.setTo(this.field[i][s][o]),n):n}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]=M.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:Sl.size,this.options.increment=e.increment>0?e.increment:Sl.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??Sl.offset.x,this.options.offset.y=i?.y??Sl.offset.y,this.options.offset.z=i?.z??Sl.offset.z,this.options.seed=e.seed??Sl.seed,this._simplex.seed(this.options.seed??L()),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 Pl="simplexNoise";class Cl{constructor(){this.loop=!1,this.source=""}load(t){void 0!==t&&(x(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Ol{constructor(){this.duration=500,this.value=[]}load(t){t&&(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class Tl{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){void 0!==t&&(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Tl;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Ol;return e.load(t),e}))))}}class Al{constructor(){this.event=[],this.notes=[]}load(t){if(t&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(P(t.audio)?this.audio=t.audio.map((t=>{const e=new Cl;return e.load(t),e})):(this.audio=new Cl,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Ol;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Tl;return e.load(t),e}))),t.filter))if(_(t.filter)){const e=window[t.filter];S(e)&&(this.filter=e)}else this.filter=t.filter}}class Ml{constructor(){this.width=24,this.height=24,this.style=""}load(t){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 El{constructor(){this.mute=new Ml,this.unmute=new Ml,this.volumeDown=new Ml,this.volumeUp=new Ml,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){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 Vl{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){void 0!==t&&(x(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 kl{constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new El,this.volume=new Vl}load(t){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 Al;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}var zl,Gl;!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(zl||(zl={})),function(t){t.Block="block",t.None="none"}(Gl||(Gl={}));const Rl=new Map;function Il(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]||e[0],s=Rl.get(i);return s?s[parseInt(e[3]||"0")]:void 0}Rl.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Rl.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Rl.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Rl.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Rl.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Rl.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Rl.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Rl.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Rl.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Rl.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Rl.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Rl.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Rl.set("pause",[0]);let Ll=!0;const Dl=()=>Ll,Hl=()=>{Ll=!1},Bl=1;function Fl(t){const e=document.createElement("img"),{clickCb:i,container:s,display:o,iconOptions:n,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,style:u,svg:p}=n;!function(t,e,i,s,o,n,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-n+"px",t.style.display=s,t.style.zIndex=`${o+Bl}`,t.style.cssText+=r}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),o,r.fullScreen.zIndex+Bl,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 Ul(t){t&&t.remove()}class Nl{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 It(t.event,(t=>{this._engine.removeEventListener(t,e)}));if(s)return;if(t.audio)this._playBuffer(Lt(t.audio));else if(t.melodies){const e=Pt(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=Pt(t.notes);await this._playNote([e],0,!1)}})()};It(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(zl.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 o=It(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(P(o)?Promise.allSettled(o):o);let n=e+1;i&&n>=t.length&&(n%=t.length),this._container.muted||await this._playNote(t,n,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const o=Lt(s.value,i,!0);try{const t=Il(o);if(!b(t))return;await this._playFrequency(t,s.duration)}catch(t){ft().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/g,this._gain=i,this._initEvents(),this._engine.dispatchEvent(zl.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;F(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/g)},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&&Dl()){const t=()=>{removeEventListener(s,t),removeEventListener(c,t),Hl(),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=It(t.audio,(async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),o=await s.decodeAudioData(i);this._audioMap.set(t.source,o)}));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,o={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:n,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=async()=>{await this.toggleMute()},l=i.icons.enable?Gl.Block:Gl.None;this._muteImg=Fl({container:t,options:e,pos:o,display:l,iconOptions:n,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=Fl({container:t,options:e,pos:o,display:Gl.None,iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=Fl({container:t,options:e,pos:o,display:l,iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=Fl({container:t,options:e,pos:o,display:l,iconOptions:c,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Dl()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),Ul(this._muteImg),Ul(this._unmuteImg),Ul(this._volumeDownImg),Ul(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 $l=()=>{removeEventListener(s,$l),removeEventListener(c,$l),Hl()};class ql{constructor(t){this.id="sounds",this._engine=t;const e={capture:!0,once:!0};addEventListener(s,$l,e),addEventListener(c,$l,e)}getPlugin(t){return Promise.resolve(new Nl(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 kl),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class jl{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 o=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*o;t++){const s=t/10,o=i.spiralInnerRadius+i.spiralLineSpacing*s,n={x:o*Math.cos(s),y:o*Math.sin(s)};e.lineTo(n.x,n.y)}}(t)}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=$(s?.innerRadius??1)*i,e.spiralLineSpacing=$(s?.lineSpacing??1)*i,e.spiralWidthFactor=$(s?.widthFactor??10)}}const Ql=.5,Wl=0,Zl=0,Xl={a:1,b:0,c:0,d:1};class Yl{draw(t){const{context:e,radius:i,particle:s,transformData:o}=t,n=2*i,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+n,u=s.container.canvas.size.height+n;let p=c[l-1].position;for(let t=l;t>0;t--){const i=c[t-1],o=i.position,r=s.trailTransform?i.transformData??Xl:Xl;e.setTransform(r.a,r.b,r.c,r.d,o.x,o.y),e.beginPath(),e.moveTo(p.x-o.x,p.y-o.y);const h={x:(p.x+d)%d,y:(p.y+u)%u};if(Math.abs(p.x-o.x)>d*Ql||Math.abs(p.y-o.y)>u*Ql){p=o;continue}e.lineTo(Math.abs(p.x-o.x)>d*Ql?h.x:Wl,Math.abs(p.y-o.y)>u*Ql?h.y:Zl);const f=Math.max(t/l*n,a,s.trailMinWidth??-1),g=e.globalAlpha;e.globalAlpha=s.trailFade?t/l:1,e.lineWidth=s.trailMaxWidth?Math.min(f,s.trailMaxWidth):f,e.strokeStyle=i.color,e.stroke(),e.globalAlpha=g,p=o}e.setTransform(o.a,o.b,o.c,o.d,r.x,r.y)}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=$(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?$(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?$(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}const Jl=.5*Math.PI;class Kl{constructor(){this.options={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}}}generate(t,e){void 0===t.zigzag&&(t.zigzag={counter:L(),waveHeight:$(this.options.waveHeight),waveLength:$(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+Jl),t.position.y+=s*Math.sin(t.velocity.angle+Jl),M.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 td="zigZagPathGenerator";async function ed(t,e=!0){Ms(t),await Ic(t,!1),await Zc(),await async function(){G(bs.easeInBack,(t=>2.70158*t**3-1.70158*t**2)),G(bs.easeOutBack,(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)})),G(bs.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})),await Promise.resolve()}(),await async function(){G(bs.easeInCirc,(t=>1-Math.sqrt(1-t**2))),G(bs.easeOutCirc,(t=>Math.sqrt(1-(t-1)**2))),G(bs.easeInOutCirc,(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2)),await Promise.resolve()}(),await async function(){G(bs.easeInCubic,(t=>t**3)),G(bs.easeOutCubic,(t=>1-(1-t)**3)),G(bs.easeInOutCubic,(t=>t<.5?4*t**3:1-(-2*t+2)**3/2)),await Promise.resolve()}(),await async function(){G(bs.easeInExpo,(t=>t?2**(10*t-10):0)),G(bs.easeOutExpo,(t=>1===t?1:1-Math.pow(2,-10*t))),G(bs.easeInOutExpo,(t=>1===t?t?1:0:t?t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0)),await Promise.resolve()}(),await async function(){G(bs.easeInLinear,(t=>t)),G(bs.easeOutLinear,(t=>t)),G(bs.easeInOutLinear,(t=>t)),await Promise.resolve()}(),await async function(){G(bs.easeInQuart,(t=>t**4)),G(bs.easeOutQuart,(t=>1-(1-t)**4)),G(bs.easeInOutQuart,(t=>t<.5?8*t**4:1-(-2*t+2)**4/2)),await Promise.resolve()}(),await async function(){G(bs.easeInQuint,(t=>t**5)),G(bs.easeOutQuint,(t=>1-(1-t)**5)),G(bs.easeInOutQuint,(t=>t<.5?16*t**5:1-(-2*t+2)**5/2)),await Promise.resolve()}(),await async function(){G(bs.easeInSine,(t=>1-Math.cos(t*Math.PI/2))),G(bs.easeOutSine,(t=>Math.sin(t*Math.PI/2))),G(bs.easeInOutSine,(t=>-(Math.cos(Math.PI*t)-1)/2)),await Promise.resolve()}(),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("canvas",new Ho),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("path",new jo),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("polygon",new Jo),await i.refresh(e)}(t,!1),await Zc(),await async function(t,e=!0){await t.addPlugin(new Qs,e)}(t,!1),await async function(t,e=!0){const i=new th;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>Promise.resolve(new eh(t))),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new _h(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new ll(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new ql(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new tn(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new sn(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new rn(t),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalParticle",(t=>Promise.resolve(new ln(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPop",(t=>Promise.resolve(new dn(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalLight",(t=>Promise.resolve(new gh(t))),e),await t.addInteractor("particlesLight",(t=>Promise.resolve(new yh(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesRepulse",(t=>Promise.resolve(new Mh(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("gradient",(()=>Promise.resolve(new $c)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("orbit",(t=>Promise.resolve(new Th(t))),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(yo,new go,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(po,new uo,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Lh,new Ih,e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Uh(t),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(ul,new dl,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(bl,new _l,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(td,new Kl,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Pl,new xl,e)}(t,!1),await async function(t,e=!0){await t.addEffect("bubble",new Gs,e)}(t,!1),await async function(t,e=!0){await t.addShape(new ks,e)}(t,!1),await async function(t,e=!0){await t.addShape(new to,e),await t.addShape(new Ks,e),await t.addShape(new Js,e),await t.addShape(new Ys,e)}(t,!1),await async function(t,e=!0){await t.addShape(new oo,e)}(t,!1),await async function(t,e=!0){await t.addShape(new qc,e)}(t,!1),await async function(t,e=!0){await t.addShape(new oh,e)}(t,!1),await async function(t,e=!0){await t.addShape(new Vh,e)}(t,!1),await async function(t,e=!0){await t.addShape(new gl,e)}(t,!1),await async function(t,e=!0){await t.addShape(new vl,e)}(t,!1),await async function(t,e=!0){await t.addShape(new jl,e)}(t,!1),await async function(t,e=!0){await t.addEffect("trail",new Yl,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:()=>$t,AnimatableColor:()=>ui,AnimationMode:()=>at,AnimationOptions:()=>ci,AnimationStatus:()=>rt,AnimationValueWithRandom:()=>yi,Background:()=>He,BackgroundMask:()=>Fe,BackgroundMaskCover:()=>Be,BaseRange:()=>ts,Circle:()=>es,ClickEvent:()=>Ne,CollisionMode:()=>ti,Collisions:()=>_i,CollisionsAbsorb:()=>pi,CollisionsOverlap:()=>fi,ColorAnimation:()=>li,DestroyType:()=>ct,DivEvent:()=>$e,DivType:()=>Le,EasingType:()=>bs,EventType:()=>Ie,Events:()=>We,ExternalInteractorBase:()=>Ps,FullScreen:()=>Ue,GradientType:()=>_s,HoverEvent:()=>je,HslAnimation:()=>di,HslColorManager:()=>Ss,Interactivity:()=>Xe,InteractivityDetect:()=>ze,InteractorType:()=>si,LimitMode:()=>ii,ManualParticle:()=>Ye,Modes:()=>Ze,Move:()=>Vi,MoveAngle:()=>Si,MoveAttract:()=>xi,MoveCenter:()=>Pi,MoveDirection:()=>m,MoveGravity:()=>Ci,MovePath:()=>Oi,MoveTrail:()=>Ai,Opacity:()=>zi,OpacityAnimation:()=>ki,Options:()=>ji,OptionsColor:()=>De,OutMode:()=>ei,OutModeDirection:()=>ht,OutModes:()=>Mi,Parallax:()=>qe,ParticleOutType:()=>oi,ParticlesBounce:()=>wi,ParticlesBounceFactor:()=>mi,ParticlesDensity:()=>Gi,ParticlesInteractorBase:()=>Cs,ParticlesNumber:()=>Ii,ParticlesNumberLimit:()=>Ri,ParticlesOptions:()=>Ni,PixelMode:()=>lt,Point:()=>Ki,RangedAnimationOptions:()=>hi,RangedAnimationValueWithRandom:()=>vi,Rectangle:()=>is,ResizeEvent:()=>Qe,Responsive:()=>ni,ResponsiveMode:()=>Ke,RgbColorManager:()=>xs,RotateDirection:()=>ws,Shadow:()=>Li,Shape:()=>Di,Size:()=>Bi,SizeAnimation:()=>Hi,Spin:()=>Ei,StartValueType:()=>dt,Stroke:()=>Fi,Theme:()=>ri,ThemeDefault:()=>ai,ThemeMode:()=>Je,ValueWithRandom:()=>gi,Vector:()=>M,Vector3d:()=>A,ZIndex:()=>Ui,addColorManager:()=>Zt,addEasing:()=>G,alterHsl:()=>Me,animate:()=>H,areBoundsInside:()=>Ot,arrayRandomIndex:()=>xt,calcExactPositionOrRandomFromSize:()=>st,calcExactPositionOrRandomFromSizeRanged:()=>ot,calcPositionFromSize:()=>tt,calcPositionOrRandomFromSize:()=>et,calcPositionOrRandomFromSizeRanged:()=>it,calculateBounds:()=>Tt,cancelAnimation:()=>B,circleBounce:()=>Gt,circleBounceDataFromParticle:()=>zt,clamp:()=>F,clear:()=>Se,collisionVelocity:()=>J,colorMix:()=>he,colorToHsl:()=>Jt,colorToRgb:()=>Kt,deepExtend:()=>At,degToRad:()=>X,divMode:()=>kt,divModeExecute:()=>Et,drawEffect:()=>Pe,drawLine:()=>we,drawParticle:()=>xe,drawParticlePlugin:()=>Ae,drawPlugin:()=>Te,drawShape:()=>Ce,drawShapeAfterDraw:()=>Oe,errorPrefix:()=>f,executeOnSingleOrMultiple:()=>It,findItemFromSingleOrMultiple:()=>Dt,generatedAttribute:()=>i,getDistance:()=>Z,getDistances:()=>W,getEasing:()=>R,getHslAnimationFromHsl:()=>pe,getHslFromAnimation:()=>ue,getLinkColor:()=>le,getLinkRandomColor:()=>de,getLogger:()=>ft,getParticleBaseVelocity:()=>K,getParticleDirectionAngle:()=>Y,getPosition:()=>Ft,getRandom:()=>L,getRandomRgbColor:()=>ae,getRangeMax:()=>j,getRangeMin:()=>q,getRangeValue:()=>$,getSize:()=>Ut,getStyleFromHsl:()=>ce,getStyleFromRgb:()=>re,halfRandom:()=>y,hasMatchMedia:()=>vt,hslToRgb:()=>oe,hslaToRgba:()=>ne,initParticleNumericAnimationValue:()=>Ht,isArray:()=>P,isBoolean:()=>w,isDivModeEnabled:()=>Mt,isFunction:()=>S,isInArray:()=>bt,isNumber:()=>b,isObject:()=>x,isPointInside:()=>Ct,isSsr:()=>yt,isString:()=>_,itemFromArray:()=>Pt,itemFromSingleOrMultiple:()=>Lt,loadAll:()=>td,loadFont:()=>St,loadOptions:()=>$i,loadParticlesOptions:()=>qi,millisecondsToSeconds:()=>v,mix:()=>U,mouseDownEvent:()=>s,mouseLeaveEvent:()=>n,mouseMoveEvent:()=>r,mouseOutEvent:()=>a,mouseUpEvent:()=>o,paintBase:()=>_e,paintImage:()=>be,parseAlpha:()=>nt,percentDenominator:()=>g,randomInRange:()=>N,rangeColorToHsl:()=>te,rangeColorToRgb:()=>Yt,rectBounce:()=>Rt,resizeEvent:()=>u,rgbToHsl:()=>ee,safeIntersectionObserver:()=>wt,safeMatchMedia:()=>mt,safeMutationObserver:()=>_t,setAnimationFunctions:()=>D,setLogger:()=>pt,setRandom:()=>I,setRangeValue:()=>Q,singleDivModeExecute:()=>Vt,stringToAlpha:()=>ie,stringToRgb:()=>se,touchCancelEvent:()=>d,touchEndEvent:()=>h,touchMoveEvent:()=>l,touchStartEvent:()=>c,tsParticles:()=>Os,updateAnimation:()=>Nt,updateColor:()=>ye,updateColorValue:()=>ge,visibilityChangeEvent:()=>p});const i="generated",s="pointerdown",o="pointerup",n="pointerleave",a="pointerout",r="pointermove",c="touchstart",h="touchend",l="touchmove",d="touchcancel",u="resize",p="visibilitychange",f="tsParticles - Error",g=100,y=.5,v=1e3;var m;function w(t){return"boolean"==typeof t}function _(t){return"string"==typeof t}function b(t){return"number"==typeof t}function S(t){return"function"==typeof t}function x(t){return"object"==typeof t&&null!==t}function P(t){return Array.isArray(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"}(m||(m={}));const C=0,O=0,T=0;class A{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!b(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:T}else{if(void 0===t||void 0===e)throw new Error(`${f} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??T}}static get origin(){return A.create(C,O,T)}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 A.create(t.x,t.y,t.z)}static create(t,e,i){return new A(t,e,i)}add(t){return A.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 A.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return A.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**2+this.y**2}mult(t){return A.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;0!=t&&this.multTo(1/t)}rotate(t){return A.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),T)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:T}sub(t){return A.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 M extends A{constructor(t,e){super(t,e,T)}static get origin(){return M.create(C,O)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return new M(t,e)}}let E=Math.random;const V={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)},k=new Map,z=2*Math.PI;function G(t,e){k.get(t)||k.set(t,e)}function R(t){return k.get(t)??(t=>t)}function I(t=Math.random){E=t}function L(){return F(E(),0,1-Number.EPSILON)}function D(t,e){V.nextFrame=e=>t(e),V.cancel=t=>e(t)}function H(t){return V.nextFrame(t)}function B(t){V.cancel(t)}function F(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function N(t){const e=j(t);let i=q(t);return e===i&&(i=0),L()*(e-i)+i}function $(t){return b(t)?t:N(t)}function q(t){return b(t)?t:t.min}function j(t){return b(t)?t:t.max}function Q(t,e){if(t===e||void 0===e&&b(t))return t;const i=q(t),s=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:Q(i,s)}function W(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 Z(t,e){return W(t,e).distance}function X(t){return t*Math.PI/180}function Y(t,e,i){if(b(t))return X(t);const s=.25;switch(t){case m.top:return.5*-Math.PI;case m.topRight:return-Math.PI*s;case m.right:return 0;case m.bottomRight:return Math.PI*s;case m.bottom:return.5*Math.PI;case m.bottomLeft:return.75*Math.PI;case m.left:return Math.PI;case m.topLeft:return.75*-Math.PI;case m.inside:return Math.atan2(i.y-e.y,i.x-e.x);case m.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return L()*z}}function K(t){const e=M.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return M.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/g,y:t.position.y*t.size.height/g}:void 0}function et(t){return{x:(t.position?.x??L()*g)*t.size.width/g,y:(t.position?.y??L()*g)*t.size.height/g}}function it(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){return{x:t.position?.x??L()*t.size.width,y:t.position?.y??L()*t.size.height}}function ot(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return st({size:t.size,position:e})}function nt(t){return t?t.endsWith("%")?parseFloat(t)/g:parseFloat(t):1}var at,rt,ct,ht,lt,dt;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(at||(at={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(rt||(rt={})),function(t){t.none="none",t.max="max",t.min="min"}(ct||(ct={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ht||(ht={})),function(t){t.precise="precise",t.percent="percent"}(lt||(lt={})),function(t){t.max="max",t.min="min",t.random="random"}(dt||(dt={}));const ut={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function pt(t){ut.debug=t.debug||ut.debug,ut.error=t.error||ut.error,ut.info=t.info||ut.info,ut.log=t.log||ut.log,ut.verbose=t.verbose||ut.verbose,ut.warning=t.warning||ut.warning}function ft(){return ut}function gt(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:o,rectOtherSide:n,velocity:a,factor:r}=t;return s.min<n.min||s.min>n.max||s.max<n.min||s.max>n.max||(i.max>=o.min&&i.max<=.5*(o.max+o.min)&&a>0||i.min<=o.max&&i.min>.5*(o.max+o.min)&&a<0)&&(e.velocity=a*-r,e.bounced=!0),e}function yt(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function vt(){return!yt()&&"undefined"!=typeof matchMedia}function mt(t){if(vt())return matchMedia(t)}function wt(t){if(!yt()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function _t(t){if(!yt()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}function bt(t,e){return t===e||P(e)&&e.indexOf(t)>-1}async function St(t,e){try{await document.fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}function xt(t){return Math.floor(L()*t.length)}function Pt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:xt(t)]}function Ct(t,e,i,s,o){return Ot(Tt(t,s??0),e,i,o)}function Ot(t,e,i,s){let o=!0;return s&&s!==ht.bottom||(o=t.top<e.height+i.x),!o||s&&s!==ht.left||(o=t.right>i.x),!o||s&&s!==ht.right||(o=t.left<e.width+i.y),!o||s&&s!==ht.top||(o=t.bottom>i.y),o}function Tt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function At(t,...e){for(const i of e){if(null==i)continue;if(!x(i)){t=i;continue}const e=Array.isArray(i);!e||!x(t)&&t&&Array.isArray(t)?e||!x(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],o=t;o[e]=x(s)&&Array.isArray(s)?s.map((t=>At(o[e],t))):At(o[e],s)}}return t}function Mt(t,e){return!!Dt(e,(e=>e.enable&&bt(t,e.mode)))}function Et(t,e,i){It(e,(e=>{const s=e.mode;e.enable&&bt(t,s)&&Vt(e,i)}))}function Vt(t,e){It(t.selectors,(i=>{e(i,t)}))}function kt(t,e){if(e&&t)return Dt(t,(t=>function(t,e){const i=It(e,(e=>t.matches(e)));return P(i)?i.some((t=>t)):i}(e,t.selectors)))}function zt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:M.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}}function Gt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[o,n]=[t.position,e.position],{dx:a,dy:r}=W(n,o);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=J(d,u,h,l),f=J(u,d,h,l),g=p.rotate(-c),y=f.rotate(-c);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function Rt(t,e){const i=Tt(t.getPosition(),t.getRadius()),s=t.options.bounce,o=gt({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:$(s.horizontal.value)});o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const n=gt({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:$(s.vertical.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function It(t,e){return P(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function Lt(t,e,i){return P(t)?Pt(t,e,i):t}function Dt(t,e){if(P(t))return t.find(((t,i)=>e(t,i)));return e(t,0)?t:void 0}function Ht(t,e){const i=t.value,s=t.animation,o={delayTime:$(s.delay)*v,enable:s.enable,value:$(t.value)*e,max:j(i)*e,min:q(i)*e,loops:0,maxLoops:$(s.count),time:0};if(s.enable){switch(o.decay=1-$(s.decay),s.mode){case at.increase:o.status=rt.increasing;break;case at.decrease:o.status=rt.decreasing;break;case at.random:o.status=L()>=y?rt.increasing:rt.decreasing}const t=s.mode===at.auto;switch(s.startValue){case dt.min:o.value=o.min,t&&(o.status=rt.increasing);break;case dt.max:o.value=o.max,t&&(o.status=rt.decreasing);break;case dt.random:default:o.value=N(o),t&&(o.status=L()>=y?rt.increasing:rt.decreasing)}}return o.initialValue=o.value,o}function Bt(t,e){if(!(t.mode===lt.percent)){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/g*e.width,y:t.y/g*e.height}:{width:t.width/g*e.width,height:t.height/g*e.height}}function Ft(t,e){return Bt(t,e)}function Ut(t,e){return Bt(t,e)}function Nt(t,e,i,s,o){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const n=(e.velocity??0)*o.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+=o.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case rt.increasing:e.value>=r?(i?e.status=rt.decreasing:e.value-=r,e.loops||(e.loops=0),e.loops++):e.value+=n;break;case rt.decreasing:e.value<=a?(i?e.status=rt.increasing:e.value+=r,e.loops||(e.loops=0),e.loops++):e.value-=n}e.velocity&&1!==c&&(e.velocity*=c),function(t,e,i,s,o){switch(e){case ct.max:i>=o&&t.destroy();break;case ct.min:i<=s&&t.destroy()}}(t,s,e.value,a,r),t.destroyed||(e.value=F(e.value,a,r))}}var $t,qt;!function(t){t.darken="darken",t.enlighten="enlighten"}($t||($t={})),function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(qt||(qt={}));const jt="random",Qt="mid",Wt=new Map;function Zt(t){Wt.set(t.key,t)}function Xt(t){for(const e of Wt.values())if(t.startsWith(e.stringPrefix))return e.parseString(t);const e=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,e,i,s,o)=>e+e+i+i+s+s+(void 0!==o?o+o:""))),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(e);return i?{a:void 0!==i[qt.a]?parseInt(i[qt.a],16)/255:1,b:parseInt(i[qt.b],16),g:parseInt(i[qt.g],16),r:parseInt(i[qt.r],16)}:void 0}function Yt(t,e,i=!0){if(!t)return;const s=_(t)?{value:t}:t;if(_(s.value))return Kt(s.value,e,i);if(P(s.value))return Yt({value:Pt(s.value,e,i)});for(const t of Wt.values()){const e=t.handleRangeColor(s);if(e)return e}}function Kt(t,e,i=!0){if(!t)return;const s=_(t)?{value:t}:t;if(_(s.value))return s.value===jt?ae():se(s.value);if(P(s.value))return Kt({value:Pt(s.value,e,i)});for(const t of Wt.values()){const e=t.handleColor(s);if(e)return e}}function Jt(t,e,i=!0){const s=Kt(t,e,i);return s?ee(s):void 0}function te(t,e,i=!0){const s=Yt(t,e,i);return s?ee(s):void 0}function ee(t){const e=t.r/255,i=t.g/255,s=t.b/255,o=Math.max(e,i,s),n=Math.min(e,i,s),a={h:0,l:.5*(o+n),s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=e===o?(i-s)/(o-n):a.h=i===o?2+(s-e)/(o-n):4+(e-i)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function ie(t){return Xt(t)?.a}function se(t){return Xt(t)}function oe(t){const e=360,i=(t.h%e+e)%e,s=Math.max(0,Math.min(100,t.s)),o=i/e,n=s/100,a=Math.max(0,Math.min(100,t.l))/100,r=255;if(0===s){const t=Math.round(a*r);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},h=a<.5?a*(1+n):a+n-a*n,l=2*a-h,d=1/3,u=Math.min(r,r*c(l,h,o+d)),p=Math.min(r,r*c(l,h,o)),f=Math.min(r,r*c(l,h,o-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ne(t){const e=oe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ae(t){const e=t??0;return{b:Math.floor(N(Q(e,256))),g:Math.floor(N(Q(e,256))),r:Math.floor(N(Q(e,256)))}}function re(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??1})`}function ce(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??1})`}function he(t,e,i,s){let o=t,n=e;return void 0===o.r&&(o=oe(t)),void 0===n.r&&(n=oe(e)),{b:U(o.b,n.b,i,s),g:U(o.g,n.g,i,s),r:U(o.r,n.r,i,s)}}function le(t,e,i){if(i===jt)return ae();if(i!==Qt)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return he(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return oe(t)}}}function de(t,e,i){const s=_(t)?t:t.value;return s===jt?i?Yt({value:s}):e?jt:Qt:s===Qt?Qt:Yt({value:s})}function ue(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function pe(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&&(fe(s.h,e.h,i),fe(s.s,e.s,i),fe(s.l,e.l,i)),s}function fe(t,e,i){t.enable=e.enable;t.enable?(t.velocity=$(e.speed)/g*i,t.decay=1-$(e.decay),t.status=rt.increasing,t.loops=0,t.maxLoops=$(e.count),t.time=0,t.delayTime=$(e.delay)*v,e.sync||(t.velocity*=L(),t.value*=L()),t.initialValue=t.value,t.offset=Q(e.offset)):t.velocity=0}function ge(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 o=t.offset?N(t.offset):0,n=(t.velocity??0)*s.factor+3.6*o,a=t.decay??1,r=j(e),c=q(e);if(i&&t.status!==rt.increasing){t.value-=n;const e=0;t.value<e&&(t.loops||(t.loops=0),t.loops++,t.status=rt.increasing)}else t.value+=n,t.value>r&&(t.loops||(t.loops=0),t.loops++,i?t.status=rt.decreasing:t.value-=r);t.velocity&&1!==a&&(t.velocity*=a),t.value=F(t.value,c,r)}function ye(t,e){if(!t)return;const{h:i,s,l:o}=t,n={min:0,max:100},a={min:0,max:100};i&&ge(i,{min:0,max:360},!1,e),s&&ge(s,n,!0,e),o&&ge(o,a,!0,e)}const ve={x:0,y:0},me={a:1,b:0,c:0,d:1};function we(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function _e(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(ve.x,ve.y,e.width,e.height)}function be(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,ve.x,ve.y,e.width,e.height),t.globalAlpha=1)}function Se(t,e){t.clearRect(ve.x,ve.y,e.width,e.height)}function xe(t){const{container:e,context:i,particle:s,delta:o,colorStyles:n,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),f=Math.sin(p),g=Math.cos(p),y=!!p,v={a:g*(d.a??me.a),b:y?f*(d.b??1):d.b??me.b,c:y?-f*(d.c??1):d.c??me.c,d:g*(d.d??me.d)};i.setTransform(v.a,v.b,v.c,v.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const m=s.shadowColor;l.enable&&m&&(i.shadowBlur=l.blur,i.shadowColor=re(m),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),n.fill&&(i.fillStyle=n.fill);const w=s.strokeWidth??0;i.lineWidth=w,n.stroke&&(i.strokeStyle=n.stroke);const _={container:e,context:i,particle:s,radius:c,opacity:h,delta:o,transformData:v,strokeWidth:w};Ce(_),Oe(_),Pe(_),i.globalCompositeOperation="source-over",i.resetTransform()}function Pe(t){const{container:e,context:i,particle:s,radius:o,opacity:n,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);c&&c.draw({context:i,particle:s,radius:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Ce(t){const{container:e,context:i,particle:s,radius:o,opacity:n,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:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),s.shapeClose&&i.closePath(),r>0&&i.stroke(),s.shapeFill&&i.fill())}function Oe(t){const{container:e,context:i,particle:s,radius:o,opacity:n,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:o,opacity:n,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}function Te(t,e,i){e.draw&&e.draw(t,i)}function Ae(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}function Me(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===$t.darken?-1:1)*i}}function Ee(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}function Ve(t,e,i=!1){if(!e)return;if(!t)return;const s=t.style;if(s)for(const t in e){const o=e[t];s.setProperty(t,o,i?"important":"")}}class ke{constructor(t){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,e,i,s,o,n)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:n,stroke:r}=a.getColorStyles(e,t,i,s);n&&(o.fill=n),r&&(o.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)Ee(n,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=te(s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=te(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=Yt(e);if(i){const e={...i,a:t.opacity};this._coverColorStyle=re(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._originalStyle=At({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style)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=1/t.length;if(e.color){const t=Yt(e.color);if(!t)return;this._trailFill={color:{...t},opacity:i}}else await new Promise(((t,s)=>{if(!e.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:i},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=e.image}))},this._paintBase=t=>{this.draw((e=>_e(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>be(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&&Ve(t,e)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;if(!t)return;const e=this.container.actualOptions.fullScreen.zIndex.toString(10);Ve(t,{position:"fixed","z-index":e,zIndex:e,top:"0",left:"0",width:"100%",height:"100%"},!0)},this.size={height:0,width:0},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>0&&i?i.color?this._paintBase(re(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Se(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove()}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<=0)return;const s=t.getFillColor(),o=t.getStrokeColor()??s;let[n,a]=this._getPluginParticleColors(t);n||(n=s),a||(a=o),(n||a)&&this.draw((s=>{const o=this.container,r=o.actualOptions,c=t.options.zIndex,h=1-t.zIndexFactor,l=h**c.opacityRate,d=t.bubble.opacity??t.opacity?.value??1,u=d*l,p=(t.strokeOpacity??d)*l,f={},g={fill:n?ce(n,u):void 0};g.stroke=a?ce(a,p):g.fill,this._applyPreDrawUpdaters(s,t,i,u,g,f),xe({container:o,context:s,particle:t,delta:e,colorStyles:g,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*h**c.sizeRate,opacity:u,shadow:t.options.shadow,transform:f}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>Ae(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>Te(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=_t((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){ft().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=Yt(t.color);i.backgroundColor=e?re(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=At({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Se(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.retina.pixelRatio,i=t.canvas.size,s=this.element.offsetWidth*e,o=this.element.offsetHeight*e;if(o===i.height&&s===i.width&&o===this.element.height&&s===this.element.width)return!1;const n={...i};return this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&t.particles.setResizeFactor({width:i.width/n.width,height:i.height/n.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Se(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()}}var ze;!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ze||(ze={}));function Ge(t,e,i,s,o){if(s){let s={passive:!0};w(o)?s.capture=o:void 0!==o&&(s=o),t.addEventListener(e,i,s)}else{const s=o;t.removeEventListener(e,i,s)}}class Re{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();It(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}if("touchend"===t.type){setTimeout((()=>this._mouseTouchFinish()),500)}},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,o=s.defaultThemes,n=e.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a?.default.auto&&i.loadTheme(n)},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,n=this.container,a=n.actualOptions,u=n.interactivity.element;if(!u)return;const p=u,f=n.canvas.element;f&&(f.style.pointerEvents=p===f?"initial":"none"),(a.interactivity.events.onHover.enable||a.interactivity.events.onClick.enable)&&(Ge(u,r,i.mouseMove,e),Ge(u,c,i.touchStart,e),Ge(u,l,i.touchMove,e),a.interactivity.events.onClick.enable?(Ge(u,h,i.touchEndClick,e),Ge(u,o,i.mouseUp,e),Ge(u,s,i.mouseDown,e)):Ge(u,h,i.touchEnd,e),Ge(u,t,i.mouseLeave,e),Ge(u,d,i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,o=i.canvas.element;let r=n;s===ze.window?(i.interactivity.element=window,r=a):s===ze.parent&&o?i.interactivity.element=o.parentElement??o.parentNode:i.interactivity.element=o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(r,t),document&&Ge(document,p,e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=mt("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):Ge(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 Ge(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 o=!1;const n=s.position;if(n&&i.interactivity.events.onClick.enable){for(const t of e.plugins.values())if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||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=n,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,o=e.canvas.element;if(!s?.element)return;let n;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(o){const t=o.getBoundingClientRect();n={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(i.interactivity.detectsOn===ze.parent){const t=e.target,i=e.currentTarget;if(t&&i&&o){const s=t.getBoundingClientRect(),a=i.getBoundingClientRect(),r=o.getBoundingClientRect();n={x:e.offsetX+2*s.left-(a.left+r.left),y:e.offsetY+2*s.top-(a.top+r.top)}}else n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===o&&(n={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,o){const e=t,i=1,s=e.touches[e.touches.length-i],a=o.getBoundingClientRect(),r=0;n={x:s.clientX-(a.left??r),y:s.clientY-(a.top??r)}}const a=e.retina.pixelRatio;n&&(n.x*=a,n.y*=a),s.mouse.position=n,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)}}var Ie,Le;!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"}(Ie||(Ie={}));class De{constructor(){this.value=""}static create(t,e){const i=new De;return i.load(t),void 0!==e&&(_(e)||P(e)?i.load({value:e}):i.load(e)),i}load(t){void 0!==t?.value&&(this.value=t.value)}}class He{constructor(){this.color=new De,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.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 Be{constructor(){this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Fe{constructor(){this.composite="destination-out",this.cover=new Be,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=_(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 Ue{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Ne{constructor(){this.enable=!1,this.mode=[]}load(t){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"}(Le||(Le={}));class $e{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=Le.circle}load(t){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 qe{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){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 je{constructor(){this.enable=!1,this.mode=[],this.parallax=new qe}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class Qe{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class We{constructor(){this.onClick=new Ne,this.onDiv=new $e,this.onHover=new je,this.resize=new Qe}load(t){if(!t)return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=It(e,(t=>{const e=new $e;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class Ze{constructor(t,e){this._engine=t,this._container=e}load(t){if(!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 Xe{constructor(t,e){this.detectsOn=ze.window,this.events=new We,this.modes=new Ze(t,e)}load(t){if(!t)return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Ye{load(t){t&&(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??lt.percent}),t.options&&(this.options=At({},t.options)))}}var Ke,Je,ti,ei,ii,si,oi;!function(t){t.screen="screen",t.canvas="canvas"}(Ke||(Ke={}));class ni{constructor(){this.maxWidth=1/0,this.options={},this.mode=Ke.canvas}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&(t.mode===Ke.screen?this.mode=Ke.screen:this.mode=Ke.canvas),void 0!==t.options&&(this.options=At({},t.options)))}}!function(t){t.any="any",t.dark="dark",t.light="light"}(Je||(Je={}));class ai{constructor(){this.auto=!1,this.mode=Je.any,this.value=!1}load(t){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 ri{constructor(){this.name="",this.default=new ai}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=At({},t.options)))}}class ci{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class hi extends ci{constructor(){super(),this.mode=at.auto,this.startValue=dt.random}load(t){super.load(t),t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class li extends ci{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),t&&void 0!==t.offset&&(this.offset=Q(t.offset))}}class di{constructor(){this.h=new li,this.s=new li,this.l=new li}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ui extends De{constructor(){super(),this.animation=new di}static create(t,e){const i=new ui;return i.load(t),void 0!==e&&(_(e)||P(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),!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"}(ti||(ti={}));class pi{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class fi{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class gi{constructor(){this.value=0}load(t){t&&void 0!==t.value&&(this.value=Q(t.value))}}class yi extends gi{constructor(){super(),this.animation=new ci}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class vi extends yi{constructor(){super(),this.animation=new hi}load(t){super.load(t)}}class mi extends gi{constructor(){super(),this.value=1}}class wi{constructor(){this.horizontal=new mi,this.vertical=new mi}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class _i{constructor(){this.absorb=new pi,this.bounce=new wi,this.enable=!1,this.maxSpeed=50,this.mode=ti.bounce,this.overlap=new fi}load(t){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=Q(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class bi{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=At(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 Si{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=Q(t.offset)),void 0!==t.value&&(this.value=Q(t.value)))}}class xi{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(t&&(void 0!==t.distance&&(this.distance=Q(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 Pi{constructor(){this.x=50,this.y=50,this.mode=lt.percent,this.radius=0}load(t){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 Ci{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=Q(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=Q(t.maxSpeed)))}}class Oi{constructor(){this.clamp=!0,this.delay=new gi,this.enable=!1,this.options={}}load(t){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=At(this.options,t.options)))}}class Ti{load(t){t&&(void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class Ai{constructor(){this.enable=!1,this.length=10,this.fill=new Ti}load(t){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"}(ei||(ei={}));class Mi{constructor(){this.default=ei.out}load(t){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 Ei{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=Q(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=At({},t.position)))}}class Vi{constructor(){this.angle=new Si,this.attract=new xi,this.center=new Pi,this.decay=0,this.distance={},this.direction=m.none,this.drift=0,this.enable=!1,this.gravity=new Ci,this.path=new Oi,this.outModes=new Mi,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ei,this.straight=!1,this.trail=new Ai,this.vibrate=!1,this.warp=!1}load(t){if(!t)return;this.angle.load(b(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=b(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=Q(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(x(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=Q(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 ki extends hi{constructor(){super(),this.destroy=ct.none,this.speed=2}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class zi extends vi{constructor(){super(),this.animation=new ki,this.value=1}load(t){if(!t)return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Gi{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(!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"}(ii||(ii={}));class Ri{constructor(){this.mode=ii.delete,this.value=0}load(t){t&&(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ii{constructor(){this.density=new Gi,this.limit=new Ri,this.value=0}load(t){t&&(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Li{constructor(){this.blur=0,this.color=new De,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=De.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 Di{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(!t)return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=At(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 Hi extends hi{constructor(){super(),this.destroy=ct.none,this.speed=5}load(t){super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Bi extends vi{constructor(){super(),this.animation=new Hi,this.value=3}load(t){if(super.load(t),!t)return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Fi{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=ui.create(this.color,t.color)),void 0!==t.width&&(this.width=Q(t.width)),void 0!==t.opacity&&(this.opacity=Q(t.opacity)))}}class Ui extends gi{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),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 Ni{constructor(t,e){this._engine=t,this._container=e,this.bounce=new wi,this.collisions=new _i,this.color=new ui,this.color.value="#fff",this.effect=new bi,this.groups={},this.move=new Vi,this.number=new Ii,this.opacity=new zi,this.reduceDuplicates=!1,this.shadow=new Li,this.shape=new Di,this.size=new Bi,this.stroke=new Fi,this.zIndex=new Ui}load(t){if(!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]=At(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(ui.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=At({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=It(e,(t=>{const e=new Fi;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 $i(t,...e){for(const i of e)t.load(i)}function qi(t,e,...i){const s=new Ni(t,e);return $i(s,...i),s}class ji{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===Je.any)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new He,this.backgroundMask=new Fe,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Ue,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new Xe(t,e),this.manualParticles=[],this.particles=qi(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(!t)return;void 0!==t.preset&&It(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=Q(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=Q(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;w(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 Ye;return e.load(t),e}))),this.particles.load(t.particles),this.style=At(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const o=this._engine.interactors.get(this._container);if(o)for(const e of o)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new ni;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 ri;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme(Je.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(Je.light)?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>i.mode===Ke.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=mt("(prefers-color-scheme: dark)"),e=t?.matches,i=this._findDefaultTheme(e?Je.dark:Je.light);i&&this.load(i.options)}}}!function(t){t.external="external",t.particles="particles"}(si||(si={}));class Qi{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 si.external:this._externalInteractors.push(t);break;case si.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(t){t.normal="normal",t.inside="inside",t.outside="outside"}(oi||(oi={}));const Wi=.5,Zi="random";function Xi(t){if(!bt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class Yi{constructor(t,e){this.container=e,this._calcPosition=(t,e,i,s=0)=>{for(const s of t.plugins.values()){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return A.create(t.x,t.y,i)}const o=st({size:t.canvas.size,position:e}),n=A.create(o.x,o.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{Xi({outMode:e,checkModes:[ei.bounce],coord:n.x,maxCoord:t.canvas.size.width,setCb:t=>n.x+=t,radius:a})},h=e=>{Xi({outMode:e,checkModes:[ei.bounce],coord:n.y,maxCoord:t.canvas.size.height,setCb:t=>n.y+=t,radius:a})};if(c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(n,s)){const e=1;return this._calcPosition(t,void 0,i,s+e)}return n},this._calculateVelocity=()=>{const t=K(this.direction).copy(),e=this.options.move;if(e.direction===m.inside||e.direction===m.outside)return t;const i=X($(e.angle.value)),s=X($(e.angle.offset)),o={left:s-i*Wi,right:s+i*Wi};return e.straight||(t.angle+=N(Q(o.left,o.right))),e.random&&"number"==typeof e.speed&&(t.length*=L()),t},this._checkOverlap=(t,e=0)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const o=i.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&e>n)throw new Error(`${f} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>Z(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?2:1,i=this.roll.horizontal?Math.PI*Wi:0;return Math.floor(((this.roll.angle??0)+i)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?Me(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=$(this.options.zIndex.value);this.position=this._calcPosition(e,t,F(i,0,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...Ft(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??lt.percent},this.direction=Y(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case m.inside:this.outType=oi.inside;break;case m.outside:this.outType=oi.outside}this.offset=M.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(Ie.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??ue(this.color))}getMass(){return this.getRadius()**2*Math.PI*Wi}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??ue(this.strokeColor))}init(t,e,i,s){const o=this.container,n=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=oi.normal,this.ignoresResizeRatio=!0;const a=o.retina.pixelRatio,r=o.actualOptions,c=qi(this._engine,o,r.particles),{reduceDuplicates:h}=c,l=c.effect.type,d=c.shape.type;this.effect=Lt(l,this.id,h),this.shape=Lt(d,this.id,h);const u=c.effect,p=c.shape;if(i){if(i.effect?.type){const t=Lt(i.effect.type,this.id,h);t&&(this.effect=t,u.load(i.effect))}if(i.shape?.type){const t=Lt(i.shape.type,this.id,h);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===Zi){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(Math.random()*t.length)]}if(this.shape===Zi){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(Math.random()*t.length)]}this.effectData=function(t,e,i,s){const o=e.options[t];if(o)return At({close:e.close,fill:e.fill},Lt(o,i,s))}(this.effect,u,this.id,h),this.shapeData=function(t,e,i,s){const o=e.options[t];if(o)return At({close:e.close,fill:e.fill},Lt(o,i,s))}(this.shape,p,this.id,h),c.load(i);const f=this.effectData;f&&c.load(f.particles);const g=this.shapeData;g&&c.load(g.particles);const y=new Xe(n,o);y.load(o.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=f?.fill??c.effect.fill,this.effectClose=f?.close??c.effect.close,this.shapeFill=g?.fill??c.shape.fill,this.shapeClose=g?.close??c.shape.close,this.options=c;const m=this.options.move.path;this.pathDelay=$(m.delay.value)*v,m.generator&&(this.pathGenerator=this._engine.getPathGenerator(m.generator),this.pathGenerator&&o.addPath(m.generator,this.pathGenerator)&&this.pathGenerator.init(o)),o.retina.initParticle(this),this.size=Ht(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=1-$(this.options.move.decay);const w=o.particles;w.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24;let _=o.effectDrawers.get(this.effect);_||(_=this._engine.getEffectDrawer(this.effect),_&&o.effectDrawers.set(this.effect,_)),_?.loadEffect&&_.loadEffect(this);let b=o.shapeDrawers.get(this.shape);b||(b=this._engine.getShapeDrawer(this.shape),b&&o.shapeDrawers.set(this.shape,b)),b?.loadShape&&b.loadShape(this);const S=b?.getSidesCount;S&&(this.sides=S(this)),this.spawning=!1,this.shadowColor=Yt(this.options.shadow.color);for(const t of w.updaters)t.init(this);for(const t of w.movers)t.init?.(this);_?.particleInit?.(o,this),b?.particleInit?.(o,this);for(const t of o.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 Ki{constructor(t,e){this.position=t,this.particle=e}}var Ji;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ji||(Ji={}));class ts{constructor(t,e,i){this.position={x:t,y:e},this.type=i}}class es extends ts{constructor(t,e,i){super(t,e,Ji.circle),this.radius=i}contains(t){return Z(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y),n=this.radius;if(t instanceof es||t.type===Ji.circle){return n+t.radius>Math.sqrt(s**2+o**2)}if(t instanceof is||t.type===Ji.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,2)+Math.pow(o-a,2)<=n**2||s<=n+i&&o<=n+a||s<=i||o<=a}return!1}}class is extends ts{constructor(t,e,i,s){super(t,e,Ji.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 es)return t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,o=t.position,n=t instanceof is?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+e&&o.x+a>s.x&&o.y<s.y+i&&o.y+r>s.y}}const ss=.5;class os{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:o}=this;for(let n=0;n<4;n++){const a=n%2;this._subs.push(new os(new is(t+i*ss*a,e+s*ss*(Math.round(n*ss)-a),i*ss,s*ss),o))}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)&&Z(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 es(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new is(t.x,t.y,e.width,e.height),i)}}const ns=t=>{const{height:e,width:i}=t;return new is(-.25*i,-.25*e,1.5*i,1.5*e)};class as{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 o=this._initDensityFactor(s.density),n=s.value,a=s.limit.value>0?s.limit.value:n,r=Math.min(n,a)*o+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*o:this._groupLimits.set(i,s.limit.value*o),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 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)},this._pushParticle=(t,e,i,s)=>{try{let o=this._pool.pop();o||(o=new Yi(this._engine,this._container)),o.init(this._nextId,t,e,i);let n=!0;if(s&&(n=s(o)),!n)return;return this._array.push(o),this._zArray.push(o),this._nextId++,this._engine.dispatchEvent(Ie.particleAdded,{container:this._container,data:{particle:o}}),o}catch(t){ft().warning(`${f} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;const o=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(o,1),s.destroy(i),this._engine.dispatchEvent(Ie.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 Qi(t,e),this._pluginsInitialized=!1;const i=e.canvas.size;this.quadTree=new os(ns(i),4),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((e=>this.addParticle(e.position?Ft(e.position,t.canvas.size):void 0,e.options)))}addParticle(t,e,i,s){const o=this._container.actualOptions.particles.number.limit.mode,n=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(n>0)switch(o){case ii.delete:{const t=a+1-n;t>0&&this.removeQuantity(t);break}case ii.wait:if(a>=n)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,o=0;o<s.number?.value&&i<t.number.value;i++,o++)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 o=0;o<t;o++)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=1,i,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<e&&n<this.count;n++)this._removeParticle(n,i,s)&&(n--,o++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],0,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 os(ns(e.canvas.size),4);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 Ki(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(Ie.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));const e=1;this._lastZIndex=t[t.length-e].position.z,this._needsSort=!1}}}class rs{constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||yt()?1:window.devicePixelRatio,this.reduceFactor=1;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 o=e.particles,n=o.move;this.maxSpeed=$(n.gravity.maxSpeed)*i,this.sizeAnimationSpeed=$(o.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,o=s.distance,n=t.retina;n.moveDrift=$(s.drift)*i,n.moveSpeed=$(s.speed)*i,n.sizeAnimationSpeed=$(e.size.animation.speed)*i;const a=n.maxDistance;a.horizontal=void 0!==o.horizontal?o.horizontal*i:void 0,a.vertical=void 0!==o.vertical?o.vertical*i:void 0,n.maxSpeed=$(s.gravity.maxSpeed)*i}}function cs(t){return t&&!t.destroyed}function hs(t,e,...i){const s=new ji(t,e);return $i(s,...i),s}class ls{constructor(t,e,i){this._intersectionManager=t=>{if(cs(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=60,i=!1){return{value:t,factor:i?60/e:60*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){ft().error(`${f} 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 rs(this),this.canvas=new ke(this),this.particles=new as(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=hs(this._engine,this),this.actualOptions=hs(this._engine,this),this._eventListeners=new Re(this),this._intersectionObserver=wt((t=>this._intersectionManager(t))),this._engine.dispatchEvent(Ie.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&cs(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!cs(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!cs(this))return;const o=this.retina.pixelRatio,n={x:i.x*o,y:i.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(e,a)};let s=!1,o=!1;this._clickHandlers.set("click",(t=>{if(!cs(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),this._clickHandlers.set("touchstart",(()=>{cs(this)&&(s=!0,o=!1)})),this._clickHandlers.set("touchmove",(()=>{cs(this)&&(o=!0)})),this._clickHandlers.set("touchend",(t=>{if(cs(this)){if(s&&!o){const e=t,s=1;let o=e.touches[e.touches.length-s];if(!o&&(o=e.changedTouches[e.changedTouches.length-s],!o))return;const n=this.canvas.element,a=n?n.getBoundingClientRect():void 0,r=0,c={x:o.clientX-(a?a.left:r),y:o.clientY-(a?a.top:r)};i(t,c,Math.max(o.radiusX,o.radiusY))}s=!1,o=!1}})),this._clickHandlers.set("touchcancel",(()=>{cs(this)&&(s=!1,o=!1)}));for(const[t,i]of this._clickHandlers)e.addEventListener(t,i)}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!cs(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(cs(this)){for(const[t,e]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,e);this._clickHandlers.clear()}}destroy(t=!0){if(cs(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));if(e>=0){const i=1;t.splice(e,i)}}this._engine.dispatchEvent(Ie.containerDestroyed,{container:this})}}draw(t){if(!cs(this))return;let e=t;const i=t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)};this._drawAnimationFrame=H((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}ft().error(`${f} - Export plugin with type ${t} not found`)}handleClickMode(t){if(cs(this)){this.particles.handleClickMode(t);for(const e of this.plugins.values())e.handleClickMode?.(t)}}async init(){if(!cs(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=hs(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=hs(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:o,delay:n,fpsLimit:a,smooth:r}=this.actualOptions;this.zLayers=s,this._duration=$(o)*v,this._delay=$(n)*v,this._lifeTime=0;this.fpsLimit=a>0?a:120,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(Ie.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(Ie.particlesSetup,{container:this})}async loadTheme(t){cs(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(cs(this)&&(void 0!==this._drawAnimationFrame&&(B(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(Ie.containerPaused,{container:this})}}play(t){if(!cs(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(Ie.containerPlay,{container:this}),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(cs(this))return this.stop(),this.start()}async reset(t){if(cs(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=hs(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=hs(this._engine,this,this._options),this.refresh()}async start(){cs(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(Ie.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{e()}),this._delay)})))}stop(){if(cs(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(Ie.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 ds{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,o=i.indexOf(e);if(o<0)return;1===s?this._listeners.delete(t):i.splice(o,1)}}async function us(t,e,i,s=!1){let o=e.get(t);return o&&!s||(o=await Promise.all([...i.values()].map((e=>e(t)))),e.set(t,o)),o}const ps="true",fs="false",gs="canvas";class ys{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new ds,this._initialized=!1,this.plugins=[],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.6.0-beta.1"}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent(Ie.configAdded,{data:{name:e,config:t}})}async addEffect(t,e,i=!0){It(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)}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}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,e=!1){return us(t,this.interactors,this._initializers.interactors,e)}async getMovers(t,e=!1){return us(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 us(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;{const i=1;e.splice(t,i)}}async load(t){const e=t.id??t.element?.id??`tsparticles${Math.floor(1e4*L())}`,{index:s,url:o}=t,n=o?await async function(t){const e=Lt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ft().error(`${f} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:s}):t.options,a=Lt(n,s),{items:r}=this,c=r.findIndex((t=>t.id.description===e)),h=new ls(this,e,a);if(c>=0){const t=this.item(c),e=t?1:0;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]=ps,document.body.append(s),s)})(e,t.element),d=(t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===gs)e=t,e.dataset[i]||(e.dataset[i]=fs);else{const s=t.getElementsByTagName(gs);s.length?(e=s[0],e.dataset[i]=fs):(e=document.createElement(gs),e.dataset[i]=ps,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(`${f} can only set click handlers after calling tsParticles.load()`);e.forEach((e=>e.addClickHandler(t)))}}var vs,ms,ws,_s,bs;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(vs||(vs={}));class Ss{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 oe(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return oe({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?ne({a:e.length>4?nt(e[vs.a]):1,h:parseInt(e[vs.h],10),l:parseInt(e[vs.l],10),s:parseInt(e[vs.s],10)}):void 0}}!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ms||(ms={}));class xs{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:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return e?{a:e.length>4?nt(e[ms.a]):1,b:parseInt(e[ms.b],10),g:parseInt(e[ms.g],10),r:parseInt(e[ms.r],10)}:void 0}}class Ps{constructor(t){this.type=si.external,this.container=t}}class Cs{constructor(t){this.type=si.particles,this.container=t}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(ws||(ws={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(_s||(_s={})),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"}(bs||(bs={}));const Os=function(){const t=new xs,e=new Ss;Zt(t),Zt(e);const i=new ys;return i.init(),i}();yt()||(window.tsParticles=Os);class Ts{static init(t){const e=new Ts,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 Os.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 As={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},Ms=t=>{const{particlesJS:e,pJSDom:i}=(t=>{const e=(e,i)=>{const s=At(As,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=Ts,{particlesJS:e,pJSDom:i,Particles:Ts}},Es=.5,Vs=0;class ks{constructor(){this.validTypes=["arrow"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=2*s,n=o*(i.heightFactor??.5),a=o*(i.headWidthFactor??.2),r=n*(i.bodyHeightFactor??.5);e.moveTo(-o*Es,Vs),e.lineTo(-o*Es,-r*Es),e.lineTo(o*Es-a,-r*Es),e.lineTo(o*Es-a,-n*Es),e.lineTo(o*Es+a,Vs),e.lineTo(o*Es-a,n*Es),e.lineTo(o*Es-a,r*Es),e.lineTo(-o*Es,r*Es),e.lineTo(-o*Es,Vs)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=$(i?.heightFactor??.5),e.headWidthFactor=$(i?.headWidthFactor??.2),e.bodyHeightFactor=$(i?.bodyHeightFactor??.5)}}const zs=2*Math.PI;class Gs{draw(t){const{context:e,radius:i}=t,s=i/3;e.beginPath(),e.arc(s,-s,s,0,zs,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}class Rs{constructor(){this.color=!0,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Is{constructor(){this.filter=t=>t.a>0,this.offset=4}load(t){if(t){if(void 0!==t.filter)if(_(t.filter)){if(Object.hasOwn(window,t.filter)){const e=window[t.filter];S(e)&&(this.filter=e)}}else this.filter=t.filter;void 0!==t.offset&&(this.offset=t.offset)}}}class Ls{constructor(){this.src=""}load(t){t&&void 0!==t.src&&(this.src=t.src)}}class Ds{constructor(){this.family="sans-serif",this.size=100}load(t){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 Hs{constructor(){this.separator="\n",this.spacing=10}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Bs{constructor(){this.color="#000000",this.font=new Ds,this.lines=new Hs,this.text=""}load(t){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 Fs{constructor(){this.enable=!1,this.override=new Rs,this.pixels=new Is,this.position={x:50,y:50},this.scale=1}load(t){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 Ls),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 Bs),this.text.load(t.text)))}}const Us={x:0,y:0};function Ns(t,e,i,s,o,n){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(L()*s);[t[s],t[e]]=[t[e],t[s]]}return t}(qs(c)),l=Math.min(c,t.actualOptions.particles.number.value),d=t.canvas.size;let u=0;const p=d.width*i.x/g-r*s*.5,f=d.height*i.y/g-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(!n(l))continue;const d={x:c.x*s+p,y:c.y*s+f},g={};o.color&&(g.color={value:l}),o.opacity&&(g.opacity={value:l.a}),t.particles.addParticle(d,g),u++}}function $s(t,e,i,s=!0){const o=t.getImageData(Us.x,Us.y,e.width,e.height).data;s&&t.clearRect(Us.x,Us.y,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;n[a.y][a.x]={r:o[t+r.r],g:o[t+r.g],b:o[t+r.b],a:o[t+r.a]/c}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}const qs=t=>[...Array(t).keys()];class js{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 o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${f} Could not get canvas context`));n.drawImage(i,Us.x,Us.y,i.width,i.height,Us.x,Us.y,o.width,o.height),t($s(n,o,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:o,text:n,lines:a,color:r}=t;if(!n||!s)return;const c=n.split(a.separator),h=b(o.size)?`${o.size}px`:o.size,l=[];let d=0,u=0;for(const t of c){s.font=`${o.style??""} ${o.variant??""} ${o.weight??""} ${h} ${o.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=`${o.style??""} ${o.variant??""} ${o.weight??""} ${h} ${o.family}`,s.fillStyle=r,s.fillText(t.text,Us.x,p+t.measure.actualBoundingBoxAscent),p+=t.height+a.spacing;return $s(s,i,e)}(e.text,s);if(!t)return;i=t}else if(e.element??e.selector){const t=e.element??(e.selector&&document.querySelector(e.selector));if(!t)return;const o=t.getContext("2d");if(!o)return;i=$s(o,t,s)}Ns(t,i,e.position,e.scale,e.override,e.pixels.filter)}}class Qs{constructor(){this.id="canvasMask"}getPlugin(t){return Promise.resolve(new js(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.canvasMask;void 0===i?.load&&(t.canvasMask=i=new Fs),i.load(e?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}function Ws(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 o=e.segments[t];i.bezierCurveTo(-o.values[2].x*s,o.values[2].y*s,-o.values[1].x*s,o.values[1].y*s,-o.values[0].x*s,o.values[0].y*s)}}const Zs=.5,Xs={heart:{segments:[{values:[{x:0,y:Zs},{x:0,y:Zs},{x:Zs,y:0},{x:Zs,y:-Zs/2}]},{values:[{x:Zs,y:-Zs/2},{x:Zs,y:-Zs/2},{x:Zs,y:-Zs},{x:Zs/2,y:-Zs}]},{values:[{x:Zs/2,y:-Zs},{x:Zs/2,y:-Zs},{x:0,y:-Zs},{x:0,y:-Zs/2}]}]},diamond:{segments:[{values:[{x:0,y:Zs},{x:0,y:Zs},{x:.375,y:0},{x:.375,y:0}]},{values:[{x:.375,y:0},{x:.375,y:0},{x:0,y:-Zs},{x:0,y:-Zs}]}]},club:{segments:[{values:[{x:0,y:-Zs},{x:0,y:-Zs},{x:Zs/2,y:-Zs},{x:Zs/2,y:-Zs/2}]},{values:[{x:Zs/2,y:-Zs/2},{x:Zs/2,y:-Zs/2},{x:Zs,y:-Zs/2},{x:Zs,y:0}]},{values:[{x:Zs,y:0},{x:Zs,y:0},{x:Zs,y:Zs/2},{x:Zs/2,y:Zs/2}]},{values:[{x:Zs/2,y:Zs/2},{x:Zs/2,y:Zs/2},{x:Zs/8,y:Zs/2},{x:Zs/8,y:Zs/8}]},{values:[{x:Zs/8,y:Zs/8},{x:Zs/8,y:Zs/2},{x:Zs/2,y:Zs},{x:Zs/2,y:Zs}]},{values:[{x:Zs/2,y:Zs},{x:Zs/2,y:Zs},{x:0,y:Zs},{x:0,y:Zs}]}]},spade:{segments:[{values:[{x:0,y:-Zs},{x:0,y:-Zs},{x:Zs,y:-Zs/2},{x:Zs,y:0}]},{values:[{x:Zs,y:0},{x:Zs,y:0},{x:Zs,y:Zs/2},{x:Zs/2,y:Zs/2}]},{values:[{x:Zs/2,y:Zs/2},{x:Zs/2,y:Zs/2},{x:Zs/8,y:Zs/2},{x:Zs/8,y:Zs/8}]},{values:[{x:Zs/8,y:Zs/8},{x:Zs/8,y:Zs/2},{x:Zs/2,y:Zs},{x:Zs/2,y:Zs}]},{values:[{x:Zs/2,y:Zs},{x:Zs/2,y:Zs},{x:0,y:Zs},{x:0,y:Zs}]}]}};class Ys{constructor(){this.validTypes=["club","clubs"]}draw(t){Ws(t,Xs.club)}}class Ks{constructor(){this.validTypes=["diamond","diamonds"]}draw(t){Ws(t,Xs.diamond)}}class Js{constructor(){this.validTypes=["heart","hearts"]}draw(t){Ws(t,Xs.heart)}}class to{constructor(){this.validTypes=["spade","spades"]}draw(t){Ws(t,Xs.spade)}}const eo=2*Math.PI,io=0,so=0;class oo{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 o=s*i.cogHoleRadius/g;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(o,so),e.arc(io,so,o,0,eo),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 o=eo/(2*i.cogNotches),n=o*i.cogInnerTaper*.005,a=o*i.cogOuterTaper*.005,r=s*i.cogInnerRadius/g;let c=o,h=!1;for(e.moveTo(s*Math.cos(a),s*Math.sin(a));c<=eo;c+=o)h?(e.lineTo(r*Math.cos(c-n),r*Math.sin(c-n)),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+n),r*Math.sin(c+n))),h=!h}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=$(i?.holeRadius??44),e.cogInnerRadius=$(i?.innerRadius??72),e.cogInnerTaper=$(i?.innerTaper??35),e.cogNotches=$(i?.notches??7),e.cogOuterTaper=$(i?.outerTaper??50)}}function no(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class ao{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:o,_STRETCH_2D:n,_lookup:a,_perm:r,_perm2D:c}=this,h=(t+e)*n,l=t+h,d=e+h,u=Math.floor(l),p=Math.floor(d),f=(u+p)*o,g=t-(u+f),y=e-(p+f),v=l-u,m=d-p,w=v+m;let _=0;for(let t=a[v-m+1|w<<1|w+m<<2|w+v<<4];void 0!==t;t=t.next){const e=g+t.dx,s=y+t.dy,o=2-e*e-s*s;if(o>0){const n=u+t.xsb,a=p+t.ysb,h=c[r[255&n]+a&255];_+=o*o*o*o*(i[h]*e+i[h+1]*s)}}return _*s}seed(t){const{_p2D:e,_base2D:i,_lookupPairs2D:s}=this,o=[];for(let t=0;t<e.length;t+=4){const s=i[e[t]];let n=null,a=null;for(let e=0;e<s.length;e+=3)a=this._contribution2D(s[e],s[e+1],s[e+2]),null===n?o[t/4]=a:n.next=a,n=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]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm2D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm2D[t]=14&this._perm[t],n[e[0]]=n[t]}}_contribution2D(t,e,i){const{_SQUISH_2D:s}=this;return{dx:-e-t*s,dy:-i-t*s,xsb:e,ysb:i}}}class ro{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:o,_SQUISH_3D:n,_lookup:a,_perm:r,_perm3D:c,_gradients3D:h}=this,l=(t+e+i)*s,d=t+l,u=e+l,p=i+l,f=Math.floor(d),g=Math.floor(u),y=Math.floor(p),v=(f+g+y)*n,m=t-(f+v),w=e-(g+v),_=i-(y+v),b=d-f,S=u-g,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=m+t.dx,i=w+t.dy,s=_+t.dz,o=2-e*e-i*i-s*s;if(o>0){const n=f+t.xsb,a=g+t.ysb,l=y+t.zsb,d=c[r[r[255&n]+a&255]+l&255];C+=o*o*o*o*(h[d]*e+h[d+1]*i+h[d+2]*s)}}return C*o}seed(t){const{_base3D:e,_lookupPairs3D:i,_p3D:s}=this,o=[];for(let t=0;t<s.length;t+=9){const i=e[s[t]];let n=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===n?o[t/9]=a:n.next=a,n=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]]=o[i[t+1]];this._perm=new Uint8Array(256),this._perm3D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm3D[t]=this._perm[t]%24*3,n[e[0]]=n[t]}}_contribution3D(t,e,i,s){const{_SQUISH_3D:o}=this;return{dx:-e-t*o,dy:-i-t*o,dz:-s-t*o,xsb:e,ysb:i,zsb:s}}}class co{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:o,_perm4D:n,_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,f=i+d,g=s+d,y=Math.floor(u),v=Math.floor(p),m=Math.floor(f),w=Math.floor(g),_=(y+v+m+w)*c,b=t-(y+_),S=e-(v+_),x=i-(m+_),P=s-(w+_),C=u-y,O=p-v,T=f-m,A=g-w,M=C+O+T+A;let E=0;for(let t=a[T-A+1|O-T+1<<1|O-A+1<<2|C-O+1<<3|C-T+1<<4|C-A+1<<5|M<<6|M+A<<8|M+T<<11|M+O<<14|M+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=m+t.zsb,u=w+t.wsb,p=n[o[o[o[255&c]+l&255]+d&255]+u&255];E+=r*r*r*r*(h[p]*e+h[p+1]*i+h[p+2]*s+h[p+3]*a)}}return E*l}seed(t){const{_p4D:e,_base4D:i,_lookupPairs4D:s}=this,o=[];for(let t=0;t<e.length;t+=16){const s=i[e[t]];let n=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===n?o[t/16]=a:n.next=a,n=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]]=o[s[t+1]];this._perm=new Uint8Array(256),this._perm4D=new Uint8Array(256);const n=new Uint8Array(256);for(let t=0;t<256;t++)n[t]=t;let a=new Uint32Array(1);a[0]=t,a=no(no(no(a)));for(let t=255;t>=0;t--){a=no(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this._perm[t]=n[e[0]],this._perm4D[t]=252&this._perm[t],n[e[0]]=n[t]}}_contribution4D(t,e,i,s,o){const{_SQUISH_4D:n}=this;return{dx:-e-t*n,dy:-i-t*n,dz:-s-t*n,dw:-o-t*n,xsb:e,ysb:i,zsb:s,wsb:o}}}class ho{constructor(){this.noise2d=new ao,this.noise3d=new ro,this.noise4d=new co}}const lo={speed:.2,step:250};class uo{constructor(){const t=new ho;this._simplex=t.noise2d,this.options=At({},lo)}generate(t){const e=t.getPosition(),{speed:i,step:s}=this.options,o=e.x/s,n=e.y/s,a=.001,r=(this._simplex.noise(o,n+a)-this._simplex.noise(o,n-a))/.002,c=(this._simplex.noise(o+a,n)-this._simplex.noise(o-a,n))/.002;return t.velocity.x=0,t.velocity.y=0,M.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??lo.speed)*t.retina.pixelRatio,this.options.step=e?.step??lo.step,this._simplex.seed(this.options.seed??L())}reset(){}update(){}}const po="curlNoise";const fo=2*Math.PI;class go{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,o=0,n=1){const a=[],r=[],c=[],h=[],l=[],d=t??L;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*(n-o))),()=>{let t,e,s=0;for(let o=i;o>=1;--o)t=l[o]+=h[o],l[o]>=1&&(t=l[o]-=1,a[o]=r[o],r[o]=d()),e=t**2*(3-2*t),s+=(a[o]*(1-e)+r[o]*e)*c[o];return s+o}}(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())%fo):(t.curveVelocity=M.origin,t.curveVelocity.length=.6*L()+.8,t.curveVelocity.angle=L()*fo),t.velocity.x=0,t.velocity.y=0,t.curveVelocity}init(t){const e=t.actualOptions.particles.move.path.options,{options:i}=this;S(e.rndFunc)?i.rndFunc=e.rndFunc:_(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 yo="curvesPathGenerator";class vo{constructor(){this.wait=!1}load(t){t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.duration&&(this.duration=Q(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class mo{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=Q(t.quantity)),void 0!==t.delay&&(this.delay=Q(t.delay)))}}class wo{constructor(){this.color=!1,this.opacity=!1}load(t){t&&(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class _o{constructor(){this.options={},this.replace=new wo,this.type="square"}load(t){t&&(void 0!==t.options&&(this.options=At({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class bo{constructor(){this.mode=lt.percent,this.height=0,this.width=0}load(t){void 0!==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 So{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new vo,this.rate=new mo,this.shape=new _o,this.startCount=0}load(t){t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size||(this.size=new bo),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=It(t.particles,(t=>At({},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=Q(t.position.x)),void 0!==t.position.y&&(this.position.y=Q(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new ui),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}var xo;!function(t){t.emitter="emitter"}(xo||(xo={}));function Po(t,e){t.color?t.color.value=e:t.color={value:e}}class Co{constructor(t,e,i,s,o){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?$(this.options.life.duration):void 0;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==t&&t>0&&(this._duration=t*v)},this._setColorAnimation=(t,e,i,s=1)=>{const o=this.container;if(!t.enable)return e;const n=N(t.offset),a=$(this.options.rate.delay)*v/o.retina.reduceFactor;return(e+$(t.speed??0)*o.fpsLimit/a+n*s)%i},this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof So?this.options=s:(this.options=new So,this.options.load(s)),this._spawnDelay=$(this.options.life.delay??0)*v/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 n=At({},this.options.particles);if(n??={},n.move??={},n.move.direction??=this.options.direction,this.options.spawnColor&&(this.spawnColor=te(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=n,this._size=this._calcSize(),this.size=Ut(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=$(this.options.rate.delay);this._emitDelay=t*v/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this._prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&Ct(t,this.container.canvas.size,M.origin)?t:this._calcPosition(),this._size=this._calcSize(),this.size=Ut(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=$(this.options.life.delay??0)*v/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 it({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:lt.precise}}}return this.options.size??(()=>{const t=new bo;return t.load({height:0,mode:lt.percent,width:0}),t})()}_emit(){if(this._paused)return;const t=$(this.options.rate.quantity);this._emitParticles(t)}_emitParticles(t){const e=Lt(this._particlesOptions);for(let i=0;i<t;i++){const t=At({},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)}Po(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 o=i.replace;o.color&&e.color&&Po(t,e.color),o.opacity&&(t.opacity?t.opacity.value=e.opacity:t.opacity={value:e.opacity})}else s=null}s&&this.container.particles.addParticle(s,t)}}}class Oo{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||b(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 So;i.load(t);const s=new Co(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!==xo.emitter)return;let s;if(i&&P(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 o=xt(i.value);t.includes(o)&&t.length<i.value.length?e--:(t.push(o),s.push(Pt(i.value,o)))}}else s=i.value}else s=i?.value;const o=s??e,n=this.container.interactivity.mouse.clickPosition;It(o,(async t=>{await this.addEmitter(t,n)}))}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters)if(P(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 To{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return Promise.resolve(new Oo(this._engine,t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;e?.emitters&&(t.emitters=It(e.emitters,(t=>{const e=new So;return e.load(t),e})));const i=e?.interactivity?.modes?.emitters;if(i)if(P(i))t.interactivity.modes.emitters={random:{count:1,enable:!0},value:i.map((t=>{const e=new So;return e.load(t),e}))};else{const e=i;if(void 0!==e.value){const i=1;if(P(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 So;return e.load(t),e}))};else{const s=new So;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 So}).value.load(i)}}}needsPlugin(t){if(!t)return!1;const e=t.emitters;return P(e)&&!!e.length||void 0!==e||!!t.interactivity?.events?.onClick?.mode&&bt(xo.emitter,t.interactivity.events.onClick.mode)}}const Ao=new Map;class Mo{constructor(t){this._engine=t}addShapeGenerator(t,e){this.getShapeGenerator(t)||Ao.set(t,e)}getShapeGenerator(t){return Ao.get(t)}getSupportedShapeGenerators(){return Ao.keys()}}class Eo{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 Vo={x:0,y:0};function ko(t,e,i,s=!0){const o=t.getImageData(Vo.x,Vo.y,e.width,e.height).data;s&&t.clearRect(Vo.x,Vo.y,e.width,e.height);const n=[];for(let t=0;t<o.length;t+=i){const s=t/i,a={x:s%e.width,y:Math.floor(s/e.width)};n[a.y]||(n[a.y]=[]);const r={r:0,g:1,b:2,a:3},c=255;n[a.y][a.x]={r:o[t+r.r],g:o[t+r.g],b:o[t+r.b],a:o[t+r.a]/c}}return{pixels:n,width:Math.min(...n.map((t=>t.length))),height:n.length}}class zo extends Eo{constructor(t,e,i,s){super(t,e,i,s);const o=s.filter;let n=t=>t.a>0;if(void 0!==o)if(_(o)){if(Object.hasOwn(window,o)){const t=window[o];S(t)&&(n=t)}}else n=o;this.filter=n,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,o=e.image,n=e.element,a=e.text,r=s.offset;if(o){const e=o.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 o=document.createElement("canvas");o.width=i.width,o.height=i.height;const n=o.getContext("2d");if(!n)return s(new Error(`${f} Could not get canvas context`));n.drawImage(i,Vo.x,Vo.y,i.width,i.height,Vo.x,Vo.y,o.width,o.height),t(ko(n,o,e))}}));return i.src=t,s}(e,r)}else if(a){const e=function(t,e,i){const s=document.createElement("canvas"),o=s.getContext("2d"),{font:n,text:a,lines:r,color:c}=t;if(!a||!o)return;const h=a.split(r.separator),l=b(n.size)?`${n.size}px`:n.size,d=[];let u=0,p=0;for(const t of h){o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`;const e=o.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 f=0;for(const t of d)o.font=`${n.style||""} ${n.variant||""} ${n.weight||""} ${l} ${n.family}`,i?(o.fillStyle=c,o.fillText(t.text,Vo.x,f+t.measure.actualBoundingBoxAscent)):(o.strokeStyle=c,o.strokeText(t.text,Vo.x,f+t.measure.actualBoundingBoxAscent)),f+=t.height+r.spacing;return ko(o,s,e)}(a,r,this.fill);if(!e)return;t=e}else if(n??i){const e=n??(i&&document.querySelector(i));if(!e)return;const s=e.getContext("2d");if(!s)return;t=ko(s,e,r)}t&&(this.pixelData=t)}randomPosition(){const{height:t,width:e}=this.pixelData,i=this.pixelData,s=this.position,o=this.scale,n=s.x-e*o*.5,a=s.y-t*o*.5;for(let s=0;s<100;s++){const s=Math.floor(L()*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*o+n,y:r.y*o+a},color:{...c},opacity:c.a}}return null}resize(t,e){super.resize(t,e)}}class Go{constructor(){this.offset=4}load(t){t&&void 0!==t.offset&&(this.offset=t.offset)}}class Ro{constructor(){this.family="Verdana",this.size=32,this.style="",this.variant="",this.weight=""}load(t){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 Io{constructor(){this.separator="\n",this.spacing=0}load(t){t&&(void 0!==t.separator&&(this.separator=t.separator),void 0!==t.spacing&&(this.spacing=t.spacing))}}class Lo{constructor(){this.color="#000000",this.font=new Ro,this.lines=new Io,this.text=""}load(t){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 Do{constructor(){this.filter=t=>t.a>0,this.pixels=new Go,this.scale=1,this.selector="",this.text=new Lo}load(t){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 Ho{generate(t,e,i,s){const o=new Do;return o.load(s),new zo(t,e,i,o)}}const Bo=.5;const Fo=.5;class Uo extends Eo{constructor(t,e,i,s){super(t,e,i,s);const o=document.createElement("canvas").getContext("2d");if(!o)throw new Error(`${f} No 2d context available`);this.checkContext=o,this.points=s.points;const n=this.points,a=new Path2D,r=t.x-e.width*Fo,c=t.y-e.height*Fo;for(const[t,i]of n.entries()){const s={x:r+i.x*e.width/g,y:c+i.y*e.height/g};t?a.lineTo(s.x,s.y):a.moveTo(s.x,s.y)}const h=n[0];if(h){const t={x:r+h.x*e.width/g,y:c+h.y*e.height/g};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,o=this.path,n=s?function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+L()*s.width-s.width*Bo,y:i.y+L()*s.height-s.height*Bo};if(t.isPointInPath(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i):function(t,e,i,s){let o=null;for(let n=0;n<100;n++){const n={x:i.x+L()*s.width-s.width*Bo,y:i.y+L()*s.height-s.height*Bo};if(t.isPointInStroke(e,n.x,n.y)){o=n;break}}return o}(t,o,e,i);return n?{position:n}:null}resize(t,e){super.resize(t,e);const i=this.points,s=new Path2D,o=t.x-e.width*Fo,n=t.y-e.height*Fo;for(const[t,a]of i.entries()){const i={x:o+a.x*e.width/g,y:n+a.y*e.height/g};t?s.lineTo(i.x,i.y):s.moveTo(i.x,i.y)}const a=i[0];if(a){const t={x:o+a.x*e.width/g,y:n+a.y*e.height/g};s.lineTo(t.x,t.y)}this.path=s}}const No=50,$o=50;class qo{constructor(){this.points=[]}load(t){t&&void 0!==t.points&&(this.points=t.points.map((t=>({x:t.x??No,y:t.y??$o}))))}}class jo{generate(t,e,i,s){const o=new qo;return o.load(s),new Uo(t,e,i,o)}}const Qo=2*Math.PI;function Wo(t,e,i,s=0){const o=[],n=Qo/e;for(let a=0;a<e;a++){const e=n*a+s;o.push({x:t.x+i*Math.cos(e),y:t.y+i*Math.sin(e)})}return o}function Zo(t,e){let i=!1;for(let s=0,o=e.length-1;s<e.length;o=s++){const n=e[s],a=e[o];n.y>t.y!=a.y>t.y&&t.x<(a.x-n.x)*(t.y-n.y)/(a.y-n.y)+n.x&&(i=!i)}return i}class Xo extends Eo{constructor(t,e,i,s){super(t,e,i,s),this.sides=s.sides,this.angle=X(s.angle),this.polygon=Wo(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 o=null;for(let e=0;e<100;e++){const e={x:i.x+L()*(s.x-i.x),y:i.y+L()*(s.y-i.y)};if(Zo(e,t)){o=e;break}}return o}(e):function(t){const e=Math.floor(L()*t.length),i=t[e],s=t[(e+1)%t.length],o=L();return{x:i.x+(s.x-i.x)*o,y:i.y+(s.y-i.y)*o}}(e);return i?{position:i}:null}resize(t,e){super.resize(t,e),this.polygon=Wo(t,this.sides,.5*e.width,this.angle)}}class Yo{constructor(){this.angle=0,this.sides=5}load(t){t&&(void 0!==t.angle&&(this.angle=t.angle),void 0!==t.sides&&(this.sides=t.sides))}}class Ko{generate(t,e,i,s){const o=new Yo;return o.load(s),new Xo(t,e,i,o)}}class Jo{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 tn{constructor(t){this.id="export-image",this._engine=t}getPlugin(t){return Promise.resolve(new Jo(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class en{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 sn{constructor(t){this.id="export-json",this._engine=t}getPlugin(t){return Promise.resolve(new en(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}const on=["webm","ogg","mp4","x-matroska"],nn=["vp9","vp9.0","vp8","vp8.0","avc1","av1","h265","h.265","h264","h.264","opus","pcm","aac","mpeg","mp4a"];class an{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),o=t.mimeType??this._supportedTypes[0],n=new MediaRecorder(s,{mimeType:o}),a=[];n.addEventListener("dataavailable",(t=>{a.push(t.data)})),n.addEventListener("stop",(()=>{i(new Blob(a,{type:o}))})),n.start(),setTimeout((()=>{n.stop()}),t.duration??5*v)}))},this._container=t,this._engine=e,this._supportedTypes=function(){const t=t=>MediaRecorder.isTypeSupported(t),e=[];return on.forEach((i=>{const s=`video/${i}`;nn.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 rn{constructor(t){this.id="export-video",this._engine=t}getPlugin(t){return Promise.resolve(new an(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}class cn{constructor(){this.replaceCursor=!1,this.pauseOnStop=!1,this.stopDelay=0}load(t){t&&(void 0!==t.options&&(this.options=At({},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 hn="particle";class ln extends Ps{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,o=i.interactivity.modes.particle;if(!o)return;const n=o.pauseOnStop&&(e.mouse.position===this._lastPosition||e.mouse.position?.x===this._lastPosition?.x&&e.mouse.position?.y===this._lastPosition?.y),a=o.stopDelay;if(s?this._lastPosition={...s}:delete this._lastPosition,this._lastPosition)if(n){if(this._clearTimeout)return;this._clearTimeout=setTimeout((()=>{if(this._particle){if(o.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=At(o.options,{move:{enable:!1}});if(this._particle=t.particles.addParticle(this._lastPosition,i),o.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,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&bt(hn,o.onClick.mode)||s.inside&&!!s.position&&bt(hn,o.onHover.mode)}loadModeOptions(t,...e){t.particle||(t.particle=new cn);for(const i of e)t.particle.load(i?.particle)}reset(){}}class dn extends Ps{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 un{constructor(){this.radius=0,this.mass=0}load(t){t&&(void 0!==t.mass&&(this.mass=t.mass),void 0!==t.radius&&(this.radius=t.radius))}}class pn extends gi{constructor(){super(),this.density=5,this.value=50,this.limit=new un}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),b(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class fn{constructor(){this.color=new De,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new pn}load(t){void 0!==t&&(void 0!==t.color&&(this.color=De.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=Q(t.position.x)),void 0!==t.position.y&&(this.position.y=Q(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 gn;!function(t){t.absorber="absorber"}(gn||(gn={}));const yn=0,vn=0,mn=2*Math.PI;class wn{constructor(t,e,i,s){this.absorbers=t,this.container=e,this._calcPosition=()=>{const t=it({size:this.container.canvas.size,position:this.options.position});return M.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=et({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=M.origin,t.absorberOrbit.length=Z(t.getPosition(),this.position),t.absorberOrbit.angle=L()*mn),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height),i=1,o=.1,n=.2;t.absorberOrbit.length=e*(i+(L()*n-o))}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?ws.clockwise:ws.counterClockwise);const o=t.absorberOrbit.length,n=t.absorberOrbit.angle,a=t.absorberOrbitDirection;t.velocity.setTo(M.origin);const r={x:a===ws.clockwise?Math.cos:Math.sin,y:a===ws.clockwise?Math.sin:Math.cos};t.position.x=this.position.x+o*r.x(n),t.position.y=this.position.y+o*r.y(n),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(t.retina.moveSpeed??0)*i.retina.pixelRatio/g*i.retina.reduceFactor}else{const i=M.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}},this.initialPosition=s?M.create(s.x,s.y):void 0,i instanceof fn?this.options=i:(this.options=new fn,this.options.load(i)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=$(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=Yt(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){Z(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:o,dy:n,distance:a}=W(this.position,s),r=M.create(o,n);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(yn,vn,this.size,0,mn,!1),t.closePath(),t.fillStyle=re(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&Ct(t,this.container.canvas.size,M.origin)?t:this._calcPosition()}}class _n{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||b(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 wn(this,this.container,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===gn.absorber){const t=Lt(i)??Lt(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=It(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 bn{constructor(){this.id="absorbers"}async getPlugin(t){return Promise.resolve(new _n(t))}loadOptions(t,e){(this.needsPlugin(t)||this.needsPlugin(e))&&(e?.absorbers&&(t.absorbers=It(e.absorbers,(t=>{const e=new fn;return e.load(t),e}))),t.interactivity.modes.absorbers=It(e?.interactivity?.modes?.absorbers,(t=>{const e=new fn;return e.load(t),e})))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return P(e)?!!e.length:!!e||!(!t.interactivity?.events?.onClick?.mode||!bt(gn.absorber,t.interactivity.events.onClick.mode))}}class Sn{load(t){t&&(void 0!==t.bottom&&(this.bottom=Q(t.bottom)),void 0!==t.left&&(this.left=Q(t.left)),void 0!==t.right&&(this.right=Q(t.right)),void 0!==t.top&&(this.top=Q(t.top)))}}var xn;!function(t){t.none="none",t.split="split"}(xn||(xn={}));class Pn extends gi{constructor(){super(),this.value=3}}class Cn extends gi{constructor(){super(),this.value={min:4,max:9}}}class On{constructor(){this.count=1,this.factor=new Pn,this.rate=new Cn,this.sizeOffset=!0}load(t){t&&(void 0!==t.color&&(this.color=De.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=It(t.particles,(t=>At({},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 Tn{constructor(){this.bounds=new Sn,this.mode=xn.none,this.split=new On}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}const An=0,Mn=.5,En=0,Vn=1,kn=500;function zn(t,e,i,s){const o=i.options.destroy;if(!o)return;const n=o.split,a=qi(t,e,i.options),r=$(n.factor.value),c=i.getFillColor();n.color?a.color.load(n.color):n.colorOffset&&c?a.color.load({value:{hsl:{h:c.h+$(n.colorOffset.h??An),s:c.s+$(n.colorOffset.s??An),l:c.l+$(n.colorOffset.l??An)}}}):a.color.load({value:{hsl:i.getFillColor()}}),a.move.load({center:{x:i.position.x,y:i.position.y,mode:lt.precise}}),b(a.size.value)?a.size.value/=r:(a.size.value.min/=r,a.size.value.max/=r),a.load(s);const h=n.sizeOffset?Q(-i.size.value,i.size.value):An,l={x:i.position.x+N(h),y:i.position.y+N(h)};return e.particles.addParticle(l,a,i.group,(t=>!(t.size.value<Mn)&&(t.velocity.length=N(Q(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??En)+Vn,t.unbreakable=!0,setTimeout((()=>{t.unbreakable=!1}),kn),!0)))}class Gn{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:o,left:n,right:a,top:r}=s,{destroyBounds:c}=t,h=e.canvas.size;o&&(c.bottom=$(o)*h.height/g),n&&(c.left=$(n)*h.width/g),a&&(c.right=$(a)*h.width/g),r&&(c.top=$(r)*h.height/g)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new Tn);for(const i of e)t.destroy.load(i?.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&i.mode===xn.split&&function(t,e,i){const s=i.options.destroy;if(!s)return;const o=s.split;if(o.count>=0&&(void 0===i.splitCount||i.splitCount++>o.count))return;const n=$(o.rate.value),a=Lt(o.particles);for(let s=0;s<n;s++)zn(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 Rn=.25,In=2*Math.PI;class Ln extends Eo{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,o]=[.5*t.width,.5*t.height],n=((t,e)=>{const i=L()*Rn,s=Math.atan(e/t*Math.tan(In*i)),o=L();return o<Rn?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),a=(l=n,(c=s)*(h=o)/Math.sqrt((h*Math.cos(l))**2+(c*Math.sin(l))**2)),r=e?a*Math.sqrt(L()):a;var c,h,l;return{position:{x:i.x+r*Math.cos(n),y:i.y+r*Math.sin(n)}}}}class Dn{generate(t,e,i,s){return new Ln(t,e,i,s)}}var Hn;function Bn(t,e){return t+e*(L()-y)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Hn||(Hn={}));class Fn extends Eo{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:Bn(e.x,i.width),y:Bn(e.y,i.height)}};{const t=.5*i.width,s=.5*i.height,o=Math.floor(4*L()),n=2*(L()-y);switch(o){case Hn.TopLeft:return{position:{x:e.x+n*t,y:e.y-s}};case Hn.TopRight:return{position:{x:e.x-t,y:e.y+n*s}};case Hn.BottomRight:return{position:{x:e.x+n*t,y:e.y+s}};case Hn.BottomLeft:default:return{position:{x:e.x+t,y:e.y+n*s}}}}}}class Un{generate(t,e,i,s){return new Fn(t,e,i,s)}}class Nn{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(t){t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.quantity&&(this.quantity=t.quantity),void 0!==t.particles&&(this.particles=At({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}const $n="trail";class qn extends Ps{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 o=s.delay*v/this.container.retina.reduceFactor;if(this._delay<o&&(this._delay+=t.value),this._delay<o)return;const n=!(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,n&&e.particles.push(s.quantity,e.interactivity.mouse,s.particles),this._delay-=o}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;return s.clicking&&s.inside&&!!s.position&&bt($n,o.onClick.mode)||s.inside&&!!s.position&&bt($n,o.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new Nn);for(const i of e)t.trail.load(i?.trail)}reset(){}}var jn;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(jn||(jn={}));const Qn=2*Math.PI;class Wn{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=Q(t.value)))}}class Zn{constructor(){this.darken=new Wn,this.enable=!1,this.enlighten=new Wn,this.mode=jn.vertical,this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=De.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=Q(t.speed)))}}class Xn{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){const e=t.options.roll;if(e?.enable)if(t.roll={enable:e.enable,horizontal:e.mode===jn.horizontal||e.mode===jn.both,vertical:e.mode===jn.vertical||e.mode===jn.both,angle:L()*Qn,speed:$(e.speed)/360},e.backColor)t.backColor=te(e.backColor);else if(e.darken.enable&&e.enlighten.enable){const i=L()>=y?$t.darken:$t.enlighten;t.roll.alter={type:i,value:$(i===$t.darken?e.darken.value:e.enlighten.value)}}else e.darken.enable?t.roll.alter={type:$t.darken,value:$(e.darken.value)}:e.enlighten.enable&&(t.roll.alter={type:$t.enlighten,value:$(e.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.roll||(t.roll=new Zn);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 o=s.speed*e.factor,n=Qn;s.angle+=o,s.angle>n&&(s.angle-=n)}(t,e)}}const Yn=1;function Kn(t,e,i,s,o,n){!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 o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=F(t.velocity.x,-Yn,Yn),t.velocity.y=F(t.velocity.y,-Yn,Yn));t.lastPathTime-=t.pathDelay}(t,n);const a=t.gravity,r=a?.enable&&a.inverse?-Yn:Yn;o&&i&&(t.velocity.x+=o*n.factor/(60*i)),a?.enable&&i&&(t.velocity.y+=r*(a.acceleration*n.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=(Yn-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 Jn{init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:$(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},o={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},n=Z(t.getPosition(),o),a=$(i.acceleration);t.retina.spinAcceleration=a*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?ws.clockwise:ws.counterClockwise,angle:t.velocity.angle,radius:n,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 o=t.container,n=o.retina.pixelRatio;t.retina.moveSpeed??=$(s.speed)*n,t.retina.moveDrift??=$(t.options.move.drift)*n;const a=function(t){return t.slow.inRange?t.slow.factor:Yn}(t),r=t.retina.moveSpeed*o.retina.reduceFactor,c=t.retina.moveDrift,h=j(i.size.value)*n,l=r*(s.size?t.getRadius()/h:1)*a*(e.factor||1)/2,d=t.retina.maxSpeed??o.retina.maxSpeed;s.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const s={x:t.spin.direction===ws.clockwise?Math.cos:Math.sin,y:t.spin.direction===ws.clockwise?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(i.canvas.size.width,i.canvas.size.height),n=.5*o;t.spin.radius>n?(t.spin.radius=n,t.spin.acceleration*=-Yn):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-Yn),t.spin.angle+=.01*e*(Yn-t.spin.radius/o)}(t,l):Kn(t,s,l,d,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),o=Math.abs(i),n=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,c=a.vertical;if(!r&&!c)return;if((r&&o>=r||c&&n>=c)&&!t.misplaced)t.misplaced=!!r&&o>r||!!c&&n>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||o<r)&&(!c||n<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*=-L()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-L())}}(t)}}const ta=2*Math.PI,ea=0,ia=0;class sa{constructor(){this.validTypes=["circle"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:ta});const o=i.circleRange;e.arc(ea,ia,s,o.min,o.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=x(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}class oa{constructor(t){this.container=t}init(t){const e=te(t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=pe(e,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:o}=t;return!t.destroyed&&!t.spawning&&(void 0!==o?.h.value&&e.enable||void 0!==o?.s.value&&i.enable||void 0!==o?.l.value&&s.enable)}update(t,e){ye(t.color,e)}}class na{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=Ht(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/g*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=L()))}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&&Nt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}class aa{constructor(t){this.container=t,this.modes=[ei.bounce,ei.split]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const s of o.plugins.values())if(void 0!==s.particleBounce&&(n=s.particleBounce(t,i,e)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,c=t.getRadius(),h=Tt(a,c),l=o.canvas.size;!function(t){if(t.outMode!==ei.bounce&&t.outMode!==ei.split||t.direction!==ht.left&&t.direction!==ht.right)return;t.bounds.right<0&&t.direction===ht.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===ht.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===ht.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===ht.left&&t.bounds.left<=0&&e<0){const e=$(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===ht.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===ht.left&&(t.particle.position.x=s),t.outMode===ei.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c}),function(t){if(t.outMode!==ei.bounce&&t.outMode!==ei.split||t.direction!==ht.bottom&&t.direction!==ht.top)return;t.bounds.bottom<0&&t.direction===ht.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===ht.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===ht.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===ht.top&&t.bounds.top<=0&&e<0){const e=$(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===ht.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===ht.top&&(t.particle.position.y=s),t.outMode===ei.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:h,canvasSize:l,offset:r,size:c})}}class ra{constructor(t){this.container=t,this.modes=[ei.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case oi.normal:case oi.outside:if(Ct(t.position,o.canvas.size,M.origin,t.getRadius(),e))return;break;case oi.inside:{const{dx:e,dy:i}=W(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&e>t.moveCenter.radius||o<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||o>=0&&i<-t.moveCenter.radius)return;break}}o.particles.remove(t,t.group,!0)}}class ca{constructor(t){this.container=t,this.modes=[ei.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===ht.left||e===ht.right))??(t.options.move.distance.vertical&&(e===ht.top||e===ht.bottom)))return;const o=t.options.move.gravity,n=this.container,a=n.canvas.size,r=t.getRadius();if(o.enable){const i=t.position;(!o.inverse&&i.y>a.height+r&&e===ht.bottom||o.inverse&&i.y<-r&&e===ht.top)&&n.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;Ct(t.position,n.canvas.size,M.origin,r,e)||n.particles.remove(t)}}}class ha{constructor(t){this.container=t,this.modes=[ei.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const o=this.container;switch(t.outType){case oi.inside:{const{x:e,y:i}=t.velocity,s=M.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(M.create(t.moveCenter));const{dx:n,dy:a}=W(t.position,s);if(e<=0&&n>=0||i<=0&&a>=0||e>=0&&n<=0||i>=0&&a<=0)return;t.position.x=Math.floor(N({min:0,max:o.canvas.size.width})),t.position.y=Math.floor(N({min:0,max:o.canvas.size.height}));const{dx:r,dy:c}=W(t.position,t.moveCenter);t.direction=Math.atan2(-c,-r),t.velocity.angle=t.direction;break}default:if(Ct(t.position,o.canvas.size,M.origin,t.getRadius(),e))return;switch(t.outType){case oi.outside:{t.position.x=Math.floor(N({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(N({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case oi.normal:{const i=t.options.move.warp,s=o.canvas.size,n={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=Tt(t.position,a);e===ht.right&&r.left>s.width+t.offset.x?(t.position.x=n.left,t.initialPosition.x=t.position.x,i||(t.position.y=L()*s.height,t.initialPosition.y=t.position.y)):e===ht.left&&r.right<-t.offset.x&&(t.position.x=n.right,t.initialPosition.x=t.position.x,i||(t.position.y=L()*s.height,t.initialPosition.y=t.position.y)),e===ht.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=L()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.top,t.initialPosition.y=t.position.y):e===ht.top&&r.bottom<-t.offset.y&&(i||(t.position.x=L()*s.width,t.initialPosition.x=t.position.x),t.position.y=n.bottom,t.initialPosition.y=t.position.y);break}}}}}class la{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 o of this.updaters.values())o.update(t,s,e,i)},this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,ei.bounce,(t=>new aa(t))),this._addUpdaterIfMissing(t,ei.out,(t=>new ha(t))),this._addUpdaterIfMissing(t,ei.destroy,(t=>new ra(t))),this._addUpdaterIfMissing(t,ei.none,(t=>new ca(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,ht.bottom),this._updateOutMode(t,e,i.left??i.default,ht.left),this._updateOutMode(t,e,i.right??i.default,ht.right),this._updateOutMode(t,e,i.top??i.default,ht.top)}}class da{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/g*e.retina.reduceFactor,i.sync||(t.size.velocity*=L()))}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)&&Nt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ua(t,e=!0){await async function(t,e=!0){await t.addMover("base",(()=>Promise.resolve(new Jn)),e)}(t,!1),await async function(t,e=!0){await t.addShape(new sa,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("color",(t=>Promise.resolve(new oa(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("opacity",(t=>Promise.resolve(new na(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("outModes",(t=>Promise.resolve(new la(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("size",(()=>Promise.resolve(new da)),e)}(t,!1),await t.refresh(e)}const pa='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';class fa{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,o=i.globalAlpha;if(!e)return;const n=e.width,a=.5*n;i.globalAlpha=s,i.drawImage(e,-a,-a,n,n),i.globalAlpha=o}(t,i)}async init(t){const e=t.actualOptions,{validTypes:i}=this;if(!i.find((t=>bt(t,e.particles.shape.type))))return;const s=[St(pa)],o=i.map((t=>e.particles.shape.options[t])).find((t=>!!t));o&&It(o,(t=>{t.font&&s.push(St(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=Lt(i.value,e.randomIndexData);if(!s)return;const o="string"==typeof s?{font:i.font??pa,padding:i.padding??0,value:s}:{font:pa,padding:0,...i,...s},n=o.font,a=o.value,r=`${a}_${n}`;if(this._emojiShapeDict.has(r))return void(e.emojiDataKey=r);const c=2*o.padding,h=j(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 ${n}`,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 ${n}`,e.textBaseline="middle",e.textAlign="center",e.fillText(a,l,l),u=t}this._emojiShapeDict.set(r,u),e.emojiDataKey=r}}const ga=1,ya=1;function va(t,e,i,s,o){const n=t.actualOptions.interactivity.modes.attract;if(!n)return;const a=t.particles.quadTree.query(s,o);for(const t of a){const{dx:s,dy:o,distance:a}=W(t.position,e),r=n.speed*n.factor,c=F(R(n.easing)(ya-a/i)*r,ga,n.maxSpeed),h=M.create(a?s/a*c:r,a?o/a*c:r);t.position.subFrom(h)}}class ma{constructor(){this.distance=200,this.duration=.4,this.easing=bs.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(t){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 wa="attract";class _a extends Ps{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===wa){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:o,mode:n}=s.onHover,{enable:a,mode:c}=s.onClick;i&&o&&bt(wa,n)?function(t,e){const i=t.interactivity.mouse.position,s=t.retina.attractModeDistance;!s||s<0||!i||va(t,i,s,new es(i.x,i.y,s),(t=>e(t)))}(this.container,(t=>this.isEnabled(t))):a&&bt(wa,c)&&function(t,e){t.attract||(t.attract={particles:[]});const{attract:i}=t;if(i.finish||(i.count||(i.count=0),i.count++,i.count===t.particles.count&&(i.finish=!0)),i.clicking){const i=t.interactivity.mouse.clickPosition,s=t.retina.attractModeDistance;if(!s||s<0||!i)return;va(t,i,s,new es(i.x,i.y,s),(t=>e(t)))}else!1===i.clicking&&(i.particles=[])}(this.container,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events;if(!(s.position&&o.onHover.enable||s.clickPosition&&o.onClick.enable))return!1;const n=o.onHover.mode,a=o.onClick.mode;return bt(wa,n)||bt(wa,a)}loadModeOptions(t,...e){t.attract||(t.attract=new ma);for(const i of e)t.attract.load(i?.attract)}reset(){}}const ba=2,Sa=.5,xa=Math.PI*Sa,Pa=2,Ca=10;function Oa(t,e,i,s,o){const n=t.particles.quadTree.query(s,o);for(const t of n)s instanceof es?Gt(zt(t),{position:e,radius:i,mass:i**ba*xa,velocity:M.origin,factor:M.origin}):s instanceof is&&Rt(t,Tt(e,i))}function Ta(t,e,i,s){Et(i,e,((e,i)=>function(t,e,i,s){const o=document.querySelectorAll(e);o.length&&o.forEach((e=>{const o=e,n=t.retina.pixelRatio,a={x:(o.offsetLeft+o.offsetWidth*Sa)*n,y:(o.offsetTop+o.offsetHeight*Sa)*n},r=o.offsetWidth*Sa*n,c=Ca*n,h=i.type===Le.circle?new es(a.x,a.y,r+c):new is(o.offsetLeft*n-c,o.offsetTop*n-c,o.offsetWidth*n+c*Pa,o.offsetHeight*n+c*Pa);s(a,r,h)}))}(t,e,i,((e,i,o)=>Oa(t,e,i,o,s)))))}class Aa{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}const Ma="bounce";class Ea extends Ps{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,o=e.onHover.mode,n=e.onDiv;i&&s&&bt(Ma,o)?function(t,e){const i=t.retina.pixelRatio,s=Ca*i,o=t.interactivity.mouse.position,n=t.retina.bounceModeDistance;!n||n<0||!o||Oa(t,o,n,new es(o.x,o.y,n+s),e)}(this.container,(t=>this.isEnabled(t))):Ta(this.container,n,Ma,(t=>this.isEnabled(t)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv;return!!s.position&&o.onHover.enable&&bt(Ma,o.onHover.mode)||Mt(Ma,n)}loadModeOptions(t,...e){t.bounce||(t.bounce=new Aa);for(const i of e)t.bounce.load(i?.bounce)}reset(){}}class Va{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(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=P(this.color)?void 0:this.color;this.color=It(t.color,(t=>De.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class ka extends Va{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class za extends Va{load(t){super.load(t),t&&(this.divs=It(t.divs,(t=>{const e=new ka;return e.load(t),e})))}}var Ga;function Ra(t,e,i,s){if(e>=i){return F(t+(e-i)*s,t,e)}if(e<i){return F(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Ga||(Ga={}));const Ia="bubble";class La extends Ps{constructor(t){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 o=t.retina.bubbleModeDistance;if(!o||o<0)return;const n=t.particles.quadTree.queryCircle(i,o,(t=>this.isEnabled(t))),{bubble:a}=t;for(const e of n){if(!a.clicking)continue;e.bubble.inRange=!a.durationEnd;const n=Z(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:j(e.options.size.value)*t.retina.pixelRatio,value:e.size.value},type:Ga.size};this._process(e,n,r,c);const h={bubbleObj:{optValue:s.opacity,value:e.bubble.opacity},particlesObj:{optValue:j(e.options.opacity.value),value:e.opacity?.value??1},type:Ga.opacity};this._process(e,n,r,h),!a.durationEnd&&n<=o?this._hoverBubbleColor(e,n):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 o of s){o.bubble.inRange=!0;const s=Z(o.getPosition(),e),a=1-s/i;s<=i?a>=0&&t.interactivity.status===r&&(this._hoverBubbleSize(o,a),this._hoverBubbleOpacity(o,a),this._hoverBubbleColor(o,a)):this.reset(o),t.interactivity.status===n&&this.reset(o)}},this._hoverBubbleColor=(t,e,i)=>{const s=this.container.actualOptions,o=i??s.interactivity.modes.bubble;if(o){if(!t.bubble.finalColor){const e=o.color;if(!e)return;const i=Lt(e);t.bubble.finalColor=te(i)}if(t.bubble.finalColor)if(o.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?ee(he(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,o=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!o)return;const n=t.options.opacity.value,a=Ra(t.opacity?.value??1,o,j(n),e);void 0!==a&&(t.bubble.opacity=a)},this._hoverBubbleSize=(t,e,i)=>{const s=this.container,o=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===o)return;const n=j(t.options.size.value)*s.retina.pixelRatio,a=Ra(t.size.value,o,n,e);void 0!==a&&(t.bubble.radius=a)},this._process=(t,e,i,s)=>{const o=this.container,n=s.bubbleObj.optValue,a=o.actualOptions.interactivity.modes.bubble;if(!a||void 0===n)return;const r=a.duration,c=o.retina.bubbleModeDistance,h=s.particlesObj.optValue,l=s.bubbleObj.value,d=s.particlesObj.value??0,u=s.type;if(c&&!(c<0)&&n!==h)if(o.bubble||(o.bubble={}),o.bubble.durationEnd)l&&(u===Ga.size&&delete t.bubble.radius,u===Ga.opacity&&delete t.bubble.opacity);else if(e<=c){if((l??d)!==n){const e=d-i*(d-n)/r;u===Ga.size&&(t.bubble.radius=e),u===Ga.opacity&&(t.bubble.opacity=e)}}else u===Ga.size&&delete t.bubble.radius,u===Ga.opacity&&delete t.bubble.opacity},this._singleSelectorHover=(t,e,i)=>{const s=this.container,o=document.querySelectorAll(e),n=s.actualOptions.interactivity.modes.bubble;n&&o.length&&o.forEach((e=>{const o=e,a=s.retina.pixelRatio,r={x:(o.offsetLeft+.5*o.offsetWidth)*a,y:(o.offsetTop+.5*o.offsetHeight)*a},c=.5*o.offsetWidth*a,h=i.type===Le.circle?new es(r.x,r.y,c):new is(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.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=kt(n.divs,o);e.bubble.div&&e.bubble.div===o||(this.clear(e,t,!0),e.bubble.div=o),this._hoverBubbleSize(e,1,i),this._hoverBubbleOpacity(e,1,i),this._hoverBubbleColor(e,1,i)}}))},t.bubble||(t.bubble={}),this.handleClickMode=e=>{e===Ia&&(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,o=i.enable,n=i.mode,a=s.enable,r=s.mode,c=e.onDiv;o&&bt(Ia,n)?this._hoverBubble():a&&bt(Ia,r)?this._clickBubble():Et(Ia,c,((e,i)=>this._singleSelectorHover(t,e,i)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,{onClick:n,onDiv:a,onHover:r}=o,c=Mt(Ia,a);return!!(c||r.enable&&s.position||n.enable&&s.clickPosition)&&(bt(Ia,r.mode)||bt(Ia,n.mode)||c)}loadModeOptions(t,...e){t.bubble||(t.bubble=new za);for(const i of e)t.bubble.load(i?.bubble)}reset(t){t.bubble.inRange=!1}}class Da{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class Ha{constructor(){this.distance=80,this.links=new Da,this.radius=60}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}const Ba=0,Fa=1;function Ua(t,e,i,s){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,e,i,s){const o=Math.floor(i.getRadius()/e.getRadius()),n=e.getFillColor(),a=i.getFillColor();if(!n||!a)return;const r=e.getPosition(),c=i.getPosition(),h=he(n,a,e.getRadius(),i.getRadius()),l=t.createLinearGradient(r.x,r.y,c.x,c.y);return l.addColorStop(Ba,ce(n,s)),l.addColorStop(F(o,Ba,Fa),re(h,s)),l.addColorStop(Fa,ce(a,s)),l}(e,i,s,o.links.opacity)}function Na(t,e,i){t.canvas.draw((s=>{const o=Ua(t,s,e,i);if(!o)return;const n=e.getPosition(),a=i.getPosition();!function(t,e,i,s,o){we(t,s,o),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,o,n,a)}))}class $a extends Ps{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 o=Math.abs(s),n=t.particles.quadTree.queryCircle(e,o,(t=>this.isEnabled(t)));n.forEach(((e,s)=>{const o=e.getPosition();for(const a of n.slice(s+1)){const s=a.getPosition(),n=Math.abs(i),r=Math.abs(o.x-s.x),c=Math.abs(o.y-s.y);r<n&&c<n&&Na(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)&&bt("connect",s.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Ha);for(const i of e)t.connect.load(i?.connect)}reset(){}}class qa{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){t&&(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=De.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ja{constructor(){this.distance=100,this.links=new qa}load(t){t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function Qa(t,e,i,s,o){t.canvas.draw((t=>{const n=e.getPosition();!function(t,e,i,s,o,n){we(t,i,s),t.strokeStyle=re(o,n),t.lineWidth=e,t.stroke()}(t,e.retina.linksWidth??0,n,o,i,s)}))}class Wa extends Ps{constructor(t){super(t)}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 o=t.particles.quadTree.queryCircle(i,s,(t=>this.isEnabled(t)));for(const n of o){const o=Z(n.getPosition(),i);if(o>s)continue;const a=e.modes.grab.links,r=a.opacity,c=r-o*r/s;if(c<=0)continue;const h=a.color??n.options.links?.color;if(!t.particles.grabLineColor&&h){const i=e.modes.grab.links;t.particles.grabLineColor=de(h,i.blink,i.consent)}const l=le(n,void 0,t.particles.grabLineColor);l&&Qa(t,n,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&&bt("grab",s.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new ja);for(const i of e)t.grab.load(i?.grab)}reset(){}}class Za extends Ps{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 Xa{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(!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=Q(e))}}class Ya extends Ps{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=$(i.quantity);if(s<=0)return;const o=Pt([void 0,...i.groups]),n=void 0!==o?e.actualOptions.particles.groups[o]:void 0;e.particles.push(s,e.interactivity.mouse,n,o)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new Xa);for(const i of e)t.push.load(i?.push)}reset(){}}class Ka{constructor(){this.quantity=2}load(t){if(!t)return;const e=t.quantity;void 0!==e&&(this.quantity=Q(e))}}class Ja extends Ps{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const s=$(i.interactivity.modes.remove.quantity);e.particles.removeQuantity(s)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new Ka);for(const i of e)t.remove.load(i?.remove)}reset(){}}class tr{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=bs.easeOutQuad}load(t){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 er extends tr{constructor(){super(),this.selectors=[]}load(t){super.load(t),t&&void 0!==t.selectors&&(this.selectors=t.selectors)}}class ir extends tr{load(t){super.load(t),t&&(this.divs=It(t.divs,(t=>{const e=new er;return e.load(t),e})))}}const sr="repulse";class or extends Ps{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 o=Math.pow(s/6,3),n=t.interactivity.mouse.clickPosition;if(void 0===n)return;const a=new es(n.x,n.y,o),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const t of r){const{dx:s,dy:a,distance:r}=W(n,t.position),c=r**2,h=-o*e.speed/c;if(c<=o){i.particles.push(t);const e=M.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 es(e.x,e.y,i))},this._processRepulse=(t,e,i,s)=>{const o=this.container,n=o.particles.quadTree.query(i,(t=>this.isEnabled(t))),a=o.actualOptions.interactivity.modes.repulse;if(!a)return;const{easing:r,speed:c,factor:h,maxSpeed:l}=a,d=R(r),u=(s?.speed??c)*h;for(const i of n){const{dx:s,dy:o,distance:n}=W(i.position,t),a=F(d(1-n/e)*u,0,l),r=M.create(n?s/n*a:u,n?o/n*a:u);i.position.addTo(r)}},this._singleSelectorRepulse=(t,e)=>{const i=this.container,s=i.actualOptions.interactivity.modes.repulse;if(!s)return;const o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=i.retina.pixelRatio,a={x:(o.offsetLeft+.5*o.offsetWidth)*n,y:(o.offsetTop+.5*o.offsetHeight)*n},r=.5*o.offsetWidth*n,c=e.type===Le.circle?new es(a.x,a.y,r):new is(o.offsetLeft*n,o.offsetTop*n,o.offsetWidth*n,o.offsetHeight*n),h=kt(s.divs,o);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!==sr)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,o=s.onHover,n=o.enable,a=o.mode,c=s.onClick,h=c.enable,l=c.mode,d=s.onDiv;i&&n&&bt(sr,a)?this._hoverRepulse():h&&bt(sr,l)?this._clickRepulse():Et(sr,d,((t,e)=>this._singleSelectorRepulse(t,e)))}isEnabled(t){const e=this.container,i=e.actualOptions,s=e.interactivity.mouse,o=(t?.interactivity??i.interactivity).events,n=o.onDiv,a=o.onHover,r=o.onClick,c=Mt(sr,n);if(!(c||a.enable&&s.position||r.enable&&s.clickPosition))return!1;const h=a.mode,l=r.mode;return bt(sr,h)||bt(sr,l)||c}loadModeOptions(t,...e){t.repulse||(t.repulse=new ir);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}class nr{constructor(){this.factor=3,this.radius=200}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class ar extends Ps{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&&bt("slow",s.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new nr);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,o=e.retina.slowModeRadius,n=i.interactivity.modes.slow;if(!n||!o||o<0||!s)return;const a=Z(s,t.getPosition()),r=a/o,c=n.factor,{slow:h}=t;a>o||(h.inRange=!0,h.factor=r/c)}}const rr=0,cr=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function hr(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,ft().error(`${f} loading image: ${t.source}`),e()})),i.src=t.source}))}async function lr(t){if("svg"!==t.type)return void await hr(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(ft().error(`${f} Image not found`),t.error=!0),t.loading=!1}function dr(t,e,i,s){const o=function(t,e,i){const{svgData:s}=t;if(!s)return"";const o=ce(e,i);if(s.includes("fill"))return s.replace(cr,(()=>o));const n=s.indexOf(">");return`${s.substring(rr,n)} fill="${o}"${s.substring(n)}`}(t,i,s.opacity?.value??1),n={color:i,gif:e.gif,data:{...t,svgData:o},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise((e=>{const i=new Blob([o],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,a=s.createObjectURL(i),r=new Image;r.addEventListener("load",(()=>{n.loaded=!0,n.element=r,e(n),s.revokeObjectURL(a)}));r.addEventListener("error",(()=>{(async()=>{s.revokeObjectURL(a);const i={...t,error:!1,loading:!0};await hr(i),n.loaded=!0,n.element=i.element,e(n)})()})),r.src=a}))}const ur=[0,4,2,1],pr=[8,8,4,2];class fr{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 gr,yr;!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"}(gr||(gr={})),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"}(yr||(yr={}));const vr=0,mr=0,wr=0;function _r(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 br(t,e,i,s,o,n){switch(t.nextByte()){case yr.EndOfFile:return!0;case yr.Image:await async function(t,e,i,s,o,n){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=_r(t,l));const d=t=>{const{r:s,g:n,b:r}=(c?a.localColorTable:e.globalColorTable)[t];return t!==o(null)?{r:s,g:n,b:r,a:255}:{r:s,g:n,b:r,a:i?~~((s+n+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(),f=t.readSubBlocksBin(),g=1<<p,y=(t,e)=>{const i=t>>>3,s=7&t;return(f[i]+(f[i+1]<<8)+(f[i+2]<<16)&(1<<e)-1<<s)>>>s};if(h){for(let i=0,o=p+1,r=0,c=[[0]],h=0;h<4;h++){if(ur[h]<a.height){let t=0,e=0,s=!1;for(;!s;){const n=i;if(i=y(r,o),r+=o+1,i===g){o=p+1,c.length=g+2;for(let t=0;t<c.length;t++)c[t]=t<g?[t]:[]}else{i>=c.length?c.push(c[n].concat(c[n][0])):n!==g&&c.push(c[n].concat(c[i][0]));for(const s of c[i]){const{r:i,g:o,b:n,a:r}=d(s);u.data.set([i,o,n,r],ur[h]*a.width+pr[h]*e+t%(4*a.width)),t+=4}c.length===1<<o&&o<12&&o++}t===4*a.width*(e+1)&&(e++,ur[h]+pr[h]*e>=a.height&&(s=!0))}}n?.(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,o=p+1,r=0,c=-4,h=!1;const l=[[0]];for(;!h;){const t=i;if(i=y(r,o),r+=o,i===g){o=p+1,l.length=g+2;for(let t=0;t<l.length;t++)l[t]=t<g?[t]:[]}else{if(i===g+1){h=!0;break}i>=l.length?l.push(l[t].concat(l[t][0])):t!==g&&l.push(l[t].concat(l[i][0]));for(const t of l[i]){const{r:e,g:i,b:s,a:o}=d(t);u.data.set([e,i,s,o],c+=4)}l.length>=1<<o&&o<12&&o++}}a.image=u,a.bitmap=await createImageBitmap(u),n?.((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,o,n);break;case yr.Extension:!function(t,e,i,s){switch(t.nextByte()){case yr.GraphicsControlExtension:{const o=e.frames[i(!1)];t.pos++;const n=t.nextByte();o.GCreserved=(224&n)>>>5,o.disposalMethod=(28&n)>>>2,o.userInputDelayFlag=2==(2&n);const a=1==(1&n);o.delayTime=10*t.nextTwoBytes();const r=t.nextByte();a&&s(r),t.pos++;break}case yr.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case yr.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case yr.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,o);break;default:throw new EvalError("undefined block found")}return!1}async function Sr(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 o=await s.arrayBuffer(),n={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 fr(new Uint8ClampedArray(o));if("GIF89a"!==a.getString(6))throw new Error("not a supported GIF file");n.width=a.nextTwoBytes(),n.height=a.nextTwoBytes();const r=a.nextByte(),c=128==(128&r);n.colorRes=(112&r)>>>4,n.sortFlag=8==(8&r);const h=1<<1+(7&r),l=a.nextByte();n.pixelAspectRatio=a.nextByte(),0!==n.pixelAspectRatio&&(n.pixelAspectRatio=(n.pixelAspectRatio+15)/64),c&&(n.globalColorTable=_r(a,h));const d=(()=>{try{return new ImageData(n.width,n.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:f}=n.globalColorTable[l];d.data.set(c?[u,p,f,255]:[0,0,0,0]);for(let t=4;t<d.data.length;t*=2)d.data.copyWithin(t,0,t);n.backgroundImage=d;let g=-1,y=!0,v=-1;const m=t=>(t&&(y=!0),g),w=t=>(null!=t&&(v=t),v);try{do{y&&(n.frames.push({left:0,top:0,width:0,height:0,disposalMethod:gr.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),g++,v=-1,y=!1)}while(!await br(a,n,i,m,w,e));n.frames.length--;for(const t of n.frames){if(t.userInputDelayFlag&&0===t.delayTime){n.totalTime=1/0;break}n.totalTime+=t.delayTime}return n}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${g} "${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)??wr,t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await hr(t)}class xr{constructor(t){this.validTypes=["image","images"],this.loadImageShape=async t=>{if(!this._engine.loadImage)throw new Error(`${f} 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:o}=t,n=s.image,a=n?.element;if(n){if(e.globalAlpha=o,n.gif&&n.gifData)!function(t){const{context:e,radius:i,particle:s,delta:o}=t,n=s.image;if(!n?.gifData||!n.gif)return;const a=new OffscreenCanvas(n.gifData.width,n.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(vr,mr,a.width,a.height),void 0===s.gifLoopCount&&(s.gifLoopCount=n.gifLoopCount??wr);let c=s.gifFrame??0;const h={x:.5*-n.gifData.width,y:.5*-n.gifData.height},l=n.gifData.frames[c];if(void 0===s.gifTime&&(s.gifTime=0),l.bitmap){switch(e.scale(i/n.gifData.width,i/n.gifData.height),l.disposalMethod){case gr.UndefinedA:case gr.UndefinedB:case gr.UndefinedC:case gr.UndefinedD:case gr.Replace:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(vr,mr,a.width,a.height);break;case gr.Combine:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y);break;case gr.RestoreBackground:r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(vr,mr,a.width,a.height),n.gifData.globalColorTable.length?r.putImageData(n.gifData.backgroundImage,h.x,h.y):r.putImageData(n.gifData.frames[0].image,h.x+l.left,h.y+l.top);break;case gr.RestorePrevious:{const t=r.getImageData(vr,mr,a.width,a.height);r.drawImage(l.bitmap,l.left,l.top),e.drawImage(a,h.x,h.y),r.clearRect(vr,mr,a.width,a.height),r.putImageData(t,vr,mr)}}if(s.gifTime+=o.value,s.gifTime>l.delayTime){if(s.gifTime-=l.delayTime,++c>=n.gifData.frames.length){if(--s.gifLoopCount<=wr)return;c=0,r.clearRect(vr,mr,a.width,a.height)}s.gifFrame=c}e.scale(n.gifData.width/i,n.gifData.height/i)}}(t);else if(a){const t=n.ratio,s={x:-i,y:-i},o=2*i;e.drawImage(a,s.x,s.y,o,o/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 o=e.getFillColor(),n=i.find((t=>t.name===s.name||t.source===s.src));if(!n)return;const a=s.replaceColor??n.replaceColor;n.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{let t;t=n.svgData&&o?await dr(n,s,o,e):{color:o,data:n,element:n.element,gif:n.gif,gifData:n.gifData,gifLoopCount:n.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:n.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 Pr{constructor(){this.src="",this.gif=!1}load(t){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 Cr{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 Pr;e.load(t),i.push(e)}}}needsPlugin(){return!0}}const Or=3;async function Tr(t,e=!0){!function(t){t.loadImage||(t.loadImage=async e=>{if(!e.name&&!e.src)throw new Error(`${f} 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-Or),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?Sr:e.replaceColor?lr:hr,await s(i)}catch{throw new Error(`${f} ${e.name??e.src} not found`)}})}(t);const i=new Cr(t);await t.addPlugin(i,e),await t.addShape(new xr(t),e)}class Ar extends gi{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Mr extends gi{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Er{constructor(){this.count=0,this.delay=new Ar,this.duration=new Mr}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Vr{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?$(i.delay.value)*(i.delay.sync?1:L())/e.retina.reduceFactor*v:0,delayTime:0,duration:e.retina.reduceFactor?$(i.duration.value)*(i.duration.sync?1:L())/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 Er);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 o=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;o=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(t.spawning)return;if(o?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 n=Q(0,i.width),a=Q(0,i.width);t.position.x=N(n),t.position.y=N(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=$(r.delay.value)*v,s.duration=$(r.duration.value)*v)}(t,e,this.container.canvas.size)}}class kr{constructor(){this.validTypes=["line"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=o?.cap??"butt"}(t)}getSidesCount(){return 1}}class zr{init(){}isEnabled(t){return!yt()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions.interactivity.events.onHover.parallax;if(yt()||!i.enable)return;const s=i.force,o=e.interactivity.mouse.position;if(!o)return;const n=e.canvas.size,a=.5*n.width,r=.5*n.height,c=i.smooth,h=t.getRadius()/s,l=(o.x-a)*h,d=(o.y-r)*h,{offset:u}=t;u.x+=(l-u.x)/c,u.y+=(d-u.y)/c}}class Gr extends Cs{constructor(t){super(t)}clear(){}init(){}interact(t){const e=this.container;void 0===t.attractDistance&&(t.attractDistance=$(t.options.move.attract.distance)*e.retina.pixelRatio);const i=t.attractDistance,s=t.getPosition(),o=e.particles.quadTree.queryCircle(s,i);for(const e of o){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:o,dy:n}=W(s,i),a=t.options.move.attract.rotate,r=o/(1e3*a.x),c=n/(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 Rr=.5,Ir=10,Lr=0;function Dr(t,e,i,s,o,n){const a=F(t.options.collisions.absorb.speed*o.factor/Ir,Lr,s);t.size.value+=a*Rr,i.size.value-=a,s<=n&&(i.size.value=0,i.destroy())}const Hr=t=>{void 0===t.collisionMaxSpeed&&(t.collisionMaxSpeed=$(t.options.collisions.maxSpeed)),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed)};function Br(t,e){Gt(zt(t),zt(e)),Hr(t),Hr(e)}function Fr(t,e,i,s){switch(t.options.collisions.mode){case ti.absorb:!function(t,e,i,s){const o=t.getRadius(),n=e.getRadius();void 0===o&&void 0!==n?t.destroy():void 0!==o&&void 0===n?e.destroy():void 0!==o&&void 0!==n&&(o>=n?Dr(t,0,e,n,i,s):Dr(e,0,t,o,i,s))}(t,e,i,s);break;case ti.bounce:Br(t,e);break;case ti.destroy:!function(t,e){t.unbreakable||e.unbreakable||Br(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 Ur extends Cs{constructor(t){super(t)}clear(){}init(){}interact(t,e){if(t.destroyed||t.spawning)return;const i=this.container,s=t.getPosition(),o=t.getRadius(),n=i.particles.quadTree.queryCircle(s,2*o);for(const a of n){if(t===a||!a.options.collisions.enable||t.options.collisions.mode!==a.options.collisions.mode||a.destroyed||a.spawning)continue;const n=a.getPosition(),r=a.getRadius();if(Math.abs(Math.round(s.z)-Math.round(n.z))>o+r)continue;Z(s,n)>o+r||Fr(t,a,e,i.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class Nr extends es{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:o}=t;return super.contains(t)||super.contains({x:s-e,y:o})||super.contains({x:s-e,y:o-i})||super.contains({x:s,y:o-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 es(s.x,s.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new is(s.x,s.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class $r{constructor(){this.blur=5,this.color=new De,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=De.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class qr{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=De.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 jr{constructor(){this.blink=!1,this.color=new De,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new $r,this.triangles=new qr,this.width=1,this.warp=!1}load(t){t&&(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=De.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 Qr=0,Wr=0;function Zr(t,e,i,s,o){const{dx:n,dy:a,distance:r}=W(t,e);if(!o||r<=i)return r;const c={x:Math.abs(n),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 Xr extends Cs{constructor(t){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;s=de(i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s)},this.linkContainer=t}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<Qr||e.y<Wr||e.x>s.width||e.y>s.height)return;const o=t.options.links,n=o.opacity,a=t.retina.linksDistance??0,r=o.warp;let c;c=r?new Nr(e.x,e.y,a,s):new es(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||o.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<Qr||h.y<Wr||h.x>s.width||h.y>s.height)continue;const l=Zr(e,h,a,s,r&&c.warp);if(l>a)continue;const d=(1-l/a)*n;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 jr);for(const i of e)t.links.load(i?.links)}reset(){}}function Yr(t,e){const i=((s=t.map((t=>t.id))).sort(((t,e)=>t-e)),s.join("_"));var s;let o=e.get(i);return void 0===o&&(o=L(),e.set(i,o)),o}class Kr{constructor(t){this.container=t,this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const s=this.container,o=s.actualOptions,n=e.destination,a=t.getPosition(),r=n.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=Yt(l.color);L()<t&&e&&(h=e,c=$(l.opacity))}if(!h){const e=void 0!==i.id?s.particles.linksColors.get(i.id):s.particles.linksColor;h=le(t,n,e)}if(!h)return;const d=t.retina.linksWidth??0,u=t.retina.linksDistance??0,{backgroundMask:p}=o;!function(t){let e=!1;const{begin:i,end:s,maxDistance:o,context:n,canvasSize:a,width:r,backgroundMask:c,colorLine:h,opacity:l,links:d}=t;if(Z(i,s)<=o)we(n,i,s),e=!0;else if(d.warp){let t,r;const c=W(i,{x:s.x-a.width,y:s.y});if(c.distance<=o){const e=i.y-c.dy/c.dx*i.x;t={x:0,y:e},r={x:a.width,y:e}}else{const e=W(i,{x:s.x,y:s.y-a.height});if(e.distance<=o){const s=-(i.y-e.dy/e.dx*i.x)/(e.dy/e.dx);t={x:s,y:0},r={x:s,y:a.height}}else{const e=W(i,{x:s.x-a.width,y:s.y-a.height});if(e.distance<=o){const s=i.y-e.dy/e.dx*i.x;t={x:-s/(e.dy/e.dx),y:s},r={x:t.x+a.width,y:t.y+a.height}}}}t&&r&&(we(n,i,t),we(n,s,r),e=!0)}if(!e)return;n.lineWidth=r,c.enable&&(n.globalCompositeOperation=c.composite),n.strokeStyle=re(h,l);const{shadow:u}=d;if(u.enable){const t=Yt(u.color);t&&(n.shadowBlur=u.blur,n.shadowColor=re(t))}n.stroke()}({context:e,width:d,begin:a,end:r,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 o=s.triangles;if(!o.enable)return;const n=this.container,a=n.actualOptions,r=e.destination,c=i.destination,h=o.opacity??.5*(e.opacity+i.opacity);h<=0||n.canvas.draw((e=>{const i=t.getPosition(),l=r.getPosition(),d=c.getPosition(),u=t.retina.linksDistance??0;if(Z(i,l)>u||Z(d,l)>u||Z(d,i)>u)return;let p=Yt(o.color);if(!p){const e=void 0!==s.id?n.particles.linksColors.get(s.id):n.particles.linksColor;p=le(t,r,e)}p&&function(t){const{context:e,pos1:i,pos2:s,pos3:o,backgroundMask:n,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,o),n.enable&&(e.globalCompositeOperation=n.composite),e.fillStyle=re(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 o=i.destination;if(!t.links?.triangles.enable||!o.options.links?.triangles.enable)return;const n=o.links?.filter((t=>{const e=this._getLinkFrequency(o,t.destination);return o.options.links&&e<=o.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(n?.length)for(const s of n){const n=s.destination;this._getTriangleFrequency(e,o,n)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>Yr([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>Yr([t,e,i],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length)return;const o=i.filter((t=>s.links&&(s.links.frequency>=1||this._getLinkFrequency(e,t.destination)<=s.links.frequency)));for(const t of o)this._drawTriangles(s,e,t,o),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:o}=t.options.links;i.linksDistance=s*e,i.linksWidth=o*e}particleDestroyed(t){t.links=[]}}class Jr{constructor(){this.id="links"}getPlugin(t){return Promise.resolve(new Kr(t))}loadOptions(){}needsPlugin(){return!0}}async function tc(t,e=!0){await async function(t,e=!0){await t.addInteractor("particlesLinks",(async t=>Promise.resolve(new Xr(t))),e)}(t,e),await async function(t,e=!0){const i=new Jr;await t.addPlugin(i,e)}(t,e)}const ec=0,ic=0;class sc{draw(t){const{particle:e,radius:i}=t;!function(t,e,i){const{context:s}=t,o=i.count.numerator*i.count.denominator,n=i.count.numerator/i.count.denominator,a=180*(n-2)/n,r=Math.PI-X(a);if(s){s.beginPath(),s.translate(e.x,e.y),s.moveTo(ec,ic);for(let t=0;t<o;t++)s.lineTo(i.length,ic),s.translate(i.length,ic),s.rotate(r)}}(t,this.getCenter(e,i),this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}}class oc extends sc{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 nc extends sc{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 ac(t,e=!0){await async function(t,e=!0){await t.addShape(new oc,e)}(t,e),await async function(t,e=!0){await t.addShape(new nc,e)}(t,e)}class rc{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class cc extends gi{constructor(){super(),this.animation=new rc,this.direction=ws.clockwise,this.path=!1,this.value=0}load(t){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 hc=2*Math.PI;class lc{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:X($(e.value)),min:0,max:hc},t.pathRotation=e.path;let i=e.direction;if(i===ws.random){i=Math.floor(2*L())>0?ws.counterClockwise:ws.clockwise}switch(i){case ws.counterClockwise:case"counterClockwise":t.rotate.status=rt.decreasing;break;case ws.clockwise:t.rotate.status=rt.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-$(s.decay),t.rotate.velocity=$(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=L())),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 cc);for(const i of e)t.rotate.load(i?.rotate)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Nt(t,t.rotate,!1,ct.none,e),t.rotation=t.rotate.value))}}const dc=Math.sqrt(2);class uc{constructor(){this.validTypes=["edge","square"]}draw(t){!function(t){const{context:e,radius:i}=t,s=i/dc,o=2*s;e.rect(-s,-s,o,o)}(t)}getSidesCount(){return 4}}const pc=0,fc=0;class gc{constructor(){this.validTypes=["star"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t,o=i.sides,n=i.starInset??2;e.moveTo(pc,fc-s);for(let t=0;t<o;t++)e.rotate(Math.PI/o),e.lineTo(pc,fc-s*n),e.rotate(Math.PI/o),e.lineTo(pc,fc-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=$(i?.inset??2)}}class yc{constructor(t){this.container=t}init(t){const e=this.container,i=t.options,s=Lt(i.stroke,t.id,i.reduceDuplicates);t.strokeWidth=$(s.width)*e.retina.pixelRatio,t.strokeOpacity=$(s.opacity??1),t.strokeAnimation=s.color?.animation;const o=te(s.color)??t.getFillColor();o&&(t.strokeColor=pe(o,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)&&ye(t.strokeColor,e)}}async function vc(t,e=!0){await async function(t,e=!0){await t.addMover("parallax",(()=>Promise.resolve(new zr)),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalAttract",(e=>Promise.resolve(new _a(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBounce",(t=>Promise.resolve(new Ea(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalBubble",(t=>Promise.resolve(new La(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalConnect",(t=>Promise.resolve(new $a(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalGrab",(t=>Promise.resolve(new Wa(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPause",(t=>Promise.resolve(new Za(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPush",(t=>Promise.resolve(new Ya(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRemove",(t=>Promise.resolve(new Ja(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalRepulse",(e=>Promise.resolve(new or(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalSlow",(t=>Promise.resolve(new ar(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesAttract",(t=>Promise.resolve(new Gr(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesCollisions",(t=>Promise.resolve(new Ur(t))),e)}(t,!1),await tc(t,!1),await async function(){G(bs.easeInQuad,(t=>t**2)),G(bs.easeOutQuad,(t=>1-(1-t)**2)),G(bs.easeInOutQuad,(t=>t<.5?2*t**2:1-(-2*t+2)**2/2)),await Promise.resolve()}(),await async function(t,e=!0){await t.addShape(new fa,e)}(t,!1),await Tr(t,!1),await async function(t,e=!0){await t.addShape(new kr,e)}(t,!1),await ac(t,!1),await async function(t,e=!0){await t.addShape(new uc,e)}(t,!1),await async function(t,e=!0){await t.addShape(new gc,e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("life",(async t=>Promise.resolve(new Vr(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("rotate",(t=>Promise.resolve(new lc(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("strokeColor",(t=>Promise.resolve(new yc(t))),e)}(t,!1),await ua(t,e)}const mc=2,wc=.5;function _c(t,e,i,s,o,n){const a={x:-(e.length*i*wc),y:i*wc},r=i*mc;n?t.fillText(e,a.x,a.y+r*o):t.strokeText(e,a.x,a.y+r*o)}class bc{constructor(){this.validTypes=["text","character","char","multiline-text"]}draw(t){!function(t){const{context:e,particle:i,radius:s,opacity:o}=t,n=i.shapeData;if(!n)return;const a=n.value;if(void 0===a)return;void 0===i.text&&(i.text=Lt(a,i.randomIndexData));const r=i.text,c=n.style??"",h=n.weight??"400",l=Math.round(s)*mc,d=n.font??"Verdana",u=i.shapeFill,p=r?.split("\n");if(p){e.font=`${c} ${h} ${l}px "${d}"`,e.globalAlpha=o;for(let t=0;t<p.length;t++)_c(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=>bt(t,e.particles.shape.type)))){const t=i.map((t=>e.particles.shape.options[t])).find((t=>!!t)),s=[];It(t,(t=>{s.push(St(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=Lt(s,e.randomIndexData))}}var Sc;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Sc||(Sc={}));class xc{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Pc extends gi{constructor(){super(),this.animation=new xc,this.direction=Sc.clockwise,this.enable=!1,this.value=0}load(t){super.load(t),t&&(this.animation.load(t.animation),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.enable&&(this.enable=t.enable))}}const Cc=2*Math.PI;class Oc{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:X($(e.value)),sinDirection:L()>=y?1:-1,cosDirection:L()>=y?1:-1,min:0,max:Cc};let i=e.direction;if(i===Sc.random){i=Math.floor(2*L())>0?Sc.counterClockwise:Sc.clockwise}switch(i){case Sc.counterClockwise:case"counterClockwise":t.tilt.status=rt.decreasing;break;case Sc.clockwise:t.tilt.status=rt.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-$(s.decay),t.tilt.velocity=$(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.tilt.velocity*=L()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){t.tilt||(t.tilt=new Pc);for(const i of e)t.tilt.load(i?.tilt)}async update(t,e){this.isEnabled(t)&&t.tilt&&(Nt(t,t.tilt,!1,ct.none,e),await Promise.resolve())}}class Tc{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=De.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=Q(t.opacity)))}}class Ac{constructor(){this.lines=new Tc,this.particles=new Tc}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class Mc{getColorStyles(t,e,i,s){const o=t.options.twinkle;if(!o)return{};const n=o.particles,a=n.enable&&L()<n.frequency,r=t.options.zIndex,c=(1-t.zIndexFactor)**r.opacityRate,h=a?$(n.opacity)*c:s,l=te(n.color),d=l?ce(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 Ac);for(const i of e)t.twinkle.load(i?.twinkle)}async update(){await Promise.resolve()}}class Ec{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=Q(t.angle)),void 0!==t.move&&(this.move=Q(t.move)))}}class Vc{constructor(){this.distance=5,this.enable=!1,this.speed=new Ec}load(t){if(t&&(void 0!==t.distance&&(this.distance=Q(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if(b(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 kc=2*Math.PI;const zc=2*Math.PI;class Gc{constructor(t){this.container=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:L()*zc,angleSpeed:$(e.speed.angle)/360,moveSpeed:$(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=$(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 Vc);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 o=s.angleSpeed*e.factor,n=s.moveSpeed*e.factor*((t.retina.wobbleDistance??0)*e.factor)/(v/60),a=kc,{position:r}=t;s.angle+=o,s.angle>a&&(s.angle-=a),r.x+=n*Math.cos(s.angle),r.y+=n*Math.abs(Math.sin(s.angle))}(t,e)}}async function Rc(t,e=!0){await async function(t,e=!0){await t.addParticleUpdater("destroy",(e=>Promise.resolve(new Gn(t,e))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("roll",(()=>Promise.resolve(new Xn)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("tilt",(t=>Promise.resolve(new Oc(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("twinkle",(()=>Promise.resolve(new Mc)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("wobble",(t=>Promise.resolve(new Gc(t))),e)}(t,!1),await async function(t,e=!0){await t.addShape(new bc,e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalTrail",(t=>Promise.resolve(new qn(t))),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new bn,e)}(t,!1),await async function(t,e=!0){t.emitterShapeManager||(t.emitterShapeManager=new Mo(t)),t.addEmitterShapeGenerator||(t.addEmitterShapeGenerator=(e,i)=>{t.emitterShapeManager?.addShapeGenerator(e,i)});const i=new To(t);await t.addPlugin(i,e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("circle",new Dn),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("square",new Un),await i.refresh(e)}(t,!1),await vc(t,e)}class Ic{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1,this.startValue=dt.random}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.sync&&(this.sync=t.sync),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)))}}class Lc{constructor(){this.value=0,this.animation=new Ic}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=Q(t.value)))}}class Dc{constructor(){this.stop=0,this.value=new ui}load(t){t&&(void 0!==t.stop&&(this.stop=t.stop),this.value=ui.create(this.value,t.value),void 0!==t.opacity&&(this.opacity=new Lc,b(t.opacity)?this.opacity.value=t.opacity:this.opacity.load(t.opacity)))}}class Hc{constructor(){this.count=0,this.enable=!1,this.speed=0,this.decay=0,this.delay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=Q(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=Q(t.speed)),void 0!==t.decay&&(this.decay=Q(t.decay)),void 0!==t.delay&&(this.delay=Q(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Bc{constructor(){this.value=0,this.animation=new Hc,this.direction=ws.clockwise}load(t){t&&(this.animation.load(t.animation),void 0!==t.value&&(this.value=Q(t.value)),void 0!==t.direction&&(this.direction=t.direction))}}class Fc{constructor(){this.angle=new Bc,this.colors=[],this.type=_s.random}load(t){t&&(this.angle.load(t.angle),void 0!==t.colors&&(this.colors=t.colors.map((t=>{const e=new Dc;return e.load(t),e}))),void 0!==t.type&&(this.type=t.type))}}const Uc=2*Math.PI;class Nc{getColorStyles(t,e,i,s){const o=t.gradient;if(!o)return{};const n=o.angle.value,a=0,r=0,c=o.type===_s.radial?e.createRadialGradient(a,r,0,a,r,i):e.createLinearGradient(Math.cos(n)*-i,Math.sin(n)*-i,Math.cos(n)*i,Math.sin(n)*i);for(const{stop:t,value:e,opacity:i}of o.colors)c.addColorStop(t,ce({h:e.h.value,s:e.s.value,l:e.l.value},i?.value??s));return{fill:c}}init(t){const e=Lt(t.options.gradient);if(!e)return;const{angle:i}=e;t.gradient={angle:{value:$(i.value),enable:i.animation.enable,velocity:$(i.animation.speed)/360*t.container.retina.reduceFactor,decay:1-$(i.animation.decay),delayTime:$(i.animation.delay)*v,max:Uc,min:0,time:0},type:e.type,colors:[]};let s=e.angle.direction;switch(s===ws.random&&(s=L()>y?ws.counterClockwise:ws.clockwise),s){case ws.counterClockwise:case"counterClockwise":t.gradient.angle.status=rt.decreasing;break;case ws.clockwise:t.gradient.angle.status=rt.increasing}const o=t.options.reduceDuplicates;for(const i of e.colors){const e=te(i.value,t.id,o);if(!e)continue;const s=pe(e,i.value.animation,t.container.retina.reduceFactor),n={stop:i.stop,value:s,opacity:i.opacity?{enable:i.opacity.animation.enable,max:j(i.opacity.value),min:q(i.opacity.value),status:rt.increasing,value:$(i.opacity.value),velocity:$(i.opacity.animation.speed)/g*t.container.retina.reduceFactor,decay:1-$(i.opacity.animation.decay),delayTime:$(i.opacity.animation.delay)*v,time:0}:void 0},{opacity:a}=n;if(i.opacity&&a){const t=i.opacity.value;a.min=q(t),a.max=j(t);switch(i.opacity.animation.startValue){case dt.min:a.value=a.min,a.status=rt.increasing;break;case dt.max:a.value=a.max,a.status=rt.decreasing;break;case dt.random:default:a.value=N(a),a.status=L()>=y?rt.increasing:rt.decreasing}}t.gradient.colors.push(n)}}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=It(e,(t=>{const e=new Fc;return e.load(t),e})))}}update(t,e){!function(t,e){const{gradient:i}=t;if(i){Nt(t,i.angle,!1,ct.none,e);for(const s of i.colors)ye(s.value,e),s.opacity&&Nt(t,s.opacity,!0,ct.none,e)}}(t,e)}}class $c{constructor(){this.validTypes=["heart"]}draw(t){!function(t){const{context:e,radius:i}=t,s=2*i,o=.5*i,n=i+o,a=-i,r=-i;e.moveTo(a,r+o),e.quadraticCurveTo(a,r,a+o,r),e.quadraticCurveTo(a+i,r,a+i,r+o),e.quadraticCurveTo(a+i,r,a+n,r),e.quadraticCurveTo(a+s,r,a+s,r+o),e.quadraticCurveTo(a+s,r+i,a+n,r+n),e.lineTo(a+i,r+s),e.lineTo(a+o,r+n),e.quadraticCurveTo(a,r+i,a,r+o)}(t)}}const qc=255;function jc(t){const e={b:0,g:0,r:0},i=t.h/60,s=t.s/g,o=t.v/g,n=o*s,a=n*(1-Math.abs(i%2-1));let r;if(i>=0&&i<=1?r={r:n,g:a,b:0}:i>1&&i<=2?r={r:a,g:n,b:0}:i>2&&i<=3?r={r:0,g:n,b:a}:i>3&&i<=4?r={r:0,g:a,b:n}:i>4&&i<=5?r={r:a,g:0,b:n}:i>5&&i<=6&&(r={r:n,g:0,b:a}),r){const t=o-n;e.r=Math.floor((r.r+t)*qc),e.g=Math.floor((r.g+t)*qc),e.b=Math.floor((r.b+t)*qc)}return e}class Qc{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 jc(e)}handleRangeColor(t){const e=t.value.hsv??t.value;if(void 0!==e.h&&void 0!==e.v)return jc({h:$(e.h),s:$(e.s),v:$(e.v)})}parseString(t){if(!t.startsWith("hsv"))return;const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t),i=1,s=2,o=3,n=5;return e?{a:(a={a:e.length>4?nt(e[n]):1,h:parseInt(e[i],10),s:parseInt(e[s],10),v:parseInt(e[o],10)}).a,...jc(a)}:void 0;var a}}function Wc(){return Zt(new Qc),Promise.resolve()}class Zc{constructor(){this.color=new De,this.color.value="#ff0000",this.radius=0,this.rate=1}load(t){void 0!==t&&(void 0!==t.color&&(this.color=De.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 Xc{constructor(){this.cure=!1,this.delay=0,this.enable=!1,this.infections=0,this.stages=[]}load(t){void 0!==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 Zc;return e.load(t),e}))))}}class Yc{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 o=i.stages,n=o.length;if(void 0!==s.delay&&void 0!==s.delayStage){const t=s.delayStage;if(t>n||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=o[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 Kc{constructor(t){this._container=t,this._container.infecter=new Yc(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=Pt(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 Jc{constructor(){this.id="infection"}getPlugin(t){return Promise.resolve(new Kc(t))}loadOptions(t,e){if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;let i=t.infection;void 0===i?.load&&(t.infection=i=new Xc),i.load(e?.infection)}needsPlugin(t){return t?.infection?.enable??!1}}class th extends Cs{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,o=s.actualOptions.infection;if(!o?.enable||o.stages.length<1)return;const n=o.stages[t.infection.stage],a=s.retina.pixelRatio,r=2*t.getRadius()+n.radius*a,c=t.getPosition(),h=n.infectedStage??t.infection.stage,l=s.particles.quadTree.queryCircle(c,r),d=n.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||L()>=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=o.stages[s.infection.stage],n=e?.infectedStage??s.infection.stage;i.updateInfectionStage(t,n)}}}isEnabled(){return this.container.actualOptions?.infection?.enable??!1}reset(){}}const eh=0,ih=0;class sh{constructor(){this.validTypes=["infinity"]}draw(t){!function(t){const{context:e,radius:i}=t,s=.55*i;e.moveTo(eh,ih),e.bezierCurveTo(s,-i,s,i,eh,ih),e.moveTo(eh,ih),e.bezierCurveTo(-s,-i,eh-s,i,eh,ih)}(t)}}const oh=1,nh=0,ah=.5*Math.PI,rh=2*Math.PI,ch=.25*Math.PI,hh="light";class lh{constructor(){this.start=new De,this.stop=new De,this.start.value="#ffffff",this.stop.value="#000000"}load(t){t&&(this.start=De.create(this.start,t.start),this.stop=De.create(this.stop,t.stop))}}class dh{constructor(){this.gradient=new lh,this.radius=1e3}load(t){t&&(this.gradient.load(t.gradient),void 0!==t.radius&&(this.radius=t.radius))}}class uh{constructor(){this.color=new De,this.color.value="#000000",this.length=2e3}load(t){t&&(this.color=De.create(this.color,t.color),void 0!==t.length&&(this.length=t.length))}}class ph{constructor(){this.area=new dh,this.shadow=new uh}load(t){t&&(this.area.load(t.area),this.shadow.load(t.shadow))}}class fh extends Ps{constructor(t){super(t)}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,rh);const o=e.createRadialGradient(i.x,i.y,0,i.x,i.y,s.radius),n=t.canvas.mouseLight;n?.start&&n.stop&&(o.addColorStop(nh,re(n.start)),o.addColorStop(oh,re(n.stop)),e.fillStyle=o,e.fill())}(t,e,s)}))}isEnabled(t){const e=this.container,i=e.interactivity.mouse,s=t?.interactivity??e.actualOptions.interactivity,o=s.events;if(!o.onHover.enable||!i.position)return!1;const n=bt(hh,o.onHover.mode);if(n&&s.modes.light){const t=s.modes.light.area.gradient;e.canvas.mouseLight={start:Yt(t.start),stop:Yt(t.stop)}}return n}loadModeOptions(t,...e){t.light||(t.light=new ph);for(const i of e)t.light.load(i?.light)}reset(){}}class gh extends Cs{constructor(t){super(t)}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 o=s.mouse.position;o&&e.canvas.draw((i=>{!function(t,e,i,s){const o=i.getPosition(),n=t.actualOptions.interactivity.modes.light?.shadow;if(!n)return;const a=i.lightShadow;if(!a)return;const r=i.getRadius(),c=i.sides,h=rh/c,l=-i.rotation+ch,d=[];for(let t=0;t<c;t++)d.push({x:o.x+r*Math.sin(l+h*t)*1,y:o.y+r*Math.cos(l+h*t)*1});const u=[],p=n.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-ah),y:t.y+p*Math.cos(-e-ah)};u.push({end:i,start:t})}const f=re(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=f,e.fill()}(e,i,t,o)}))}isEnabled(t){const e=this.container,i=t.interactivity??e.actualOptions.interactivity,s=e.interactivity.mouse,o=i.events;if(!o.onHover.enable||!s.position)return!1;const n=bt(hh,o.onHover.mode);if(n&&i.modes.light){const e=i.modes.light.shadow;t.lightShadow=Yt(e.color)}return n}reset(){}}class yh{constructor(){this.factor=4,this.value=!0}load(t){t&&(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class vh{constructor(){this.disable=!1,this.reduce=new yh}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class mh{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=mt("(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 wh{constructor(t){this.id="motion",this._engine=t}getPlugin(t){return Promise.resolve(new mh(t,this._engine))}loadOptions(t,e){if(!this.needsPlugin())return;let i=t.motion;i?.load||(t.motion=i=new vh),i.load(e?.motion)}needsPlugin(){return!0}}class _h extends gi{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class bh{constructor(){this.animation=new ci,this.enable=!1,this.opacity=1,this.rotation=new _h,this.width=1}load(t){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=Q(t.opacity)),void 0!==t.width&&(this.width=Q(t.width)),void 0!==t.radius&&(this.radius=Q(t.radius)),void 0!==t.color&&(this.color=De.create(this.color,t.color)))}}var Sh;!function(t){t.front="front",t.back="back"}(Sh||(Sh={}));const xh=2*Math.PI,Ph=.5*Math.PI,Ch=Math.PI+Ph;class Oh{constructor(t){this.container=t}afterDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Sh.front)}beforeDraw(t){const e=t.options.orbit;e?.enable&&this.drawOrbit(t,Sh.back)}drawOrbit(t,e){const i=this.container;let s,o;switch(e){case Sh.back:s=Ph,o=Ch;break;case Sh.front:s=Ch,o=Ph;break;default:s=0,o=xh}i.canvas.draw((e=>{!function(t,e,i,s,o,n,a,r,c){if(n<=0)return;const h=e.getPosition();i&&(t.strokeStyle=ce(i,o)),t.lineWidth=n;const l=X(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,o)}))}init(t){const e=this.container,i=t.options.orbit;i?.enable&&(t.orbitRotation=$(i.rotation.value),t.orbitColor=te(i.color),t.retina.orbitRadius=void 0!==i.radius?$(i.radius)*e.retina.pixelRatio:void 0,e.retina.orbitRadius=t.retina.orbitRadius,t.orbitAnimationSpeed=i.animation.enable?$(i.animation.speed):0,t.orbitWidth=$(i.width),t.orbitOpacity=$(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 bh);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/xh)*e.factor)}}class Th extends gi{constructor(){super(),this.enabled=!1,this.distance=1,this.duration=1,this.factor=1,this.speed=1}load(t){super.load(t),t&&(void 0!==t.enabled&&(this.enabled=t.enabled),void 0!==t.distance&&(this.distance=Q(t.distance)),void 0!==t.duration&&(this.duration=Q(t.duration)),void 0!==t.factor&&(this.factor=Q(t.factor)),void 0!==t.speed&&(this.speed=Q(t.speed)))}}class Ah extends Cs{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:$(i.distance)*e.retina.pixelRatio,speed:$(i.speed),factor:$(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:o,dy:n,distance:a}=W(s,i),r=t.repulse.speed*t.repulse.factor;if(a>0){const i=F((1-Math.pow(a/t.repulse.distance,2))*r,0,r),s=M.create(o/a*i,n/a*i);e.position.addTo(s)}else{const t=M.create(r,r);e.position.addTo(t)}}}isEnabled(t){return t.options.repulse?.enabled??!1}loadParticlesOptions(t,...e){t.repulse||(t.repulse=new Th);for(const i of e)t.repulse.load(i?.repulse)}reset(){}}var Mh;!function(t){t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Mh||(Mh={}));class Eh{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],o=1,n=2,a=3;switch(s.type){case Mh.line:t.lineTo(i.x*e,i.y*e);break;case Mh.bezier:t.bezierCurveTo(s.values[o].x*e,s.values[o].y*e,s.values[n].x*e,s.values[n].y*e,s.values[a].x*e,s.values[a].y*e);break;case Mh.quadratic:t.quadraticCurveTo(s.values[o].x*e,s.values[o].y*e,s.values[n].x*e,s.values[n].y*e);break;case Mh.arc:t.arc(i.x*e,i.y*e,s.values[o].x*e,s.values[n].x,s.values[n].y);break;case Mh.ellipse:t.ellipse(i.x*e,i.y*e,s.values[o].x*e,s.values[o].y*e,s.values[n].x,s.values[a].x,s.values[a].y)}}if(!i.half)return;for(let s=i.segments.length-1;s>=0;s--){const o=i.segments[s],n=o.values[0],a=1,r=2;switch(o.type){case Mh.line:t.lineTo(n.x*-e,n.y*e);break;case Mh.bezier:t.bezierCurveTo(-o.values[r].x*e,o.values[r].y*e,-o.values[a].x*e,o.values[a].y*e,n.x*e,n.y*e);break;case Mh.quadratic:t.quadraticCurveTo(-o.values[a].x*e,o.values[a].y*e,-o.values[r].x*e,o.values[r].y*e);case Mh.arc:case Mh.ellipse:}}}(e,s,i.pathData)}particleInit(t,e){const i=e.shapeData;i&&(e.pathData=At({},i))}}class Vh{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 kh{constructor(){this._grad3=[new Vh(1,1,0),new Vh(-1,1,0),new Vh(1,-1,0),new Vh(-1,-1,0),new Vh(1,0,1),new Vh(-1,0,1),new Vh(1,0,-1),new Vh(-1,0,-1),new Vh(0,1,1),new Vh(0,-1,1),new Vh(0,1,-1),new Vh(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 o=Math.floor(t),n=Math.floor(e);t-=o,e-=n,o&=255,n&=255;const a=i[o+s[n]].dot2(t,e),r=i[o+s[n+1]].dot2(t,e-1),c=i[o+1+s[n]].dot2(t-1,e),h=i[o+1+s[n+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:o}=this;let n=Math.floor(t),a=Math.floor(e),r=Math.floor(i);t-=n,e-=a,i-=r,n&=255,a&=255,r&=255;const c=s[n+o[a+o[r]]].dot3(t,e,i),h=s[n+o[a+o[r+1]]].dot3(t,e,i-1),l=s[n+o[a+1+o[r]]].dot3(t,e-1,i),d=s[n+o[a+1+o[r+1]]].dot3(t,e-1,i-1),u=s[n+1+o[a+o[r]]].dot3(t-1,e,i),p=s[n+1+o[a+o[r+1]]].dot3(t-1,e,i-1),f=s[n+1+o[a+1+o[r]]].dot3(t-1,e-1,i),g=s[n+1+o[a+1+o[r+1]]].dot3(t-1,e-1,i-1),y=this._fade(t),v=this._fade(e),m=this._fade(i);return this._lerp(this._lerp(this._lerp(c,u,y),this._lerp(h,p,y),m),this._lerp(this._lerp(l,f,y),this._lerp(d,g,y),m),v)}seed(t){const{_grad3:e,_gradP:i,_perm:s,_p:o}=this;let n=t;n>0&&n<1&&(n*=65536),n=Math.floor(n),n<256&&(n|=n<<8);for(let t=0;t<256;t++){const a=1&t?o[t]^255&n:o[t]^n>>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 zh=2*Math.PI,Gh={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 Rh{constructor(){this._calculateField=()=>{const{field:t,noiseGen:e,options:i}=this,s=i.factor.length,o=i.factor.angle;for(let n=0;n<i.columns;n++){const a=t[n];for(let t=0;t<i.rows;t++){const r=a[t];r.length=e.noise3d(n*s+i.offset.x,t*s+i.offset.y,this.noiseZ),r.angle=e.noise3d(n*o,t*o,this.noiseZ)*zh}}},this._drawField=t=>{const{field:e,options:i}=this;for(let s=0;s<i.columns;s++){const o=e[s];for(let e=0;e<i.rows;e++){const i=o[e],{angle:n,length:a}=i;t.setTransform(1,0,0,1,s*this.options.size,e*this.options.size),t.rotate(n),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]=M.origin}},this.noiseGen=new kh,this.field=[],this.noiseZ=0,this.options=At({},Gh)}generate(t){const e=t.getPosition(),{size:i}=this.options,s=Math.max(Math.floor(e.x/i),0),o=Math.max(Math.floor(e.y/i),0),{field:n}=this;return n?.[s]?.[o]?n[s][o].copy():M.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:Gh.size,i.increment=e.increment>0?e.increment:Gh.increment,i.draw=!!e.draw;const s=e.offset;i.offset.x=s?.x??Gh.offset.x,i.offset.y=s?.y??Gh.offset.y;const o=e.factor;i.factor.angle=o?.angle??Gh.factor.angle,i.factor.length=o?.length??Gh.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??L()),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 Ih="perlinNoise";class Lh{constructor(){this.enable=!1,this.dimensions=2,this.radius=0,this.retries=30,this.steps=0}load(t){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 Dh=2*Math.PI;class Hh{constructor(t,e,i,s,o){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=o?{...o}: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(L()*(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*(Dh/this.retries),s=this.getRandom(this.radius,2*this.radius),o=Math.cos(i)*s,n=Math.sin(i)*s,a={x:Math.floor(t.position.x+o),y:Math.floor(t.position.y+n)},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(Z(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 Bh{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,o=t.retina.pixelRatio;if(!e?.enable)return;this._currentIndex=0,this.poissonDisc=new Hh(s,e.radius?e.radius*o:Math.max(j(i.size.value)*o,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 Fh{constructor(t){this.id="poisson",this._engine=t}getPlugin(t){return Promise.resolve(new Bh(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 Lh),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,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,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,o,n,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=s,this._y1=o,this._x2=n,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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=s,this._y1=o},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,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,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,o,n,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=s,this._r2=o,this._angle=n,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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=s,this._y2=o},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,o){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=s,this._y2=o},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,o,n){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,s,o,n)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,s,o,n){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,s,o,n)},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,o,n,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,s,o,n,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,s,o,n,a){return new window.SVGPathSegArcRel(void 0,t,e,i,s,o,n,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,o=1,n=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++,o=-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++,n=-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*=o,t&&(c*=Math.pow(10,n*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 o=new i,n=new s(t);if(!n.initialCommandIsMoveTo())return[];for(;n.hasMoreData();){const t=n.parseSegment();if(!t)return[];o.appendSegment(t)}return o.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 Uh{constructor(){this.color=new De,this.width=.5,this.opacity=1}load(t){t&&(this.color=De.create(this.color,t.color),_(this.color.value)&&(this.opacity=ie(this.color.value)??this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class Nh{constructor(){this.enable=!1,this.stroke=new Uh}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const e=t.stroke;this.stroke.load(e)}}var $h,qh,jh;!function(t){t.equidistant="equidistant",t.onePerPoint="one-per-point",t.perPoint="per-point",t.randomLength="random-length",t.randomPoint="random-point"}($h||($h={}));class Qh{constructor(){this.arrangement=$h.onePerPoint}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class Wh{constructor(){this.path=[],this.size={height:0,width:0}}load(t){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"}(qh||(qh={}));class Zh{constructor(){this.radius=10,this.type=qh.path}load(t){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"}(jh||(jh={}));class Xh{constructor(){this.draw=new Nh,this.enable=!1,this.inline=new Qh,this.move=new Zh,this.scale=1,this.type=jh.none}load(t){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!==jh.none,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&(_(t.data)?this.data=t.data:(this.data=new Wh,this.data.load(t.data))),void 0!==t.position&&(this.position=At({},t.position)))}}const Yh=0,Kh=1;function Jh(t,e,i){const s=Yt(i.color);if(!s)return;const o=e[0];t.beginPath(),t.moveTo(o.x,o.y);for(const i of e)t.lineTo(i.x,i.y);t.closePath(),t.strokeStyle=re(s),t.lineWidth=i.width,t.stroke()}function tl(t,e,i,s){const o=1,n=0,a=0,r=1;t.setTransform(o,n,a,r,s.x,s.y);const c=Yt(i.color);c&&(t.strokeStyle=re(c,i.opacity),t.lineWidth=i.width,t.stroke(e),t.resetTransform())}function el(t,e,i){const{dx:s,dy:o}=W(i,t),{dx:n,dy:a}=W(e,t),r=(s*n+o*a)/(n**2+a**2),c={x:t.x+n*r,y:t.y+a*r,isOnSegment:r>=Yh&&r<=Kh};return r<Yh?(c.x=t.x,c.y=t.y):r>Kh&&(c.x=e.x,c.y=e.y),c}function il(t,e,i){const{dx:s,dy:o}=W(t,e),n=Math.atan2(o,s),a=M.create(Math.sin(n),-Math.cos(n)),r=2*(i.x*a.x+i.y*a.y);a.multTo(r),i.subFrom(a)}const sl=`${f} No polygon data loaded.`,ol=`${f} No polygon found, you need to specify SVG url in config.`,nl=0,al=0,rl=.5;class cl{constructor(t,e){this._checkInsidePolygon=t=>{const e=this._container,i=e.actualOptions.polygon;if(!i?.enable||i.type===jh.none||i.type===jh.inline)return!0;if(!this.raw)throw new Error(ol);const s=e.canvas.size,o=t?.x??L()*s.width,n=t?.y??L()*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>n!=s.y>n&&o<(s.x-i.x)*(n-i.y)/(s.y-i.y)+i.x&&(a=!a)}return i.type===jh.inside?a:i.type===jh.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(),o=new Path2D,n=s.scale(this._scale);o.addPath?(o.addPath(i,n),t.path2d=o):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,o=e??!1;if(!s||void 0!==this.paths&&!o)return this.raw;const n=await fetch(s);if(!n.ok)throw new Error(`${f} occurred during polygon mask download`);return this._parseSvgPath(await n.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(sl);let i,s=0;const o=this.paths.reduce(((t,e)=>t+e.length),0)/e.particles.number.value;for(const e of this.paths){const n=o*t-s;if(n<=e.length){i=e.element.getPointAtLength(n);break}s+=e.length}const n=this._scale;return{x:(i?.x??nl)*n+(this.offset?.x??nl),y:(i?.y??al)*n+(this.offset?.y??al)}},this._getPointByIndex=t=>{if(!this.raw?.length)throw new Error(sl);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}},this._getRandomPoint=()=>{if(!this.raw?.length)throw new Error(sl);const t=Pt(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(sl);const t=Pt(this.paths),e=Math.floor(L()*t.length)+1,i=t.element.getPointAtLength(e),s=this._scale;return{x:i.x*s+(this.offset?.x??nl),y:i.y*s+(this.offset?.y??al)}},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(_(i))s=i;else{const t=t=>`<path d="${t}" />`,e=P(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,o=s.actualOptions.polygon;if(!o)return;const n=(new DOMParser).parseFromString(t,"image/svg+xml"),a=n.getElementsByTagName("svg")[0];let r=a.getElementsByTagName("path");r.length||(r=n.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=o.position??{x:50,y:50},l=s.canvas.size;return this.offset={x:l.width*h.x/g-this.dimension.width*rl,y:l.height*h.y/g-this.dimension.height*rl},function(t,e,i){const s=[];for(const o of t){const t=o.element.pathSegList,n=t?.numberOfItems??0,a={x:0,y:0};for(let o=0;o<n;o++){const n=t?.getItem(o),r=window.SVGPathSeg;switch(n?.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=n;a.x=t.x,a.y=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_ABS:a.x=n.x;break;case r.PATHSEG_LINETO_VERTICAL_ABS:a.y=n.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=n;a.x+=t.x,a.y+=t.y;break}case r.PATHSEG_LINETO_HORIZONTAL_REL:a.x+=n.x;break;case r.PATHSEG_LINETO_VERTICAL_REL:a.y+=n.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!==ht.top)return!1;if(s.type===jh.inside||s.type===jh.outside){let e,i,s;const o=t.getPosition(),n=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=el(a,h,o);const l=W(o,e);if([i,s]=[l.dx,l.dy],l.distance<n)return il(a,h,t.velocity),!0}if(e&&void 0!==i&&void 0!==s&&!this._checkInsidePolygon(o)){const i={x:1,y:1},s=2*n,a=-1;return o.x>=e.x&&(i.x=-1),o.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===jh.inline&&t.initialPosition){const e=Z(t.initialPosition,t.getPosition()),{velocity:i}=t;if(e>this._moveRadius)return i.x=i.y*rl-i.x,i.y=i.x*rl-i.y,!0}return!1},this._randomPoint=()=>{const t=this._container,e=t.actualOptions.polygon;if(!e)return;let i;if(e.type===jh.inline)switch(e.inline.arrangement){case $h.randomPoint:i=this._getRandomPoint();break;case $h.randomLength:i=this._getRandomPointByLength();break;case $h.equidistant:i=this._getEquidistantPointByIndex(t.particles.count);break;case $h.onePerPoint:case $h.perPoint:default:i=this._getPointByIndex(t.particles.count)}else{const e=t.canvas.size;i={x:L()*e.width,y:L()*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!==jh.none&&e.type!==jh.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 o=e.path2d;t&&(o&&this.offset?tl(t,o,i.stroke,this.offset):s&&Jh(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 At({},t||this._randomPoint())}particlesInitialization(){const t=this._container.actualOptions.polygon;return!(!t?.enable||t.type!==jh.inline||t.inline.arrangement!==$h.onePerPoint&&t.inline.arrangement!==$h.perPoint)&&(this._drawPoints(),!0)}resize(){const t=this._container,e=t.actualOptions.polygon;if(!e?.enable||e.type===jh.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 hl{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return Promise.resolve(new cl(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 Xh),i.load(e?.polygon)}needsPlugin(t){return t?.polygon?.enable??(void 0!==t?.polygon?.type&&t.polygon.type!==jh.none)}}class ll{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(M.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*L()|0):L()*e|0),void 0===t.hexSpeed&&(t.hexSpeed=t.velocity.length),t.hexStep%this.options.turnSteps==0&&(t.hexDirection=L()>.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 M.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 dl="polygonPathGenerator";const ul=2*Math.PI,pl=.5;class fl{constructor(){this.validTypes=["rounded-polygon"]}draw(t){const{context:e,particle:i,radius:s}=t;!function(t,e,i){let s=e[0],o=e[1];const n=e.length;t.moveTo((s.x+o.x)*pl,(s.y+o.y)*pl);for(let a=1;a<=n;a++)s=o,o=e[(a+1)%n],t.arcTo(s.x,s.y,(s.x+o.x)*pl,(s.y+o.y)*pl,i)}(e,function(t,e,i=0){const s=ul/t,o=[];for(let n=0;n<t;n++)o.push({x:Math.cos(n*s+i)*e,y:Math.sin(n*s+i)*e});return o}(i.sides,s),i.borderRadius??5)}getSidesCount(t){const e=t.shapeData;return Math.round($(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.borderRadius=Math.round($(i?.radius??5))*t.retina.pixelRatio}}const gl=Math.sqrt(2);class yl{constructor(){this.validTypes=["rounded-rect"]}draw(t){const{context:e,particle:i,radius:s}=t,o=s/gl,n=2*o,a=i.borderRadius??5;"roundRect"in e?e.roundRect(-o,-o,n,n,a):function(t,e,i,s){const o={x:-e,y:-e,height:i,width:i},n=s,a=s,r=s,c=s,{x:h,y:l,width:d,height:u}=o,p=h+d,f=l+u;t.moveTo(h+n,l),t.lineTo(p-a,l),t.quadraticCurveTo(p,l,p,l+a),t.lineTo(p,l+u-c),t.quadraticCurveTo(p,f,p-c,f),t.lineTo(h+r,f),t.quadraticCurveTo(h,f,h,f-r),t.lineTo(h,l+n),t.quadraticCurveTo(h,l,h+n,l)}(e,o,n,a)}particleInit(t,e){const i=e.shapeData;e.borderRadius=$(i?.radius??5)*t.retina.pixelRatio}}var vl;!function(t){t[t.normal=0]="normal",t[t.reverse=1]="reverse"}(vl||(vl={}));const ml=.5;class wl{constructor(){this._paths=[],this._reverse=!1,this._size={width:0,height:0},this._scale=1,this._offset={x:0,y:0,mode:lt.percent},this._width=0}generate(t,e){const i=t.container.retina.pixelRatio;void 0===t.svgDirection&&(t.svgDirection=L()>y?vl.normal:vl.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)*ml).length),void 0===t.svgStep&&(t.svgStep=N({min:0,max:this._paths[t.svgPathIndex].length})*i),void 0===t.svgOffset&&(t.svgOffset={width:N({min:-this._width*ml,max:this._width*ml})*i,height:N({min:-this._width*ml,max:this._width*ml})*i}),void 0===t.svgInitialPosition&&(t.svgInitialPosition={...t.position}),t.velocity.x=0,t.velocity.y=0,t.svgDirection===vl.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=vl.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=vl.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),o=t.container.canvas.size,n=Ft(this._offset,o),a=this._scale*i;t.position.x=(e.x-this._size.width*ml)*a+t.svgInitialPosition.x+n.x+t.svgOffset.width,t.position.y=(e.y-this._size.height*ml)*a+t.svgInitialPosition.y+n.y+t.svgOffset.height}return M.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"),o=s.getElementsByTagName("svg")[0];let n=o.getElementsByTagName("path");n.length||(n=s.getElementsByTagName("path")),this._paths=[];for(let t=0;t<n.length;t++){const e=n.item(t);e&&this._paths.push({element:e,length:e.getTotalLength()})}this._size.height=parseFloat(o.getAttribute("height")??"0"),this._size.width=parseFloat(o.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 _l="svgPathGenerator";const bl={size:20,increment:.004,columns:0,rows:0,layers:0,width:0,height:0,offset:{x:4e4,y:4e4,z:4e4}};class Sl{constructor(){const t=new ho;this._simplex=t.noise4d,this.field=[],this.noiseW=0,this.options=At({},bl)}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),o=Math.max(Math.floor(e.z/this.options.size),0),n=M.origin;return this.field?.[i]?.[s]?.[o]?(n.setTo(this.field[i][s][o]),n):n}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]=M.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:bl.size,this.options.increment=e.increment>0?e.increment:bl.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??bl.offset.x,this.options.offset.y=i?.y??bl.offset.y,this.options.offset.z=i?.z??bl.offset.z,this.options.seed=e.seed??bl.seed,this._simplex.seed(this.options.seed??L()),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 xl="simplexNoise";class Pl{constructor(){this.loop=!1,this.source=""}load(t){void 0!==t&&(x(t)?(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class Cl{constructor(){this.duration=500,this.value=[]}load(t){t&&(void 0!==t.duration&&(this.duration=t.duration),void 0!==t.value&&(this.value=t.value))}}class Ol{constructor(){this.loop=!1,this.melodies=[],this.notes=[]}load(t){void 0!==t&&(void 0!==t.loop&&(this.loop=t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ol;return e.load(t),e}))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Cl;return e.load(t),e}))))}}class Tl{constructor(){this.event=[],this.notes=[]}load(t){if(t&&(void 0!==t.event&&(this.event=t.event),void 0!==t.audio&&(P(t.audio)?this.audio=t.audio.map((t=>{const e=new Pl;return e.load(t),e})):(this.audio=new Pl,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map((t=>{const e=new Cl;return e.load(t),e}))),void 0!==t.melodies&&(this.melodies=t.melodies.map((t=>{const e=new Ol;return e.load(t),e}))),t.filter))if(_(t.filter)){const e=window[t.filter];S(e)&&(this.filter=e)}else this.filter=t.filter}}class Al{constructor(){this.width=24,this.height=24,this.style=""}load(t){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 Ml{constructor(){this.mute=new Al,this.unmute=new Al,this.volumeDown=new Al,this.volumeUp=new Al,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){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 El{constructor(){this.value=100,this.max=100,this.min=0,this.step=10}load(t){void 0!==t&&(x(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 Vl{constructor(){this.autoPlay=!0,this.enable=!1,this.events=[],this.icons=new Ml,this.volume=new El}load(t){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 Tl;return e.load(t),e}))),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}var kl,zl;!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(kl||(kl={})),function(t){t.Block="block",t.None="none"}(zl||(zl={}));const Gl=new Map;function Rl(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]||e[0],s=Gl.get(i);return s?s[parseInt(e[3]||"0")]:void 0}Gl.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),Gl.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),Gl.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),Gl.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),Gl.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),Gl.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),Gl.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),Gl.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),Gl.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),Gl.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),Gl.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),Gl.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),Gl.set("pause",[0]);let Il=!0;const Ll=()=>Il,Dl=()=>{Il=!1},Hl=1;function Bl(t){const e=document.createElement("img"),{clickCb:i,container:s,display:o,iconOptions:n,margin:a,options:r,pos:c,rightOffsets:h}=t,{width:l,path:d,style:u,svg:p}=n;!function(t,e,i,s,o,n,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-n+"px",t.style.display=s,t.style.zIndex=`${o+Hl}`,t.style.cssText+=r}(e,c.top+a,c.right-(a*(h.length+1)+l+h.reduce(((t,e)=>t+e),0)),o,r.fullScreen.zIndex+Hl,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 Fl(t){t&&t.remove()}class Ul{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 It(t.event,(t=>{this._engine.removeEventListener(t,e)}));if(s)return;if(t.audio)this._playBuffer(Lt(t.audio));else if(t.melodies){const e=Pt(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=Pt(t.notes);await this._playNote([e],0,!1)}})()};It(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(kl.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 o=It(s.value,(async(i,s)=>this._playNoteValue(t,e,s)));await(P(o)?Promise.allSettled(o):o);let n=e+1;i&&n>=t.length&&(n%=t.length),this._container.muted||await this._playNote(t,n,i)},this._playNoteValue=async(t,e,i)=>{const s=t[e];if(!s)return;const o=Lt(s.value,i,!0);try{const t=Rl(o);if(!b(t))return;await this._playFrequency(t,s.duration)}catch(t){ft().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/g,this._gain=i,this._initEvents(),this._engine.dispatchEvent(kl.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;F(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/g)},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&&Ll()){const t=()=>{removeEventListener(s,t),removeEventListener(c,t),Dl(),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=It(t.audio,(async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this._getAudioContext(),o=await s.decodeAudioData(i);this._audioMap.set(t.source,o)}));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,o={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:n,unmute:a,volumeDown:r,volumeUp:c}=i.icons,h=async()=>{await this.toggleMute()},l=i.icons.enable?zl.Block:zl.None;this._muteImg=Bl({container:t,options:e,pos:o,display:l,iconOptions:n,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._unmuteImg=Bl({container:t,options:e,pos:o,display:zl.None,iconOptions:a,margin:10,rightOffsets:[r.width,c.width],clickCb:h}),this._volumeDownImg=Bl({container:t,options:e,pos:o,display:l,iconOptions:r,margin:10,rightOffsets:[c.width],clickCb:async()=>{await this.volumeDown()}}),this._volumeUpImg=Bl({container:t,options:e,pos:o,display:l,iconOptions:c,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!Ll()&&i.autoPlay&&await this.unmute()}stop(){this._container.muted=!0,(async()=>{await this._mute(),Fl(this._muteImg),Fl(this._unmuteImg),Fl(this._volumeDownImg),Fl(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 Nl=()=>{removeEventListener(s,Nl),removeEventListener(c,Nl),Dl()};class $l{constructor(t){this.id="sounds",this._engine=t;const e={capture:!0,once:!0};addEventListener(s,Nl,e),addEventListener(c,Nl,e)}getPlugin(t){return Promise.resolve(new Ul(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 Vl),i.load(e?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}class ql{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 o=(s-i.spiralInnerRadius)/i.spiralLineSpacing;for(let t=0;t<10*o;t++){const s=t/10,o=i.spiralInnerRadius+i.spiralLineSpacing*s,n={x:o*Math.cos(s),y:o*Math.sin(s)};e.lineTo(n.x,n.y)}}(t)}particleInit(t,e){const i=t.retina.pixelRatio,s=e.shapeData;e.spiralInnerRadius=$(s?.innerRadius??1)*i,e.spiralLineSpacing=$(s?.lineSpacing??1)*i,e.spiralWidthFactor=$(s?.widthFactor??10)}}const jl=.5,Ql=0,Wl=0,Zl={a:1,b:0,c:0,d:1};class Xl{draw(t){const{context:e,radius:i,particle:s,transformData:o}=t,n=2*i,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+n,u=s.container.canvas.size.height+n;let p=c[l-1].position;for(let t=l;t>0;t--){const i=c[t-1],o=i.position,r=s.trailTransform?i.transformData??Zl:Zl;e.setTransform(r.a,r.b,r.c,r.d,o.x,o.y),e.beginPath(),e.moveTo(p.x-o.x,p.y-o.y);const h={x:(p.x+d)%d,y:(p.y+u)%u};if(Math.abs(p.x-o.x)>d*jl||Math.abs(p.y-o.y)>u*jl){p=o;continue}e.lineTo(Math.abs(p.x-o.x)>d*jl?h.x:Ql,Math.abs(p.y-o.y)>u*jl?h.y:Wl);const f=Math.max(t/l*n,a,s.trailMinWidth??-1),g=e.globalAlpha;e.globalAlpha=s.trailFade?t/l:1,e.lineWidth=s.trailMaxWidth?Math.min(f,s.trailMaxWidth):f,e.strokeStyle=i.color,e.stroke(),e.globalAlpha=g,p=o}e.setTransform(o.a,o.b,o.c,o.d,r.x,r.y)}particleInit(t,e){e.trail=[];const i=e.effectData;e.trailFade=i?.fade??!0,e.trailLength=$(i?.length??10)*t.retina.pixelRatio,e.trailMaxWidth=i?.maxWidth?$(i.maxWidth)*t.retina.pixelRatio:void 0,e.trailMinWidth=i?.minWidth?$(i.minWidth)*t.retina.pixelRatio:void 0,e.trailTransform=i?.transform??!1}}const Yl=.5*Math.PI;class Kl{constructor(){this.options={waveHeight:{min:0,max:3},waveLength:{min:0,max:5}}}generate(t,e){void 0===t.zigzag&&(t.zigzag={counter:L(),waveHeight:$(this.options.waveHeight),waveLength:$(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+Yl),t.position.y+=s*Math.sin(t.velocity.angle+Yl),M.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 Jl="zigZagPathGenerator";async function td(t,e=!0){Ms(t),await Rc(t,!1),await Wc(),await async function(){G(bs.easeInBack,(t=>2.70158*t**3-1.70158*t**2)),G(bs.easeOutBack,(t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)})),G(bs.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})),await Promise.resolve()}(),await async function(){G(bs.easeInCirc,(t=>1-Math.sqrt(1-t**2))),G(bs.easeOutCirc,(t=>Math.sqrt(1-(t-1)**2))),G(bs.easeInOutCirc,(t=>t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2)),await Promise.resolve()}(),await async function(){G(bs.easeInCubic,(t=>t**3)),G(bs.easeOutCubic,(t=>1-(1-t)**3)),G(bs.easeInOutCubic,(t=>t<.5?4*t**3:1-(-2*t+2)**3/2)),await Promise.resolve()}(),await async function(){G(bs.easeInExpo,(t=>t?2**(10*t-10):0)),G(bs.easeOutExpo,(t=>1===t?1:1-Math.pow(2,-10*t))),G(bs.easeInOutExpo,(t=>1===t?t?1:0:t?t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0)),await Promise.resolve()}(),await async function(){G(bs.easeInLinear,(t=>t)),G(bs.easeOutLinear,(t=>t)),G(bs.easeInOutLinear,(t=>t)),await Promise.resolve()}(),await async function(){G(bs.easeInQuart,(t=>t**4)),G(bs.easeOutQuart,(t=>1-(1-t)**4)),G(bs.easeInOutQuart,(t=>t<.5?8*t**4:1-(-2*t+2)**4/2)),await Promise.resolve()}(),await async function(){G(bs.easeInQuint,(t=>t**5)),G(bs.easeOutQuint,(t=>1-(1-t)**5)),G(bs.easeInOutQuint,(t=>t<.5?16*t**5:1-(-2*t+2)**5/2)),await Promise.resolve()}(),await async function(){G(bs.easeInSine,(t=>1-Math.cos(t*Math.PI/2))),G(bs.easeOutSine,(t=>Math.sin(t*Math.PI/2))),G(bs.easeInOutSine,(t=>-(Math.cos(Math.PI*t)-1)/2)),await Promise.resolve()}(),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("canvas",new Ho),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("path",new jo),await i.refresh(e)}(t,!1),await async function(t,e=!0){const i=t;i.addEmitterShapeGenerator?.("polygon",new Ko),await i.refresh(e)}(t,!1),await Wc(),await async function(t,e=!0){await t.addPlugin(new Qs,e)}(t,!1),await async function(t,e=!0){const i=new Jc;await t.addPlugin(i,e),await t.addInteractor("particlesInfection",(t=>Promise.resolve(new th(t))),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new wh(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new hl(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new $l(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new tn(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new sn(t),e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new rn(t),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalParticle",(t=>Promise.resolve(new ln(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalPop",(t=>Promise.resolve(new dn(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("externalLight",(t=>Promise.resolve(new fh(t))),e),await t.addInteractor("particlesLight",(t=>Promise.resolve(new gh(t))),e)}(t,!1),await async function(t,e=!0){await t.addInteractor("particlesRepulse",(t=>Promise.resolve(new Ah(t))),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("gradient",(()=>Promise.resolve(new Nc)),e)}(t,!1),await async function(t,e=!0){await t.addParticleUpdater("orbit",(t=>Promise.resolve(new Oh(t))),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(yo,new go,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(po,new uo,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Ih,new Rh,e)}(t,!1),await async function(t,e=!0){await t.addPlugin(new Fh(t),e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(dl,new ll,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(_l,new wl,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(Jl,new Kl,e)}(t,!1),await async function(t,e=!0){await t.addPathGenerator(xl,new Sl,e)}(t,!1),await async function(t,e=!0){await t.addEffect("bubble",new Gs,e)}(t,!1),await async function(t,e=!0){await t.addShape(new ks,e)}(t,!1),await async function(t,e=!0){await t.addShape(new to,e),await t.addShape(new Js,e),await t.addShape(new Ks,e),await t.addShape(new Ys,e)}(t,!1),await async function(t,e=!0){await t.addShape(new oo,e)}(t,!1),await async function(t,e=!0){await t.addShape(new $c,e)}(t,!1),await async function(t,e=!0){await t.addShape(new sh,e)}(t,!1),await async function(t,e=!0){await t.addShape(new Eh,e)}(t,!1),await async function(t,e=!0){await t.addShape(new fl,e)}(t,!1),await async function(t,e=!0){await t.addShape(new yl,e)}(t,!1),await async function(t,e=!0){await t.addShape(new ql,e)}(t,!1),await async function(t,e=!0){await t.addEffect("trail",new Xl,e)}(t,!1),await t.refresh(e)}return e})()));
|