tsparticles 2.3.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/browser/index.js +0 -2
- package/cjs/index.js +21 -12
- package/esm/index.js +0 -2
- package/package.json +11 -12
- package/report.html +5 -4
- package/tsparticles.bundle.js +6457 -11444
- package/tsparticles.bundle.min.js +1 -1
- package/tsparticles.bundle.min.js.LICENSE.txt +1 -1
- package/tsparticles.js +20 -31
- package/tsparticles.min.js +1 -1
- package/tsparticles.min.js.LICENSE.txt +1 -1
- package/umd/index.js +1 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.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 o in i)("object"==typeof exports?exports:t)[o]=i[o]}}(this,(()=>(()=>{"use strict";var t={74:()=>{!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,o,n,s,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS,"C",t),this._x=e,this._y=i,this._x1=o,this._y1=n,this._x2=s,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,o,n,s,a){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL,"c",t),this._x=e,this._y=i,this._x1=o,this._y1=n,this._x2=s,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,o,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS,"Q",t),this._x=e,this._y=i,this._x1=o,this._y1=n},window.SVGPathSegCurvetoQuadraticAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticAbs]"},window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticRel=function(t,e,i,o,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL,"q",t),this._x=e,this._y=i,this._x1=o,this._y1=n},window.SVGPathSegCurvetoQuadraticRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticRel]"},window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x1+" "+this._y1+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticRel(void 0,this._x,this._y,this._x1,this._y1)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"x1",{get:function(){return this._x1},set:function(t){this._x1=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype,"y1",{get:function(){return this._y1},set:function(t){this._y1=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegArcAbs=function(t,e,i,o,n,s,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_ABS,"A",t),this._x=e,this._y=i,this._r1=o,this._r2=n,this._angle=s,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,o,n,s,a,r){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_ARC_REL,"a",t),this._x=e,this._y=i,this._r1=o,this._r2=n,this._angle=s,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,o,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS,"S",t),this._x=e,this._y=i,this._x2=o,this._y2=n},window.SVGPathSegCurvetoCubicSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothAbs]"},window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoCubicSmoothRel=function(t,e,i,o,n){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL,"s",t),this._x=e,this._y=i,this._x2=o,this._y2=n},window.SVGPathSegCurvetoCubicSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoCubicSmoothRel]"},window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x2+" "+this._y2+" "+this._x+" "+this._y},window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,this._x,this._y,this._x2,this._y2)},Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"x2",{get:function(){return this._x2},set:function(t){this._x2=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype,"y2",{get:function(){return this._y2},set:function(t){this._y2=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothAbs=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS,"T",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothAbs]"},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathSegCurvetoQuadraticSmoothRel=function(t,e,i){window.SVGPathSeg.call(this,window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL,"t",t),this._x=e,this._y=i},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype=Object.create(window.SVGPathSeg.prototype),window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString=function(){return"[object SVGPathSegCurvetoQuadraticSmoothRel]"},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString=function(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y},window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone=function(){return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0,this._x,this._y)},Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"x",{get:function(){return this._x},set:function(t){this._x=t,this._segmentChanged()},enumerable:!0}),Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype,"y",{get:function(){return this._y},set:function(t){this._y=t,this._segmentChanged()},enumerable:!0}),window.SVGPathElement.prototype.createSVGPathSegClosePath=function(){return new window.SVGPathSegClosePath(void 0)},window.SVGPathElement.prototype.createSVGPathSegMovetoAbs=function(t,e){return new window.SVGPathSegMovetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegMovetoRel=function(t,e){return new window.SVGPathSegMovetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoAbs=function(t,e){return new window.SVGPathSegLinetoAbs(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegLinetoRel=function(t,e){return new window.SVGPathSegLinetoRel(void 0,t,e)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs=function(t,e,i,o,n,s){return new window.SVGPathSegCurvetoCubicAbs(void 0,t,e,i,o,n,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel=function(t,e,i,o,n,s){return new window.SVGPathSegCurvetoCubicRel(void 0,t,e,i,o,n,s)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs=function(t,e,i,o){return new window.SVGPathSegCurvetoQuadraticAbs(void 0,t,e,i,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel=function(t,e,i,o){return new window.SVGPathSegCurvetoQuadraticRel(void 0,t,e,i,o)},window.SVGPathElement.prototype.createSVGPathSegArcAbs=function(t,e,i,o,n,s,a){return new window.SVGPathSegArcAbs(void 0,t,e,i,o,n,s,a)},window.SVGPathElement.prototype.createSVGPathSegArcRel=function(t,e,i,o,n,s,a){return new window.SVGPathSegArcRel(void 0,t,e,i,o,n,s,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,o){return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0,t,e,i,o)},window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel=function(t,e,i,o){return new window.SVGPathSegCurvetoCubicSmoothRel(void 0,t,e,i,o)},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(t){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||0==t.length)return[];const e=this,i=function(){this.pathSegList=[]};i.prototype.appendSegment=function(t){this.pathSegList.push(t)};const o=function(t){this._string=t,this._currentIndex=0,this._endIndex=this._string.length,this._previousCommand=window.SVGPathSeg.PATHSEG_UNKNOWN,this._skipOptionalSpaces()};o.prototype._isCurrentSpace=function(){const t=this._string[this._currentIndex];return t<=" "&&(" "==t||"\n"==t||"\t"==t||"\r"==t||"\f"==t)},o.prototype._skipOptionalSpaces=function(){for(;this._currentIndex<this._endIndex&&this._isCurrentSpace();)this._currentIndex++;return this._currentIndex<this._endIndex},o.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)},o.prototype.hasMoreData=function(){return this._currentIndex<this._endIndex},o.prototype.peekSegmentType=function(){const t=this._string[this._currentIndex];return this._pathSegTypeFromChar(t)},o.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}},o.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},o.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},o.prototype._parseNumber=function(){let t=0,e=0,i=1,o=0,n=1,s=1;const a=this._currentIndex;if(this._skipOptionalSpaces(),this._currentIndex<this._endIndex&&"+"==this._string.charAt(this._currentIndex)?this._currentIndex++:this._currentIndex<this._endIndex&&"-"==this._string.charAt(this._currentIndex)&&(this._currentIndex++,n=-1),this._currentIndex==this._endIndex||(this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")&&"."!=this._string.charAt(this._currentIndex))return;const r=this._currentIndex;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)this._currentIndex++;if(this._currentIndex!=r){let t=this._currentIndex-1,i=1;for(;t>=r;)e+=i*(this._string.charAt(t--)-"0"),i*=10}if(this._currentIndex<this._endIndex&&"."==this._string.charAt(this._currentIndex)){if(this._currentIndex++,this._currentIndex>=this._endIndex||this._string.charAt(this._currentIndex)<"0"||this._string.charAt(this._currentIndex)>"9")return;for(;this._currentIndex<this._endIndex&&this._string.charAt(this._currentIndex)>="0"&&this._string.charAt(this._currentIndex)<="9";)i*=10,o+=(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++,s=-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 l=e+o;return l*=n,t&&(l*=Math.pow(10,s*t)),a!=this._currentIndex?(this._skipOptionalSpacesOrDelimiter(),l):void 0},o.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},o.prototype.parseSegment=function(){const t=this._string[this._currentIndex];let i,o=this._pathSegTypeFromChar(t);if(o==window.SVGPathSeg.PATHSEG_UNKNOWN){if(this._previousCommand==window.SVGPathSeg.PATHSEG_UNKNOWN)return null;if(o=this._nextCommandHelper(t,this._previousCommand),o==window.SVGPathSeg.PATHSEG_UNKNOWN)return null}else this._currentIndex++;switch(this._previousCommand=o,o){case window.SVGPathSeg.PATHSEG_MOVETO_REL:return new window.SVGPathSegMovetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_MOVETO_ABS:return new window.SVGPathSegMovetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_REL:return new window.SVGPathSegLinetoRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_ABS:return new window.SVGPathSegLinetoAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL:return new window.SVGPathSegLinetoHorizontalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS:return new window.SVGPathSegLinetoHorizontalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL:return new window.SVGPathSegLinetoVerticalRel(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS:return new window.SVGPathSegLinetoVerticalAbs(e,this._parseNumber());case window.SVGPathSeg.PATHSEG_CLOSEPATH:return this._skipOptionalSpaces(),new window.SVGPathSegClosePath(e);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicRel(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicAbs(e,i.x,i.y,i.x1,i.y1,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothRel(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:return i={x2:this._parseNumber(),y2:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoCubicSmoothAbs(e,i.x,i.y,i.x2,i.y2);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticRel(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegCurvetoQuadraticAbs(e,i.x,i.y,i.x1,i.y1);case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:return new window.SVGPathSegCurvetoQuadraticSmoothRel(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:return new window.SVGPathSegCurvetoQuadraticSmoothAbs(e,this._parseNumber(),this._parseNumber());case window.SVGPathSeg.PATHSEG_ARC_REL:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcRel(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);case window.SVGPathSeg.PATHSEG_ARC_ABS:return i={x1:this._parseNumber(),y1:this._parseNumber(),arcAngle:this._parseNumber(),arcLarge:this._parseArcFlag(),arcSweep:this._parseArcFlag(),x:this._parseNumber(),y:this._parseNumber()},new window.SVGPathSegArcAbs(e,i.x,i.y,i.x1,i.y1,i.arcAngle,i.arcLarge,i.arcSweep);default:throw"Unknown path seg type."}};const n=new i,s=new o(t);if(!s.initialCommandIsMoveTo())return[];for(;s.hasMoreData();){const t=s.parseSegment();if(!t)return[];n.appendSegment(t)}return n.pathSegList})}catch(t){console.warn("An error occurred in tsParticles pathseg polyfill. If the Polygon Mask is not working, please open an issue here: https://github.com/matteobruni/tsparticles",t)}}()}},e={};function i(o){var n=e[o];if(void 0!==n)return n.exports;var s=e[o]={exports:{}};return t[o](s,s.exports,i),s.exports}i.d=(t,e)=>{for(var o in e)i.o(e,o)&&!i.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return(()=>{i.r(o),i.d(o,{AnimatableColor:()=>ge,AnimationOptions:()=>Te,Background:()=>Xt,BackgroundMask:()=>Jt,BackgroundMaskCover:()=>Yt,Circle:()=>Ye,ClickEvent:()=>te,Collisions:()=>Se,CollisionsOverlap:()=>ye,ColorAnimation:()=>pe,DivEvent:()=>ee,Events:()=>ne,ExternalInteractorBase:()=>ui,FullScreen:()=>Kt,HoverEvent:()=>oe,HslAnimation:()=>ve,HslColorManager:()=>hi,Interactivity:()=>ae,ManualParticle:()=>re,Modes:()=>se,Motion:()=>ce,MotionReduce:()=>le,Move:()=>Ee,MoveAngle:()=>_e,MoveAttract:()=>Pe,MoveGravity:()=>xe,MovePath:()=>Ae,MovePathDelay:()=>Ce,MoveTrail:()=>Ve,Opacity:()=>ke,OpacityAnimation:()=>Re,Options:()=>qe,OptionsColor:()=>Zt,OutModes:()=>Oe,Parallax:()=>ie,ParticlesBounce:()=>be,ParticlesBounceFactor:()=>me,ParticlesDensity:()=>ze,ParticlesInteractorBase:()=>pi,ParticlesNumber:()=>Me,ParticlesOptions:()=>Fe,Point:()=>Ze,Range:()=>Xe,Rectangle:()=>Je,Responsive:()=>he,RgbColorManager:()=>di,Shadow:()=>Le,Shape:()=>Ie,Size:()=>De,SizeAnimation:()=>He,Spin:()=>Ge,Stroke:()=>Be,Theme:()=>ue,ThemeDefault:()=>de,ValueWithRandom:()=>we,Vector:()=>n,Vector3d:()=>e,ZIndex:()=>Ne,addColorManager:()=>et,alterHsl:()=>Tt,animate:()=>R,areBoundsInside:()=>D,arrayRandomIndex:()=>L,calcEasing:()=>S,calcExactPositionOrRandomFromSize:()=>C,calcExactPositionOrRandomFromSizeRanged:()=>A,calcPositionFromSize:()=>_,calcPositionOrRandomFromSize:()=>P,calcPositionOrRandomFromSizeRanged:()=>x,calculateBounds:()=>B,cancelAnimation:()=>k,circleBounce:()=>W,circleBounceDataFromParticle:()=>Q,clamp:()=>l,clear:()=>Ct,collisionVelocity:()=>b,colorMix:()=>yt,colorToHsl:()=>at,colorToRgb:()=>st,deepExtend:()=>N,divMode:()=>q,divModeExecute:()=>j,drawLine:()=>_t,drawParticle:()=>At,drawParticlePlugin:()=>Et,drawPlugin:()=>Gt,drawShape:()=>Vt,drawShapeAfterEffect:()=>Ot,drawTriangle:()=>Pt,executeOnSingleOrMultiple:()=>Z,findItemFromSingleOrMultiple:()=>Y,generatedAttribute:()=>Rt,getDistance:()=>f,getDistances:()=>y,getHslAnimationFromHsl:()=>bt,getHslFromAnimation:()=>mt,getLinkColor:()=>ft,getLinkRandomColor:()=>wt,getParticleBaseVelocity:()=>m,getParticleDirectionAngle:()=>w,getRandom:()=>r,getRandomRgbColor:()=>pt,getRangeMax:()=>p,getRangeMin:()=>u,getRangeValue:()=>d,getStyleFromHsl:()=>gt,getStyleFromRgb:()=>vt,getValue:()=>g,hasMatchMedia:()=>E,hslToRgb:()=>dt,hslaToRgba:()=>ut,isDivModeEnabled:()=>F,isInArray:()=>z,isPointInside:()=>H,isSsr:()=>G,itemFromArray:()=>I,itemFromSingleOrMultiple:()=>X,loadFont:()=>M,loadFull:()=>Fn,loadOptions:()=>je,loadParticlesOptions:()=>Ue,loadSlim:()=>Rn,mix:()=>c,mouseDownEvent:()=>zt,mouseLeaveEvent:()=>Dt,mouseMoveEvent:()=>Lt,mouseOutEvent:()=>Bt,mouseUpEvent:()=>Mt,paintBase:()=>xt,parseAlpha:()=>V,randomInRange:()=>h,rangeColorToHsl:()=>rt,rangeColorToRgb:()=>nt,rectBounce:()=>$,resizeEvent:()=>Ft,rgbToHsl:()=>lt,safeMatchMedia:()=>T,setRandom:()=>a,setRangeValue:()=>v,singleDivModeExecute:()=>U,stringToAlpha:()=>ct,stringToRgb:()=>ht,touchCancelEvent:()=>Nt,touchEndEvent:()=>kt,touchMoveEvent:()=>Ht,touchStartEvent:()=>It,tsParticles:()=>yi,visibilityChangeEvent:()=>jt});class t{constructor(){this._listeners=new Map}addEventListener(t,e){var i;this.removeEventListener(t,e),this._listeners.get(t)||this._listeners.set(t,[]),null===(i=this._listeners.get(t))||void 0===i||i.push(e)}dispatchEvent(t,e){var i;null===(i=this._listeners.get(t))||void 0===i||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 o=i.length,n=i.indexOf(e);n<0||(1===o?this._listeners.delete(t):i.splice(n,1))}}class e{constructor(t,e,i){if("number"!=typeof t&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}else{if(void 0===t||void 0===e)throw new Error("tsParticles - Vector3d not initialized correctly");this.x=t,this.y=e,this.z=null!=i?i:0}}static get origin(){return e.create(0,0,0)}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 e.create(t.x,t.y,t.z)}static create(t,i,o){return new e(t,i,o)}add(t){return e.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 e.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return e.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 e.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}rotate(t){return e.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:0}sub(t){return e.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}updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class n extends e{constructor(t,e){super(t,e,0)}static get origin(){return n.create(0,0)}static clone(t){return n.create(t.x,t.y)}static create(t,e){return new n(t,e)}}let s=Math.random;function a(t=Math.random){s=t}function r(){return l(s(),0,1-1e-16)}function l(t,e,i){return Math.min(Math.max(t,e),i)}function c(t,e,i,o){return Math.floor((t*i+e*o)/(i+o))}function h(t){const e=p(t);let i=u(t);return e===i&&(i=0),r()*(e-i)+i}function d(t){return"number"==typeof t?t:h(t)}function u(t){return"number"==typeof t?t:t.min}function p(t){return"number"==typeof t?t:t.max}function v(t,e){if(t===e||void 0===e&&"number"==typeof t)return t;const i=u(t),o=p(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(o,e)}:v(i,o)}function g(t){const e=t.random,{enable:i,minimumValue:o}="boolean"==typeof e?{enable:e,minimumValue:0}:e;return d(i?v(t.value,o):t.value)}function y(t,e){const i=t.x-e.x,o=t.y-e.y;return{dx:i,dy:o,distance:Math.sqrt(i*i+o*o)}}function f(t,e){return y(t,e).distance}function w(t,e,i){if("number"==typeof t)return t*Math.PI/180;switch(t){case"top":return-Math.PI/2;case"top-right":return-Math.PI/4;case"right":return 0;case"bottom-right":return Math.PI/4;case"bottom":return Math.PI/2;case"bottom-left":return 3*Math.PI/4;case"left":return Math.PI;case"top-left":return-3*Math.PI/4;case"inside":return Math.atan2(i.y-e.y,i.x-e.x);case"outside":return Math.atan2(e.y-i.y,e.x-i.x);default:return r()*Math.PI*2}}function m(t){const e=n.origin;return e.length=1,e.angle=t,e}function b(t,e,i,o){return n.create(t.x*(i-o)/(i+o)+2*e.x*o/(i+o),t.y)}function S(t,e){switch(e){case"ease-in-quad":return t**2;case"ease-out-quad":return 1-(1-t)**2;case"ease-in-out-quad":return t<.5?2*t**2:1-(-2*t+2)**2/2;case"ease-in-cubic":return t**3;case"ease-out-cubic":return 1-(1-t)**3;case"ease-in-out-cubic":return t<.5?4*t**3:1-(-2*t+2)**3/2;case"ease-in-quart":return t**4;case"ease-out-quart":return 1-(1-t)**4;case"ease-in-out-quart":return t<.5?8*t**4:1-(-2*t+2)**4/2;case"ease-in-quint":return t**5;case"ease-out-quint":return 1-(1-t)**5;case"ease-in-out-quint":return t<.5?16*t**5:1-(-2*t+2)**5/2;case"ease-in-expo":return t?2**(10*t-10):0;case"ease-out-expo":return 1===t?1:1-Math.pow(2,-10*t);case"ease-in-out-expo":return t?1===t?1:t<.5?2**(20*t-10)/2:(2-2**(-20*t+10))/2:0;case"ease-in-sine":return 1-Math.cos(t*Math.PI/2);case"ease-out-sine":return Math.sin(t*Math.PI/2);case"ease-in-out-sine":return-(Math.cos(Math.PI*t)-1)/2;case"ease-in-back":{const e=1.70158;return(e+1)*t**3-e*t**2}case"ease-out-back":{const e=1.70158;return 1+(e+1)*Math.pow(t-1,3)+e*Math.pow(t-1,2)}case"ease-in-out-back":{const e=1.525*1.70158;return t<.5?(2*t)**2*(2*(e+1)*t-e)/2:((2*t-2)**2*((e+1)*(2*t-2)+e)+2)/2}case"ease-in-circ":return 1-Math.sqrt(1-t**2);case"ease-out-circ":return Math.sqrt(1-(t-1)**2);case"ease-in-out-circ":return t<.5?(1-Math.sqrt(1-(2*t)**2))/2:(Math.sqrt(1-(-2*t+2)**2)+1)/2;default:return t}}function _(t){var e,i;return void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?{x:t.position.x*t.size.width/100,y:t.position.y*t.size.height/100}:void 0}function P(t){var e,i,o,n;return{x:(null!==(i=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==i?i:100*r())*t.size.width/100,y:(null!==(n=null===(o=t.position)||void 0===o?void 0:o.y)&&void 0!==n?n:100*r())*t.size.height/100}}function x(t){var e,i;const o={x:void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)?d(t.position.x):void 0,y:void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?d(t.position.y):void 0};return P({size:t.size,position:o})}function C(t){var e,i,o,n;return{x:null!==(i=null===(e=t.position)||void 0===e?void 0:e.x)&&void 0!==i?i:r()*t.size.width,y:null!==(n=null===(o=t.position)||void 0===o?void 0:o.y)&&void 0!==n?n:r()*t.size.height}}function A(t){var e,i;const o={x:void 0!==(null===(e=t.position)||void 0===e?void 0:e.x)?d(t.position.x):void 0,y:void 0!==(null===(i=t.position)||void 0===i?void 0:i.y)?d(t.position.y):void 0};return C({size:t.size,position:o})}function V(t){return t.endsWith("%")?parseFloat(t)/100:parseFloat(t)}function O(t,e,i,o,n,s){const a={bounced:!1};return e.min<o.min||e.min>o.max||e.max<o.min||e.max>o.max||(t.max>=i.min&&t.max<=(i.max+i.min)/2&&n>0||t.min<=i.max&&t.min>(i.max+i.min)/2&&n<0)&&(a.velocity=n*-s,a.bounced=!0),a}function G(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function E(){return!G()&&"undefined"!=typeof matchMedia}function T(t){if(E())return matchMedia(t)}function R(){return G()?t=>setTimeout(t):t=>(requestAnimationFrame||setTimeout)(t)}function k(){return G()?t=>clearTimeout(t):t=>(cancelAnimationFrame||clearTimeout)(t)}function z(t,e){return t===e||e instanceof Array&&e.indexOf(t)>-1}async function M(t,e){try{await document.fonts.load(`${null!=e?e:"400"} 36px '${null!=t?t:"Verdana"}'`)}catch(t){}}function L(t){return Math.floor(r()*t.length)}function I(t,e,i=!0){return t[void 0!==e&&i?e%t.length:L(t)]}function H(t,e,i,o,n){return D(B(t,null!=o?o:0),e,i,n)}function D(t,e,i,o){let n=!0;return o&&"bottom"!==o||(n=t.top<e.height+i.x),!n||o&&"left"!==o||(n=t.right>i.x),!n||o&&"right"!==o||(n=t.left<e.width+i.y),!n||o&&"top"!==o||(n=t.bottom>i.y),n}function B(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function N(t,...e){for(const i of e){if(null==i)continue;if("object"!=typeof i){t=i;continue}const e=Array.isArray(i);!e||"object"==typeof t&&t&&Array.isArray(t)?e||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const o=i[e],n="object"==typeof o,s=t;s[e]=n&&Array.isArray(o)?o.map((t=>N(s[e],t))):N(s[e],o)}}return t}function F(t,e){return!!Y(e,(e=>e.enable&&z(t,e.mode)))}function j(t,e,i){Z(e,(e=>{const o=e.mode;e.enable&&z(t,o)&&U(e,i)}))}function U(t,e){Z(t.selectors,(i=>{e(i,t)}))}function q(t,e){if(e&&t)return Y(t,(t=>function(t,e){const i=Z(e,(e=>t.matches(e)));return i instanceof Array?i.some((t=>t)):i}(e,t.selectors)))}function Q(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:n.create(g(t.options.bounce.horizontal),g(t.options.bounce.vertical))}}function W(t,e){const{x:i,y:o}=t.velocity.sub(e.velocity),[n,s]=[t.position,e.position],{dx:a,dy:r}=y(s,n);if(i*a+o*r<0)return;const l=-Math.atan2(r,a),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=b(d,u,c,h),v=b(u,d,c,h),g=p.rotate(-l),f=v.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=f.x*e.factor.x,e.velocity.y=f.y*e.factor.y}function $(t,e){const i=B(t.getPosition(),t.getRadius()),o=O({min:i.left,max:i.right},{min:i.top,max:i.bottom},{min:e.left,max:e.right},{min:e.top,max:e.bottom},t.velocity.x,g(t.options.bounce.horizontal));o.bounced&&(void 0!==o.velocity&&(t.velocity.x=o.velocity),void 0!==o.position&&(t.position.x=o.position));const n=O({min:i.top,max:i.bottom},{min:i.left,max:i.right},{min:e.top,max:e.bottom},{min:e.left,max:e.right},t.velocity.y,g(t.options.bounce.vertical));n.bounced&&(void 0!==n.velocity&&(t.velocity.y=n.velocity),void 0!==n.position&&(t.position.y=n.position))}function Z(t,e){return t instanceof Array?t.map((t=>e(t))):e(t)}function X(t,e,i){return t instanceof Array?I(t,e,i):t}function Y(t,e){return t instanceof Array?t.find((t=>e(t))):e(t)?t:void 0}const J="random",K="mid",tt=new Map;function et(t){tt.set(t.key,t)}function it(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function ot(t){for(const[,e]of tt)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,o,n)=>e+e+i+i+o+o+(void 0!==n?n+n:""))),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[4]?parseInt(i[4],16)/255:1,b:parseInt(i[3],16),g:parseInt(i[2],16),r:parseInt(i[1],16)}:void 0}function nt(t,e,i=!0){if(!t)return;const o="string"==typeof t?{value:t}:t;if("string"==typeof o.value)return st(o.value,e,i);if(o.value instanceof Array)return nt({value:I(o.value,e,i)});for(const[,t]of tt){const e=t.handleRangeColor(o);if(e)return e}}function st(t,e,i=!0){if(!t)return;const o="string"==typeof t?{value:t}:t;if("string"==typeof o.value)return o.value===J?pt():ht(o.value);if(o.value instanceof Array)return st({value:I(o.value,e,i)});for(const[,t]of tt){const e=t.handleColor(o);if(e)return e}}function at(t,e,i=!0){const o=st(t,e,i);return o?lt(o):void 0}function rt(t,e,i=!0){const o=nt(t,e,i);return o?lt(o):void 0}function lt(t){const e=t.r/255,i=t.g/255,o=t.b/255,n=Math.max(e,i,o),s=Math.min(e,i,o),a={h:0,l:(n+s)/2,s:0};return n!==s&&(a.s=a.l<.5?(n-s)/(n+s):(n-s)/(2-n-s),a.h=e===n?(i-o)/(n-s):a.h=i===n?2+(o-e)/(n-s):4+(e-i)/(n-s)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function ct(t){var e;return null===(e=ot(t))||void 0===e?void 0:e.a}function ht(t){return ot(t)}function dt(t){const e={b:0,g:0,r:0},i={h:t.h/360,l:t.l/100,s:t.s/100};if(i.s){const t=i.l<.5?i.l*(1+i.s):i.l+i.s-i.l*i.s,o=2*i.l-t;e.r=it(o,t,i.h+1/3),e.g=it(o,t,i.h),e.b=it(o,t,i.h-1/3)}else e.b=i.l,e.g=i.l,e.r=i.l;return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function ut(t){const e=dt(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function pt(t){const e=null!=t?t:0;return{b:Math.floor(h(v(e,256))),g:Math.floor(h(v(e,256))),r:Math.floor(h(v(e,256)))}}function vt(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=e?e:1})`}function gt(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${null!=e?e:1})`}function yt(t,e,i,o){let n=t,s=e;return void 0===n.r&&(n=dt(t)),void 0===s.r&&(s=dt(e)),{b:c(n.b,s.b,i,o),g:c(n.g,s.g,i,o),r:c(n.r,s.r,i,o)}}function ft(t,e,i){var o,n;if(i===J)return pt();if(i!==K)return i;{const i=null!==(o=t.getFillColor())&&void 0!==o?o:t.getStrokeColor(),s=null!==(n=null==e?void 0:e.getFillColor())&&void 0!==n?n:null==e?void 0:e.getStrokeColor();if(i&&s&&e)return yt(i,s,t.getRadius(),e.getRadius());{const t=null!=i?i:s;if(t)return dt(t)}}}function wt(t,e,i){const o="string"==typeof t?t:t.value;return o===J?i?nt({value:o}):e?J:K:o===K?K:nt({value:o})}function mt(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function bt(t,e,i){const o={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(St(o.h,e.h,i),St(o.s,e.s,i),St(o.l,e.l,i)),o}function St(t,e,i){t.enable=e.enable,t.enable?(t.velocity=d(e.speed)/100*i,t.decay=1-d(e.decay),t.status=0,e.sync||(t.velocity*=r(),t.value*=r())):t.velocity=0}function _t(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Pt(t,e,i,o){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(o.x,o.y),t.closePath()}function xt(t,e,i){t.save(),t.fillStyle=null!=i?i:"rgba(0,0,0,0)",t.fillRect(0,0,e.width,e.height),t.restore()}function Ct(t,e){t.clearRect(0,0,e.width,e.height)}function At(t){var e,i,o,n,s,a,r,l,c,h;const{container:d,context:u,particle:p,delta:v,colorStyles:g,backgroundMask:y,composite:f,radius:w,opacity:m,shadow:b,transform:S}=t,_=p.getPosition();u.save(),void 0!==S.a||void 0!==S.b||void 0!==S.c||void 0!==S.d?u.setTransform(null!==(e=S.a)&&void 0!==e?e:1,null!==(i=S.b)&&void 0!==i?i:0,null!==(o=S.c)&&void 0!==o?o:0,null!==(n=S.d)&&void 0!==n?n:1,_.x,_.y):u.translate(_.x,_.y),u.beginPath();const P=p.rotation+(p.pathRotation?p.velocity.angle:0);0!==P&&u.rotate(P),y&&(u.globalCompositeOperation=f);const x=p.shadowColor;b.enable&&x&&(u.shadowBlur=b.blur,u.shadowColor=vt(x),u.shadowOffsetX=b.offset.x,u.shadowOffsetY=b.offset.y),g.fill&&(u.fillStyle=g.fill);const C=p.stroke;u.lineWidth=null!==(s=p.strokeWidth)&&void 0!==s?s:0,g.stroke&&(u.strokeStyle=g.stroke),Vt(d,u,p,w,m,v),(null!==(a=null==C?void 0:C.width)&&void 0!==a?a:0)>0&&u.stroke(),p.close&&u.closePath(),p.fill&&u.fill(),u.restore(),u.save(),void 0!==S.a||void 0!==S.b||void 0!==S.c||void 0!==S.d?u.setTransform(null!==(r=S.a)&&void 0!==r?r:1,null!==(l=S.b)&&void 0!==l?l:0,null!==(c=S.c)&&void 0!==c?c:0,null!==(h=S.d)&&void 0!==h?h:1,_.x,_.y):u.translate(_.x,_.y),p.rotation&&u.rotate(p.rotation),y&&(u.globalCompositeOperation=f),Ot(d,u,p,w,m,v),u.restore()}function Vt(t,e,i,o,n,s){if(!i.shape)return;const a=t.drawers.get(i.shape);a&&a.draw(e,i,o,n,s,t.retina.pixelRatio)}function Ot(t,e,i,o,n,s){if(!i.shape)return;const a=t.drawers.get(i.shape);(null==a?void 0:a.afterEffect)&&a.afterEffect(e,i,o,n,s,t.retina.pixelRatio)}function Gt(t,e,i){e.draw&&(t.save(),e.draw(t,i),t.restore())}function Et(t,e,i,o){e.drawParticle&&(t.save(),e.drawParticle(t,i,o),t.restore())}function Tt(t,e,i){return{h:t.h,s:t.s,l:t.l+("darken"===e?-1:1)*i}}const Rt="generated",kt="touchend",zt="pointerdown",Mt="pointerup",Lt="pointermove",It="touchstart",Ht="touchmove",Dt="pointerleave",Bt="pointerout",Nt="touchcancel",Ft="resize",jt="visibilitychange";function Ut(t,e,i){var o;const n=e[i];void 0!==n&&(t[i]=(null!==(o=t[i])&&void 0!==o?o:1)*n)}class qt{constructor(t){this.container=t,this.size={height:0,width:0},this._context=null,this._generatedCanvas=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}clear(){const t=this.container.actualOptions,e=t.particles.move.trail;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&this._trailFillColor?this._paintBase(vt(this._trailFillColor,1/e.length)):this.draw((t=>{Ct(t,this.size)}))}destroy(){var t;this._generatedCanvas?null===(t=this.element)||void 0===t||t.remove():this._resetOriginalStyle(),this.draw((t=>{Ct(t,this.size)})),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){if(this._context)return t(this._context)}drawParticle(t,e){var i;if(t.spawning||t.destroyed)return;const o=t.getRadius();if(o<=0)return;const n=t.getFillColor(),s=null!==(i=t.getStrokeColor())&&void 0!==i?i:n;let[a,r]=this._getPluginParticleColors(t);a||(a=n),r||(r=s),(a||r)&&this.draw((i=>{var n,s,l,c,h;const d=this.container.actualOptions,u=t.options.zIndex,p=(1-t.zIndexFactor)**u.opacityRate,v=null!==(l=null!==(n=t.bubble.opacity)&&void 0!==n?n:null===(s=t.opacity)||void 0===s?void 0:s.value)&&void 0!==l?l:1,g=v*p,y=(null!==(h=null===(c=t.stroke)||void 0===c?void 0:c.opacity)&&void 0!==h?h:v)*p,f={},w={fill:a?gt(a,g):void 0};w.stroke=r?gt(r,y):w.fill,this._applyPreDrawUpdaters(i,t,o,g,w,f),At({container:this.container,context:i,particle:t,delta:e,colorStyles:w,backgroundMask:d.backgroundMask.enable,composite:d.backgroundMask.composite,radius:o*(1-t.zIndexFactor)**u.sizeRate,opacity:g,shadow:t.options.shadow,transform:f}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((o=>{Et(o,t,e,i)}))}drawPlugin(t,e){this.draw((i=>{Gt(i,t,e)}))}init(){this.resize(),this._initStyle(),this._initCover(),this._initTrail(),this.initBackground(),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element,i=null==e?void 0:e.style;if(i){if(t.color){const e=nt(t.color);i.backgroundColor=e?vt(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){var e;this._generatedCanvas&&(null===(e=this.element)||void 0===e||e.remove()),this._generatedCanvas=t.dataset&&Rt in t.dataset?"true"===t.dataset[Rt]:this._generatedCanvas,this.element=t,this._originalStyle=N({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Ct(e,this.size),this._paintBase(this._coverColorStyle)):this._paintBase()}))}resize(){if(!this.element)return;const t=this.container,e=t.retina.pixelRatio,i=t.canvas.size,o=this.element.offsetWidth*e,n=this.element.offsetHeight*e;if(n===i.height&&o===i.width&&n===this.element.height&&o===this.element.width)return;const s=Object.assign({},i);this.element.width=i.width=this.element.offsetWidth*e,this.element.height=i.height=this.element.offsetHeight*e,this.container.started&&(this.resizeFactor={width:i.width/s.width,height:i.height/s.height})}async windowResize(){if(!this.element)return;this.resize();const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyPostDrawUpdaters(t){var e;for(const i of this._postDrawUpdaters)null===(e=i.afterDraw)||void 0===e||e.call(i,t)}_applyPreDrawUpdaters(t,e,i,o,n,s){var a;for(const r of this._preDrawUpdaters){if(r.getColorStyles){const{fill:s,stroke:a}=r.getColorStyles(e,t,i,o);s&&(n.fill=s),a&&(n.stroke=a)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)Ut(s,t,e)}null===(a=r.beforeDraw)||void 0===a||a.call(r,e)}}_applyResizePlugins(){var t;for(const e of this._resizePlugins)null===(t=e.resize)||void 0===t||t.call(e)}_getPluginParticleColors(t){let e,i;for(const o of this._colorPlugins)if(!e&&o.particleFillColor&&(e=rt(o.particleFillColor(t))),!i&&o.particleStrokeColor&&(i=rt(o.particleStrokeColor(t))),e&&i)break;return[e,i]}_initCover(){const t=this.container.actualOptions.backgroundMask.cover,e=nt(t.color);if(e){const i={r:e.r,g:e.g,b:e.b,a:t.opacity};this._coverColorStyle=vt(i,i.a)}}_initStyle(){const t=this.element,e=this.container.actualOptions;if(t){e.fullScreen.enable?(this._originalStyle=N({},t.style),t.style.setProperty("position","fixed","important"),t.style.setProperty("z-index",e.fullScreen.zIndex.toString(10),"important"),t.style.setProperty("top","0","important"),t.style.setProperty("left","0","important"),t.style.setProperty("width","100%","important"),t.style.setProperty("height","100%","important")):this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style)continue;const o=e.style[i];o&&t.style.setProperty(i,o,"important")}}}_initTrail(){const t=this.container.actualOptions,e=nt(t.particles.move.trail.fillColor);if(e){const i=t.particles.move.trail;this._trailFillColor={r:e.r,g:e.g,b:e.b,a:1/i.length}}}_paintBase(t){this.draw((e=>{xt(e,this.size,t)}))}_resetOriginalStyle(){const t=this.element,e=this._originalStyle;t&&e&&(t.style.position=e.position,t.style.zIndex=e.zIndex,t.style.top=e.top,t.style.left=e.left,t.style.width=e.width,t.style.height=e.height)}}function Qt(t,e,i,o,n){if(o){let o={passive:!0};"boolean"==typeof n?o.capture=n:void 0!==n&&(o=n),t.addEventListener(e,i,o)}else{const o=n;t.removeEventListener(e,i,o)}}class Wt{constructor(t){this.container=t,this.canPush=!0,this.mouseMoveHandler=t=>this.mouseTouchMove(t),this.touchStartHandler=t=>this.mouseTouchMove(t),this.touchMoveHandler=t=>this.mouseTouchMove(t),this.touchEndHandler=()=>this.mouseTouchFinish(),this.mouseLeaveHandler=()=>this.mouseTouchFinish(),this.touchCancelHandler=()=>this.mouseTouchFinish(),this.touchEndClickHandler=t=>this.mouseTouchClick(t),this.mouseUpHandler=t=>this.mouseTouchClick(t),this.mouseDownHandler=()=>this.mouseDown(),this.visibilityChangeHandler=()=>this.handleVisibilityChange(),this.themeChangeHandler=t=>this.handleThemeChange(t),this.oldThemeChangeHandler=t=>this.handleThemeChange(t),this.resizeHandler=()=>this.handleWindowResize()}addListeners(){this.manageListeners(!0)}removeListeners(){this.manageListeners(!1)}doMouseTouchClick(t){const e=this.container,i=e.actualOptions;if(this.canPush){const t=e.interactivity.mouse.position;if(!t)return;e.interactivity.mouse.clickPosition=Object.assign({},t),e.interactivity.mouse.clickTime=(new Date).getTime();Z(i.interactivity.events.onClick.mode,(t=>this.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this.mouseTouchFinish()),500)}handleClickMode(t){this.container.handleClickMode(t)}handleThemeChange(t){const e=t.matches?this.container.options.defaultDarkTheme:this.container.options.defaultLightTheme,i=this.container.options.themes.find((t=>t.name===e));i&&i.default.auto&&this.container.loadTheme(e)}handleVisibilityChange(){const t=this.container,e=t.actualOptions;this.mouseTouchFinish(),e.pauseOnBlur&&((null===document||void 0===document?void 0:document.hidden)?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))}handleWindowResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),delete this.resizeTimeout),this.resizeTimeout=setTimeout((async()=>{var t;return null===(t=this.container.canvas)||void 0===t?void 0:t.windowResize()}),500)}manageListeners(t){var e;const i=this.container,o=i.actualOptions,n=o.interactivity.detectsOn;let s=Dt;if("window"===n)i.interactivity.element=window,s=Bt;else if("parent"===n&&i.canvas.element){const t=i.canvas.element;i.interactivity.element=null!==(e=t.parentElement)&&void 0!==e?e:t.parentNode}else i.interactivity.element=i.canvas.element;const a=T("(prefers-color-scheme: dark)");a&&(void 0!==a.addEventListener?Qt(a,"change",this.themeChangeHandler,t):void 0!==a.addListener&&(t?a.addListener(this.oldThemeChangeHandler):a.removeListener(this.oldThemeChangeHandler)));const r=i.interactivity.element;if(!r)return;const l=r;(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(Qt(r,Lt,this.mouseMoveHandler,t),Qt(r,It,this.touchStartHandler,t),Qt(r,Ht,this.touchMoveHandler,t),o.interactivity.events.onClick.enable?(Qt(r,kt,this.touchEndClickHandler,t),Qt(r,Mt,this.mouseUpHandler,t),Qt(r,zt,this.mouseDownHandler,t)):Qt(r,kt,this.touchEndHandler,t),Qt(r,s,this.mouseLeaveHandler,t),Qt(r,Nt,this.touchCancelHandler,t)),i.canvas.element&&(i.canvas.element.style.pointerEvents=l===i.canvas.element?"initial":"none"),o.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(i.canvas.element&&this.resizeObserver.unobserve(i.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&i.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===i.canvas.element))&&this.handleWindowResize()})),this.resizeObserver.observe(i.canvas.element)):Qt(window,Ft,this.resizeHandler,t)),document&&Qt(document,jt,this.visibilityChangeHandler,t,!1)}mouseDown(){const t=this.container.interactivity;if(t){const e=t.mouse;e.clicking=!0,e.downPosition=e.position}}mouseTouchClick(t){const e=this.container,i=e.actualOptions,o=e.interactivity.mouse;o.inside=!0;let n=!1;const s=o.position;if(s&&i.interactivity.events.onClick.enable){for(const[,t]of e.plugins)if(t.clickPositionValid&&(n=t.clickPositionValid(s),n))break;n||this.doMouseTouchClick(t),o.clicking=!1}}mouseTouchFinish(){const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Dt,e.inside=!1,e.clicking=!1}mouseTouchMove(t){var e,i,o,n,s,a,r;const l=this.container,c=l.actualOptions;if(!(null===(e=l.interactivity)||void 0===e?void 0:e.element))return;let h;l.interactivity.mouse.inside=!0;const d=l.canvas.element;if(t.type.startsWith("pointer")){this.canPush=!0;const e=t;if(l.interactivity.element===window){if(d){const t=d.getBoundingClientRect();h={x:e.clientX-t.left,y:e.clientY-t.top}}}else if("parent"===c.interactivity.detectsOn){const t=e.target,n=e.currentTarget,s=l.canvas.element;if(t&&n&&s){const i=t.getBoundingClientRect(),o=n.getBoundingClientRect(),a=s.getBoundingClientRect();h={x:e.offsetX+2*i.left-(o.left+a.left),y:e.offsetY+2*i.top-(o.top+a.top)}}else h={x:null!==(i=e.offsetX)&&void 0!==i?i:e.clientX,y:null!==(o=e.offsetY)&&void 0!==o?o:e.clientY}}else e.target===l.canvas.element&&(h={x:null!==(n=e.offsetX)&&void 0!==n?n:e.clientX,y:null!==(s=e.offsetY)&&void 0!==s?s:e.clientY})}else{this.canPush="touchmove"!==t.type;const e=t,i=e.touches[e.touches.length-1],o=null==d?void 0:d.getBoundingClientRect();h={x:i.clientX-(null!==(a=null==o?void 0:o.left)&&void 0!==a?a:0),y:i.clientY-(null!==(r=null==o?void 0:o.top)&&void 0!==r?r:0)}}const u=l.retina.pixelRatio;h&&(h.x*=u,h.y*=u),l.interactivity.mouse.position=h,l.interactivity.status=Lt}}class $t{constructor(t){this.container=t}async nextFrame(t){var e;try{const i=this.container;if(!i.smooth&&void 0!==i.lastFrameTime&&t<i.lastFrameTime+1e3/i.fpsLimit)return void i.draw(!1);null!==(e=i.lastFrameTime)&&void 0!==e||(i.lastFrameTime=t);const o=function(t,e=60,i=!1){return{value:t,factor:i?60/e:60*t/1e3}}(t-i.lastFrameTime,i.fpsLimit,i.smooth);if(i.lifeTime+=o.value,i.lastFrameTime=t,o.value>1e3)return void i.draw(!1);if(await i.particles.draw(o),i.duration>0&&i.lifeTime>i.duration)return void i.destroy();i.getAnimationStatus()&&i.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}class Zt{constructor(){this.value=""}static create(t,e){const i=new Zt;return i.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?i.load({value:e}):i.load(e)),i}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class Xt{constructor(){this.color=new Zt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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 Yt{constructor(){this.color=new Zt,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Jt{constructor(){this.composite="destination-out",this.cover=new Yt,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="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class Kt{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 te{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))}}class ee{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get el(){return this.elementId}set el(t){this.elementId=t}get elementId(){return this.ids}set elementId(t){this.ids=t}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){var e,i;if(!t)return;const o=null!==(i=null!==(e=t.ids)&&void 0!==e?e:t.elementId)&&void 0!==i?i:t.el;void 0!==o&&(this.ids=o),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 ie{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 oe{constructor(){this.enable=!1,this.mode=[],this.parallax=new ie}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 ne{constructor(){this.onClick=new te,this.onDiv=new ee,this.onHover=new oe,this.resize=!0}get onclick(){return this.onClick}set onclick(t){this.onClick=t}get ondiv(){return this.onDiv}set ondiv(t){this.onDiv=t}get onhover(){return this.onHover}set onhover(t){this.onHover=t}load(t){var e,i,o;if(!t)return;this.onClick.load(null!==(e=t.onClick)&&void 0!==e?e:t.onclick);const n=null!==(i=t.onDiv)&&void 0!==i?i:t.ondiv;void 0!==n&&(this.onDiv=Z(n,(t=>{const e=new ee;return e.load(t),e}))),this.onHover.load(null!==(o=t.onHover)&&void 0!==o?o:t.onhover),void 0!==t.resize&&(this.resize=t.resize)}}class se{constructor(t,e){this._engine=t,this._container=e}load(t){if(t&&this._container){const e=this._engine.plugins.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}}class ae{constructor(t,e){this.detectsOn="window",this.events=new ne,this.modes=new se(t,e)}get detect_on(){return this.detectsOn}set detect_on(t){this.detectsOn=t}load(t){var e;if(!t)return;const i=null!==(e=t.detectsOn)&&void 0!==e?e:t.detect_on;void 0!==i&&(this.detectsOn=i),this.events.load(t.events),this.modes.load(t.modes)}}class re{load(t){var e,i;t&&(void 0!==t.position&&(this.position={x:null!==(e=t.position.x)&&void 0!==e?e:50,y:null!==(i=t.position.y)&&void 0!==i?i:50}),void 0!==t.options&&(this.options=N({},t.options)))}}class le{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 ce{constructor(){this.disable=!1,this.reduce=new le}load(t){t&&(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class he{constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=N({},t.options)))}}class de{constructor(){this.auto=!1,this.mode="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 ue{constructor(){this.name="",this.default=new de}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=N({},t.options)))}}class pe{constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.decay=0,this.sync=!0}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=v(t.offset)),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.decay&&(this.decay=v(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ve{constructor(){this.h=new pe,this.s=new pe,this.l=new pe}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ge extends Zt{constructor(){super(),this.animation=new ve}static create(t,e){const i=new ge;return i.load(t),void 0!==e&&("string"==typeof e||e instanceof Array?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))}}class ye{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 fe{constructor(){this.enable=!1,this.minimumValue=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue))}}class we{constructor(){this.random=new fe,this.value=0}load(t){t&&("boolean"==typeof t.random?this.random.enable=t.random:this.random.load(t.random),void 0!==t.value&&(this.value=v(t.value,this.random.enable?this.random.minimumValue:void 0)))}}class me extends we{constructor(){super(),this.random.minimumValue=.1,this.value=1}}class be{constructor(){this.horizontal=new me,this.vertical=new me}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Se{constructor(){this.bounce=new be,this.enable=!1,this.mode="bounce",this.overlap=new ye}load(t){t&&(this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class _e{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=v(t.offset)),void 0!==t.value&&(this.value=v(t.value)))}}class Pe{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}get rotateX(){return this.rotate.x}set rotateX(t){this.rotate.x=t}get rotateY(){return this.rotate.y}set rotateY(t){this.rotate.y=t}load(t){var e,i,o,n;if(!t)return;void 0!==t.distance&&(this.distance=v(t.distance)),void 0!==t.enable&&(this.enable=t.enable);const s=null!==(i=null===(e=t.rotate)||void 0===e?void 0:e.x)&&void 0!==i?i:t.rotateX;void 0!==s&&(this.rotate.x=s);const a=null!==(n=null===(o=t.rotate)||void 0===o?void 0:o.y)&&void 0!==n?n:t.rotateY;void 0!==a&&(this.rotate.y=a)}}class xe{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=v(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=v(t.maxSpeed)))}}class Ce extends we{constructor(){super()}}class Ae{constructor(){this.clamp=!0,this.delay=new Ce,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=N(this.options,t.options)))}}class Ve{constructor(){this.enable=!1,this.length=10,this.fillColor=new Zt,this.fillColor.value="#000000"}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),this.fillColor=Zt.create(this.fillColor,t.fillColor),void 0!==t.length&&(this.length=t.length))}}class Oe{constructor(){this.default="out"}load(t){var e,i,o,n;t&&(void 0!==t.default&&(this.default=t.default),this.bottom=null!==(e=t.bottom)&&void 0!==e?e:t.default,this.left=null!==(i=t.left)&&void 0!==i?i:t.default,this.right=null!==(o=t.right)&&void 0!==o?o:t.default,this.top=null!==(n=t.top)&&void 0!==n?n:t.default)}}class Ge{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=v(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),this.position=t.position?N({},t.position):void 0)}}class Ee{constructor(){this.angle=new _e,this.attract=new Pe,this.center={x:50,y:50,mode:"percent",radius:0},this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new xe,this.path=new Ae,this.outModes=new Oe,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ge,this.straight=!1,this.trail=new Ve,this.vibrate=!1,this.warp=!1}get bounce(){return this.collisions}set bounce(t){this.collisions=t}get collisions(){return!1}set collisions(t){}get noise(){return this.path}set noise(t){this.path=t}get outMode(){return this.outModes.default}set outMode(t){this.outModes.default=t}get out_mode(){return this.outMode}set out_mode(t){this.outMode=t}load(t){var e,i,o,n;if(!t)return;this.angle.load("number"==typeof t.angle?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center=N(null!==(e=this.center)&&void 0!==e?e:{},t.center),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance="number"==typeof t.distance?{horizontal:t.distance,vertical:t.distance}:Object.assign({},t.distance)),void 0!==t.drift&&(this.drift=v(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const s=null!==(o=null!==(i=t.outModes)&&void 0!==i?i:t.outMode)&&void 0!==o?o:t.out_mode;void 0!==s&&("object"==typeof s?this.outModes.load(s):this.outModes.load({default:s})),this.path.load(null!==(n=t.path)&&void 0!==n?n:t.noise),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=v(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 Te{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=v(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=v(t.speed)),void 0!==t.decay&&(this.decay=v(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Re extends Te{constructor(){super(),this.destroy="none",this.enable=!1,this.speed=2,this.startValue="random",this.sync=!1}get opacity_min(){return this.minimumValue}set opacity_min(t){this.minimumValue=t}load(t){var e;t&&(super.load(t),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=null!==(e=t.minimumValue)&&void 0!==e?e:t.opacity_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class ke extends we{constructor(){super(),this.animation=new Re,this.random.minimumValue=.1,this.value=1}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var e;if(!t)return;super.load(t);const i=null!==(e=t.animation)&&void 0!==e?e:t.anim;void 0!==i&&(this.animation.load(i),this.value=v(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class ze{constructor(){this.enable=!1,this.area=800,this.factor=1e3}get value_area(){return this.area}set value_area(t){this.area=t}load(t){var e;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const i=null!==(e=t.area)&&void 0!==e?e:t.value_area;void 0!==i&&(this.area=i),void 0!==t.factor&&(this.factor=t.factor)}}class Me{constructor(){this.density=new ze,this.limit=0,this.value=100}get max(){return this.limit}set max(t){this.limit=t}load(t){var e;if(!t)return;this.density.load(t.density);const i=null!==(e=t.limit)&&void 0!==e?e:t.max;void 0!==i&&(this.limit=i),void 0!==t.value&&(this.value=t.value)}}class Le{constructor(){this.blur=0,this.color=new Zt,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=Zt.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 Ie{constructor(){this.options={},this.type="circle"}get character(){var t;return null!==(t=this.options.character)&&void 0!==t?t:this.options.char}set character(t){this.options.character=t,this.options.char=t}get custom(){return this.options}set custom(t){this.options=t}get image(){var t;return null!==(t=this.options.image)&&void 0!==t?t:this.options.images}set image(t){this.options.image=t,this.options.images=t}get images(){return this.image}set images(t){this.image=t}get polygon(){var t;return null!==(t=this.options.polygon)&&void 0!==t?t:this.options.star}set polygon(t){this.options.polygon=t,this.options.star=t}get stroke(){return[]}set stroke(t){}load(t){var e,i,o;if(!t)return;const n=null!==(e=t.options)&&void 0!==e?e:t.custom;if(void 0!==n)for(const t in n){const e=n[t];e&&(this.options[t]=N(null!==(i=this.options[t])&&void 0!==i?i:{},e))}this.loadShape(t.character,"character","char",!0),this.loadShape(t.polygon,"polygon","star",!1),this.loadShape(null!==(o=t.image)&&void 0!==o?o:t.images,"image","images",!0),void 0!==t.type&&(this.type=t.type)}loadShape(t,e,i,o){var n,s;if(!t)return;const a=t instanceof Array,r=a?[]:{},l=a!==this.options[e]instanceof Array,c=a!==this.options[i]instanceof Array;l&&(this.options[e]=r),c&&o&&(this.options[i]=r),this.options[e]=N(null!==(n=this.options[e])&&void 0!==n?n:r,t),this.options[i]&&!o||(this.options[i]=N(null!==(s=this.options[i])&&void 0!==s?s:r,t))}}class He extends Te{constructor(){super(),this.destroy="none",this.enable=!1,this.speed=5,this.startValue="random",this.sync=!1}get size_min(){return this.minimumValue}set size_min(t){this.minimumValue=t}load(t){var e;super.load(t),t&&(void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=null!==(e=t.minimumValue)&&void 0!==e?e:t.size_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class De extends we{constructor(){super(),this.animation=new He,this.random.minimumValue=1,this.value=3}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var e;if(super.load(t),!t)return;const i=null!==(e=t.animation)&&void 0!==e?e:t.anim;void 0!==i&&(this.animation.load(i),this.value=v(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Be{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=ge.create(this.color,t.color)),void 0!==t.width&&(this.width=t.width),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ne extends we{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 Fe{constructor(t,e){this._engine=t,this._container=e,this.bounce=new be,this.collisions=new Se,this.color=new ge,this.color.value="#fff",this.groups={},this.move=new Ee,this.number=new Me,this.opacity=new ke,this.reduceDuplicates=!1,this.shadow=new Le,this.shape=new Ie,this.size=new De,this.stroke=new Be,this.zIndex=new Ne}load(t){var e,i,o,n,s,a;if(!t)return;if(this.bounce.load(t.bounce),this.color.load(ge.create(this.color,t.color)),void 0!==t.groups)for(const i in t.groups){const o=t.groups[i];void 0!==o&&(this.groups[i]=N(null!==(e=this.groups[i])&&void 0!==e?e:{},o))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex);const r=null!==(o=null===(i=t.move)||void 0===i?void 0:i.collisions)&&void 0!==o?o:null===(n=t.move)||void 0===n?void 0:n.bounce;void 0!==r&&(this.collisions.enable=r),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=N({},t.interactivity));const l=null!==(s=t.stroke)&&void 0!==s?s:null===(a=t.shape)||void 0===a?void 0:a.stroke;if(l&&(this.stroke=Z(l,(t=>{const e=new Be;return e.load(t),e}))),this._container){const e=this._engine.plugins.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.plugins.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function je(t,...e){for(const i of e)t.load(i)}function Ue(t,e,...i){const o=new Fe(t,e);return je(o,...i),o}class qe{constructor(t,e){this._engine=t,this._container=e,this.autoPlay=!0,this.background=new Xt,this.backgroundMask=new Jt,this.fullScreen=new Kt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new ae(t,e),this.manualParticles=[],this.motion=new ce,this.particles=Ue(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}get backgroundMode(){return this.fullScreen}set backgroundMode(t){this.fullScreen.load(t)}get fps_limit(){return this.fpsLimit}set fps_limit(t){this.fpsLimit=t}get retina_detect(){return this.detectRetina}set retina_detect(t){this.detectRetina=t}load(t){var e,i,o,n,s;if(!t)return;void 0!==t.preset&&Z(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay);const a=null!==(e=t.detectRetina)&&void 0!==e?e:t.retina_detect;void 0!==a&&(this.detectRetina=a),void 0!==t.duration&&(this.duration=t.duration);const r=null!==(i=t.fpsLimit)&&void 0!==i?i:t.fps_limit;void 0!==r&&(this.fpsLimit=r),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 l=null!==(o=t.fullScreen)&&void 0!==o?o:t.backgroundMode;"boolean"==typeof l?this.fullScreen.enable=l:this.fullScreen.load(l),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),void 0!==t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new re;return e.load(t),e}))),this.motion.load(t.motion),this.particles.load(t.particles),this.style=N(this.style,t.style),this._engine.plugins.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const c=this._engine.plugins.interactors.get(this._container);if(c)for(const e of c)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new he;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=new ue;t.load(e),this.themes.push(t)}this.defaultDarkTheme=null===(n=this._findDefaultTheme("dark"))||void 0===n?void 0:n.name,this.defaultLightTheme=null===(s=this._findDefaultTheme("light"))||void 0===s?void 0:s.name}setResponsive(t,e,i){this.load(i);const o=this.responsive.find((i=>"screen"===i.mode&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(null==o?void 0:o.options),null==o?void 0:o.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=T("(prefers-color-scheme: dark)"),e=t&&t.matches,i=this._findDefaultTheme(e?"dark":"light");i&&this.load(i.options)}}_findDefaultTheme(t){var e;return null!==(e=this.themes.find((e=>e.default.value&&e.default.mode===t)))&&void 0!==e?e:this.themes.find((t=>t.default.value&&"any"===t.default.mode))}_importPreset(t){this.load(this._engine.plugins.getPreset(t))}}class Qe{constructor(t,e){this.container=e,this._engine=t,this._interactors=this._engine.plugins.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&await e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode&&e.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case 0:this._externalInteractors.push(t);break;case 1:this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.interact(t,e)}async reset(t){for(const e of this._externalInteractors)e.isEnabled()&&await e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&await e.reset(t)}}const We=t=>{(z(t.outMode,t.checkModes)||z(t.outMode,t.checkModes))&&(t.coord>t.maxCoord-2*t.radius?t.setCb(-t.radius):t.coord<2*t.radius&&t.setCb(t.radius))};class $e{constructor(t,e,i,o,s,a){var c,v,y,f,m,b,S,_,P,x,C,A,V;this.id=e,this.container=i,this.group=a,this._engine=t,this.fill=!0,this.pathRotation=!1,this.close=!0,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const O=i.retina.pixelRatio,G=i.actualOptions,E=Ue(this._engine,i,G.particles),T=E.shape.type,R=E.reduceDuplicates;if(this.shape=X(T,this.id,R),null==s?void 0:s.shape){if(s.shape.type){const t=s.shape.type;this.shape=X(t,this.id,R)}const t=new Ie;t.load(s.shape),this.shape&&(this.shapeData=this._loadShapeData(t,R))}else this.shapeData=this._loadShapeData(E.shape,R);E.load(s),E.load(null===(c=this.shapeData)||void 0===c?void 0:c.particles),this.interactivity=new ae(t,i),this.interactivity.load(i.actualOptions.interactivity),this.interactivity.load(E.interactivity),this.fill=null!==(y=null===(v=this.shapeData)||void 0===v?void 0:v.fill)&&void 0!==y?y:this.fill,this.close=null!==(m=null===(f=this.shapeData)||void 0===f?void 0:f.close)&&void 0!==m?m:this.close,this.options=E;const k=this.options.move.path;this.pathDelay=1e3*g(k.delay),k.generator&&(this.pathGenerator=this._engine.plugins.getPathGenerator(k.generator),this.pathGenerator&&i.addPath(k.generator,this.pathGenerator)&&this.pathGenerator.init(i));const z=d(this.options.zIndex.value);i.retina.initParticle(this);const M=this.options.size,L=M.value,I=M.animation;if(this.size={enable:M.animation.enable,value:d(M.value)*i.retina.pixelRatio,max:p(L)*O,min:u(L)*O,loops:0,maxLoops:d(M.animation.count)},I.enable){switch(this.size.status=0,this.size.decay=1-d(I.decay),I.startValue){case"min":this.size.value=this.size.min,this.size.status=0;break;case"random":this.size.value=h(this.size)*O,this.size.status=r()>=.5?0:1;break;default:this.size.value=this.size.max,this.size.status=1}this.size.velocity=(null!==(b=this.retina.sizeAnimationSpeed)&&void 0!==b?b:i.retina.sizeAnimationSpeed)/100*i.retina.reduceFactor,I.sync||(this.size.velocity*=r())}this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.position=this._calcPosition(i,o,l(z,0,i.zLayers)),this.initialPosition=this.position.copy();const H=i.canvas.size,D=this.options.move.center,B="percent"===D.mode;switch(this.moveCenter={x:(null!==(S=D.x)&&void 0!==S?S:50)*(B?H.width/100:1),y:(null!==(_=D.y)&&void 0!==_?_:50)*(B?H.height/100:1),radius:null!==(P=this.options.move.center.radius)&&void 0!==P?P:0,mode:null!==(x=this.options.move.center.mode)&&void 0!==x?x:"percent"},this.direction=w(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-d(this.options.move.decay),this.offset=n.origin;const N=i.particles;N.needsSort=N.needsSort||N.lastZIndex<this.position.z,N.lastZIndex=this.position.z,this.zIndexFactor=this.position.z/i.zLayers,this.sides=24;let F=i.drawers.get(this.shape);F||(F=this._engine.plugins.getShapeDrawer(this.shape),F&&i.drawers.set(this.shape,F)),(null==F?void 0:F.loadShape)&&(null==F||F.loadShape(this));const j=null==F?void 0:F.getSidesCount;j&&(this.sides=j(this)),this.spawning=!1,this.shadowColor=nt(this.options.shadow.color);for(const t of i.particles.updaters)null===(C=t.init)||void 0===C||C.call(t,this);for(const t of i.particles.movers)null===(A=t.init)||void 0===A||A.call(t,this);(null==F?void 0:F.particleInit)&&F.particleInit(i,this);for(const[,t]of i.plugins)null===(V=t.particleCreated)||void 0===V||V.call(t,this)}destroy(t){if(!this.unbreakable&&!this.destroyed){this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;for(const[,e]of this.container.plugins)e.particleDestroyed&&e.particleDestroyed(this,t);for(const e of this.container.particles.updaters)e.particleDestroyed&&e.particleDestroyed(this,t)}}draw(t){const e=this.container;for(const[,i]of e.plugins)e.canvas.drawParticlePlugin(i,this,t);e.canvas.drawParticle(this,t)}getFillColor(){var t,e;const i=null!==(t=this.bubble.color)&&void 0!==t?t:mt(this.color);if(i&&this.roll&&(this.backColor||this.roll.alter)){const t=this.roll.horizontal&&this.roll.vertical?2:1,o=this.roll.horizontal?Math.PI/2:0;if(Math.floor(((null!==(e=this.roll.angle)&&void 0!==e?e:0)+o)/(Math.PI/t))%2){if(this.backColor)return this.backColor;if(this.roll.alter)return Tt(i,this.roll.alter.type,this.roll.alter.value)}}return i}getMass(){return this.getRadius()**2*Math.PI/2}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){var t;return null!==(t=this.bubble.radius)&&void 0!==t?t:this.size.value}getStrokeColor(){var t,e;return null!==(e=null!==(t=this.bubble.color)&&void 0!==t?t:mt(this.strokeColor))&&void 0!==e?e:this.getFillColor()}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size;return this.position.x>=-t&&this.position.y>=-t&&this.position.y<=e.height+t&&this.position.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){this.opacity&&(this.opacity.loops=0),this.size.loops=0}_calcPosition(t,i,o,n=0){var s,a,r,l;for(const[,n]of t.plugins){const t=void 0!==n.particlePosition?n.particlePosition(i,this):void 0;if(void 0!==t)return e.create(t.x,t.y,o)}const c=C({size:t.canvas.size,position:i}),h=e.create(c.x,c.y,o),d=this.getRadius(),u=this.options.move.outModes,p=e=>{We({outMode:e,checkModes:["bounce","bounce-horizontal"],coord:h.x,maxCoord:t.canvas.size.width,setCb:t=>h.x+=t,radius:d})},v=e=>{We({outMode:e,checkModes:["bounce","bounce-vertical"],coord:h.y,maxCoord:t.canvas.size.height,setCb:t=>h.y+=t,radius:d})};return p(null!==(s=u.left)&&void 0!==s?s:u.default),p(null!==(a=u.right)&&void 0!==a?a:u.default),v(null!==(r=u.top)&&void 0!==r?r:u.default),v(null!==(l=u.bottom)&&void 0!==l?l:u.default),this._checkOverlap(h,n)?this._calcPosition(t,void 0,o,n+1):h}_calculateVelocity(){const t=m(this.direction).copy(),e=this.options.move;if("inside"===e.direction||"outside"===e.direction)return t;const i=Math.PI/180*d(e.angle.value),o=Math.PI/180*d(e.angle.offset),n={left:o-i/2,right:o+i/2};return e.straight||(t.angle+=h(v(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=r()),t}_checkOverlap(t,e=0){const i=this.options.collisions,o=this.getRadius();if(!i.enable)return!1;const n=i.overlap;if(n.enable)return!1;const s=n.retries;if(s>=0&&e>s)throw new Error("Particle is overlapping and can't be placed");let a=!1;for(const e of this.container.particles.array)if(f(t,e.position)<o+e.getRadius()){a=!0;break}return a}_loadShapeData(t,e){const i=t.options[this.shape];if(i)return N({},X(i,this.id,e))}}class Ze{constructor(t,e){this.position=t,this.particle=e}}class Xe{constructor(t,e){this.position={x:t,y:e}}}class Ye extends Xe{constructor(t,e,i){super(t,e),this.radius=i}contains(t){return f(t,this.position)<=this.radius}intersects(t){const e=t,i=t,o=this.position,n=t.position,s=Math.abs(n.x-o.x),a=Math.abs(n.y-o.y),r=this.radius;if(void 0!==i.radius){return r+i.radius>Math.sqrt(s**2+a**2)}if(void 0!==e.size){const t=e.size.width,i=e.size.height;return Math.pow(s-t,2)+Math.pow(a-i,2)<=r**2||s<=r+t&&a<=r+i||s<=t||a<=i}return!1}}class Je extends Xe{constructor(t,e,i,o){super(t,e),this.size={height:o,width:i}}contains(t){const e=this.size.width,i=this.size.height,o=this.position;return t.x>=o.x&&t.x<=o.x+e&&t.y>=o.y&&t.y<=o.y+i}intersects(t){t instanceof Ye&&t.intersects(this);const e=this.size.width,i=this.size.height,o=this.position,n=t.position,s=t instanceof Je?t.size:{width:0,height:0},a=s.width,r=s.height;return n.x<o.x+e&&n.x+a>o.x&&n.y<o.y+i&&n.y+r>o.y}}class Ke{constructor(t,e){this.rectangle=t,this.capacity=e,this.points=[],this.divided=!1}insert(t){var e,i,o,n,s;return!!this.rectangle.contains(t.position)&&(this.points.length<this.capacity?(this.points.push(t),!0):(this.divided||this.subdivide(),null!==(s=(null===(e=this.northEast)||void 0===e?void 0:e.insert(t))||(null===(i=this.northWest)||void 0===i?void 0:i.insert(t))||(null===(o=this.southEast)||void 0===o?void 0:o.insert(t))||(null===(n=this.southWest)||void 0===n?void 0:n.insert(t)))&&void 0!==s&&s))}query(t,e,i){var o,n,s,a;const r=null!=i?i:[];if(!t.intersects(this.rectangle))return[];for(const i of this.points)!t.contains(i.position)&&f(t.position,i.position)>i.particle.getRadius()&&(!e||e(i.particle))||r.push(i.particle);return this.divided&&(null===(o=this.northEast)||void 0===o||o.query(t,e,r),null===(n=this.northWest)||void 0===n||n.query(t,e,r),null===(s=this.southEast)||void 0===s||s.query(t,e,r),null===(a=this.southWest)||void 0===a||a.query(t,e,r)),r}queryCircle(t,e,i){return this.query(new Ye(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new Je(t.x,t.y,e.width,e.height),i)}subdivide(){const t=this.rectangle.position.x,e=this.rectangle.position.y,i=this.rectangle.size.width,o=this.rectangle.size.height,n=this.capacity;this.northEast=new Ke(new Je(t,e,i/2,o/2),n),this.northWest=new Ke(new Je(t+i/2,e,i/2,o/2),n),this.southEast=new Ke(new Je(t,e+o/2,i/2,o/2),n),this.southWest=new Ke(new Je(t+i/2,e+o/2,i/2,o/2),n),this.divided=!0}}class ti{constructor(t,e){this.container=e,this._engine=t,this.nextId=0,this.array=[],this.zArray=[],this.limit=0,this.needsSort=!1,this.lastZIndex=0,this.interactionManager=new Qe(this._engine,e);const i=this.container.canvas.size;this.quadTree=new Ke(new Je(-i.width/4,-i.height/4,3*i.width/2,3*i.height/2),4),this.movers=this._engine.plugins.getMovers(e,!0),this.updaters=this._engine.plugins.getUpdaters(e,!0)}get count(){return this.array.length}addManualParticles(){const t=this.container,e=t.actualOptions;for(const i of e.manualParticles)this.addParticle(_({size:t.canvas.size,position:i.position}),i.options)}addParticle(t,e,i,o){const n=this.container.actualOptions.particles.number.limit;if(n>0){const t=this.count+1-n;t>0&&this.removeQuantity(t)}return this._pushParticle(t,e,i,o)}clear(){this.array=[],this.zArray=[]}destroy(){this.array=[],this.zArray=[],this.movers=[],this.updaters=[]}async draw(t){const e=this.container,i=this.container.canvas.size;this.quadTree=new Ke(new Je(-i.width/4,-i.height/4,3*i.width/2,3*i.height/2),4),e.canvas.clear(),await this.update(t),this.needsSort&&(this.zArray.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this.lastZIndex=this.zArray[this.zArray.length-1].position.z,this.needsSort=!1);for(const[,i]of e.plugins)e.canvas.drawPlugin(i,t);for(const e of this.zArray)e.draw(t)}handleClickMode(t){this.interactionManager.handleClickMode(t)}init(){var t;const e=this.container,i=e.actualOptions;this.lastZIndex=0,this.needsSort=!1;let o=!1;this.updaters=this._engine.plugins.getUpdaters(e,!0),this.interactionManager.init();for(const[,t]of e.plugins)if(void 0!==t.particlesInitialization&&(o=t.particlesInitialization()),o)break;this.interactionManager.init();for(const[,t]of e.pathGenerators)t.init(e);if(this.addManualParticles(),!o){for(const e in i.particles.groups){const o=i.particles.groups[e];for(let n=this.count,s=0;s<(null===(t=o.number)||void 0===t?void 0:t.value)&&n<i.particles.number.value;n++,s++)this.addParticle(void 0,o,e)}for(let t=this.count;t<i.particles.number.value;t++)this.addParticle()}}push(t,e,i,o){this.pushing=!0;for(let n=0;n<t;n++)this.addParticle(null==e?void 0:e.position,i,o);this.pushing=!1}async redraw(){this.clear(),this.init(),await 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,o){if(t<0||t>this.count)return;let n=0;for(let s=t;n<e&&s<this.count;s++){const t=this.array[s];if(!t||t.group!==i)continue;t.destroy(o),this.array.splice(s--,1);const e=this.zArray.indexOf(t);this.zArray.splice(e,1),n++,this._engine.dispatchEvent("particleRemoved",{container:this.container,data:{particle:t}})}}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.container.actualOptions;for(const e in t.particles.groups)this._applyDensity(t.particles.groups[e],0,e);this._applyDensity(t.particles,t.manualParticles.length)}async update(t){var e,i;const o=this.container,n=[];for(const[,t]of o.pathGenerators)t.update();for(const[,i]of o.plugins)null===(e=i.update)||void 0===e||e.call(i,t);for(const e of this.array){const s=o.canvas.resizeFactor;s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height),e.ignoresResizeRatio=!1,await this.interactionManager.reset(e);for(const[,o]of this.container.plugins){if(e.destroyed)break;null===(i=o.particleUpdate)||void 0===i||i.call(o,e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?n.push(e):this.quadTree.insert(new Ze(e.getPosition(),e))}for(const t of n)this.remove(t);await this.interactionManager.externalInteract(t);for(const e of o.particles.array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||await this.interactionManager.particlesInteract(e,t)}delete o.canvas.resizeFactor}_applyDensity(t,e,i){var o;if(!(null===(o=t.number.density)||void 0===o?void 0:o.enable))return;const n=t.number,s=this._initDensityFactor(n.density),a=n.value,r=n.limit>0?n.limit:a,l=Math.min(a,r)*s+e,c=Math.min(this.count,this.array.filter((t=>t.group===i)).length);this.limit=n.limit*s,c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}_initDensityFactor(t){const e=this.container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,o=e.retina.pixelRatio;return i.width*i.height/(t.factor*o**2*t.area)}_pushParticle(t,e,i,o){try{const n=new $e(this._engine,this.nextId,this.container,t,e,i);let s=!0;if(o&&(s=o(n)),!s)return;return this.array.push(n),this.zArray.push(n),this.nextId++,this._engine.dispatchEvent("particleAdded",{container:this.container,data:{particle:n}}),n}catch(t){return void console.warn(`error adding particle: ${t}`)}}}class ei{constructor(t){this.container=t}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||G()?1:window.devicePixelRatio;const i=this.container.actualOptions.motion;if(i&&(i.disable||i.reduce.value)){const e=T("(prefers-reduced-motion: reduce)");if(e){this._handleMotionChange(e);const i=()=>{this._handleMotionChange(e),t.refresh().catch((()=>{}))};void 0!==e.addEventListener?e.addEventListener("change",i):void 0!==e.addListener&&e.addListener(i)}else this.reduceFactor=1}else this.reduceFactor=1;const o=this.pixelRatio;if(t.canvas.element){const e=t.canvas.element;t.canvas.size.width=e.offsetWidth*o,t.canvas.size.height=e.offsetHeight*o}const n=e.particles;this.attractDistance=d(n.move.attract.distance)*o,this.sizeAnimationSpeed=d(n.size.animation.speed)*o,this.maxSpeed=d(n.move.gravity.maxSpeed)*o}initParticle(t){const e=t.options,i=this.pixelRatio,o=e.move.distance,n=t.retina;n.attractDistance=d(e.move.attract.distance)*i,n.moveDrift=d(e.move.drift)*i,n.moveSpeed=d(e.move.speed)*i,n.sizeAnimationSpeed=d(e.size.animation.speed)*i;const s=n.maxDistance;s.horizontal=void 0!==o.horizontal?o.horizontal*i:void 0,s.vertical=void 0!==o.vertical?o.vertical*i:void 0,n.maxSpeed=d(e.move.gravity.maxSpeed)*i}_handleMotionChange(t){const e=this.container.actualOptions;if(t.matches){const t=e.motion;this.reduceFactor=t.disable?0:t.reduce.value?1/t.reduce.factor:1}else this.reduceFactor=1}}function ii(t){return t&&!t.destroyed}function oi(t,e,...i){const o=new qe(t,e);return je(o,...i),o}const ni={generate:t=>{const e=t.velocity.copy();return e.angle+=e.length*Math.PI/180,e},init:()=>{},update:()=>{}};class si{constructor(t,e,i){this.id=e,this._engine=t,this.fpsLimit=120,this.smooth=!1,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._sourceOptions=i,this._initialSourceOptions=i,this.retina=new ei(this),this.canvas=new qt(this),this.particles=new ti(this._engine,this),this.frameManager=new $t(this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.drawers=new Map,this._options=oi(this._engine,this),this.actualOptions=oi(this._engine,this),this._eventListeners=new Wt(this),"undefined"!=typeof IntersectionObserver&&IntersectionObserver&&(this._intersectionObserver=new IntersectionObserver((t=>this._intersectionManager(t)))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!ii(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,o)=>{if(!ii(this))return;const n=this.retina.pixelRatio,s={x:i.x*n,y:i.y*n},a=this.particles.quadTree.queryCircle(s,o*n);t(e,a)};let o=!1,n=!1;e.addEventListener("click",(t=>{if(!ii(this))return;const e=t,o={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,o,1)})),e.addEventListener("touchstart",(()=>{ii(this)&&(o=!0,n=!1)})),e.addEventListener("touchmove",(()=>{ii(this)&&(n=!0)})),e.addEventListener("touchend",(t=>{var e,s,a;if(ii(this)){if(o&&!n){const o=t;let n=o.touches[o.touches.length-1];if(!n&&(n=o.changedTouches[o.changedTouches.length-1],!n))return;const r=null===(e=this.canvas.element)||void 0===e?void 0:e.getBoundingClientRect(),l={x:n.clientX-(null!==(s=null==r?void 0:r.left)&&void 0!==s?s:0),y:n.clientY-(null!==(a=null==r?void 0:r.top)&&void 0!==a?a:0)};i(t,l,Math.max(n.radiusX,n.radiusY))}o=!1,n=!1}})),e.addEventListener("touchcancel",(()=>{ii(this)&&(o=!1,n=!1)}))}addPath(t,e,i=!1){return!(!ii(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,null!=e?e:ni),!0)}destroy(){if(!ii(this))return;this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.drawers)t.destroy&&t.destroy(this);for(const t of this.drawers.keys())this.drawers.delete(t);this._engine.plugins.destroy(this),this.destroyed=!0;const t=this._engine.dom(),e=t.findIndex((t=>t===this));e>=0&&t.splice(e,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!ii(this))return;let e=t;this._drawAnimationFrame=R()((async t=>{e&&(this.lastFrameTime=void 0,e=!1),await this.frameManager.nextFrame(t)}))}exportConfiguration(){return JSON.stringify(this.actualOptions,((t,e)=>{if("_engine"!==t&&"_container"!==t)return e}),2)}exportImage(t,e,i){var o;return null===(o=this.canvas.element)||void 0===o?void 0:o.toBlob(t,null!=e?e:"image/png",i)}exportImg(t){this.exportImage(t)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&ii(this)}handleClickMode(t){if(ii(this)){this.particles.handleClickMode(t);for(const[,e]of this.plugins)e.handleClickMode&&e.handleClickMode(t)}}async init(){if(!ii(this))return;const t=this._engine.plugins.getSupportedShapes();for(const e of t){const t=this._engine.plugins.getShapeDrawer(e);t&&this.drawers.set(e,t)}this._options=oi(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=oi(this._engine,this,this._options),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize(),this.zLayers=this.actualOptions.zLayers,this.duration=1e3*d(this.actualOptions.duration),this.lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this.smooth=this.actualOptions.smooth;const e=this._engine.plugins.getAvailablePlugins(this);for(const[t,i]of e)this.plugins.set(t,i);for(const[,t]of this.drawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init?t.init(this.actualOptions):void 0!==t.initAsync&&await t.initAsync(this.actualOptions);this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)void 0!==t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){ii(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(ii(this)&&(void 0!==this._drawAnimationFrame&&(k()(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!ii(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("containerPlay",{container:this}),this.draw(e||!1)}else this._firstStart=!1}async refresh(){if(ii(this))return this.stop(),this.start()}async reset(){if(ii(this))return this._options=oi(this._engine,this),this.refresh()}setNoise(t,e,i){ii(this)&&this.setPath(t,e,i)}setPath(t,e,i){if(!t||!ii(this))return;const o=Object.assign({},ni);if("function"==typeof t)o.generate=t,e&&(o.init=e),i&&(o.update=i);else{const e=o;o.generate=t.generate||e.generate,o.init=t.init||e.init,o.update=t.update||e.update}this.addPath("default",o,!0)}async start(){if(ii(this)&&!this.started){await this.init(),this.started=!0,this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)void 0!==t.startAsync?await t.startAsync():void 0!==t.start&&t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play()}}stop(){var t;if(ii(this)&&this.started){this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.clear(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const[,e]of this.plugins)null===(t=e.stop)||void 0===t||t.call(e);for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent("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)}_intersectionManager(t){if(ii(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play:this.pause)()}}async function ai(t,e){const i=X(t,e);if(!i)return;const o=await fetch(i);if(o.ok)return o.json();var n;n=o.status,console.error(`tsParticles - Error ${n} while retrieving config file`)}class ri{constructor(t){this._engine=t}load(t,e,i){const o={index:i,remote:!1};return"string"==typeof t?o.tagId=t:o.options=t,"number"==typeof e?o.index=e:o.options=null!=e?e:o.options,this.loadOptions(o)}async loadJSON(t,e,i){let o,n;return"number"==typeof e||void 0===e?o=t:(n=t,o=e),this.loadRemoteOptions({tagId:n,url:o,index:i,remote:!0})}async loadOptions(t){var e,i,o;const n=null!==(e=t.tagId)&&void 0!==e?e:`tsparticles${Math.floor(1e4*r())}`,{index:s,url:a,remote:l}=t,c=l?await ai(a,s):t.options;let h=null!==(i=t.element)&&void 0!==i?i:document.getElementById(n);h||(h=document.createElement("div"),h.id=n,null===(o=document.querySelector("body"))||void 0===o||o.append(h));const d=X(c,s),u=this._engine.dom(),p=u.findIndex((t=>t.id===n));if(p>=0){const t=this._engine.domItem(p);t&&!t.destroyed&&(t.destroy(),u.splice(p,1))}let v;if("canvas"===h.tagName.toLowerCase())v=h,v.dataset[Rt]="false";else{const t=h.getElementsByTagName("canvas");t.length?(v=t[0],v.dataset[Rt]="false"):(v=document.createElement("canvas"),v.dataset[Rt]="true",h.appendChild(v))}v.style.width||(v.style.width="100%"),v.style.height||(v.style.height="100%");const g=new si(this._engine,n,d);return p>=0?u.splice(p,0,g):u.push(g),g.canvas.loadCanvas(v),await g.start(),g}async loadRemoteOptions(t){return this.loadOptions(t)}async set(t,e,i,o){const n={index:o,remote:!1};return"string"==typeof t?n.tagId=t:n.element=t,e instanceof HTMLElement?n.element=e:n.options=e,"number"==typeof i?n.index=i:n.options=null!=i?i:n.options,this.loadOptions(n)}async setJSON(t,e,i,o){let n,s,a,r;return t instanceof HTMLElement?(r=t,n=e,a=i):(s=t,r=e,n=i,a=o),this.loadRemoteOptions({tagId:s,url:n,index:a,element:r,remote:!0})}}function li(t,e,i,o=!1){let n=e.get(t);return n&&!o||(n=[...i.values()].map((e=>e(t))),e.set(t,n)),n}class ci{constructor(t){this._engine=t,this.plugins=[],this.interactorsInitializers=new Map,this.moversInitializers=new Map,this.updatersInitializers=new Map,this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.drawers=new Map,this.pathGenerators=new Map}addInteractor(t,e){this.interactorsInitializers.set(t,e)}addParticleMover(t,e){this.moversInitializers.set(t,e)}addParticleUpdater(t,e){this.updatersInitializers.set(t,e)}addPathGenerator(t,e){this.getPathGenerator(t)||this.pathGenerators.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShapeDrawer(t,e){this.getShapeDrawer(t)||this.drawers.set(t,e)}destroy(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,i.getPlugin(t));return e}getInteractors(t,e=!1){return li(t,this.interactors,this.interactorsInitializers,e)}getMovers(t,e=!1){return li(t,this.movers,this.moversInitializers,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.drawers.get(t)}getSupportedShapes(){return this.drawers.keys()}getUpdaters(t,e=!1){return li(t,this.updaters,this.updatersInitializers,e)}loadOptions(t,e){for(const i of this.plugins)i.loadOptions(t,e)}loadParticlesOptions(t,e,...i){const o=this.updaters.get(t);if(o)for(const t of o)t.loadOptions&&t.loadOptions(e,...i)}}class hi{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){var e;const i=null!==(e=t.value.hsl)&&void 0!==e?e:t.value;if(void 0!==i.h&&void 0!==i.l)return dt(i)}handleRangeColor(t){var e;const i=null!==(e=t.value.hsl)&&void 0!==e?e:t.value;if(void 0!==i.h&&void 0!==i.l)return dt({h:d(i.h),l:d(i.l),s:d(i.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?ut({a:e.length>4?V(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}}class di{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){var e;const i=null!==(e=t.value.rgb)&&void 0!==e?e:t.value;if(void 0!==i.r)return i}handleRangeColor(t){var e;const i=null!==(e=t.value.rgb)&&void 0!==e?e:t.value;if(void 0!==i.r)return{r:d(i.r),g:d(i.g),b:d(i.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?V(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}}class ui{constructor(t){this.container=t,this.type=0}}class pi{constructor(t){this.container=t,this.type=1}}const vi=new di,gi=new hi;et(vi),et(gi);const yi=new class{constructor(){this._domArray=[],this._eventDispatcher=new t,this._initialized=!1,this._loader=new ri(this),this.plugins=new ci(this)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e){this.plugins.addInteractor(t,e),await this.refresh()}async addMover(t,e){this.plugins.addParticleMover(t,e),await this.refresh()}async addParticleUpdater(t,e){this.plugins.addParticleUpdater(t,e),await this.refresh()}async addPathGenerator(t,e){this.plugins.addPathGenerator(t,e),await this.refresh()}async addPlugin(t){this.plugins.addPlugin(t),await this.refresh()}async addPreset(t,e,i=!1){this.plugins.addPreset(t,e,i),await this.refresh()}async addShape(t,e,i,o,n){let s;s="function"==typeof e?{afterEffect:o,destroy:n,draw:e,init:i}:e,this.plugins.addShapeDrawer(t,s),await this.refresh()}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this._domArray}domItem(t){const e=this.dom(),i=e[t];if(i&&!i.destroyed)return i;e.splice(t,1)}init(){this._initialized||(this._initialized=!0)}async load(t,e){return this._loader.load(t,e)}async loadFromArray(t,e,i){return this._loader.load(t,e,i)}async loadJSON(t,e,i){return this._loader.loadJSON(t,e,i)}async refresh(){for(const t of this.dom())await t.refresh()}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}async set(t,e,i){return this._loader.set(t,e,i)}async setJSON(t,e,i,o){return this._loader.setJSON(t,e,i,o)}setOnClickHandler(t){const e=this.dom();if(!e.length)throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");for(const i of e)i.addClickHandler(t)}};yi.init();class fi{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 wi extends we{constructor(){super(),this.density=5,this.value=50,this.limit=new fi}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),"number"==typeof t.limit?this.limit.radius=t.limit:this.limit.load(t.limit))}}class mi{constructor(){this.color=new Zt,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new wi}load(t){void 0!==t&&(void 0!==t.color&&(this.color=Zt.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=v(t.position.x)),void 0!==t.position.y&&(this.position.y=v(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))}}class bi{constructor(t,e,i,o){var s,a,r;this.absorbers=t,this.container=e,this.initialPosition=o?n.create(o.x,o.y):void 0,i instanceof mi?this.options=i:(this.options=new mi,this.options.load(i)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=d(this.options.size.value)*e.retina.pixelRatio,this.mass=this.size*this.options.size.density*e.retina.reduceFactor;const l=this.options.size.limit;this.limit={radius:l.radius*e.retina.pixelRatio*e.retina.reduceFactor,mass:l.mass},this.color=null!==(s=nt(this.options.color))&&void 0!==s?s:{b:0,g:0,r:0},this.position=null!==(r=null===(a=this.initialPosition)||void 0===a?void 0:a.copy())&&void 0!==r?r:this.calcPosition()}attract(t){const e=this.container,i=this.options;if(i.draggable){const t=e.interactivity.mouse;if(t.clicking&&t.downPosition){f(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 o=t.getPosition(),{dx:s,dy:a,distance:r}=y(this.position,o),l=n.create(s,a);if(l.length=this.mass/Math.pow(r,2)*e.retina.reduceFactor,r<this.size+t.getRadius()){const o=.033*t.getRadius()*e.retina.pixelRatio;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?i.destroy?t.destroy():(t.needsNewPosition=!0,this.updateParticlePosition(t,l)):(i.destroy&&(t.size.value-=o),this.updateParticlePosition(t,l)),(this.limit.radius<=0||this.size<this.limit.radius)&&(this.size+=o),(this.limit.mass<=0||this.mass<this.limit.mass)&&(this.mass+=o*this.options.size.density*e.retina.reduceFactor)}else this.updateParticlePosition(t,l)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(0,0,this.size,0,2*Math.PI,!1),t.closePath(),t.fillStyle=vt(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&H(t,this.container.canvas.size,n.origin)?t:this.calcPosition()}calcPosition(){const t=x({size:this.container.canvas.size,position:this.options.position});return n.create(t.x,t.y)}updateParticlePosition(t,e){var i;if(t.destroyed)return;const o=this.container,s=o.canvas.size;if(t.needsNewPosition){const e=P({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=n.create(0,0),t.absorberOrbit.length=f(t.getPosition(),this.position),t.absorberOrbit.angle=r()*Math.PI*2),t.absorberOrbit.length<=this.size&&!this.options.destroy){const e=Math.min(s.width,s.height);t.absorberOrbit.length=e*(.2*r()-.1+1)}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?"clockwise":"counter-clockwise");const a=t.absorberOrbit.length,l=t.absorberOrbit.angle,c=t.absorberOrbitDirection;t.velocity.setTo(n.origin);const h={x:"clockwise"===c?Math.cos:Math.sin,y:"clockwise"===c?Math.sin:Math.cos};t.position.x=this.position.x+a*h.x(l),t.position.y=this.position.y+a*h.y(l),t.absorberOrbit.length-=e.length,t.absorberOrbit.angle+=(null!==(i=t.retina.moveSpeed)&&void 0!==i?i:0)*o.retina.pixelRatio/100*o.retina.reduceFactor}else{const i=n.origin;i.length=e.length,i.angle=e.angle,t.velocity.addTo(i)}}}class Si{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((e=>e.name===t)),t.addAbsorber=(t,e)=>this.addAbsorber(t,e)}addAbsorber(t,e){const i=new bi(this,this.container,t,e);return this.array.push(i),i}draw(t){for(const e of this.array)t.save(),e.draw(t),t.restore()}handleClickMode(t){const e=this.absorbers,i=this.interactivityAbsorbers;if("absorber"===t){const t=X(i),o=null!=t?t:X(e),n=this.container.interactivity.mouse.clickPosition;this.addAbsorber(o,n)}}init(t){var e,i;t&&(this.absorbers=Z(t.absorbers,(t=>{const e=new mi;return e.load(t),e})),this.interactivityAbsorbers=Z(null===(i=null===(e=t.interactivity)||void 0===e?void 0:e.modes)||void 0===i?void 0:i.absorbers,(t=>{const e=new mi;return e.load(t),e})),Z(this.absorbers,(t=>{this.addAbsorber(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 _i{constructor(){this.id="absorbers"}getPlugin(t){return new Si(t)}loadOptions(t,e){var i,o;if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;const n=t;n.absorbers=Z(null==e?void 0:e.absorbers,(t=>{const e=new mi;return e.load(t),e})),n.interactivity.modes.absorbers=Z(null===(o=null===(i=null==e?void 0:e.interactivity)||void 0===i?void 0:i.modes)||void 0===o?void 0:o.absorbers,(t=>{const e=new mi;return e.load(t),e}))}needsPlugin(t){var e,i,o;if(!t)return!1;const n=t.absorbers;return n instanceof Array?!!n.length:!!n||!(!(null===(o=null===(i=null===(e=t.interactivity)||void 0===e?void 0:e.events)||void 0===i?void 0:i.onClick)||void 0===o?void 0:o.mode)||!z("absorber",t.interactivity.events.onClick.mode))}}class Pi{load(t){t&&(void 0!==t.bottom&&(this.bottom=v(t.bottom)),void 0!==t.left&&(this.left=v(t.left)),void 0!==t.right&&(this.right=v(t.right)),void 0!==t.top&&(this.top=v(t.top)))}}class xi extends we{constructor(){super(),this.value=3}}class Ci extends we{constructor(){super(),this.value={min:4,max:9}}}class Ai{constructor(){this.count=1,this.factor=new xi,this.rate=new Ci,this.sizeOffset=!0}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=Z(t.particles,(t=>N({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset))}}class Vi{constructor(){this.bounds=new Pi,this.mode="none",this.split=new Ai}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}class Oi{constructor(t,e){this.engine=t,this.container=e}init(t){const e=this.container,i=t.options.destroy;if(!i)return;t.splitCount=0;const o=i.bounds;t.destroyBounds||(t.destroyBounds={}),o.bottom&&(t.destroyBounds.bottom=d(o.bottom)*e.canvas.size.height/100),o.left&&(t.destroyBounds.left=d(o.left)*e.canvas.size.width/100),o.right&&(t.destroyBounds.right=d(o.right)*e.canvas.size.width/100),o.top&&(t.destroyBounds.top=d(o.top)*e.canvas.size.height/100)}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.destroy||(t.destroy=new Vi);for(const i of e)t.destroy.load(null==i?void 0:i.destroy)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;i&&"split"===i.mode&&this.split(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()}addSplitParticle(t,e){const i=t.options.destroy;if(!i)return;const o=i.split,n=Ue(this.engine,this.container,t.options),s=g(o.factor);n.color.load({value:{hsl:t.getFillColor()}}),n.move.load({center:{x:t.position.x,y:t.position.y,mode:"precise"}}),"number"==typeof n.size.value?n.size.value/=s:(n.size.value.min/=s,n.size.value.max/=s),n.load(e);const a=o.sizeOffset?v(-t.size.value,t.size.value):0,r={x:t.position.x+h(a),y:t.position.y+h(a)};return this.container.particles.addParticle(r,n,t.group,(e=>{var i;return!(e.size.value<.5)&&(e.velocity.length=h(v(t.velocity.length,e.velocity.length)),e.splitCount=(null!==(i=t.splitCount)&&void 0!==i?i:0)+1,e.unbreakable=!0,setTimeout((()=>{e.unbreakable=!1}),500),!0)}))}split(t){const e=t.options.destroy;if(!e)return;const i=e.split;if(i.count>=0&&(void 0===t.splitCount||t.splitCount++>i.count))return;const o=g(i.rate),n=X(i.particles);for(let e=0;e<o;e++)this.addSplitParticle(t,n)}}class Gi{randomPosition(t,e,i){const[o,n]=[e.width/2,e.height/2],s=((t,e)=>{const i=r()/4,o=Math.atan(e/t*Math.tan(2*Math.PI*i)),n=r();return n<.25?o:n<.5?Math.PI-o:n<.75?Math.PI+o:-o})(o,n),a=(d=s,(c=o)*(h=n)/Math.sqrt((h*Math.cos(d))**2+(c*Math.sin(d))**2)),l=i?a*Math.sqrt(r()):a;var c,h,d;return{x:t.x+l*Math.cos(s),y:t.y+l*Math.sin(s)}}}class Ei{constructor(){this.wait=!1}load(t){void 0!==t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.wait&&(this.wait=t.wait))}}class Ti{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=v(t.quantity)),void 0!==t.delay&&(this.delay=v(t.delay)))}}class Ri{constructor(){this.mode="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 ki{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new Ei,this.rate=new Ti,this.shape="square",this.startCount=0}load(t){void 0!==t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(void 0===this.size&&(this.size=new Ri),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=Z(t.particles,(t=>N({},t))),this.rate.load(t.rate),void 0!==t.shape&&(this.shape=t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=v(t.position.x)),void 0!==t.position.y&&(this.position.y=v(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new ge),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class zi{constructor(t,e,i,o,n){var s,a,r,l,c,h,d,u;this.emitters=e,this.container=i,this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=n,o instanceof ki?this.options=o:(this.options=new ki,this.options.load(o)),this._spawnDelay=1e3*(null!==(s=this.options.life.delay)&&void 0!==s?s:0)/this.container.retina.reduceFactor,this.position=null!==(a=this._initialPosition)&&void 0!==a?a:this.calcPosition(),this.name=this.options.name,this._shape=null===(r=this._engine.emitterShapeManager)||void 0===r?void 0:r.getShape(this.options.shape),this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let p=N({},this.options.particles);null!=p||(p={}),null!==(l=p.move)&&void 0!==l||(p.move={}),null!==(c=(u=p.move).direction)&&void 0!==c||(u.direction=this.options.direction),this.options.spawnColor&&(this.spawnColor=rt(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=p,this.size=null!==(h=this.options.size)&&void 0!==h?h:(()=>{const t=new Ri;return t.load({height:0,mode:"percent",width:0}),t})(),this._lifeCount=null!==(d=this.options.life.count)&&void 0!==d?d:-1,this._immortal=this._lifeCount<=0,this._engine.dispatchEvent("emitterCreated",{container:i,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}getPosition(){if(this.options.domId){const t=this.container,e=document.getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{x:(i.x+i.width/2)*t.retina.pixelRatio,y:(i.y+i.height/2)*t.retina.pixelRatio}}}return this.position}getSize(){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}}}return{width:"percent"===this.size.mode?t.canvas.size.width*this.size.width/100:this.size.width,height:"percent"===this.size.mode?t.canvas.size.height*this.size.height/100:this.size.height}}pause(){this._paused||delete this._emitDelay}play(){var t;if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(null!==(t=this._spawnDelay)&&void 0!==t?t:0))){if(void 0===this._emitDelay){const t=d(this.options.rate.delay);this._emitDelay=1e3*t/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this.prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&H(t,this.container.canvas.size,n.origin)?t:this.calcPosition()}update(t){var e,i,o;this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=null!==(e=this._spawnDelay)&&void 0!==e?e:0,this._currentEmitDelay=null!==(i=this._emitDelay)&&void 0!==i?i: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._spawnDelay=1e3*(null!==(o=this.options.life.delay)&&void 0!==o?o:0)/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(){return x({size:this.container.canvas.size,position:this.options.position})}destroy(){this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})}emit(){if(this._paused)return;const t=d(this.options.rate.quantity);this.emitParticles(t)}emitParticles(t){var e,i,o;const n=this.getPosition(),s=this.getSize(),a=X(this._particlesOptions);for(let r=0;r<t;r++){const t=N({},a);if(this.spawnColor){const i=null===(e=this.options.spawnColor)||void 0===e?void 0:e.animation;i&&(this.spawnColor.h=this.setColorAnimation(i.h,this.spawnColor.h,360),this.spawnColor.s=this.setColorAnimation(i.s,this.spawnColor.s,100),this.spawnColor.l=this.setColorAnimation(i.l,this.spawnColor.l,100)),t.color?t.color.value=this.spawnColor:t.color={value:this.spawnColor}}if(!n)return;const r=null!==(o=null===(i=this._shape)||void 0===i?void 0:i.randomPosition(n,s,this.fill))&&void 0!==o?o:n;this.container.particles.addParticle(r,t)}}prepareToDie(){var t;if(this._paused)return;const e=null===(t=this.options.life)||void 0===t?void 0:t.duration;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==e&&e>0&&(this._duration=1e3*e)}setColorAnimation(t,e,i){var o;const n=this.container;if(!t.enable)return e;const s=h(t.offset),a=1e3*d(this.options.rate.delay)/n.retina.reduceFactor;return(e+d(null!==(o=t.speed)&&void 0!==o?o:0)*n.fpsLimit/a+3.6*s)%i}}class Mi{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||"number"==typeof t?this.array[t||0]:this.array.find((e=>e.name===t)),e.addEmitter=(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()}}addEmitter(t,e){const i=new ki;i.load(t);const o=new zi(this._engine,this,this.container,i,e);return this.array.push(o),o}handleClickMode(t){const e=this.emitters,i=this.interactivityEmitters;if("emitter"===t){let t;if(i&&i.value instanceof Array)if(i.value.length>0&&i.random.enable){t=[];const e=[];for(let o=0;o<i.random.count;o++){const n=L(i.value);e.includes(n)&&e.length<i.value.length?o--:(e.push(n),t.push(I(i.value,n)))}}else t=i.value;else t=null==i?void 0:i.value;const o=null!=t?t:e,n=this.container.interactivity.mouse.clickPosition;Z(o,(t=>{this.addEmitter(t,n)}))}}init(t){var e,i,o,n,s,a,r,l;if(!t)return;this.emitters=Z(t.emitters,(t=>{const e=new ki;return e.load(t),e}));const c=null===(i=null===(e=t.interactivity)||void 0===e?void 0:e.modes)||void 0===i?void 0:i.emitters;if(c)if(c instanceof Array)this.interactivityEmitters={random:{count:1,enable:!0},value:c.map((t=>{const e=new ki;return e.load(t),e}))};else{const t=c;if(void 0!==t.value)if(t.value instanceof Array)this.interactivityEmitters={random:{count:null!==(o=this.interactivityEmitters.random.count)&&void 0!==o?o:1,enable:null!==(n=this.interactivityEmitters.random.enable)&&void 0!==n&&n},value:t.value.map((t=>{const e=new ki;return e.load(t),e}))};else{const e=new ki;e.load(t.value),this.interactivityEmitters={random:{count:null!==(s=this.interactivityEmitters.random.count)&&void 0!==s?s:1,enable:null!==(a=this.interactivityEmitters.random.enable)&&void 0!==a&&a},value:e}}else{const t=new ki;t.load(c),this.interactivityEmitters={random:{count:null!==(r=this.interactivityEmitters.random.count)&&void 0!==r?r:1,enable:null!==(l=this.interactivityEmitters.random.enable)&&void 0!==l&&l},value:t}}}if(this.emitters instanceof Array)for(const t of this.emitters)this.addEmitter(t);else 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)}}const Li=new Map;class Ii{constructor(t){this._engine=t}addShape(t,e){this.getShape(t)||Li.set(t,e)}getShape(t){return Li.get(t)}getSupportedShapes(){return Li.keys()}}function Hi(t,e){return t+e*(r()-.5)}class Di{randomPosition(t,e,i){if(i)return{x:Hi(t.x,e.width),y:Hi(t.y,e.height)};{const i=e.width/2,o=e.height/2,n=Math.floor(4*r()),s=2*(r()-.5);switch(n){case 0:return{x:t.x+s*i,y:t.y-o};case 1:return{x:t.x-i,y:t.y+s*o};case 2:return{x:t.x+s*i,y:t.y+o};default:return{x:t.x+i,y:t.y+s*o}}}}}class Bi{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return new Mi(this._engine,t)}loadOptions(t,e){var i,o,n,s,a,r;if(!this.needsPlugin(t)&&!this.needsPlugin(e))return;const l=t;l.emitters=Z(null==e?void 0:e.emitters,(t=>{const e=new ki;return e.load(t),e}));const c=null===(o=null===(i=null==e?void 0:e.interactivity)||void 0===i?void 0:i.modes)||void 0===o?void 0:o.emitters;if(c)if(c instanceof Array)l.interactivity.modes.emitters={random:{count:1,enable:!0},value:c.map((t=>{const e=new ki;return e.load(t),e}))};else{const t=c;if(void 0!==t.value)if(t.value instanceof Array)l.interactivity.modes.emitters={random:{count:null!==(n=t.random.count)&&void 0!==n?n:1,enable:null!==(s=t.random.enable)&&void 0!==s&&s},value:t.value.map((t=>{const e=new ki;return e.load(t),e}))};else{const e=new ki;e.load(t.value),l.interactivity.modes.emitters={random:{count:null!==(a=t.random.count)&&void 0!==a?a:1,enable:null!==(r=t.random.enable)&&void 0!==r&&r},value:e}}else{(l.interactivity.modes.emitters={random:{count:1,enable:!1},value:new ki}).value.load(c)}}}needsPlugin(t){var e,i,o;if(!t)return!1;const n=t.emitters;return n instanceof Array&&!!n.length||void 0!==n||!!(null===(o=null===(i=null===(e=t.interactivity)||void 0===e?void 0:e.events)||void 0===i?void 0:i.onClick)||void 0===o?void 0:o.mode)&&z("emitter",t.interactivity.events.onClick.mode)}}class Ni{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=N({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}class Fi extends ui{constructor(t){super(t),this._delay=0}clear(){}init(){}async interact(t){var e,i,o,n;if(!this.container.retina.reduceFactor)return;const s=this.container,a=s.actualOptions.interactivity.modes.trail;if(!a)return;const r=1e3*a.delay/this.container.retina.reduceFactor;if(this._delay<r&&(this._delay+=t.value),this._delay<r)return;let l=!0;a.pauseOnStop&&(s.interactivity.mouse.position===this._lastPosition||(null===(e=s.interactivity.mouse.position)||void 0===e?void 0:e.x)===(null===(i=this._lastPosition)||void 0===i?void 0:i.x)&&(null===(o=s.interactivity.mouse.position)||void 0===o?void 0:o.y)===(null===(n=this._lastPosition)||void 0===n?void 0:n.y))&&(l=!1),s.interactivity.mouse.position?this._lastPosition={x:s.interactivity.mouse.position.x,y:s.interactivity.mouse.position.y}:delete this._lastPosition,l&&s.particles.push(a.quantity,s.interactivity.mouse,a.particles),this._delay-=r}isEnabled(t){var e;const i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:o.interactivity).events;return n.clicking&&n.inside&&!!n.position&&z("trail",s.onClick.mode)||n.inside&&!!n.position&&z("trail",s.onHover.mode)}loadModeOptions(t,...e){t.trail||(t.trail=new Ni);for(const i of e)t.trail.load(null==i?void 0:i.trail)}reset(){}}i(74);class ji{constructor(){this.color=new Zt,this.width=.5,this.opacity=1}load(t){var e;t&&(this.color=Zt.create(this.color,t.color),"string"==typeof this.color.value&&(this.opacity=null!==(e=ct(this.color.value))&&void 0!==e?e:this.opacity),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.width&&(this.width=t.width))}}class Ui{constructor(){this.enable=!1,this.stroke=new ji}get lineColor(){return this.stroke.color}set lineColor(t){this.stroke.color=Zt.create(this.stroke.color,t)}get lineWidth(){return this.stroke.width}set lineWidth(t){this.stroke.width=t}load(t){var e;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const i=null!==(e=t.stroke)&&void 0!==e?e:{color:t.lineColor,width:t.lineWidth};this.stroke.load(i)}}class qi{constructor(){this.arrangement="one-per-point"}load(t){t&&void 0!==t.arrangement&&(this.arrangement=t.arrangement)}}class Qi{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)))}}class Wi{constructor(){this.radius=10,this.type="path"}load(t){t&&(void 0!==t.radius&&(this.radius=t.radius),void 0!==t.type&&(this.type=t.type))}}class $i{constructor(){this.draw=new Ui,this.enable=!1,this.inline=new qi,this.move=new Wi,this.scale=1,this.type="none"}get inlineArrangement(){return this.inline.arrangement}set inlineArrangement(t){this.inline.arrangement=t}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="none"!==this.type,void 0!==t.url&&(this.url=t.url),void 0!==t.data&&("string"==typeof t.data?this.data=t.data:(this.data=new Qi,this.data.load(t.data))),void 0!==t.position&&(this.position=N({},t.position)))}}function Zi(t,e,i){const o=nt(i.color);if(o){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(const i of e)t.lineTo(i.x,i.y);t.closePath(),t.strokeStyle=vt(o),t.lineWidth=i.width,t.stroke()}}function Xi(t,e,i,o){t.translate(o.x,o.y);const n=nt(i.color);n&&(t.strokeStyle=vt(n,i.opacity),t.lineWidth=i.width,t.stroke(e))}function Yi(t,e,i){const{dx:o,dy:n}=y(i,t),{dx:s,dy:a}=y(e,t),r=(o*s+n*a)/(s**2+a**2),l={x:t.x+s*r,y:t.x+a*r,isOnSegment:r>=0&&r<=1};return r<0?(l.x=t.x,l.y=t.y):r>1&&(l.x=e.x,l.y=e.y),l}function Ji(t,e,i){const{dx:o,dy:s}=y(t,e),a=Math.atan2(s,o),r=n.create(Math.sin(a),-Math.cos(a)),l=2*(i.x*r.x+i.y*r.y);r.multTo(l),i.subFrom(r)}const Ki="No polygon data loaded.";class to{constructor(t,e){this._container=t,this._engine=e,this.dimension={height:0,width:0},this.path2DSupported=!!window.Path2D,this.options=new $i,this._polygonMaskMoveRadius=this.options.move.radius*t.retina.pixelRatio}clickPositionValid(t){const e=this.options;return e.enable&&"none"!==e.type&&"inline"!==e.type&&this.checkInsidePolygon(t)}draw(t){var e;if(!(null===(e=this.paths)||void 0===e?void 0:e.length))return;const i=this.options,o=i.draw;if(!i.enable||!o.enable)return;const n=this.raw;for(const e of this.paths){const i=e.path2d,s=this.path2DSupported;t&&(s&&i&&this.offset?Xi(t,i,o.stroke,this.offset):n&&Zi(t,n,o.stroke))}}async initAsync(t){this.options.load(null==t?void 0:t.polygon);const e=this.options;this._polygonMaskMoveRadius=e.move.radius*this._container.retina.pixelRatio,e.enable&&await this.initRawData()}particleBounce(t,e,i){return this.polygonBounce(t,e,i)}particlePosition(t){var e,i;if(this.options.enable&&(null!==(i=null===(e=this.raw)||void 0===e?void 0:e.length)&&void 0!==i?i:0)>0)return N({},t||this.randomPoint())}particlesInitialization(){const t=this.options;return!(!t.enable||"inline"!==t.type||"one-per-point"!==t.inline.arrangement&&"per-point"!==t.inline.arrangement)&&(this.drawPoints(),!0)}resize(){const t=this._container,e=this.options;e.enable&&"none"!==e.type&&(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}checkInsidePolygon(t){var e,i;const o=this._container,n=this.options;if(!n.enable||"none"===n.type||"inline"===n.type)return!0;if(!this.raw)throw new Error("No polygon found, you need to specify SVG url in config.");const s=o.canvas.size,a=null!==(e=null==t?void 0:t.x)&&void 0!==e?e:r()*s.width,l=null!==(i=null==t?void 0:t.y)&&void 0!==i?i:r()*s.height;let c=!1;for(let t=0,e=this.raw.length-1;t<this.raw.length;e=t++){const i=this.raw[t],o=this.raw[e];i.y>l!=o.y>l&&a<(o.x-i.x)*(l-i.y)/(o.y-i.y)+i.x&&(c=!c)}return"inside"===n.type?c:"outside"===n.type&&!c}createPath2D(){var t,e;const i=this.options;if(this.path2DSupported&&(null===(t=this.paths)||void 0===t?void 0:t.length))for(const t of this.paths){const o=null===(e=t.element)||void 0===e?void 0:e.getAttribute("d");if(o){const e=new Path2D(o),n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGMatrix(),s=new Path2D,a=n.scale(i.scale);s.addPath?(s.addPath(e,a),t.path2d=s):delete t.path2d}else delete t.path2d;!t.path2d&&this.raw&&(t.path2d=new Path2D,t.path2d.moveTo(this.raw[0].x,this.raw[0].y),this.raw.forEach(((e,i)=>{var o;i>0&&(null===(o=t.path2d)||void 0===o||o.lineTo(e.x,e.y))})),t.path2d.closePath())}}async downloadSvgPath(t,e){const i=this.options,o=t||i.url,n=null!=e&&e;if(!o||void 0!==this.paths&&!n)return this.raw;const s=await fetch(o);if(!s.ok)throw new Error("tsParticles Error - Error occurred during polygon mask download");return this.parseSvgPath(await s.text(),e)}drawPoints(){if(this.raw)for(const t of this.raw)this._container.particles.addParticle({x:t.x,y:t.y})}getEquidistantPointByIndex(t){var e,i,o,n,s,a,r;const l=this._container.actualOptions,c=this.options;if(!this.raw||!this.raw.length||!(null===(e=this.paths)||void 0===e?void 0:e.length))throw new Error(Ki);let h,d=0;const u=this.paths.reduce(((t,e)=>t+e.length),0)/l.particles.number.value;for(const e of this.paths){const i=u*t-d;if(i<=e.length){h=e.element.getPointAtLength(i);break}d+=e.length}return{x:(null!==(i=null==h?void 0:h.x)&&void 0!==i?i:0)*c.scale+(null!==(n=null===(o=this.offset)||void 0===o?void 0:o.x)&&void 0!==n?n:0),y:(null!==(s=null==h?void 0:h.y)&&void 0!==s?s:0)*c.scale+(null!==(r=null===(a=this.offset)||void 0===a?void 0:a.y)&&void 0!==r?r:0)}}getPointByIndex(t){if(!this.raw||!this.raw.length)throw new Error(Ki);const e=this.raw[t%this.raw.length];return{x:e.x,y:e.y}}getRandomPoint(){if(!this.raw||!this.raw.length)throw new Error(Ki);const t=I(this.raw);return{x:t.x,y:t.y}}getRandomPointByLength(){var t,e,i;const o=this.options;if(!this.raw||!this.raw.length||!(null===(t=this.paths)||void 0===t?void 0:t.length))throw new Error(Ki);const n=I(this.paths),s=Math.floor(r()*n.length)+1,a=n.element.getPointAtLength(s);return{x:a.x*o.scale+((null===(e=this.offset)||void 0===e?void 0:e.x)||0),y:a.y*o.scale+((null===(i=this.offset)||void 0===i?void 0:i.y)||0)}}async initRawData(t){const e=this.options;if(e.url)this.raw=await this.downloadSvgPath(e.url,t);else if(e.data){const i=e.data;let o;if("string"!=typeof i){const t=i.path instanceof Array?i.path.map((t=>`<path d="${t}" />`)).join(""):`<path d="${i.path}" />`;o=`<svg ${'xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"'} width="${i.size.width}" height="${i.size.height}">${t}</svg>`}else o=i;this.raw=this.parseSvgPath(o,t)}this.createPath2D(),this._engine.dispatchEvent("polygonMaskLoaded",{container:this._container})}parseSvgPath(t,e){var i,o,n;const s=null!=e&&e;if(void 0!==this.paths&&!s)return this.raw;const a=this._container,r=this.options,l=(new DOMParser).parseFromString(t,"image/svg+xml"),c=l.getElementsByTagName("svg")[0];let h=c.getElementsByTagName("path");h.length||(h=l.getElementsByTagName("path")),this.paths=[];for(let t=0;t<h.length;t++){const e=h.item(t);e&&this.paths.push({element:e,length:e.getTotalLength()})}const d=a.retina.pixelRatio,u=r.scale/d;this.dimension.width=parseFloat(null!==(i=c.getAttribute("width"))&&void 0!==i?i:"0")*u,this.dimension.height=parseFloat(null!==(o=c.getAttribute("height"))&&void 0!==o?o:"0")*u;const p=null!==(n=r.position)&&void 0!==n?n:{x:50,y:50};return this.offset={x:a.canvas.size.width*p.x/(100*d)-this.dimension.width/2,y:a.canvas.size.height*p.y/(100*d)-this.dimension.height/2},function(t,e,i){var o;const n=[];for(const s of t){const t=s.element.pathSegList,a=null!==(o=null==t?void 0:t.numberOfItems)&&void 0!==o?o:0,r={x:0,y:0};for(let o=0;o<a;o++){const s=null==t?void 0:t.getItem(o),a=window.SVGPathSeg;switch(null==s?void 0:s.pathSegType){case a.PATHSEG_MOVETO_ABS:case a.PATHSEG_LINETO_ABS:case a.PATHSEG_CURVETO_CUBIC_ABS:case a.PATHSEG_CURVETO_QUADRATIC_ABS:case a.PATHSEG_ARC_ABS:case a.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS:case a.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS:{const t=s;r.x=t.x,r.y=t.y;break}case a.PATHSEG_LINETO_HORIZONTAL_ABS:r.x=s.x;break;case a.PATHSEG_LINETO_VERTICAL_ABS:r.y=s.y;break;case a.PATHSEG_LINETO_REL:case a.PATHSEG_MOVETO_REL:case a.PATHSEG_CURVETO_CUBIC_REL:case a.PATHSEG_CURVETO_QUADRATIC_REL:case a.PATHSEG_ARC_REL:case a.PATHSEG_CURVETO_CUBIC_SMOOTH_REL:case a.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL:{const t=s;r.x+=t.x,r.y+=t.y;break}case a.PATHSEG_LINETO_HORIZONTAL_REL:r.x+=s.x;break;case a.PATHSEG_LINETO_VERTICAL_REL:r.y+=s.y;break;case a.PATHSEG_UNKNOWN:case a.PATHSEG_CLOSEPATH:continue}n.push({x:r.x*e+i.x,y:r.y*e+i.y})}}return n}(this.paths,u,this.offset)}polygonBounce(t,e,i){const o=this.options;if(!this.raw||!o.enable||"top"!==i)return!1;if("inside"===o.type||"outside"===o.type){let e,i,o;const n=t.getPosition(),s=t.getRadius();for(let a=0,r=this.raw.length-1;a<this.raw.length;r=a++){const l=this.raw[a],c=this.raw[r];e=Yi(l,c,n);const h=y(n,e);if([i,o]=[h.dx,h.dy],h.distance<s)return Ji(l,c,t.velocity),!0}if(e&&void 0!==i&&void 0!==o&&!this.checkInsidePolygon(n)){const i={x:1,y:1};return t.position.x>=e.x&&(i.x=-1),t.position.y>=e.y&&(i.y=-1),t.position.x=e.x+2*s*i.x,t.position.y=e.y+2*s*i.y,t.velocity.mult(-1),!0}}else if("inline"===o.type&&t.initialPosition){if(f(t.initialPosition,t.getPosition())>this._polygonMaskMoveRadius)return t.velocity.x=t.velocity.y/2-t.velocity.x,t.velocity.y=t.velocity.x/2-t.velocity.y,!0}return!1}randomPoint(){const t=this._container,e=this.options;let i;if("inline"===e.type)switch(e.inline.arrangement){case"random-point":i=this.getRandomPoint();break;case"random-length":i=this.getRandomPointByLength();break;case"equidistant":i=this.getEquidistantPointByIndex(t.particles.count);break;default:i=this.getPointByIndex(t.particles.count)}else i={x:r()*t.canvas.size.width,y:r()*t.canvas.size.height};return this.checkInsidePolygon(i)?i:this.randomPoint()}}class eo{constructor(t){this.id="polygonMask",this._engine=t}getPlugin(t){return new to(t,this._engine)}loadOptions(t,e){if(!this.needsPlugin(e))return;const i=t;let o=i.polygon;void 0===(null==o?void 0:o.load)&&(i.polygon=o=new $i),o.load(null==e?void 0:e.polygon)}needsPlugin(t){var e,i,o;return null!==(i=null===(e=null==t?void 0:t.polygon)||void 0===e?void 0:e.enable)&&void 0!==i?i:void 0!==(null===(o=null==t?void 0:t.polygon)||void 0===o?void 0:o.type)&&"none"!==t.polygon.type}}class io{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=v(t.value)))}}class oo{constructor(){this.darken=new io,this.enable=!1,this.enlighten=new io,this.mode="vertical",this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=Zt.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=v(t.speed)))}}class no{getTransformValues(t){var e;const i=(null===(e=t.roll)||void 0===e?void 0:e.enable)&&t.roll,o=i&&i.horizontal,n=i&&i.vertical;return{a:o?Math.cos(i.angle):void 0,d:n?Math.sin(i.angle):void 0}}init(t){const e=t.options.roll;if(null==e?void 0:e.enable)if(t.roll={enable:e.enable,horizontal:"horizontal"===e.mode||"both"===e.mode,vertical:"vertical"===e.mode||"both"===e.mode,angle:r()*Math.PI*2,speed:d(e.speed)/360},e.backColor)t.backColor=rt(e.backColor);else if(e.darken.enable&&e.enlighten.enable){const i=r()>=.5?"darken":"enlighten";t.roll.alter={type:i,value:d("darken"===i?e.darken.value:e.enlighten.value)}}else e.darken.enable?t.roll.alter={type:"darken",value:d(e.darken.value)}:e.enlighten.enable&&(t.roll.alter={type:"enlighten",value:d(e.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!(null==e?void 0:e.enable)}loadOptions(t,...e){t.roll||(t.roll=new oo);for(const i of e)t.roll.load(null==i?void 0:i.roll)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll;if(!t.roll||!(null==i?void 0:i.enable))return;const o=t.roll.speed*e.factor,n=2*Math.PI;t.roll.angle+=o,t.roll.angle>n&&(t.roll.angle-=n)}(t,e)}}class so{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=v(t.speed)),void 0!==t.decay&&(this.decay=v(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ao extends we{constructor(){super(),this.animation=new so,this.direction="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))}}class ro{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:d(e.value)*Math.PI/180},t.pathRotation=e.path;let i=e.direction;if("random"===i){i=Math.floor(2*r())>0?"counter-clockwise":"clockwise"}switch(i){case"counter-clockwise":case"counterClockwise":t.rotate.status=1;break;case"clockwise":t.rotate.status=0}const o=e.animation;o.enable&&(t.rotate.decay=1-d(o.decay),t.rotate.velocity=d(o.speed)/360*this.container.retina.reduceFactor,o.sync||(t.rotate.velocity*=r())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&e.animation.enable&&!e.path)}loadOptions(t,...e){t.rotate||(t.rotate=new ao);for(const i of e)t.rotate.load(null==i?void 0:i.rotate)}update(t,e){var i,o;this.isEnabled(t)&&(!function(t,e){var i,o;const n=t.rotate,s=t.options.rotate;if(!n||!s)return;const a=s.animation,r=(null!==(i=n.velocity)&&void 0!==i?i:0)*e.factor,l=2*Math.PI,c=null!==(o=n.decay)&&void 0!==o?o:1;a.enable&&(0===n.status?(n.value+=r,n.value>l&&(n.value-=l)):(n.value-=r,n.value<0&&(n.value+=l)),n.velocity&&1!==c&&(n.velocity*=c))}(t,e),t.rotation=null!==(o=null===(i=t.rotate)||void 0===i?void 0:i.value)&&void 0!==o?o:0)}}class lo{init(t){var e;const i=t.container,o=t.options,n=o.move.gravity,s=o.move.spin;if(t.gravity={enable:n.enable,acceleration:d(n.acceleration),inverse:n.inverse},s.enable){const o=null!==(e=s.position)&&void 0!==e?e:{x:50,y:50},n={x:o.x/100*i.canvas.size.width,y:o.y/100*i.canvas.size.height},a=f(t.getPosition(),n),r=d(s.acceleration);t.retina.spinAcceleration=r*i.retina.pixelRatio,t.spin={center:n,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:a,acceleration:t.retina.spinAcceleration}}}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){var i,o,n,s,a;const c=t.options,h=c.move;if(!h.enable)return;const u=t.container,v=function(t){return t.slow.inRange?t.slow.factor:1}(t),g=(null!==(i=(s=t.retina).moveSpeed)&&void 0!==i?i:s.moveSpeed=d(h.speed)*u.retina.pixelRatio)*u.retina.reduceFactor,f=null!==(o=(a=t.retina).moveDrift)&&void 0!==o?o:a.moveDrift=d(t.options.move.drift)*u.retina.pixelRatio,w=p(c.size.value)*u.retina.pixelRatio,m=g*((h.size?t.getRadius()/w:1)*v*(e.factor||1))/2;if(h.spin.enable)!function(t,e){const i=t.container;if(!t.spin)return;const o={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*o.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*o.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const n=Math.max(i.canvas.size.width,i.canvas.size.height);t.spin.radius>n/2?(t.spin.radius=n/2,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=e/100*(1-t.spin.radius/n)}(t,m);else{!function(t,e){var i;const o=t.options.move.path;if(!o.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const n=null===(i=t.pathGenerator)||void 0===i?void 0:i.generate(t);n&&t.velocity.addTo(n),o.clamp&&(t.velocity.x=l(t.velocity.x,-1,1),t.velocity.y=l(t.velocity.y,-1,1)),t.lastPathTime-=t.pathDelay}(t,e);const i=t.gravity,o=(null==i?void 0:i.enable)&&i.inverse?-1:1;(null==i?void 0:i.enable)&&m&&(t.velocity.y+=o*(i.acceleration*e.factor)/(60*m)),f&&m&&(t.velocity.x+=f*e.factor/(60*m));const s=t.moveDecay;1!=s&&t.velocity.multTo(s);const a=t.velocity.mult(m),r=null!==(n=t.retina.maxSpeed)&&void 0!==n?n:u.retina.maxSpeed;(null==i?void 0:i.enable)&&r>0&&(!i.inverse&&a.y>=0&&a.y>=r||i.inverse&&a.y<=0&&a.y<=-r)&&(a.y=o*r,m&&(t.velocity.y=a.y/m));const c=t.options.zIndex,d=(1-t.zIndexFactor)**c.velocityRate;1!=d&&a.multTo(d),t.position.addTo(a),h.vibrate&&(t.position.x+=Math.sin(t.position.x*Math.cos(t.position.y)),t.position.y+=Math.cos(t.position.y*Math.sin(t.position.x)))}!function(t){const e=t.initialPosition,{dx:i,dy:o}=y(e,t.position),n=Math.abs(i),s=Math.abs(o),a=t.retina.maxDistance.horizontal,l=t.retina.maxDistance.vertical;if(a||l)if((a&&n>=a||l&&s>=l)&&!t.misplaced)t.misplaced=!!a&&n>a||!!l&&s>l,a&&(t.velocity.x=t.velocity.y/2-t.velocity.x),l&&(t.velocity.y=t.velocity.x/2-t.velocity.y);else if((!a||n<a)&&(!l||s<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,o=t.velocity;a&&(i.x<e.x&&o.x<0||i.x>e.x&&o.x>0)&&(o.x*=-r()),l&&(i.y<e.y&&o.y<0||i.y>e.y&&o.y>0)&&(o.y*=-r())}}(t)}}class co{draw(t,e,i){t.arc(0,0,i,0,2*Math.PI,!1)}getSidesCount(){return 12}}function ho(t,e,i,o,n){var s,a;const r=e;if(!r||!i.enable)return;const l=h(i.offset),c=(null!==(s=e.velocity)&&void 0!==s?s:0)*t.factor+3.6*l,d=null!==(a=e.decay)&&void 0!==a?a:1;n&&0!==r.status?(r.value-=c,r.value<0&&(r.status=0,r.value+=r.value)):(r.value+=c,n&&r.value>o&&(r.status=1,r.value-=r.value%o)),r.velocity&&1!==d&&(r.velocity*=d),r.value>o&&(r.value%=o)}class uo{constructor(t){this.container=t}init(t){const e=rt(t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=bt(e,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){var e,i,o;const n=t.options.color.animation;return!t.destroyed&&!t.spawning&&(void 0!==(null===(e=t.color)||void 0===e?void 0:e.h.value)&&n.h.enable||void 0!==(null===(i=t.color)||void 0===i?void 0:i.s.value)&&n.s.enable||void 0!==(null===(o=t.color)||void 0===o?void 0:o.l.value)&&n.l.enable)}update(t,e){!function(t,e){var i,o,n;const s=t.options.color.animation;void 0!==(null===(i=t.color)||void 0===i?void 0:i.h)&&ho(e,t.color.h,s.h,360,!1),void 0!==(null===(o=t.color)||void 0===o?void 0:o.s)&&ho(e,t.color.s,s.s,100,!0),void 0!==(null===(n=t.color)||void 0===n?void 0:n.l)&&ho(e,t.color.l,s.l,100,!0)}(t,e)}}class po{constructor(){this.distance=200,this.duration=.4,this.easing="ease-out-quad",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))}}class vo extends ui{constructor(t){super(t),t.attract||(t.attract={particles:[]}),this.handleClickMode=e=>{const i=this.container.actualOptions.interactivity.modes.attract;if(i&&"attract"===e){t.attract||(t.attract={particles:[]}),t.attract.clicking=!0,t.attract.count=0;for(const e of t.attract.particles)this.isEnabled(e)&&e.velocity.setTo(e.initialVelocity);t.attract.particles=[],t.attract.finish=!1,setTimeout((()=>{t.destroyed||(t.attract||(t.attract={particles:[]}),t.attract.clicking=!1)}),1e3*i.duration)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.attract;e&&(t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===Lt,o=e.interactivity.events,n=o.onHover.enable,s=o.onHover.mode,a=o.onClick.enable,r=o.onClick.mode;i&&n&&z("attract",s)?this.hoverAttract():a&&z("attract",r)&&this.clickAttract()}isEnabled(t){var e;const i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:o.interactivity).events;if(!(n.position&&s.onHover.enable||n.clickPosition&&s.onClick.enable))return!1;const a=s.onHover.mode,r=s.onClick.mode;return z("attract",a)||z("attract",r)}loadModeOptions(t,...e){t.attract||(t.attract=new po);for(const i of e)t.attract.load(null==i?void 0:i.attract)}reset(){}clickAttract(){const t=this.container;if(t.attract||(t.attract={particles:[]}),t.attract.finish||(t.attract.count||(t.attract.count=0),t.attract.count++,t.attract.count===t.particles.count&&(t.attract.finish=!0)),t.attract.clicking){const e=t.interactivity.mouse.clickPosition,i=t.retina.attractModeDistance;if(!i||i<0||!e)return;this.processAttract(e,i,new Ye(e.x,e.y,i))}else!1===t.attract.clicking&&(t.attract.particles=[])}hoverAttract(){const t=this.container,e=t.interactivity.mouse.position,i=t.retina.attractModeDistance;!i||i<0||!e||this.processAttract(e,i,new Ye(e.x,e.y,i))}processAttract(t,e,i){const o=this.container,s=o.actualOptions.interactivity.modes.attract;if(!s)return;const a=o.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const i of a){const{dx:o,dy:a,distance:r}=y(i.position,t),c=s.speed*s.factor,h=l(S(1-r/e,s.easing)*c,0,s.maxSpeed),d=n.create(0===r?c:o/r*h,0===r?c:a/r*h);i.position.subFrom(d)}}}class go{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}class yo extends ui{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)}async interact(){const t=this.container,e=t.actualOptions.interactivity.events,i=t.interactivity.status===Lt,o=e.onHover.enable,n=e.onHover.mode,s=e.onDiv;i&&o&&z("bounce",n)?this.processMouseBounce():j("bounce",s,((t,e)=>this.singleSelectorBounce(t,e)))}isEnabled(t){var e;const i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:o.interactivity).events,a=s.onDiv;return n.position&&s.onHover.enable&&z("bounce",s.onHover.mode)||F("bounce",a)}loadModeOptions(t,...e){t.bounce||(t.bounce=new go);for(const i of e)t.bounce.load(null==i?void 0:i.bounce)}reset(){}processBounce(t,e,i){const o=this.container.particles.quadTree.query(i,(t=>this.isEnabled(t)));for(const s of o)i instanceof Ye?W(Q(s),{position:t,radius:e,mass:e**2*Math.PI/2,velocity:n.origin,factor:n.origin}):i instanceof Je&&$(s,B(t,e))}processMouseBounce(){const t=this.container,e=10*t.retina.pixelRatio,i=t.interactivity.mouse.position,o=t.retina.bounceModeDistance;!o||o<0||!i||this.processBounce(i,o,new Ye(i.x,i.y,o+e))}singleSelectorBounce(t,e){const i=this.container,o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=i.retina.pixelRatio,s={x:(o.offsetLeft+o.offsetWidth/2)*n,y:(o.offsetTop+o.offsetHeight/2)*n},a=o.offsetWidth/2*n,r=10*n,l="circle"===e.type?new Ye(s.x,s.y,a+r):new Je(o.offsetLeft*n-r,o.offsetTop*n-r,o.offsetWidth*n+2*r,o.offsetHeight*n+2*r);this.processBounce(s,a,l)}))}}class fo{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=this.color instanceof Array?void 0:this.color;this.color=Z(t.color,(t=>Zt.create(e,t)))}void 0!==t.size&&(this.size=t.size)}}}class wo extends fo{constructor(){super(),this.selectors=[]}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class mo extends fo{load(t){super.load(t),t&&(this.divs=Z(t.divs,(t=>{const e=new wo;return e.load(t),e})))}}function bo(t,e,i,o){if(e>=i){return l(t+(e-i)*o,t,e)}if(e<i){return l(t-(i-e)*o,e,t)}}class So extends ui{constructor(t){super(t),t.bubble||(t.bubble={}),this.handleClickMode=e=>{"bubble"===e&&(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))}async interact(t){const e=this.container.actualOptions.interactivity.events,i=e.onHover,o=e.onClick,n=i.enable,s=i.mode,a=o.enable,r=o.mode,l=e.onDiv;n&&z("bubble",s)?this.hoverBubble(t):a&&z("bubble",r)?this.clickBubble(t):j("bubble",l,((e,i)=>this.singleSelectorHover(t,e,i)))}isEnabled(t){var e;const i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:o.interactivity).events,a=F("bubble",s.onDiv);if(!(a||s.onHover.enable&&n.position||s.onClick.enable&&n.clickPosition))return!1;const r=s.onHover.mode,l=s.onClick.mode;return z("bubble",r)||z("bubble",l)||a}loadModeOptions(t,...e){t.bubble||(t.bubble=new mo);for(const i of e)t.bubble.load(null==i?void 0:i.bubble)}reset(t){t.bubble.inRange=!1}clickBubble(t){var e,i;const o=this.container,n=o.actualOptions,s=o.interactivity.mouse.clickPosition,a=n.interactivity.modes.bubble;if(!a||!s)return;o.bubble||(o.bubble={});const r=o.retina.bubbleModeDistance;if(!r||r<0)return;const l=o.particles.quadTree.queryCircle(s,r,(t=>this.isEnabled(t)));for(const t of l){if(!o.bubble.clicking)continue;t.bubble.inRange=!o.bubble.durationEnd;const n=f(t.getPosition(),s),l=((new Date).getTime()-(o.interactivity.mouse.clickTime||0))/1e3;l>a.duration&&(o.bubble.durationEnd=!0),l>2*a.duration&&(o.bubble.clicking=!1,o.bubble.durationEnd=!1);const c={bubbleObj:{optValue:o.retina.bubbleModeSize,value:t.bubble.radius},particlesObj:{optValue:p(t.options.size.value)*o.retina.pixelRatio,value:t.size.value},type:"size"};this.process(t,n,l,c);const h={bubbleObj:{optValue:a.opacity,value:t.bubble.opacity},particlesObj:{optValue:p(t.options.opacity.value),value:null!==(i=null===(e=t.opacity)||void 0===e?void 0:e.value)&&void 0!==i?i:1},type:"opacity"};this.process(t,n,l,h),o.bubble.durationEnd?delete t.bubble.color:n<=r?this.hoverBubbleColor(t,n):delete t.bubble.color}}hoverBubble(t){const e=this.container,i=e.interactivity.mouse.position,o=e.retina.bubbleModeDistance;if(!o||o<0||void 0===i)return;const n=e.particles.quadTree.queryCircle(i,o,(t=>this.isEnabled(t)));for(const t of n){t.bubble.inRange=!0;const n=f(t.getPosition(),i),s=1-n/o;n<=o?s>=0&&e.interactivity.status===Lt&&(this.hoverBubbleSize(t,s),this.hoverBubbleOpacity(t,s),this.hoverBubbleColor(t,s)):this.reset(t),e.interactivity.status===Dt&&this.reset(t)}}hoverBubbleColor(t,e,i){const o=this.container.actualOptions,n=null!=i?i:o.interactivity.modes.bubble;if(n){if(!t.bubble.finalColor){const e=n.color;if(!e)return;const i=X(e);t.bubble.finalColor=rt(i)}if(t.bubble.finalColor)if(n.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?lt(yt(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}}hoverBubbleOpacity(t,e,i){var o,n,s,a;const r=this.container.actualOptions,l=null!==(o=null==i?void 0:i.opacity)&&void 0!==o?o:null===(n=r.interactivity.modes.bubble)||void 0===n?void 0:n.opacity;if(!l)return;const c=t.options.opacity.value,h=bo(null!==(a=null===(s=t.opacity)||void 0===s?void 0:s.value)&&void 0!==a?a:1,l,p(c),e);void 0!==h&&(t.bubble.opacity=h)}hoverBubbleSize(t,e,i){const o=this.container,n=(null==i?void 0:i.size)?i.size*o.retina.pixelRatio:o.retina.bubbleModeSize;if(void 0===n)return;const s=p(t.options.size.value)*o.retina.pixelRatio,a=bo(t.size.value,n,s,e);void 0!==a&&(t.bubble.radius=a)}process(t,e,i,o){const n=this.container,s=o.bubbleObj.optValue,a=n.actualOptions.interactivity.modes.bubble;if(!a||void 0===s)return;const r=a.duration,l=n.retina.bubbleModeDistance,c=o.particlesObj.optValue,h=o.bubbleObj.value,d=o.particlesObj.value||0,u=o.type;if(l&&!(l<0)&&s!==c)if(n.bubble||(n.bubble={}),n.bubble.durationEnd)h&&("size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity);else if(e<=l){if((null!=h?h:d)!==s){const e=d-i*(d-s)/r;"size"===u&&(t.bubble.radius=e),"opacity"===u&&(t.bubble.opacity=e)}}else"size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity}singleSelectorHover(t,e,i){const o=this.container,n=document.querySelectorAll(e),s=o.actualOptions.interactivity.modes.bubble;s&&n.length&&n.forEach((e=>{const n=e,a=o.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth/2)*a,y:(n.offsetTop+n.offsetHeight/2)*a},l=n.offsetWidth/2*a,c="circle"===i.type?new Ye(r.x,r.y,l):new Je(n.offsetLeft*a,n.offsetTop*a,n.offsetWidth*a,n.offsetHeight*a),h=o.particles.quadTree.query(c,(t=>this.isEnabled(t)));for(const e of h){if(!c.contains(e.getPosition()))continue;e.bubble.inRange=!0;const i=q(s.divs,n);e.bubble.div&&e.bubble.div===n||(this.clear(e,t,!0),e.bubble.div=n),this.hoverBubbleSize(e,1,i),this.hoverBubbleOpacity(e,1,i),this.hoverBubbleColor(e,1,i)}}))}}class _o{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class Po{constructor(){this.distance=80,this.links=new _o,this.radius=60}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){var e,i;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(i=null!==(e=t.links)&&void 0!==e?e:t.lineLinked)&&void 0!==i?i:t.line_linked),void 0!==t.radius&&(this.radius=t.radius))}}function xo(t,e,i,o){const n=t.actualOptions.interactivity.modes.connect;if(n)return function(t,e,i,o){const n=Math.floor(i.getRadius()/e.getRadius()),s=e.getFillColor(),a=i.getFillColor();if(!s||!a)return;const r=e.getPosition(),l=i.getPosition(),c=yt(s,a,e.getRadius(),i.getRadius()),h=t.createLinearGradient(r.x,r.y,l.x,l.y);return h.addColorStop(0,gt(s,o)),h.addColorStop(n>1?1:n,vt(c,o)),h.addColorStop(1,gt(a,o)),h}(e,i,o,n.links.opacity)}function Co(t,e,i){t.canvas.draw((o=>{var n;const s=xo(t,o,e,i);if(!s)return;const a=e.getPosition(),r=i.getPosition();!function(t,e,i,o,n){t.save(),_t(t,o,n),t.lineWidth=e,t.strokeStyle=i,t.stroke(),t.restore()}(o,null!==(n=e.retina.linksWidth)&&void 0!==n?n:0,s,a,r)}))}class Ao extends ui{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)}async interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const e=t.interactivity.mouse.position;if(!t.retina.connectModeDistance||t.retina.connectModeDistance<0||!t.retina.connectModeRadius||t.retina.connectModeRadius<0||!e)return;const i=Math.abs(t.retina.connectModeRadius),o=t.particles.quadTree.queryCircle(e,i,(t=>this.isEnabled(t)));let n=0;for(const e of o){const i=e.getPosition();for(const s of o.slice(n+1)){const o=s.getPosition(),n=Math.abs(t.retina.connectModeDistance),a=Math.abs(i.x-o.x),r=Math.abs(i.y-o.y);a<n&&r<n&&Co(t,e,s)}++n}}}isEnabled(t){var e;const i=this.container,o=i.interactivity.mouse,n=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:i.actualOptions.interactivity).events;return!(!n.onHover.enable||!o.position)&&z("connect",n.onHover.mode)}loadModeOptions(t,...e){t.connect||(t.connect=new Po);for(const i of e)t.connect.load(null==i?void 0:i.connect)}reset(){}}class Vo{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=Zt.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Oo{constructor(){this.distance=100,this.links=new Vo}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){var e,i;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(i=null!==(e=t.links)&&void 0!==e?e:t.lineLinked)&&void 0!==i?i:t.line_linked))}}function Go(t,e,i,o,n){t.canvas.draw((t=>{var s;const a=e.getPosition();!function(t,e,i,o,n,s){t.save(),_t(t,i,o),t.strokeStyle=vt(n,s),t.lineWidth=e,t.stroke(),t.restore()}(t,null!==(s=e.retina.linksWidth)&&void 0!==s?s:0,a,n,i,o)}))}class Eo extends ui{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)}async interact(){var t,e;const i=this.container,o=i.actualOptions.interactivity;if(!o.modes.grab||!o.events.onHover.enable||i.interactivity.status!==Lt)return;const n=i.interactivity.mouse.position;if(!n)return;const s=i.retina.grabModeDistance;if(!s||s<0)return;const a=i.particles.quadTree.queryCircle(n,s,(t=>this.isEnabled(t)));for(const r of a){const a=f(r.getPosition(),n);if(a>s)continue;const l=o.modes.grab.links,c=l.opacity,h=c-a*c/s;if(h<=0)continue;const d=null!==(t=l.color)&&void 0!==t?t:null===(e=r.options.links)||void 0===e?void 0:e.color;if(!i.particles.grabLineColor&&d){const t=o.modes.grab.links;i.particles.grabLineColor=wt(d,t.blink,t.consent)}const u=ft(r,void 0,i.particles.grabLineColor);if(!u)return;Go(i,r,u,h,n)}}isEnabled(t){var e;const i=this.container,o=i.interactivity.mouse,n=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:i.actualOptions.interactivity).events;return n.onHover.enable&&!!o.position&&z("grab",n.onHover.mode)}loadModeOptions(t,...e){t.grab||(t.grab=new Oo);for(const i of e)t.grab.load(null==i?void 0:i.grab)}reset(){}}class To extends ui{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const e=this.container;e.getAnimationStatus()?e.pause():e.play()}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class Ro{constructor(){this.default=!0,this.groups=[],this.quantity=4}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var e;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 i=null!==(e=t.quantity)&&void 0!==e?e:t.particles_nb;void 0!==i&&(this.quantity=i)}}class ko extends ui{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 o=i.quantity;if(o<=0)return;const n=I([void 0,...i.groups]),s=void 0!==n?e.actualOptions.particles.groups[n]:void 0;e.particles.push(o,e.interactivity.mouse,s,n)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.push||(t.push=new Ro);for(const i of e)t.push.load(null==i?void 0:i.push)}reset(){}}class zo{constructor(){this.quantity=2}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var e;if(!t)return;const i=null!==(e=t.quantity)&&void 0!==e?e:t.particles_nb;void 0!==i&&(this.quantity=i)}}class Mo extends ui{constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity.modes.remove||"remove"!==t)return;const o=i.interactivity.modes.remove.quantity;e.particles.removeQuantity(o)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...e){t.remove||(t.remove=new zo);for(const i of e)t.remove.load(null==i?void 0:i.remove)}reset(){}}class Lo{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing="ease-out-quad"}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 Io extends Lo{constructor(){super(),this.selectors=[]}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class Ho extends Lo{load(t){super.load(t),t&&(this.divs=Z(t.divs,(t=>{const e=new Io;return e.load(t),e})))}}class Do extends ui{constructor(t){super(t),t.repulse||(t.repulse={particles:[]}),this.handleClickMode=e=>{const i=this.container.actualOptions.interactivity.modes.repulse;if(i&&"repulse"===e){t.repulse||(t.repulse={particles:[]}),t.repulse.clicking=!0,t.repulse.count=0;for(const e of t.repulse.particles)this.isEnabled(e)&&e.velocity.setTo(e.initialVelocity);t.repulse.particles=[],t.repulse.finish=!1,setTimeout((()=>{t.destroyed||(t.repulse||(t.repulse={particles:[]}),t.repulse.clicking=!1)}),1e3*i.duration)}}}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;e&&(t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}async interact(){const t=this.container,e=t.actualOptions,i=t.interactivity.status===Lt,o=e.interactivity.events,n=o.onHover.enable,s=o.onHover.mode,a=o.onClick.enable,r=o.onClick.mode,l=o.onDiv;i&&n&&z("repulse",s)?this.hoverRepulse():a&&z("repulse",r)?this.clickRepulse():j("repulse",l,((t,e)=>this.singleSelectorRepulse(t,e)))}isEnabled(t){var e;const i=this.container,o=i.actualOptions,n=i.interactivity.mouse,s=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:o.interactivity).events,a=F("repulse",s.onDiv);if(!(a||s.onHover.enable&&n.position||s.onClick.enable&&n.clickPosition))return!1;const r=s.onHover.mode,l=s.onClick.mode;return z("repulse",r)||z("repulse",l)||a}loadModeOptions(t,...e){t.repulse||(t.repulse=new Ho);for(const i of e)t.repulse.load(null==i?void 0:i.repulse)}reset(){}clickRepulse(){const t=this.container,e=t.actualOptions.interactivity.modes.repulse;if(e)if(t.repulse||(t.repulse={particles:[]}),t.repulse.finish||(t.repulse.count||(t.repulse.count=0),t.repulse.count++,t.repulse.count===t.particles.count&&(t.repulse.finish=!0)),t.repulse.clicking){const i=t.retina.repulseModeDistance;if(!i||i<0)return;const o=Math.pow(i/6,3),s=t.interactivity.mouse.clickPosition;if(void 0===s)return;const a=new Ye(s.x,s.y,o),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const i of r){const{dx:a,dy:r,distance:l}=y(s,i.position),c=l**2,h=e.speed,d=-o*h/c;if(c<=o){t.repulse.particles.push(i);const e=n.create(a,r);e.length=d,i.velocity.setTo(e)}}}else if(!1===t.repulse.clicking){for(const e of t.repulse.particles)e.velocity.setTo(e.initialVelocity);t.repulse.particles=[]}}hoverRepulse(){const t=this.container,e=t.interactivity.mouse.position,i=t.retina.repulseModeDistance;!i||i<0||!e||this.processRepulse(e,i,new Ye(e.x,e.y,i))}processRepulse(t,e,i,o){var s;const a=this.container,r=a.particles.quadTree.query(i,(t=>this.isEnabled(t))),c=a.actualOptions.interactivity.modes.repulse;if(c)for(const i of r){const{dx:a,dy:r,distance:h}=y(i.position,t),d=(null!==(s=null==o?void 0:o.speed)&&void 0!==s?s:c.speed)*c.factor,u=l(S(1-h/e,c.easing)*d,0,c.maxSpeed),p=n.create(0===h?d:a/h*u,0===h?d:r/h*u);i.position.addTo(p)}}singleSelectorRepulse(t,e){const i=this.container,o=i.actualOptions.interactivity.modes.repulse;if(!o)return;const n=document.querySelectorAll(t);n.length&&n.forEach((t=>{const n=t,s=i.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth/2)*s,y:(n.offsetTop+n.offsetHeight/2)*s},r=n.offsetWidth/2*s,l="circle"===e.type?new Ye(a.x,a.y,r):new Je(n.offsetLeft*s,n.offsetTop*s,n.offsetWidth*s,n.offsetHeight*s),c=q(o.divs,n);this.processRepulse(a,r,l,c)}))}}class Bo{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 No extends ui{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)}async interact(){}isEnabled(t){var e;const i=this.container,o=i.interactivity.mouse,n=(null!==(e=null==t?void 0:t.interactivity)&&void 0!==e?e:i.actualOptions.interactivity).events;return n.onHover.enable&&!!o.position&&z("slow",n.onHover.mode)}loadModeOptions(t,...e){t.slow||(t.slow=new Bo);for(const i of e)t.slow.load(null==i?void 0:i.slow)}reset(t){t.slow.inRange=!1;const e=this.container,i=e.actualOptions,o=e.interactivity.mouse.position,n=e.retina.slowModeRadius,s=i.interactivity.modes.slow;if(!s||!n||n<0||!o)return;const a=f(o,t.getPosition()),r=a/n,l=s.factor;a<=n&&(t.slow.inRange=!0,t.slow.factor=r/l)}}const Fo=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function jo(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,console.error(`Error tsParticles - loading image: ${t.source}`),e()})),i.src=t.source}))}async function Uo(t){if("svg"!==t.type)return void await jo(t);t.loading=!0;const e=await fetch(t.source);e.ok||(console.error("Error tsParticles - Image not found"),t.error=!0),t.error||(t.svgData=await e.text()),t.loading=!1}function qo(t,e,i,o){var n,s,a;const r=function(t,e,i){const{svgData:o}=t;if(!o)return"";const n=gt(e,i);if(o.includes("fill"))return o.replace(Fo,(()=>n));const s=o.indexOf(">");return`${o.substring(0,s)} fill="${n}"${o.substring(s)}`}(t,i,null!==(s=null===(n=o.opacity)||void 0===n?void 0:n.value)&&void 0!==s?s:1),l={color:i,data:Object.assign(Object.assign({},t),{svgData:r}),loaded:!1,ratio:e.width/e.height,replaceColor:null!==(a=e.replaceColor)&&void 0!==a?a:e.replace_color,source:e.src};return new Promise((e=>{const i=new Blob([r],{type:"image/svg+xml"}),o=URL||window.URL||window.webkitURL||window,n=o.createObjectURL(i),s=new Image;s.addEventListener("load",(()=>{l.loaded=!0,l.element=s,e(l),o.revokeObjectURL(n)})),s.addEventListener("error",(async()=>{o.revokeObjectURL(n);const i=Object.assign(Object.assign({},t),{error:!1,loading:!0});await jo(i),l.loaded=!0,l.element=i.element,e(l)})),s.src=n}))}class Qo{constructor(){this._images=[]}addImage(t,e){const i=this.getImages(t);null==i||i.images.push(e)}destroy(){this._images=[]}draw(t,e,i,o){var n;const s=e.image,a=null==s?void 0:s.element;if(!a)return;const r=null!==(n=null==s?void 0:s.ratio)&&void 0!==n?n:1,l={x:-i,y:-i};t.globalAlpha=o,t.drawImage(a,l.x,l.y,2*i,2*i/r),t.globalAlpha=1}getImages(t){const e=this._images.find((e=>e.id===t.id));return e||(this._images.push({id:t.id,images:[]}),this.getImages(t))}getSidesCount(){return 12}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;const e=t.container,i=this.getImages(e).images,o=t.shapeData,n=i.find((t=>t.source===o.src));n?n.error:this.loadImageShape(e,o).then((()=>{this.loadShape(t)}))}particleInit(t,e){var i;if("image"!==e.shape&&"images"!==e.shape)return;const o=this.getImages(t).images,n=e.shapeData,s=e.getFillColor(),a=null!==(i=n.replaceColor)&&void 0!==i?i:n.replace_color,r=o.find((t=>t.source===n.src));r&&(r.loading?setTimeout((()=>{this.particleInit(t,e)})):(async()=>{var t,i;let o;o=r.svgData&&a&&s?await qo(r,n,s,e):{color:s,data:r,element:r.element,loaded:!0,ratio:n.width/n.height,replaceColor:a,source:n.src},o.ratio||(o.ratio=1);const l={image:o,fill:null!==(t=n.fill)&&void 0!==t?t:e.fill,close:null!==(i=n.close)&&void 0!==i?i:e.close};e.image=l.image,e.fill=l.fill,e.close=l.close})())}async loadImageShape(t,e){var i;const o=e.src;if(!o)throw new Error("Error tsParticles - No image.src");try{const n={source:o,type:o.substring(o.length-3),error:!1,loading:!0};this.addImage(t,n);const s=(null!==(i=e.replaceColor)&&void 0!==i?i:e.replace_color)?Uo:jo;await s(n)}catch(t){throw new Error(`tsParticles error - ${e.src} not found`)}}}class Wo extends we{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class $o extends we{constructor(){super(),this.random.minimumValue=1e-4,this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Zo{constructor(){this.count=0,this.delay=new Wo,this.duration=new $o}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Xo{constructor(t){this.container=t}init(t){const e=this.container,i=t.options.life;i&&(t.life={delay:e.retina.reduceFactor?d(i.delay.value)*(i.delay.sync?1:r())/e.retina.reduceFactor*1e3:0,delayTime:0,duration:e.retina.reduceFactor?d(i.duration.value)*(i.duration.sync?1:r())/e.retina.reduceFactor*1e3: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 Zo);for(const i of e)t.life.load(null==i?void 0:i.life)}update(t,e){if(!this.isEnabled(t)||!t.life)return;const i=t.life;let o=!1;if(t.spawning){if(i.delayTime+=e.value,!(i.delayTime>=t.life.delay))return;o=!0,t.spawning=!1,i.delayTime=0,i.time=0}if(-1===i.duration)return;if(t.spawning)return;if(o?i.time=0:i.time+=e.value,i.time<i.duration)return;if(i.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const n=this.container.canvas.size,s=v(0,n.width),a=v(0,n.width);t.position.x=h(s),t.position.y=h(a),t.spawning=!0,i.delayTime=0,i.time=0,t.reset();const r=t.options.life;r&&(i.delay=1e3*d(r.delay.value),i.duration=1e3*d(r.duration.value))}}class Yo{draw(t,e,i){t.moveTo(-i/2,0),t.lineTo(i/2,0)}getSidesCount(){return 1}}class Jo{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity={enable:e.animation.enable,max:p(e.value),min:u(e.value),value:d(e.value),loops:0,maxLoops:d(e.animation.count)};const i=e.animation;if(i.enable){t.opacity.decay=1-d(i.decay),t.opacity.status=0;const o=e.value;switch(t.opacity.min=u(o),t.opacity.max=p(o),i.startValue){case"min":t.opacity.value=t.opacity.min,t.opacity.status=0;break;case"random":t.opacity.value=h(t.opacity),t.opacity.status=r()>=.5?0:1;break;default:t.opacity.value=t.opacity.max,t.opacity.status=1}t.opacity.velocity=d(i.speed)/100*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=r())}}isEnabled(t){var e,i,o,n;return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((null!==(e=t.opacity.maxLoops)&&void 0!==e?e:0)<=0||(null!==(i=t.opacity.maxLoops)&&void 0!==i?i:0)>0&&(null!==(o=t.opacity.loops)&&void 0!==o?o:0)<(null!==(n=t.opacity.maxLoops)&&void 0!==n?n:0))}update(t,e){this.isEnabled(t)&&function(t,e){var i,o,n,s,a,r;if(!t.opacity)return;const c=t.opacity.min,h=t.opacity.max,d=null!==(i=t.opacity.decay)&&void 0!==i?i:1;if(!(t.destroyed||!t.opacity.enable||(null!==(o=t.opacity.maxLoops)&&void 0!==o?o:0)>0&&(null!==(n=t.opacity.loops)&&void 0!==n?n:0)>(null!==(s=t.opacity.maxLoops)&&void 0!==s?s:0))){switch(t.opacity.status){case 0:t.opacity.value>=h?(t.opacity.status=1,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value+=(null!==(a=t.opacity.velocity)&&void 0!==a?a:0)*e.factor;break;case 1:t.opacity.value<=c?(t.opacity.status=0,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value-=(null!==(r=t.opacity.velocity)&&void 0!==r?r:0)*e.factor}t.opacity.velocity&&1!==t.opacity.decay&&(t.opacity.velocity*=d),function(t,e,i,o){switch(t.options.opacity.animation.destroy){case"max":e>=o&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,t.opacity.value,c,h),t.destroyed||(t.opacity.value=l(t.opacity.value,c,h))}}(t,e)}}class Ko{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,e,i,o){if(!this.modes.includes(o))return;const n=this.container;let s=!1;for(const[,o]of n.plugins)if(void 0!==o.particleBounce&&(s=o.particleBounce(t,i,e)),s)break;if(s)return;const a=t.getPosition(),r=t.offset,l=t.getRadius(),c=B(a,l),h=n.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode)return;t.bounds.right<0?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&e>0||"left"===t.direction&&t.bounds.left<=0&&e<0){const e=g(t.particle.options.bounce.horizontal);t.particle.velocity.x*=-e,i=!0}if(!i)return;const o=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width?t.particle.position.x=t.canvasSize.width-o:t.bounds.left<=0&&(t.particle.position.x=o),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:o,direction:e,bounds:c,canvasSize:h,offset:r,size:l}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode)return;t.bounds.bottom<0?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&e>0||"top"===t.direction&&t.bounds.top<=0&&e<0){const e=g(t.particle.options.bounce.vertical);t.particle.velocity.y*=-e,i=!0}if(!i)return;const o=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height?t.particle.position.y=t.canvasSize.height-o:t.bounds.top<=0&&(t.particle.position.y=o),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:o,direction:e,bounds:c,canvasSize:h,offset:r,size:l})}}class tn{constructor(t){this.container=t,this.modes=["destroy"]}update(t,e,i,o){if(!this.modes.includes(o))return;const s=this.container;switch(t.outType){case"normal":case"outside":if(H(t.position,s.canvas.size,n.origin,t.getRadius(),e))return;break;case"inside":{const{dx:e,dy:i}=y(t.position,t.moveCenter),{x:o,y:n}=t.velocity;if(o<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||o>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}s.particles.remove(t,void 0,!0)}}class en{constructor(t){this.container=t,this.modes=["none"]}update(t,e,i,o){if(!this.modes.includes(o))return;if(t.options.move.distance.horizontal&&("left"===e||"right"===e)||t.options.move.distance.vertical&&("top"===e||"bottom"===e))return;const s=t.options.move.gravity,a=this.container,r=a.canvas.size,l=t.getRadius();if(s.enable){const i=t.position;(!s.inverse&&i.y>r.height+l&&"bottom"===e||s.inverse&&i.y<-l&&"top"===e)&&a.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;H(t.position,a.canvas.size,n.origin,l,e)||a.particles.remove(t)}}}class on{constructor(t){this.container=t,this.modes=["out"]}update(t,e,i,o){if(!this.modes.includes(o))return;const s=this.container;switch(t.outType){case"inside":{const{x:e,y:i}=t.velocity,o=n.origin;o.length=t.moveCenter.radius,o.angle=t.velocity.angle+Math.PI,o.addTo(n.create(t.moveCenter));const{dx:a,dy:r}=y(t.position,o);if(e<=0&&a>=0||i<=0&&r>=0||e>=0&&a<=0||i>=0&&r<=0)return;t.position.x=Math.floor(h({min:0,max:s.canvas.size.width})),t.position.y=Math.floor(h({min:0,max:s.canvas.size.height}));const{dx:l,dy:c}=y(t.position,t.moveCenter);t.direction=Math.atan2(-c,-l),t.velocity.angle=t.direction;break}default:if(H(t.position,s.canvas.size,n.origin,t.getRadius(),e))return;switch(t.outType){case"outside":{t.position.x=Math.floor(h({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(h({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=y(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case"normal":{const i=t.options.move.warp,o=s.canvas.size,n={bottom:o.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:o.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),l=B(t.position,a);"right"===e&&l.left>o.width+t.offset.x?(t.position.x=n.left,t.initialPosition.x=t.position.x,i||(t.position.y=r()*o.height,t.initialPosition.y=t.position.y)):"left"===e&&l.right<-t.offset.x&&(t.position.x=n.right,t.initialPosition.x=t.position.x,i||(t.position.y=r()*o.height,t.initialPosition.y=t.position.y)),"bottom"===e&&l.top>o.height+t.offset.y?(i||(t.position.x=r()*o.width,t.initialPosition.x=t.position.x),t.position.y=n.top,t.initialPosition.y=t.position.y):"top"===e&&l.bottom<-t.offset.y&&(i||(t.position.x=r()*o.width,t.initialPosition.x=t.position.x),t.position.y=n.bottom,t.initialPosition.y=t.position.y);break}}}}}class nn{constructor(t){this.container=t,this.updaters=[new Ko(t),new tn(t),new on(t),new en(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){var i,o,n,s;const a=t.options.move.outModes;this.updateOutMode(t,e,null!==(i=a.bottom)&&void 0!==i?i:a.default,"bottom"),this.updateOutMode(t,e,null!==(o=a.left)&&void 0!==o?o:a.default,"left"),this.updateOutMode(t,e,null!==(n=a.right)&&void 0!==n?n:a.default,"right"),this.updateOutMode(t,e,null!==(s=a.top)&&void 0!==s?s:a.default,"top")}updateOutMode(t,e,i,o){for(const n of this.updaters)n.update(t,o,e,i)}}class sn{init(){}isEnabled(t){return!G()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const e=t.container,i=e.actualOptions;if(G()||!i.interactivity.events.onHover.parallax.enable)return;const o=i.interactivity.events.onHover.parallax.force,n=e.interactivity.mouse.position;if(!n)return;const s=e.canvas.size.width/2,a=e.canvas.size.height/2,r=i.interactivity.events.onHover.parallax.smooth,l=t.getRadius()/o,c=(n.x-s)*l,h=(n.y-a)*l;t.offset.x+=(c-t.offset.x)/r,t.offset.y+=(h-t.offset.y)/r}}class an extends pi{constructor(t){super(t)}clear(){}init(){}async interact(t){var e;const i=this.container,o=null!==(e=t.retina.attractDistance)&&void 0!==e?e:i.retina.attractDistance,n=t.getPosition(),s=i.particles.quadTree.queryCircle(n,o);for(const e of s){if(t===e||!e.options.move.attract.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:o,dy:s}=y(n,i),a=t.options.move.attract.rotate,r=o/(1e3*a.x),l=s/(1e3*a.y),c=e.size.value/t.size.value,h=1/c;t.velocity.x-=r*c,t.velocity.y-=l*c,e.velocity.x+=r*h,e.velocity.y+=l*h}}isEnabled(t){return t.options.move.attract.enable}reset(){}}function rn(t,e){W(Q(t),Q(e))}function ln(t,e,i,o){switch(t.options.collisions.mode){case"absorb":!function(t,e,i,o){if(void 0===t.getRadius()&&void 0!==e.getRadius())t.destroy();else if(void 0!==t.getRadius()&&void 0===e.getRadius())e.destroy();else if(void 0!==t.getRadius()&&void 0!==e.getRadius())if(t.getRadius()>=e.getRadius()){const n=l(t.getRadius()/e.getRadius(),0,e.getRadius())*i;t.size.value+=n,e.size.value-=n,e.getRadius()<=o&&(e.size.value=0,e.destroy())}else{const n=l(e.getRadius()/t.getRadius(),0,t.getRadius())*i;t.size.value-=n,e.size.value+=n,t.getRadius()<=o&&(t.size.value=0,t.destroy())}}(t,e,i,o);break;case"bounce":rn(t,e);break;case"destroy":!function(t,e){t.unbreakable||e.unbreakable||rn(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.destroy():t.destroy())}(t,e)}}class cn extends pi{constructor(t){super(t)}clear(){}init(){}async interact(t){const e=this.container,i=t.getPosition(),o=t.getRadius(),n=e.particles.quadTree.queryCircle(i,2*o);for(const s of n){if(t===s||!s.options.collisions.enable||t.options.collisions.mode!==s.options.collisions.mode||s.destroyed||s.spawning)continue;const n=s.getPosition(),a=s.getRadius();if(Math.abs(Math.round(i.z)-Math.round(n.z))>o+a)continue;f(i,n)>o+a||ln(t,s,e.fpsLimit/1e3,e.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class hn extends Ye{constructor(t,e,i,o){super(t,e,i),this.canvasSize=o,this.canvasSize=Object.assign({},o)}contains(t){if(super.contains(t))return!0;const e={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(e))return!0;const i={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(i))return!0;const o={x:t.x,y:t.y-this.canvasSize.height};return super.contains(o)}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,o={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new Ye(o.x,o.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new Je(o.x,o.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class dn{constructor(){this.blur=5,this.color=new Zt,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=Zt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class un{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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 pn{constructor(){this.blink=!1,this.color=new Zt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new dn,this.triangles=new un,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=Zt.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))}}function vn(t,e,i,o,n){let s=f(t,e);if(!n||s<=i)return s;if(s=f(t,{x:e.x-o.width,y:e.y}),s<=i)return s;if(s=f(t,{x:e.x-o.width,y:e.y-o.height}),s<=i)return s;return s=f(t,{x:e.x,y:e.y-o.height}),s}class gn extends pi{constructor(t){super(t),this.linkContainer=t}clear(){}init(){this.linkContainer.particles.linksColors=new Map}async interact(t){var e;if(!t.options.links)return;t.links=[];const i=t.getPosition(),o=this.container,n=o.canvas.size;if(i.x<0||i.y<0||i.x>n.width||i.y>n.height)return;const s=t.options.links,a=s.opacity,r=null!==(e=t.retina.linksDistance)&&void 0!==e?e:0,l=s.warp,c=l?new hn(i.x,i.y,r,n):new Ye(i.x,i.y,r),h=o.particles.quadTree.query(c);for(const e of h){const o=e.options.links;if(t===e||!(null==o?void 0:o.enable)||s.id!==o.id||e.spawning||e.destroyed||!e.links||-1!==t.links.map((t=>t.destination)).indexOf(e)||-1!==e.links.map((t=>t.destination)).indexOf(t))continue;const c=e.getPosition();if(c.x<0||c.y<0||c.x>n.width||c.y>n.height)continue;const h=vn(i,c,r,n,l&&o.warp);if(h>r)return;const d=(1-h/r)*a;this.setColor(t),t.links.push({destination:e,opacity:d})}}isEnabled(t){var e;return!!(null===(e=t.options.links)||void 0===e?void 0:e.enable)}loadParticlesOptions(t,...e){var i,o;t.links||(t.links=new pn);for(const n of e)t.links.load(null!==(o=null!==(i=null==n?void 0:n.links)&&void 0!==i?i:null==n?void 0:n.lineLinked)&&void 0!==o?o:null==n?void 0:n.line_linked)}reset(){}setColor(t){if(!t.options.links)return;const e=this.linkContainer,i=t.options.links;let o=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(o)return;o=wt(i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=o:e.particles.linksColors.set(i.id,o)}}function yn(t,e){const i=((o=t.map((t=>t.id))).sort(((t,e)=>t-e)),o.join("_"));var o;let n=e.get(i);return void 0===n&&(n=r(),e.set(i,n)),n}class fn{constructor(t){this.container=t,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){var i;const o=this.container,n=e.options;if(!e.links||e.links.length<=0)return;t.save();const s=e.links.filter((t=>n.links&&this.getLinkFrequency(e,t.destination)<=n.links.frequency));for(const t of s)this.drawTriangles(o,n,e,t,s),t.opacity>0&&(null!==(i=e.retina.linksWidth)&&void 0!==i?i:0)>0&&this.drawLinkLine(e,t);t.restore()}init(){this._freqs.links=new Map,this._freqs.triangles=new Map}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this.container.retina.pixelRatio;t.retina.linksDistance=t.options.links.distance*e,t.retina.linksWidth=t.options.links.width*e}particleDestroyed(t){t.links=[]}drawLinkLine(t,e){const i=this.container,o=i.actualOptions,n=e.destination,s=t.getPosition(),a=n.getPosition();let l=e.opacity;i.canvas.draw((e=>{var c,h,u;if(!t.options.links)return;let p;const v=null===(c=t.options.twinkle)||void 0===c?void 0:c.lines;if(null==v?void 0:v.enable){const t=v.frequency,e=nt(v.color);r()<t&&e&&(p=e,l=d(v.opacity))}if(!p){const e=t.options.links,o=void 0!==(null==e?void 0:e.id)?i.particles.linksColors.get(e.id):i.particles.linksColor;p=ft(t,n,o)}if(!p)return;const g=null!==(h=t.retina.linksWidth)&&void 0!==h?h:0,w=null!==(u=t.retina.linksDistance)&&void 0!==u?u:0;!function(t,e,i,o,n,s,a,r,l,c,h,d){let u=!1;if(f(i,o)<=n)_t(t,i,o),u=!0;else if(a){let e,a;const r=y(i,{x:o.x-s.width,y:o.y});if(r.distance<=n){const t=i.y-r.dy/r.dx*i.x;e={x:0,y:t},a={x:s.width,y:t}}else{const t=y(i,{x:o.x,y:o.y-s.height});if(t.distance<=n){const o=-(i.y-t.dy/t.dx*i.x)/(t.dy/t.dx);e={x:o,y:0},a={x:o,y:s.height}}else{const t=y(i,{x:o.x-s.width,y:o.y-s.height});if(t.distance<=n){const o=i.y-t.dy/t.dx*i.x;e={x:-o/(t.dy/t.dx),y:o},a={x:e.x+s.width,y:e.y+s.height}}}}e&&a&&(_t(t,i,e),_t(t,o,a),u=!0)}if(u){if(t.lineWidth=e,r&&(t.globalCompositeOperation=l),t.strokeStyle=vt(c,h),d.enable){const e=nt(d.color);e&&(t.shadowBlur=d.blur,t.shadowColor=vt(e))}t.stroke()}}(e,g,s,a,w,i.canvas.size,t.options.links.warp,o.backgroundMask.enable,o.backgroundMask.composite,p,l,t.options.links.shadow)}))}drawLinkTriangle(t,e,i){var o;if(!t.options.links)return;const n=this.container,s=n.actualOptions,a=e.destination,r=i.destination,l=t.options.links.triangles,c=null!==(o=l.opacity)&&void 0!==o?o:(e.opacity+i.opacity)/2;c<=0||n.canvas.draw((e=>{var i;const o=t.getPosition(),h=a.getPosition(),d=r.getPosition(),u=null!==(i=t.retina.linksDistance)&&void 0!==i?i:0;if(f(o,h)>u||f(d,h)>u||f(d,o)>u)return;let p=nt(l.color);if(!p){const e=t.options.links,i=void 0!==(null==e?void 0:e.id)?n.particles.linksColors.get(e.id):n.particles.linksColor;p=ft(t,a,i)}p&&function(t,e,i,o,n,s,a,r){Pt(t,e,i,o),n&&(t.globalCompositeOperation=s),t.fillStyle=vt(a,r),t.fill()}(e,o,h,d,s.backgroundMask.enable,s.backgroundMask.composite,p,c)}))}drawTriangles(t,e,i,o,n){var s,a,r;const l=o.destination;if(!(null===(s=e.links)||void 0===s?void 0:s.triangles.enable)||!(null===(a=l.options.links)||void 0===a?void 0:a.triangles.enable))return;const c=null===(r=l.links)||void 0===r?void 0:r.filter((t=>{const e=this.getLinkFrequency(l,t.destination);return l.options.links&&e<=l.options.links.frequency&&n.findIndex((e=>e.destination===t.destination))>=0}));if(null==c?void 0:c.length)for(const t of c){const n=t.destination;this.getTriangleFrequency(i,l,n)>e.links.triangles.frequency||this.drawLinkTriangle(i,o,t)}}getLinkFrequency(t,e){return yn([t,e],this._freqs.links)}getTriangleFrequency(t,e,i){return yn([t,e,i],this._freqs.triangles)}}class wn{constructor(){this.id="links"}getPlugin(t){return new fn(t)}loadOptions(){}needsPlugin(){return!0}}async function mn(t){await async function(t){await t.addInteractor("particlesLinks",(t=>new gn(t)))}(t),await async function(t){const e=new wn;await t.addPlugin(e)}(t)}class bn{draw(t,e,i){const o=this.getCenter(e,i),n=this.getSidesData(e,i),s=n.count.numerator*n.count.denominator,a=n.count.numerator/n.count.denominator,r=180*(a-2)/a,l=Math.PI-Math.PI*r/180;if(t){t.beginPath(),t.translate(o.x,o.y),t.moveTo(0,0);for(let e=0;e<s;e++)t.lineTo(n.length,0),t.translate(n.length,0),t.rotate(l)}}getSidesCount(t){var e,i;const o=t.shapeData;return null!==(i=null!==(e=null==o?void 0:o.sides)&&void 0!==e?e:null==o?void 0:o.nb_sides)&&void 0!==i?i:5}}class Sn extends bn{getCenter(t,e){return{x:-e/(this.getSidesCount(t)/3.5),y:-e/.76}}getSidesData(t,e){var i,o;const n=t.shapeData,s=null!==(o=null!==(i=null==n?void 0:n.sides)&&void 0!==i?i:null==n?void 0:n.nb_sides)&&void 0!==o?o:5;return{count:{denominator:1,numerator:s},length:2.66*e/(s/3)}}}class _n extends bn{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 Pn(t){await async function(t){await t.addShape("polygon",new Sn)}(t),await async function(t){await t.addShape("triangle",new _n)}(t)}class xn{init(){}isEnabled(t){var e,i,o,n;return!t.destroyed&&!t.spawning&&t.size.enable&&((null!==(e=t.size.maxLoops)&&void 0!==e?e:0)<=0||(null!==(i=t.size.maxLoops)&&void 0!==i?i:0)>0&&(null!==(o=t.size.loops)&&void 0!==o?o:0)<(null!==(n=t.size.maxLoops)&&void 0!==n?n:0))}update(t,e){this.isEnabled(t)&&function(t,e){var i,o,n,s,a;const r=(null!==(i=t.size.velocity)&&void 0!==i?i:0)*e.factor,c=t.size.min,h=t.size.max,d=null!==(o=t.size.decay)&&void 0!==o?o:1;if(!(t.destroyed||!t.size.enable||(null!==(n=t.size.maxLoops)&&void 0!==n?n:0)>0&&(null!==(s=t.size.loops)&&void 0!==s?s:0)>(null!==(a=t.size.maxLoops)&&void 0!==a?a:0))){switch(t.size.status){case 0:t.size.value>=h?(t.size.status=1,t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value+=r;break;case 1:t.size.value<=c?(t.size.status=0,t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value-=r}t.size.velocity&&1!==d&&(t.size.velocity*=d),function(t,e,i,o){switch(t.options.size.animation.destroy){case"max":e>=o&&t.destroy();break;case"min":e<=i&&t.destroy()}}(t,t.size.value,c,h),t.destroyed||(t.size.value=l(t.size.value,c,h))}}(t,e)}}const Cn=Math.sqrt(2);class An{draw(t,e,i){t.rect(-i/Cn,-i/Cn,2*i/Cn,2*i/Cn)}getSidesCount(){return 4}}class Vn{draw(t,e,i){var o;const n=e.shapeData,s=this.getSidesCount(e),a=null!==(o=null==n?void 0:n.inset)&&void 0!==o?o:2;t.moveTo(0,0-i);for(let e=0;e<s;e++)t.rotate(Math.PI/s),t.lineTo(0,0-i*a),t.rotate(Math.PI/s),t.lineTo(0,0-i)}getSidesCount(t){var e,i;const o=t.shapeData;return null!==(i=null!==(e=null==o?void 0:o.sides)&&void 0!==e?e:null==o?void 0:o.nb_sides)&&void 0!==i?i:5}}function On(t,e,i,o,n){var s,a;const r=e;if(!r||!r.enable)return;const l=h(i.offset),c=(null!==(s=e.velocity)&&void 0!==s?s:0)*t.factor+3.6*l,d=null!==(a=e.decay)&&void 0!==a?a:1;n&&0!==r.status?(r.value-=c,r.value<0&&(r.status=0,r.value+=r.value)):(r.value+=c,n&&r.value>o&&(r.status=1,r.value-=r.value%o)),r.velocity&&1!==d&&(r.velocity*=d),r.value>o&&(r.value%=o)}class Gn{constructor(t){this.container=t}init(t){var e,i;const o=this.container;t.stroke=X(t.options.stroke,t.id,t.options.reduceDuplicates),t.strokeWidth=t.stroke.width*o.retina.pixelRatio;const n=null!==(e=rt(t.stroke.color))&&void 0!==e?e:t.getFillColor();n&&(t.strokeColor=bt(n,null===(i=t.stroke.color)||void 0===i?void 0:i.animation,o.retina.reduceFactor))}isEnabled(t){var e,i,o,n;const s=null===(e=t.stroke)||void 0===e?void 0:e.color;return!t.destroyed&&!t.spawning&&!!s&&(void 0!==(null===(i=t.strokeColor)||void 0===i?void 0:i.h.value)&&s.animation.h.enable||void 0!==(null===(o=t.strokeColor)||void 0===o?void 0:o.s.value)&&s.animation.s.enable||void 0!==(null===(n=t.strokeColor)||void 0===n?void 0:n.l.value)&&s.animation.l.enable)}update(t,e){this.isEnabled(t)&&function(t,e){var i,o,n,s,a,r,l,c,h,d;if(!(null===(i=t.stroke)||void 0===i?void 0:i.color))return;const u=t.stroke.color.animation,p=null!==(n=null===(o=t.strokeColor)||void 0===o?void 0:o.h)&&void 0!==n?n:null===(s=t.color)||void 0===s?void 0:s.h;p&&On(e,p,u.h,360,!1);const v=null!==(r=null===(a=t.strokeColor)||void 0===a?void 0:a.s)&&void 0!==r?r:null===(l=t.color)||void 0===l?void 0:l.s;v&&On(e,v,u.s,100,!0);const g=null!==(h=null===(c=t.strokeColor)||void 0===c?void 0:c.l)&&void 0!==h?h:null===(d=t.color)||void 0===d?void 0:d.l;g&&On(e,g,u.l,100,!0)}(t,e)}}const En=["text","character","char"];class Tn{draw(t,e,i,o){var n,s,a;const r=e.shapeData;if(void 0===r)return;const l=r.value;if(void 0===l)return;const c=e;void 0===c.text&&(c.text=X(l,e.randomIndexData));const h=c.text,d=null!==(n=r.style)&&void 0!==n?n:"",u=null!==(s=r.weight)&&void 0!==s?s:"400",p=2*Math.round(i),v=null!==(a=r.font)&&void 0!==a?a:"Verdana",g=e.fill,y=h.length*i/2;t.font=`${d} ${u} ${p}px "${v}"`;const f={x:-y,y:i/2};t.globalAlpha=o,g?t.fillText(h,f.x,f.y):t.strokeText(h,f.x,f.y),t.globalAlpha=1}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(En.find((t=>z(t,e.particles.shape.type)))){const t=En.map((t=>e.particles.shape.options[t])).find((t=>!!t)),i=[];Z(t,(t=>{i.push(M(t.font,t.weight))})),await Promise.all(i)}}}async function Rn(t){await async function(t){t.addMover("base",(()=>new lo))}(t),await async function(t){t.addMover("parallax",(()=>new sn))}(t),await async function(t){await t.addInteractor("externalAttract",(t=>new vo(t)))}(t),await async function(t){await t.addInteractor("externalBounce",(t=>new yo(t)))}(t),await async function(t){await t.addInteractor("externalBubble",(t=>new So(t)))}(t),await async function(t){await t.addInteractor("externalConnect",(t=>new Ao(t)))}(t),await async function(t){await t.addInteractor("externalGrab",(t=>new Eo(t)))}(t),await function(t){t.addInteractor("externalPause",(t=>new To(t)))}(t),await async function(t){await t.addInteractor("externalPush",(t=>new ko(t)))}(t),await function(t){t.addInteractor("externalRemove",(t=>new Mo(t)))}(t),await async function(t){await t.addInteractor("externalRepulse",(t=>new Do(t)))}(t),await async function(t){await t.addInteractor("externalSlow",(t=>new No(t)))}(t),await async function(t){await t.addInteractor("particlesAttract",(t=>new an(t)))}(t),await async function(t){await t.addInteractor("particlesCollisions",(t=>new cn(t)))}(t),await mn(t),await async function(t){await t.addShape("circle",new co)}(t),await async function(t){const e=new Qo;await t.addShape("image",e),await t.addShape("images",e)}(t),await async function(t){await t.addShape("line",new Yo)}(t),await Pn(t),await async function(t){const e=new An;await t.addShape("edge",e),await t.addShape("square",e)}(t),await async function(t){await t.addShape("star",new Vn)}(t),await async function(t){const e=new Tn;for(const i of En)await t.addShape(i,e)}(t),await async function(t){await t.addParticleUpdater("life",(t=>new Xo(t)))}(t),await async function(t){await t.addParticleUpdater("opacity",(t=>new Jo(t)))}(t),await async function(t){await t.addParticleUpdater("size",(()=>new xn))}(t),await async function(t){await t.addParticleUpdater("rotate",(t=>new ro(t)))}(t),await async function(t){await t.addParticleUpdater("color",(t=>new uo(t)))}(t),await async function(t){await t.addParticleUpdater("strokeColor",(t=>new Gn(t)))}(t),await async function(t){await t.addParticleUpdater("outModes",(t=>new nn(t)))}(t),await(t=>{const e=(e,i)=>t.load(e,i);return e.load=(e,i,o)=>{t.loadJSON(e,i).then((t=>{t&&o(t)})).catch((()=>{o(void 0)}))},e.setOnClickHandler=e=>{t.setOnClickHandler(e)},{particlesJS:e,pJSDom:t.dom()}})(t)}class kn{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=v(t.speed)),void 0!==t.decay&&(this.decay=v(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class zn extends we{constructor(){super(),this.animation=new kn,this.direction="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))}}class Mn{constructor(t){this.container=t}getTransformValues(t){var e;const i=(null===(e=t.tilt)||void 0===e?void 0:e.enable)&&t.tilt;return{b:i?Math.cos(i.value)*i.cosDirection:void 0,c:i?Math.sin(i.value)*i.sinDirection:void 0}}init(t){var e;const i=t.options.tilt;if(!i)return;t.tilt={enable:i.enable,value:d(i.value)*Math.PI/180,sinDirection:r()>=.5?1:-1,cosDirection:r()>=.5?1:-1};let o=i.direction;if("random"===o){o=Math.floor(2*r())>0?"counter-clockwise":"clockwise"}switch(o){case"counter-clockwise":case"counterClockwise":t.tilt.status=1;break;case"clockwise":t.tilt.status=0}const n=null===(e=t.options.tilt)||void 0===e?void 0:e.animation;(null==n?void 0:n.enable)&&(t.tilt.decay=1-d(n.decay),t.tilt.velocity=d(n.speed)/360*this.container.retina.reduceFactor,n.sync||(t.tilt.velocity*=r()))}isEnabled(t){var e;const i=null===(e=t.options.tilt)||void 0===e?void 0:e.animation;return!t.destroyed&&!t.spawning&&!!(null==i?void 0:i.enable)}loadOptions(t,...e){t.tilt||(t.tilt=new zn);for(const i of e)t.tilt.load(null==i?void 0:i.tilt)}update(t,e){this.isEnabled(t)&&function(t,e){var i,o;if(!t.tilt||!t.options.tilt)return;const n=t.options.tilt.animation,s=(null!==(i=t.tilt.velocity)&&void 0!==i?i:0)*e.factor,a=2*Math.PI,r=null!==(o=t.tilt.decay)&&void 0!==o?o:1;n.enable&&(0===t.tilt.status?(t.tilt.value+=s,t.tilt.value>a&&(t.tilt.value-=a)):(t.tilt.value-=s,t.tilt.value<0&&(t.tilt.value+=a)),t.tilt.velocity&&1!==r&&(t.tilt.velocity*=r))}(t,e)}}class Ln{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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=v(t.opacity)))}}class In{constructor(){this.lines=new Ln,this.particles=new Ln}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class Hn{getColorStyles(t,e,i,o){const n=t.options.twinkle;if(!n)return{};const s=n.particles,a=s.enable&&r()<s.frequency,l=t.options.zIndex,c=(1-t.zIndexFactor)**l.opacityRate,h=a?d(s.opacity)*c:o,u=rt(s.color),p=u?gt(u,h):void 0,v={},g=a&&p;return v.fill=g?p:void 0,v.stroke=g?p:void 0,v}init(){}isEnabled(t){const e=t.options.twinkle;return!!e&&e.particles.enable}loadOptions(t,...e){t.twinkle||(t.twinkle=new In);for(const i of e)t.twinkle.load(null==i?void 0:i.twinkle)}update(){}}class Dn{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=v(t.angle)),void 0!==t.move&&(this.move=v(t.move)))}}class Bn{constructor(){this.distance=5,this.enable=!1,this.speed=new Dn}load(t){if(t&&(void 0!==t.distance&&(this.distance=v(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if("number"==typeof 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)}}}class Nn{constructor(t){this.container=t}init(t){var e;const i=t.options.wobble;(null==i?void 0:i.enable)?t.wobble={angle:r()*Math.PI*2,angleSpeed:d(i.speed.angle)/360,moveSpeed:d(i.speed.move)/10}:t.wobble={angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=d(null!==(e=null==i?void 0:i.distance)&&void 0!==e?e:0)*this.container.retina.pixelRatio}isEnabled(t){var e;return!t.destroyed&&!t.spawning&&!!(null===(e=t.options.wobble)||void 0===e?void 0:e.enable)}loadOptions(t,...e){t.wobble||(t.wobble=new Bn);for(const i of e)t.wobble.load(null==i?void 0:i.wobble)}update(t,e){this.isEnabled(t)&&function(t,e){var i;const o=t.options.wobble;if(!(null==o?void 0:o.enable)||!t.wobble)return;const n=t.wobble.angleSpeed*e.factor,s=t.wobble.moveSpeed*e.factor*((null!==(i=t.retina.wobbleDistance)&&void 0!==i?i:0)*e.factor)/(1e3/60),a=2*Math.PI;t.wobble.angle+=n,t.wobble.angle>a&&(t.wobble.angle-=a),t.position.x+=s*Math.cos(t.wobble.angle),t.position.y+=s*Math.abs(Math.sin(t.wobble.angle))}(t,e)}}async function Fn(t){await Rn(t),await async function(t){await t.addParticleUpdater("destroy",(e=>new Oi(t,e)))}(t),await async function(t){await t.addParticleUpdater("roll",(()=>new no))}(t),await async function(t){await t.addParticleUpdater("tilt",(t=>new Mn(t)))}(t),await async function(t){await t.addParticleUpdater("twinkle",(()=>new Hn))}(t),await async function(t){await t.addParticleUpdater("wobble",(t=>new Nn(t)))}(t),await async function(t){await t.addInteractor("externalTrail",(t=>new Fi(t)))}(t),await async function(t){const e=new _i;await t.addPlugin(e)}(t),await async function(t){t.emitterShapeManager||(t.emitterShapeManager=new Ii(t)),t.addEmitterShape||(t.addEmitterShape=(e,i)=>{var o;null===(o=t.emitterShapeManager)||void 0===o||o.addShape(e,i)});const e=new Bi(t);await t.addPlugin(e),t.addEmitterShape("circle",new Gi),t.addEmitterShape("square",new Di)}(t),await async function(t){const e=new eo(t);await t.addPlugin(e)}(t)}Fn(yi)})(),o})()));
|
|
2
|
+
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var e=i();for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(this,(()=>(()=>{"use strict";var t={d:(i,e)=>{for(var s in e)t.o(e,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:e[s]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{AnimatableColor:()=>yi,AnimationOptions:()=>Ti,Background:()=>Qt,BackgroundMask:()=>ti,BackgroundMaskCover:()=>Kt,Circle:()=>oe,ClickEvent:()=>ei,Collisions:()=>_i,CollisionsAbsorb:()=>fi,CollisionsOverlap:()=>mi,ColorAnimation:()=>pi,DivEvent:()=>si,Events:()=>ai,ExternalInteractorBase:()=>be,FullScreen:()=>ii,HoverEvent:()=>ni,HslAnimation:()=>vi,HslColorManager:()=>me,Interactivity:()=>li,ManualParticle:()=>ci,Modes:()=>ri,Move:()=>Di,MoveAngle:()=>zi,MoveAttract:()=>ki,MoveCenter:()=>Pi,MoveGravity:()=>Mi,MovePath:()=>Ci,MoveTrail:()=>Oi,Opacity:()=>Ii,OpacityAnimation:()=>Ei,Options:()=>Qi,OptionsColor:()=>Zt,OutModes:()=>Si,Parallax:()=>oi,ParticlesBounce:()=>xi,ParticlesBounceFactor:()=>wi,ParticlesDensity:()=>Ai,ParticlesInteractorBase:()=>we,ParticlesNumber:()=>Li,ParticlesOptions:()=>Yi,Point:()=>ee,Range:()=>se,Rectangle:()=>ne,Responsive:()=>di,RgbColorManager:()=>ge,Shadow:()=>Hi,Shape:()=>ji,Size:()=>$i,SizeAnimation:()=>Ni,Spin:()=>Ri,Stroke:()=>Gi,Theme:()=>ui,ThemeDefault:()=>hi,ValueWithRandom:()=>bi,Vector:()=>o,Vector3d:()=>s,ZIndex:()=>Xi,addColorManager:()=>st,addEasing:()=>r,alterHsl:()=>Et,animate:()=>I,areBoundsInside:()=>B,arrayRandomIndex:()=>F,calcExactPositionOrRandomFromSize:()=>C,calcExactPositionOrRandomFromSizeRanged:()=>O,calcPositionFromSize:()=>k,calcPositionOrRandomFromSize:()=>P,calcPositionOrRandomFromSizeRanged:()=>M,calculateBounds:()=>W,cancelAnimation:()=>A,circleBounce:()=>Y,circleBounceDataFromParticle:()=>X,clamp:()=>h,clear:()=>Ct,collisionVelocity:()=>z,colorMix:()=>gt,colorToHsl:()=>lt,colorToRgb:()=>rt,deepExtend:()=>U,divMode:()=>G,divModeExecute:()=>N,drawLine:()=>kt,drawParticle:()=>Ot,drawParticlePlugin:()=>Tt,drawPlugin:()=>Dt,drawShape:()=>St,drawShapeAfterEffect:()=>Rt,drawTriangle:()=>Pt,executeOnSingleOrMultiple:()=>Z,findItemFromSingleOrMultiple:()=>K,generatedAttribute:()=>It,getDistance:()=>w,getDistances:()=>b,getEasing:()=>l,getHslAnimationFromHsl:()=>_t,getHslFromAnimation:()=>xt,getLinkColor:()=>bt,getLinkRandomColor:()=>wt,getParticleBaseVelocity:()=>_,getParticleDirectionAngle:()=>x,getRandom:()=>d,getRandomRgbColor:()=>yt,getRangeMax:()=>f,getRangeMin:()=>y,getRangeValue:()=>v,getStyleFromHsl:()=>mt,getStyleFromRgb:()=>ft,getValue:()=>g,hasMatchMedia:()=>T,hslToRgb:()=>pt,hslaToRgba:()=>vt,isDivModeEnabled:()=>j,isInArray:()=>L,isPointInside:()=>V,isSsr:()=>D,itemFromArray:()=>q,itemFromSingleOrMultiple:()=>Q,loadFont:()=>H,loadFull:()=>Lo,loadOptions:()=>Ji,loadParticlesOptions:()=>Zi,loadSlim:()=>Mo,mix:()=>u,mouseDownEvent:()=>Lt,mouseLeaveEvent:()=>Bt,mouseMoveEvent:()=>Ft,mouseOutEvent:()=>Wt,mouseUpEvent:()=>Ht,paintBase:()=>Mt,parseAlpha:()=>S,randomInRange:()=>p,rangeColorToHsl:()=>ct,rangeColorToRgb:()=>at,rectBounce:()=>J,resizeEvent:()=>jt,rgbToHsl:()=>dt,safeMatchMedia:()=>E,setRandom:()=>c,setRangeValue:()=>m,singleDivModeExecute:()=>$,stringToAlpha:()=>ht,stringToRgb:()=>ut,touchCancelEvent:()=>Ut,touchEndEvent:()=>At,touchMoveEvent:()=>Vt,touchStartEvent:()=>qt,tsParticles:()=>ze,visibilityChangeEvent:()=>Nt});class e{_listeners;constructor(){this._listeners=new Map}addEventListener(t,i){this.removeEventListener(t,i),this._listeners.get(t)||this._listeners.set(t,[]),this._listeners.get(t)?.push(i)}dispatchEvent(t,i){this._listeners.get(t)?.forEach((t=>t(i)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,i){const e=this._listeners.get(t);if(!e)return;const s=e.length,o=e.indexOf(i);o<0||(1===s?this._listeners.delete(t):e.splice(o,1))}}class s{x;y;z;constructor(t,i,e){if("number"!=typeof t&&t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}else{if(void 0===t||void 0===i)throw new Error("tsParticles - Vector3d not initialized correctly");this.x=t,this.y=i,this.z=e??0}}static get origin(){return s.create(0,0,0)}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 s.create(t.x,t.y,t.z)}static create(t,i,e){return new s(t,i,e)}add(t){return s.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 s.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return s.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 s.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}rotate(t){return s.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}sub(t){return s.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}updateFromAngle(t,i){this.x=Math.cos(t)*i,this.y=Math.sin(t)*i}}class o extends s{constructor(t,i){super(t,i,0)}static get origin(){return o.create(0,0)}static clone(t){return o.create(t.x,t.y)}static create(t,i){return new o(t,i)}}let n=Math.random;const a=new Map;function r(t,i){a.get(t)||a.set(t,i)}function l(t){return a.get(t)??(t=>t)}function c(t=Math.random){n=t}function d(){return h(n(),0,1-1e-16)}function h(t,i,e){return Math.min(Math.max(t,i),e)}function u(t,i,e,s){return Math.floor((t*e+i*s)/(e+s))}function p(t){const i=f(t);let e=y(t);return i===e&&(e=0),d()*(i-e)+e}function v(t){return"number"==typeof t?t:p(t)}function y(t){return"number"==typeof t?t:t.min}function f(t){return"number"==typeof t?t:t.max}function m(t,i){if(t===i||void 0===i&&"number"==typeof t)return t;const e=y(t),s=f(t);return void 0!==i?{min:Math.min(e,i),max:Math.max(s,i)}:m(e,s)}function g(t){const i=t.random,{enable:e,minimumValue:s}="boolean"==typeof i?{enable:i,minimumValue:0}:i;return v(e?m(t.value,s):t.value)}function b(t,i){const e=t.x-i.x,s=t.y-i.y;return{dx:e,dy:s,distance:Math.sqrt(e*e+s*s)}}function w(t,i){return b(t,i).distance}function x(t,i,e){if("number"==typeof t)return t*Math.PI/180;switch(t){case"top":return-Math.PI/2;case"top-right":return-Math.PI/4;case"right":return 0;case"bottom-right":return Math.PI/4;case"bottom":return Math.PI/2;case"bottom-left":return 3*Math.PI/4;case"left":return Math.PI;case"top-left":return-3*Math.PI/4;case"inside":return Math.atan2(e.y-i.y,e.x-i.x);case"outside":return Math.atan2(i.y-e.y,i.x-e.x);default:return d()*Math.PI*2}}function _(t){const i=o.origin;return i.length=1,i.angle=t,i}function z(t,i,e,s){return o.create(t.x*(e-s)/(e+s)+2*i.x*s/(e+s),t.y)}function k(t){return t.position&&void 0!==t.position.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/100,y:t.position.y*t.size.height/100}:void 0}function P(t){return{x:(t.position?.x??100*d())*t.size.width/100,y:(t.position?.y??100*d())*t.size.height/100}}function M(t){const i={x:void 0!==t.position?.x?v(t.position.x):void 0,y:void 0!==t.position?.y?v(t.position.y):void 0};return P({size:t.size,position:i})}function C(t){return{x:t.position?.x??d()*t.size.width,y:t.position?.y??d()*t.size.height}}function O(t){const i={x:void 0!==t.position?.x?v(t.position.x):void 0,y:void 0!==t.position?.y?v(t.position.y):void 0};return C({size:t.size,position:i})}function S(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}function R(t,i,e,s,o,n){const a={bounced:!1};return i.min<s.min||i.min>s.max||i.max<s.min||i.max>s.max||(t.max>=e.min&&t.max<=(e.max+e.min)/2&&o>0||t.min<=e.max&&t.min>(e.max+e.min)/2&&o<0)&&(a.velocity=o*-n,a.bounced=!0),a}function D(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function T(){return!D()&&"undefined"!=typeof matchMedia}function E(t){if(T())return matchMedia(t)}function I(){return D()?t=>setTimeout(t):t=>(requestAnimationFrame||setTimeout)(t)}function A(){return D()?t=>clearTimeout(t):t=>(cancelAnimationFrame||clearTimeout)(t)}function L(t,i){return t===i||i instanceof Array&&i.indexOf(t)>-1}async function H(t,i){try{await document.fonts.load(`${i??"400"} 36px '${t??"Verdana"}'`)}catch{}}function F(t){return Math.floor(d()*t.length)}function q(t,i,e=!0){return t[void 0!==i&&e?i%t.length:F(t)]}function V(t,i,e,s,o){return B(W(t,s??0),i,e,o)}function B(t,i,e,s){let o=!0;return s&&"bottom"!==s||(o=t.top<i.height+e.x),!o||s&&"left"!==s||(o=t.right>e.x),!o||s&&"right"!==s||(o=t.left<i.width+e.y),!o||s&&"top"!==s||(o=t.bottom>e.y),o}function W(t,i){return{bottom:t.y+i,left:t.x-i,right:t.x+i,top:t.y-i}}function U(t,...i){for(const e of i){if(null==e)continue;if("object"!=typeof e){t=e;continue}const i=Array.isArray(e);!i||"object"==typeof t&&t&&Array.isArray(t)?i||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const i in e){if("__proto__"===i)continue;const s=e[i],o="object"==typeof s,n=t;n[i]=o&&Array.isArray(s)?s.map((t=>U(n[i],t))):U(n[i],s)}}return t}function j(t,i){return!!K(i,(i=>i.enable&&L(t,i.mode)))}function N(t,i,e){Z(i,(i=>{const s=i.mode;i.enable&&L(t,s)&&$(i,e)}))}function $(t,i){Z(t.selectors,(e=>{i(e,t)}))}function G(t,i){if(i&&t)return K(t,(t=>function(t,i){const e=Z(i,(i=>t.matches(i)));return e instanceof Array?e.some((t=>t)):e}(i,t.selectors)))}function X(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:o.create(g(t.options.bounce.horizontal),g(t.options.bounce.vertical))}}function Y(t,i){const{x:e,y:s}=t.velocity.sub(i.velocity),[o,n]=[t.position,i.position],{dx:a,dy:r}=b(n,o);if(e*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=i.mass,h=t.velocity.rotate(l),u=i.velocity.rotate(l),p=z(h,u,c,d),v=z(u,h,c,d),y=p.rotate(-l),f=v.rotate(-l);t.velocity.x=y.x*t.factor.x,t.velocity.y=y.y*t.factor.y,i.velocity.x=f.x*i.factor.x,i.velocity.y=f.y*i.factor.y}function J(t,i){const e=W(t.getPosition(),t.getRadius()),s=R({min:e.left,max:e.right},{min:e.top,max:e.bottom},{min:i.left,max:i.right},{min:i.top,max:i.bottom},t.velocity.x,g(t.options.bounce.horizontal));s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const o=R({min:e.top,max:e.bottom},{min:e.left,max:e.right},{min:i.top,max:i.bottom},{min:i.left,max:i.right},t.velocity.y,g(t.options.bounce.vertical));o.bounced&&(void 0!==o.velocity&&(t.velocity.y=o.velocity),void 0!==o.position&&(t.position.y=o.position))}function Z(t,i){return t instanceof Array?t.map((t=>i(t))):i(t)}function Q(t,i,e){return t instanceof Array?q(t,i,e):t}function K(t,i){return t instanceof Array?t.find((t=>i(t))):i(t)?t:void 0}const tt="random",it="mid",et=new Map;function st(t){et.set(t.key,t)}function ot(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t}function nt(t){for(const[,i]of et)if(t.startsWith(i.stringPrefix))return i.parseString(t);const i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,i,e,s,o)=>i+i+e+e+s+s+(void 0!==o?o+o:""))),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return e?{a:void 0!==e[4]?parseInt(e[4],16)/255:1,b:parseInt(e[3],16),g:parseInt(e[2],16),r:parseInt(e[1],16)}:void 0}function at(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return rt(s.value,i,e);if(s.value instanceof Array)return at({value:q(s.value,i,e)});for(const[,t]of et){const i=t.handleRangeColor(s);if(i)return i}}function rt(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return s.value===tt?yt():ut(s.value);if(s.value instanceof Array)return rt({value:q(s.value,i,e)});for(const[,t]of et){const i=t.handleColor(s);if(i)return i}}function lt(t,i,e=!0){const s=rt(t,i,e);return s?dt(s):void 0}function ct(t,i,e=!0){const s=at(t,i,e);return s?dt(s):void 0}function dt(t){const i=t.r/255,e=t.g/255,s=t.b/255,o=Math.max(i,e,s),n=Math.min(i,e,s),a={h:0,l:(o+n)/2,s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=i===o?(e-s)/(o-n):a.h=e===o?2+(s-i)/(o-n):4+(i-e)/(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 ht(t){return nt(t)?.a}function ut(t){return nt(t)}function pt(t){const i={b:0,g:0,r:0},e={h:t.h/360,l:t.l/100,s:t.s/100};if(e.s){const t=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,s=2*e.l-t;i.r=ot(s,t,e.h+1/3),i.g=ot(s,t,e.h),i.b=ot(s,t,e.h-1/3)}else i.b=e.l,i.g=e.l,i.r=e.l;return i.r=Math.floor(255*i.r),i.g=Math.floor(255*i.g),i.b=Math.floor(255*i.b),i}function vt(t){const i=pt(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}function yt(t){const i=t??0;return{b:Math.floor(p(m(i,256))),g:Math.floor(p(m(i,256))),r:Math.floor(p(m(i,256)))}}function ft(t,i){return`rgba(${t.r}, ${t.g}, ${t.b}, ${i??1})`}function mt(t,i){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${i??1})`}function gt(t,i,e,s){let o=t,n=i;return void 0===o.r&&(o=pt(t)),void 0===n.r&&(n=pt(i)),{b:u(o.b,n.b,e,s),g:u(o.g,n.g,e,s),r:u(o.r,n.r,e,s)}}function bt(t,i,e){if(e===tt)return yt();if(e!==it)return e;{const e=t.getFillColor()??t.getStrokeColor(),s=i?.getFillColor()??i?.getStrokeColor();if(e&&s&&i)return gt(e,s,t.getRadius(),i.getRadius());{const t=e??s;if(t)return pt(t)}}}function wt(t,i,e){const s="string"==typeof t?t:t.value;return s===tt?e?at({value:s}):i?tt:it:s===it?it:at({value:s})}function xt(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function _t(t,i,e){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return i&&(zt(s.h,i.h,e),zt(s.s,i.s,e),zt(s.l,i.l,e)),s}function zt(t,i,e){t.enable=i.enable,t.enable?(t.velocity=v(i.speed)/100*e,t.decay=1-v(i.decay),t.status=0,i.sync||(t.velocity*=d(),t.value*=d())):t.velocity=0}function kt(t,i,e){t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.closePath()}function Pt(t,i,e,s){t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(e.x,e.y),t.lineTo(s.x,s.y),t.closePath()}function Mt(t,i,e){t.fillStyle=e??"rgba(0,0,0,0)",t.fillRect(0,0,i.width,i.height)}function Ct(t,i){t.clearRect(0,0,i.width,i.height)}function Ot(t){const{container:i,context:e,particle:s,delta:o,colorStyles:n,backgroundMask:a,composite:r,radius:l,opacity:c,shadow:d,transform:h}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),v=Math.sin(p),y=Math.cos(p),f={a:y*(h.a??1),b:v*(h.b??1),c:-v*(h.c??1),d:y*(h.d??1)};e.setTransform(f.a,f.b,f.c,f.d,u.x,u.y),e.beginPath(),a&&(e.globalCompositeOperation=r);const m=s.shadowColor;d.enable&&m&&(e.shadowBlur=d.blur,e.shadowColor=ft(m),e.shadowOffsetX=d.offset.x,e.shadowOffsetY=d.offset.y),n.fill&&(e.fillStyle=n.fill);const g=s.stroke;e.lineWidth=s.strokeWidth??0,n.stroke&&(e.strokeStyle=n.stroke),St(i,e,s,l,c,o),(g?.width??0)>0&&e.stroke(),s.close&&e.closePath(),s.fill&&e.fill(),Rt(i,e,s,l,c,o),e.globalCompositeOperation="source-over",e.setTransform(1,0,0,1,0,0)}function St(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);a&&a.draw(i,e,s,o,n,t.retina.pixelRatio)}function Rt(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);a?.afterEffect&&a.afterEffect(i,e,s,o,n,t.retina.pixelRatio)}function Dt(t,i,e){i.draw&&i.draw(t,e)}function Tt(t,i,e,s){i.drawParticle&&i.drawParticle(t,e,s)}function Et(t,i,e){return{h:t.h,s:t.s,l:t.l+("darken"===i?-1:1)*e}}const It="generated",At="touchend",Lt="pointerdown",Ht="pointerup",Ft="pointermove",qt="touchstart",Vt="touchmove",Bt="pointerleave",Wt="pointerout",Ut="touchcancel",jt="resize",Nt="visibilitychange";function $t(t,i,e){const s=i[e];void 0!==s&&(t[e]=(t[e]??1)*s)}class Gt{container;element;resizeFactor;size;_colorPlugins;_context;_coverColorStyle;_generated;_mutationObserver;_originalStyle;_postDrawUpdaters;_preDrawUpdaters;_resizePlugins;_trailFillColor;constructor(t){this.container=t,this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._mutationObserver=D()||"undefined"==typeof MutationObserver?void 0:new MutationObserver((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()}))}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,i=t.particles.move.trail;t.backgroundMask.enable?this.paint():i.enable&&i.length>0&&this._trailFillColor?this._paintBase(ft(this._trailFillColor,1/i.length)):this.draw((t=>{Ct(t,this.size)}))}destroy(){this._mutationObserver?.disconnect(),this._generated?this.element?.remove():this._resetOriginalStyle(),this.draw((t=>{Ct(t,this.size)})),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){if(this._context)return t(this._context)}drawParticle(t,i){if(t.spawning||t.destroyed)return;const e=t.getRadius();if(e<=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.actualOptions,r=t.options.zIndex,l=(1-t.zIndexFactor)**r.opacityRate,c=t.bubble.opacity??t.opacity?.value??1,d=c*l,h=(t.stroke?.opacity??c)*l,u={},p={fill:n?mt(n,d):void 0};p.stroke=a?mt(a,h):p.fill,this._applyPreDrawUpdaters(s,t,e,d,p,u),Ot({container:this.container,context:s,particle:t,delta:i,colorStyles:p,backgroundMask:o.backgroundMask.enable,composite:o.backgroundMask.composite,radius:e*(1-t.zIndexFactor)**r.sizeRate,opacity:d,shadow:t.options.shadow,transform:u}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,i,e){this.draw((s=>{Tt(s,t,i,e)}))}drawPlugin(t,i){this.draw((e=>{Dt(e,t,i)}))}init(){this.resize(),this._initStyle(),this._initCover(),this._initTrail(),this.initBackground(),this.element&&this._mutationObserver?.observe(this.element,{attributes:!0}),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,i=this.element?.style;if(i){if(t.color){const e=at(t.color);i.backgroundColor=e?ft(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?.remove(),this._generated=t.dataset&&It in t.dataset?"true"===t.dataset[It]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=U({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=this.element.getContext("2d"),this._mutationObserver?.observe(this.element,{attributes:!0}),this.container.retina.init(),this.initBackground()}paint(){const t=this.container.actualOptions;this.draw((i=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Ct(i,this.size),this._paintBase(this._coverColorStyle)):this._paintBase()}))}resize(){if(!this.element)return;const t=this.container,i=t.retina.pixelRatio,e=t.canvas.size,s=this.element.offsetWidth*i,o=this.element.offsetHeight*i;if(o===e.height&&s===e.width&&o===this.element.height&&s===this.element.width)return;const n={...e};this.element.width=e.width=this.element.offsetWidth*i,this.element.height=e.height=this.element.offsetHeight*i,this.container.started&&(this.resizeFactor={width:e.width/n.width,height:e.height/n.height})}async windowResize(){if(!this.element)return;this.resize();const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}_applyPostDrawUpdaters(t){for(const i of this._postDrawUpdaters)i.afterDraw?.(t)}_applyPreDrawUpdaters(t,i,e,s,o,n){for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:n,stroke:r}=a.getColorStyles(i,t,e,s);n&&(o.fill=n),r&&(o.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(i);for(const i in t)$t(n,t,i)}a.beforeDraw?.(i)}}_applyResizePlugins(){for(const t of this._resizePlugins)t.resize&&t.resize()}_getPluginParticleColors(t){let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=ct(s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=ct(s.particleStrokeColor(t))),i&&e)break;return[i,e]}_initCover(){const t=this.container.actualOptions.backgroundMask.cover,i=at(t.color);if(i){const e={r:i.r,g:i.g,b:i.b,a:t.opacity};this._coverColorStyle=ft(e,e.a)}}_initStyle(){const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?(this._originalStyle=U({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const e in i.style){if(!e||!i.style)continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}}_initTrail(){const t=this.container.actualOptions,i=at(t.particles.move.trail.fillColor);if(i){const e=t.particles.move.trail;this._trailFillColor={...i,a:1/e.length}}}_paintBase(t){this.draw((i=>{Mt(i,this.size,t)}))}_repairStyle(){const t=this.element;t&&(this._mutationObserver?.disconnect(),this._initStyle(),this.initBackground(),this._mutationObserver?.observe(t,{attributes:!0}))}_resetOriginalStyle(){const t=this.element,i=this._originalStyle;t&&i&&(t.style.position=i.position,t.style.zIndex=i.zIndex,t.style.top=i.top,t.style.left=i.left,t.style.width=i.width,t.style.height=i.height)}_setFullScreenStyle(){const t=this.element;if(!t)return;const i="important";t.style.setProperty("position","fixed",i),t.style.setProperty("z-index",this.container.actualOptions.fullScreen.zIndex.toString(10),i),t.style.setProperty("top","0",i),t.style.setProperty("left","0",i),t.style.setProperty("width","100%",i),t.style.setProperty("height","100%",i)}}function Xt(t,i,e,s,o){if(s){let s={passive:!0};"boolean"==typeof o?s.capture=o:void 0!==o&&(s=o),t.addEventListener(i,e,s)}else{const s=o;t.removeEventListener(i,e,s)}}class Yt{container;canPush;mouseDownHandler;mouseLeaveHandler;mouseMoveHandler;mouseUpHandler;oldThemeChangeHandler;resizeHandler;resizeObserver;resizeTimeout;themeChangeHandler;touchCancelHandler;touchEndClickHandler;touchEndHandler;touchMoveHandler;touchStartHandler;visibilityChangeHandler;constructor(t){this.container=t,this.canPush=!0,this.mouseMoveHandler=t=>this.mouseTouchMove(t),this.touchStartHandler=t=>this.mouseTouchMove(t),this.touchMoveHandler=t=>this.mouseTouchMove(t),this.touchEndHandler=()=>this.mouseTouchFinish(),this.mouseLeaveHandler=()=>this.mouseTouchFinish(),this.touchCancelHandler=()=>this.mouseTouchFinish(),this.touchEndClickHandler=t=>this.mouseTouchClick(t),this.mouseUpHandler=t=>this.mouseTouchClick(t),this.mouseDownHandler=()=>this.mouseDown(),this.visibilityChangeHandler=()=>this.handleVisibilityChange(),this.themeChangeHandler=t=>this.handleThemeChange(t),this.oldThemeChangeHandler=t=>this.handleThemeChange(t),this.resizeHandler=()=>this.handleWindowResize()}addListeners(){this.manageListeners(!0)}removeListeners(){this.manageListeners(!1)}doMouseTouchClick(t){const i=this.container,e=i.actualOptions;if(this.canPush){const t=i.interactivity.mouse.position;if(!t)return;i.interactivity.mouse.clickPosition={...t},i.interactivity.mouse.clickTime=(new Date).getTime();Z(e.interactivity.events.onClick.mode,(t=>this.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this.mouseTouchFinish()),500)}handleClickMode(t){this.container.handleClickMode(t)}handleThemeChange(t){const i=t.matches?this.container.options.defaultThemes.dark:this.container.options.defaultThemes.light,e=this.container.options.themes.find((t=>t.name===i));e&&e.default.auto&&this.container.loadTheme(i)}handleVisibilityChange(){const t=this.container,i=t.actualOptions;this.mouseTouchFinish(),i.pauseOnBlur&&(document?.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.getAnimationStatus()?t.play(!0):t.draw(!0)))}handleWindowResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),delete this.resizeTimeout),this.resizeTimeout=setTimeout((async()=>this.container.canvas?.windowResize()),500)}manageListeners(t){const i=this.container,e=i.actualOptions,s=e.interactivity.detectsOn;let o=Bt;if("window"===s)i.interactivity.element=window,o=Wt;else if("parent"===s&&i.canvas.element){const t=i.canvas.element;i.interactivity.element=t.parentElement??t.parentNode}else i.interactivity.element=i.canvas.element;const n=E("(prefers-color-scheme: dark)");n&&(void 0!==n.addEventListener?Xt(n,"change",this.themeChangeHandler,t):void 0!==n.addListener&&(t?n.addListener(this.oldThemeChangeHandler):n.removeListener(this.oldThemeChangeHandler)));const a=i.interactivity.element;if(!a)return;const r=a;(e.interactivity.events.onHover.enable||e.interactivity.events.onClick.enable)&&(Xt(a,Ft,this.mouseMoveHandler,t),Xt(a,qt,this.touchStartHandler,t),Xt(a,Vt,this.touchMoveHandler,t),e.interactivity.events.onClick.enable?(Xt(a,At,this.touchEndClickHandler,t),Xt(a,Ht,this.mouseUpHandler,t),Xt(a,Lt,this.mouseDownHandler,t)):Xt(a,At,this.touchEndHandler,t),Xt(a,o,this.mouseLeaveHandler,t),Xt(a,Ut,this.touchCancelHandler,t)),i.canvas.element&&(i.canvas.element.style.pointerEvents=r===i.canvas.element?"initial":"none"),e.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(i.canvas.element&&this.resizeObserver.unobserve(i.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&i.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===i.canvas.element))&&this.handleWindowResize()})),this.resizeObserver.observe(i.canvas.element)):Xt(window,jt,this.resizeHandler,t)),document&&Xt(document,Nt,this.visibilityChangeHandler,t,!1)}mouseDown(){const t=this.container.interactivity;if(t){const i=t.mouse;i.clicking=!0,i.downPosition=i.position}}mouseTouchClick(t){const i=this.container,e=i.actualOptions,s=i.interactivity.mouse;s.inside=!0;let o=!1;const n=s.position;if(n&&e.interactivity.events.onClick.enable){for(const[,t]of i.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||this.doMouseTouchClick(t),s.clicking=!1}}mouseTouchFinish(){const t=this.container.interactivity;if(!t)return;const i=t.mouse;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=Bt,i.inside=!1,i.clicking=!1}mouseTouchMove(t){const i=this.container,e=i.actualOptions;if(!i.interactivity?.element)return;let s;i.interactivity.mouse.inside=!0;const o=i.canvas.element;if(t.type.startsWith("pointer")){this.canPush=!0;const n=t;if(i.interactivity.element===window){if(o){const t=o.getBoundingClientRect();s={x:n.clientX-t.left,y:n.clientY-t.top}}}else if("parent"===e.interactivity.detectsOn){const t=n.target,e=n.currentTarget,o=i.canvas.element;if(t&&e&&o){const i=t.getBoundingClientRect(),a=e.getBoundingClientRect(),r=o.getBoundingClientRect();s={x:n.offsetX+2*i.left-(a.left+r.left),y:n.offsetY+2*i.top-(a.top+r.top)}}else s={x:n.offsetX??n.clientX,y:n.offsetY??n.clientY}}else n.target===i.canvas.element&&(s={x:n.offsetX??n.clientX,y:n.offsetY??n.clientY})}else{this.canPush="touchmove"!==t.type;const i=t,e=i.touches[i.touches.length-1],n=o?.getBoundingClientRect();s={x:e.clientX-(n?.left??0),y:e.clientY-(n?.top??0)}}const n=i.retina.pixelRatio;s&&(s.x*=n,s.y*=n),i.interactivity.mouse.position=s,i.interactivity.status=Ft}}class Jt{container;constructor(t){this.container=t}async nextFrame(t){try{const i=this.container;if(!i.smooth&&void 0!==i.lastFrameTime&&t<i.lastFrameTime+1e3/i.fpsLimit)return void i.draw(!1);i.lastFrameTime??=t;const e=function(t,i=60,e=!1){return{value:t,factor:e?60/i:60*t/1e3}}(t-i.lastFrameTime,i.fpsLimit,i.smooth);if(i.lifeTime+=e.value,i.lastFrameTime=t,e.value>1e3)return void i.draw(!1);if(await i.particles.draw(e),i.duration>0&&i.lifeTime>i.duration)return void i.destroy();i.getAnimationStatus()&&i.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}class Zt{value;constructor(){this.value=""}static create(t,i){const e=new Zt;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){void 0!==t?.value&&(this.value=t.value)}}class Qt{color;image;opacity;position;repeat;size;constructor(){this.color=new Zt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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 Kt{color;opacity;constructor(){this.color=new Zt,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ti{composite;cover;enable;constructor(){this.composite="destination-out",this.cover=new Kt,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const i=t.cover,e="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==i.color?i:{color:e})}void 0!==t.enable&&(this.enable=t.enable)}}}class ii{enable;zIndex;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 ei{enable;mode;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))}}class si{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get el(){return this.elementId}set el(t){this.elementId=t}get elementId(){return this.ids}set elementId(t){this.ids=t}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){if(!t)return;const i=t.ids??t.elementId??t.el;void 0!==i&&(this.ids=i),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 oi{enable;force;smooth;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 ni{enable;mode;parallax;constructor(){this.enable=!1,this.mode=[],this.parallax=new oi}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 ai{onClick;onDiv;onHover;resize;constructor(){this.onClick=new ei,this.onDiv=new si,this.onHover=new ni,this.resize=!0}get onclick(){return this.onClick}set onclick(t){this.onClick=t}get ondiv(){return this.onDiv}set ondiv(t){this.onDiv=t}get onhover(){return this.onHover}set onhover(t){this.onHover=t}load(t){if(!t)return;this.onClick.load(t.onClick??t.onclick);const i=t.onDiv??t.ondiv;void 0!==i&&(this.onDiv=Z(i,(t=>{const i=new si;return i.load(t),i}))),this.onHover.load(t.onHover??t.onhover),void 0!==t.resize&&(this.resize=t.resize)}}class ri{_container;_engine;constructor(t,i){this._engine=t,this._container=i}load(t){if(t&&this._container){const i=this._engine.plugins.interactors.get(this._container);if(i)for(const e of i)e.loadModeOptions&&e.loadModeOptions(this,t)}}}class li{detectsOn;events;modes;constructor(t,i){this.detectsOn="window",this.events=new ai,this.modes=new ri(t,i)}get detect_on(){return this.detectsOn}set detect_on(t){this.detectsOn=t}load(t){if(!t)return;const i=t.detectsOn??t.detect_on;void 0!==i&&(this.detectsOn=i),this.events.load(t.events),this.modes.load(t.modes)}}class ci{options;position;load(t){t&&(void 0!==t.position&&(this.position={x:t.position.x??50,y:t.position.y??50}),void 0!==t.options&&(this.options=U({},t.options)))}}class di{maxWidth;mode;options;constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=U({},t.options)))}}class hi{auto;mode;value;constructor(){this.auto=!1,this.mode="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 ui{default;name;options;constructor(){this.name="",this.default=new hi}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=U({},t.options)))}}class pi{count;decay;enable;offset;speed;sync;constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.decay=0,this.sync=!0}load(t){t&&(void 0!==t.count&&(this.count=m(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=m(t.offset)),void 0!==t.speed&&(this.speed=m(t.speed)),void 0!==t.decay&&(this.decay=m(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class vi{h;l;s;constructor(){this.h=new pi,this.s=new pi,this.l=new pi}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class yi extends Zt{animation;constructor(){super(),this.animation=new vi}static create(t,i){const e=new yi;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){if(super.load(t),!t)return;const i=t.animation;void 0!==i&&(void 0!==i.enable?this.animation.h.load(i):this.animation.load(t.animation))}}class fi{speed;constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class mi{enable;retries;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{enable;minimumValue;constructor(){this.enable=!1,this.minimumValue=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue))}}class bi{random;value;constructor(){this.random=new gi,this.value=0}load(t){t&&("boolean"==typeof t.random?this.random.enable=t.random:this.random.load(t.random),void 0!==t.value&&(this.value=m(t.value,this.random.enable?this.random.minimumValue:void 0)))}}class wi extends bi{constructor(){super(),this.random.minimumValue=.1,this.value=1}}class xi{horizontal;vertical;constructor(){this.horizontal=new wi,this.vertical=new wi}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class _i{absorb;bounce;enable;mode;overlap;constructor(){this.absorb=new fi,this.bounce=new xi,this.enable=!1,this.mode="bounce",this.overlap=new mi}load(t){t&&(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class zi{offset;value;constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=m(t.offset)),void 0!==t.value&&(this.value=m(t.value)))}}class ki{distance;enable;rotate;constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}get rotateX(){return this.rotate.x}set rotateX(t){this.rotate.x=t}get rotateY(){return this.rotate.y}set rotateY(t){this.rotate.y=t}load(t){if(!t)return;void 0!==t.distance&&(this.distance=m(t.distance)),void 0!==t.enable&&(this.enable=t.enable);const i=t.rotate?.x??t.rotateX;void 0!==i&&(this.rotate.x=i);const e=t.rotate?.y??t.rotateY;void 0!==e&&(this.rotate.y=e)}}class Pi{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode="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 Mi{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=m(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=m(t.maxSpeed)))}}class Ci{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new bi,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=U(this.options,t.options)))}}class Oi{enable;fillColor;length;constructor(){this.enable=!1,this.length=10,this.fillColor=new Zt,this.fillColor.value="#000000"}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),this.fillColor=Zt.create(this.fillColor,t.fillColor),void 0!==t.length&&(this.length=t.length))}}class Si{bottom;default;left;right;top;constructor(){this.default="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 Ri{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=m(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),this.position=t.position?U({},t.position):void 0)}}class Di{angle;attract;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;trail;vibrate;warp;constructor(){this.angle=new zi,this.attract=new ki,this.center=new Pi,this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new Mi,this.path=new Ci,this.outModes=new Si,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ri,this.straight=!1,this.trail=new Oi,this.vibrate=!1,this.warp=!1}get bounce(){return this.collisions}set bounce(t){this.collisions=t}get collisions(){return!1}set collisions(t){}get noise(){return this.path}set noise(t){this.path=t}get outMode(){return this.outModes.default}set outMode(t){this.outModes.default=t}get out_mode(){return this.outMode}set out_mode(t){this.outMode=t}load(t){if(!t)return;this.angle.load("number"==typeof t.angle?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance="number"==typeof t.distance?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=m(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const i=t.outModes??t.outMode??t.out_mode;void 0!==i&&("object"==typeof i?this.outModes.load(i):this.outModes.load({default:i})),this.path.load(t.path??t.noise),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=m(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 Ti{count;decay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=m(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=m(t.speed)),void 0!==t.decay&&(this.decay=m(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ei extends Ti{destroy;minimumValue;startValue;constructor(){super(),this.destroy="none",this.enable=!1,this.speed=2,this.startValue="random",this.sync=!1}get opacity_min(){return this.minimumValue}set opacity_min(t){this.minimumValue=t}load(t){t&&(super.load(t),void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=t.minimumValue??t.opacity_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class Ii extends bi{animation;constructor(){super(),this.animation=new Ei,this.random.minimumValue=.1,this.value=1}get anim(){return this.animation}set anim(t){this.animation=t}load(t){if(!t)return;super.load(t);const i=t.animation??t.anim;void 0!==i&&(this.animation.load(i),this.value=m(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Ai{area;enable;factor;constructor(){this.enable=!1,this.area=800,this.factor=1e3}get value_area(){return this.area}set value_area(t){this.area=t}load(t){if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const i=t.area??t.value_area;void 0!==i&&(this.area=i),void 0!==t.factor&&(this.factor=t.factor)}}class Li{density;limit;value;constructor(){this.density=new Ai,this.limit=0,this.value=100}get max(){return this.limit}set max(t){this.limit=t}load(t){if(!t)return;this.density.load(t.density);const i=t.limit??t.max;void 0!==i&&(this.limit=i),void 0!==t.value&&(this.value=t.value)}}class Hi{blur;color;enable;offset;constructor(){this.blur=0,this.color=new Zt,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=Zt.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)))}}const Fi="character",qi="char",Vi="image",Bi="images",Wi="polygon",Ui="star";class ji{options;type;constructor(){this.options={},this.type="circle"}get character(){return this.options[Fi]??this.options.char}set character(t){this.options.char=this.options[Fi]=t}get custom(){return this.options}set custom(t){this.options=t}get image(){return this.options.image??this.options.images}set image(t){this.options.images=this.options.image=t}get images(){return this.image}set images(t){this.image=t}get polygon(){return this.options.polygon??this.options.star}set polygon(t){this.options.star=this.options.polygon=t}get stroke(){return[]}set stroke(t){}load(t){if(!t)return;const i=t.options??t.custom;if(void 0!==i)for(const t in i){const e=i[t];e&&(this.options[t]=U(this.options[t]??{},e))}this.loadShape(t.character,Fi,qi,!0),this.loadShape(t.polygon,Wi,Ui,!1),this.loadShape(t.image??t.images,Vi,Bi,!0),void 0!==t.type&&(this.type=t.type)}loadShape(t,i,e,s){if(!t)return;const o=t instanceof Array,n=o?[]:{},a=o!==this.options[i]instanceof Array,r=o!==this.options[e]instanceof Array;a&&(this.options[i]=n),r&&s&&(this.options[e]=n),this.options[i]=U(this.options[i]??n,t),this.options[e]&&!s||(this.options[e]=U(this.options[e]??n,t))}}class Ni extends Ti{destroy;minimumValue;startValue;constructor(){super(),this.destroy="none",this.enable=!1,this.speed=5,this.startValue="random",this.sync=!1}get size_min(){return this.minimumValue}set size_min(t){this.minimumValue=t}load(t){super.load(t),t&&(void 0!==t.destroy&&(this.destroy=t.destroy),void 0!==t.enable&&(this.enable=t.enable),this.minimumValue=t.minimumValue??t.size_min,void 0!==t.speed&&(this.speed=t.speed),void 0!==t.startValue&&(this.startValue=t.startValue),void 0!==t.sync&&(this.sync=t.sync))}}class $i extends bi{animation;constructor(){super(),this.animation=new Ni,this.random.minimumValue=1,this.value=3}get anim(){return this.animation}set anim(t){this.animation=t}load(t){if(super.load(t),!t)return;const i=t.animation??t.anim;void 0!==i&&(this.animation.load(i),this.value=m(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Gi{color;opacity;width;constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=yi.create(this.color,t.color)),void 0!==t.width&&(this.width=t.width),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Xi extends bi{opacityRate;sizeRate;velocityRate;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 Yi{bounce;collisions;color;groups;interactivity;move;number;opacity;reduceDuplicates;shadow;shape;size;stroke;zIndex;_container;_engine;constructor(t,i){this._engine=t,this._container=i,this.bounce=new xi,this.collisions=new _i,this.color=new yi,this.color.value="#fff",this.groups={},this.move=new Di,this.number=new Li,this.opacity=new Ii,this.reduceDuplicates=!1,this.shadow=new Hi,this.shape=new ji,this.size=new $i,this.stroke=new Gi,this.zIndex=new Xi}load(t){if(!t)return;if(this.bounce.load(t.bounce),this.color.load(yi.create(this.color,t.color)),void 0!==t.groups)for(const i in t.groups){const e=t.groups[i];void 0!==e&&(this.groups[i]=U(this.groups[i]??{},e))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex);const i=t.move?.collisions??t.move?.bounce;void 0!==i&&(this.collisions.enable=i),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=U({},t.interactivity));const e=t.stroke??t.shape?.stroke;if(e&&(this.stroke=Z(e,(t=>{const i=new Gi;return i.load(t),i}))),this._container){const i=this._engine.plugins.updaters.get(this._container);if(i)for(const e of i)e.loadOptions&&e.loadOptions(this,t);const e=this._engine.plugins.interactors.get(this._container);if(e)for(const i of e)i.loadParticlesOptions&&i.loadParticlesOptions(this,t)}}}function Ji(t,...i){for(const e of i)t.load(e)}function Zi(t,i,...e){const s=new Yi(t,i);return Ji(s,...e),s}class Qi{autoPlay;background;backgroundMask;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;interactivity;manualParticles;particles;pauseOnBlur;pauseOnOutsideViewport;preset;responsive;smooth;style;themes;zLayers;_container;_engine;constructor(t,i){this._engine=t,this._container=i,this.autoPlay=!0,this.background=new Qt,this.backgroundMask=new ti,this.defaultThemes={},this.delay=0,this.fullScreen=new ii,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new li(t,i),this.manualParticles=[],this.particles=Zi(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}get backgroundMode(){return this.fullScreen}set backgroundMode(t){this.fullScreen.load(t)}get fps_limit(){return this.fpsLimit}set fps_limit(t){this.fpsLimit=t}get retina_detect(){return this.detectRetina}set retina_detect(t){this.detectRetina=t}load(t){if(!t)return;void 0!==t.preset&&Z(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.delay&&(this.delay=m(t.delay));const i=t.detectRetina??t.retina_detect;void 0!==i&&(this.detectRetina=i),void 0!==t.duration&&(this.duration=m(t.duration));const e=t.fpsLimit??t.fps_limit;void 0!==e&&(this.fpsLimit=e),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??t.backgroundMode;"boolean"==typeof s?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),void 0!==t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const i=new ci;return i.load(t),i}))),this.particles.load(t.particles),this.style=U(this.style,t.style),this._engine.plugins.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const o=this._engine.plugins.interactors.get(this._container);if(o)for(const i of o)i.loadOptions&&i.loadOptions(this,t);if(void 0!==t.responsive)for(const i of t.responsive){const t=new di;t.load(i),this.responsive.push(t)}if(this.responsive.sort(((t,i)=>t.maxWidth-i.maxWidth)),void 0!==t.themes)for(const i of t.themes){const t=new ui;t.load(i),this.themes.push(t)}this.defaultThemes.dark=this._findDefaultTheme("dark")?.name,this.defaultThemes.light=this._findDefaultTheme("light")?.name}setResponsive(t,i,e){this.load(e);const s=this.responsive.find((e=>"screen"===e.mode&&screen?e.maxWidth>screen.availWidth:e.maxWidth*i>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const i=this.themes.find((i=>i.name===t));i&&this.load(i.options)}else{const t=E("(prefers-color-scheme: dark)"),i=t&&t.matches,e=this._findDefaultTheme(i?"dark":"light");e&&this.load(e.options)}}_findDefaultTheme(t){return this.themes.find((i=>i.default.value&&i.default.mode===t))??this.themes.find((t=>t.default.value&&"any"===t.default.mode))}_importPreset(t){this.load(this._engine.plugins.getPreset(t))}}class Ki{container;_engine;_externalInteractors;_interactors;_particleInteractors;constructor(t,i){this.container=i,this._engine=t,this._interactors=this._engine.plugins.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.interact(t)}handleClickMode(t){for(const i of this._externalInteractors)i.handleClickMode&&i.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case 0:this._externalInteractors.push(t);break;case 1:this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&await e.interact(t,i)}async reset(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.reset(t)}}const te=t=>{L(t.outMode,t.checkModes)&&(t.coord>t.maxCoord-2*t.radius?t.setCb(-t.radius):t.coord<2*t.radius&&t.setCb(t.radius))};class ie{container;backColor;bubble;close;color;destroyed;direction;fill;group;id;ignoresResizeRatio;initialPosition;initialVelocity;interactivity;lastPathTime;misplaced;moveCenter;moveDecay;offset;opacity;options;outType;pathDelay;pathGenerator;pathRotation;position;randomIndexData;retina;roll;rotation;shadowColor;shape;shapeData;sides;size;slow;spawning;stroke;strokeColor;strokeWidth;unbreakable;velocity;wobble;zIndexFactor;_engine;constructor(t,i,e,s,o,n){this.container=e,this._engine=t,this.init(i,s,o,n)}destroy(t){if(!this.unbreakable&&!this.destroyed){this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;for(const[,i]of this.container.plugins)i.particleDestroyed&&i.particleDestroyed(this,t);for(const i of this.container.particles.updaters)i.particleDestroyed&&i.particleDestroyed(this,t)}}draw(t){const i=this.container;for(const[,e]of i.plugins)i.canvas.drawParticlePlugin(e,this,t);i.canvas.drawParticle(this,t)}getFillColor(){const t=this.bubble.color??xt(this.color);if(t&&this.roll&&(this.backColor||this.roll.alter)){const i=this.roll.horizontal&&this.roll.vertical?2:1,e=this.roll.horizontal?Math.PI/2:0;if(Math.floor(((this.roll.angle??0)+e)/(Math.PI/i))%2){if(this.backColor)return this.backColor;if(this.roll.alter)return Et(t,this.roll.alter.type,this.roll.alter.value)}}return t}getMass(){return this.getRadius()**2*Math.PI/2}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.bubble.color??xt(this.strokeColor)??this.getFillColor()}init(t,i,e,s){const n=this.container,a=this._engine;this.group=s,this.fill=!0,this.pathRotation=!1,this.close=!0,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const r=n.retina.pixelRatio,l=n.actualOptions,c=Zi(this._engine,n,l.particles),u=c.shape.type,{reduceDuplicates:m}=c;this.shape=Q(u,this.id,m);const b=c.shape;if(e&&e.shape&&e.shape.type){const t=Q(e.shape.type,this.id,m);t&&(this.shape=t,b.load(e.shape))}this.shapeData=this._loadShapeData(b,m),c.load(e),c.load(this.shapeData?.particles),this.interactivity=new li(a,n),this.interactivity.load(n.actualOptions.interactivity),this.interactivity.load(c.interactivity),this.fill=this.shapeData?.fill??this.fill,this.close=this.shapeData?.close??this.close,this.options=c;const w=this.options.move.path;this.pathDelay=1e3*g(w.delay),w.generator&&(this.pathGenerator=this._engine.plugins.getPathGenerator(w.generator),this.pathGenerator&&n.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(n));const _=v(this.options.zIndex.value);n.retina.initParticle(this);const z=this.options.size,k=z.value,P=z.animation;if(this.size={enable:z.animation.enable,value:v(z.value)*n.retina.pixelRatio,max:f(k)*r,min:y(k)*r,loops:0,maxLoops:v(z.animation.count)},P.enable)switch(this.size.status=0,this.size.decay=1-v(P.decay),P.startValue){case"min":this.size.value=this.size.min,this.size.status=0;break;case"random":this.size.value=p(this.size)*r,this.size.status=d()>=.5?0:1;break;default:this.size.value=this.size.max,this.size.status=1}this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.position=this._calcPosition(n,i,h(_,0,n.zLayers)),this.initialPosition=this.position.copy();const M=n.canvas.size,C={...this.options.move.center},O="percent"===C.mode;switch(this.moveCenter={x:C.x*(O?M.width/100:1),y:C.y*(O?M.height/100:1),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??"percent"},this.direction=x(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-v(this.options.move.decay),this.offset=o.origin;const S=n.particles;S.needsSort=S.needsSort||S.lastZIndex<this.position.z,S.lastZIndex=this.position.z,this.zIndexFactor=this.position.z/n.zLayers,this.sides=24;let R=n.drawers.get(this.shape);R||(R=this._engine.plugins.getShapeDrawer(this.shape),R&&n.drawers.set(this.shape,R)),R?.loadShape&&R?.loadShape(this);const D=R?.getSidesCount;D&&(this.sides=D(this)),this.spawning=!1,this.shadowColor=at(this.options.shadow.color);for(const t of n.particles.updaters)t.init(this);for(const t of n.particles.movers)t.init?.(this);R?.particleInit&&R.particleInit(n,this);for(const[,t]of n.plugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size;return this.position.x>=-t&&this.position.y>=-t&&this.position.y<=i.height+t&&this.position.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}_calcPosition(t,i,e,o=0){for(const[,o]of t.plugins){const t=void 0!==o.particlePosition?o.particlePosition(i,this):void 0;if(void 0!==t)return s.create(t.x,t.y,e)}const n=C({size:t.canvas.size,position:i}),a=s.create(n.x,n.y,e),r=this.getRadius(),l=this.options.move.outModes,c=i=>{te({outMode:i,checkModes:["bounce","bounce-horizontal"],coord:a.x,maxCoord:t.canvas.size.width,setCb:t=>a.x+=t,radius:r})},d=i=>{te({outMode:i,checkModes:["bounce","bounce-vertical"],coord:a.y,maxCoord:t.canvas.size.height,setCb:t=>a.y+=t,radius:r})};return c(l.left??l.default),c(l.right??l.default),d(l.top??l.default),d(l.bottom??l.default),this._checkOverlap(a,o)?this._calcPosition(t,void 0,e,o+1):a}_calculateVelocity(){const t=_(this.direction).copy(),i=this.options.move;if("inside"===i.direction||"outside"===i.direction)return t;const e=Math.PI/180*v(i.angle.value),s=Math.PI/180*v(i.angle.offset),o={left:s-e/2,right:s+e/2};return i.straight||(t.angle+=p(m(o.left,o.right))),i.random&&"number"==typeof i.speed&&(t.length*=d()),t}_checkOverlap(t,i=0){const e=this.options.collisions,s=this.getRadius();if(!e.enable)return!1;const o=e.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&i>n)throw new Error("Particle is overlapping and can't be placed");let a=!1;for(const i of this.container.particles.array)if(w(t,i.position)<s+i.getRadius()){a=!0;break}return a}_loadShapeData(t,i){const e=t.options[this.shape];if(e)return U({},Q(e,this.id,i))}}class ee{position;particle;constructor(t,i){this.position=t,this.particle=i}}class se{position;constructor(t,i){this.position={x:t,y:i}}}class oe extends se{radius;constructor(t,i,e){super(t,i),this.radius=e}contains(t){return w(t,this.position)<=this.radius}intersects(t){const i=t,e=t,s=this.position,o=t.position,n=Math.abs(o.x-s.x),a=Math.abs(o.y-s.y),r=this.radius;if(void 0!==e.radius){return r+e.radius>Math.sqrt(n**2+a**2)}if(void 0!==i.size){const t=i.size.width,e=i.size.height;return Math.pow(n-t,2)+Math.pow(a-e,2)<=r**2||n<=r+t&&a<=r+e||n<=t||a<=e}return!1}}class ne extends se{size;constructor(t,i,e,s){super(t,i),this.size={height:s,width:e}}contains(t){const i=this.size.width,e=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+i&&t.y>=s.y&&t.y<=s.y+e}intersects(t){t instanceof oe&&t.intersects(this);const i=this.size.width,e=this.size.height,s=this.position,o=t.position,n=t instanceof ne?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+i&&o.x+a>s.x&&o.y<s.y+e&&o.y+r>s.y}}class ae{rectangle;capacity;_NE;_NW;_SE;_SW;_divided;_points;constructor(t,i){this.rectangle=t,this.capacity=i,this._points=[],this._divided=!1}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this.subdivide(),(this._NE?.insert(t)||this._NW?.insert(t)||this._SE?.insert(t)||this._SW?.insert(t))??!1))}query(t,i,e){const s=e??[];if(!t.intersects(this.rectangle))return[];for(const e of this._points)!t.contains(e.position)&&w(t.position,e.position)>e.particle.getRadius()&&(!i||i(e.particle))||s.push(e.particle);return this._divided&&(this._NE?.query(t,i,s),this._NW?.query(t,i,s),this._SE?.query(t,i,s),this._SW?.query(t,i,s)),s}queryCircle(t,i,e){return this.query(new oe(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new ne(t.x,t.y,i.width,i.height),e)}subdivide(){const t=this.rectangle.position.x,i=this.rectangle.position.y,e=this.rectangle.size.width,s=this.rectangle.size.height,o=this.capacity;this._NE=new ae(new ne(t,i,e/2,s/2),o),this._NW=new ae(new ne(t+e/2,i,e/2,s/2),o),this._SE=new ae(new ne(t,i+s/2,e/2,s/2),o),this._SW=new ae(new ne(t+e/2,i+s/2,e/2,s/2),o),this._divided=!0}}class re{container;array;lastZIndex;limit;movers;needsSort;pool;pushing;quadTree;updaters;zArray;_engine;interactionManager;nextId;constructor(t,i){this.container=i,this._engine=t,this.nextId=0,this.array=[],this.zArray=[],this.pool=[],this.limit=0,this.needsSort=!1,this.lastZIndex=0,this.interactionManager=new Ki(this._engine,i);const e=this.container.canvas.size;this.quadTree=new ae(new ne(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),this.movers=this._engine.plugins.getMovers(i,!0),this.updaters=this._engine.plugins.getUpdaters(i,!0)}get count(){return this.array.length}addManualParticles(){const t=this.container,i=t.actualOptions;for(const e of i.manualParticles)this.addParticle(k({size:t.canvas.size,position:e.position}),e.options)}addParticle(t,i,e,s){const o=this.container.actualOptions.particles.number.limit;if(o>0){const t=this.count+1-o;t>0&&this.removeQuantity(t)}return this._pushParticle(t,i,e,s)}clear(){this.array=[],this.zArray=[]}destroy(){this.array=[],this.zArray=[],this.movers=[],this.updaters=[]}async draw(t){const i=this.container,e=this.container.canvas.size;this.quadTree=new ae(new ne(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),i.canvas.clear(),await this.update(t),this.needsSort&&(this.zArray.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id)),this.lastZIndex=this.zArray[this.zArray.length-1].position.z,this.needsSort=!1);for(const[,e]of i.plugins)i.canvas.drawPlugin(e,t);for(const i of this.zArray)i.draw(t)}handleClickMode(t){this.interactionManager.handleClickMode(t)}init(){const t=this.container,i=t.actualOptions;this.lastZIndex=0,this.needsSort=!1;let e=!1;this.updaters=this._engine.plugins.getUpdaters(t,!0),this.interactionManager.init();for(const[,i]of t.plugins)if(void 0!==i.particlesInitialization&&(e=i.particlesInitialization()),e)break;this.interactionManager.init();for(const[,i]of t.pathGenerators)i.init(t);if(this.addManualParticles(),!e){for(const t in i.particles.groups){const e=i.particles.groups[t];for(let s=this.count,o=0;o<e.number?.value&&s<i.particles.number.value;s++,o++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.particles.number.value;t++)this.addParticle()}}push(t,i,e,s){this.pushing=!0;for(let o=0;o<t;o++)this.addParticle(i?.position,e,s);this.pushing=!1}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}remove(t,i,e){this.removeAt(this.array.indexOf(t),void 0,i,e)}removeAt(t,i=1,e,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<i&&n<this.count;n++){const t=this.array[n];if(!t||t.group!==e)continue;t.destroy(s),this.array.splice(n--,1);const i=this.zArray.indexOf(t);this.zArray.splice(i,1),this.pool.push(t),o++,this._engine.dispatchEvent("particleRemoved",{container:this.container,data:{particle:t}})}}removeQuantity(t,i){this.removeAt(0,t,i)}setDensity(){const t=this.container.actualOptions;for(const i in t.particles.groups)this._applyDensity(t.particles.groups[i],0,i);this._applyDensity(t.particles,t.manualParticles.length)}async update(t){const i=this.container,e=[];for(const[,t]of i.pathGenerators)t.update();for(const[,e]of i.plugins)e.update?.(t);for(const s of this.array){const o=i.canvas.resizeFactor;o&&!s.ignoresResizeRatio&&(s.position.x*=o.width,s.position.y*=o.height,s.initialPosition.x*=o.width,s.initialPosition.y*=o.height),s.ignoresResizeRatio=!1,await this.interactionManager.reset(s);for(const[,i]of this.container.plugins){if(s.destroyed)break;i.particleUpdate?.(s,t)}for(const i of this.movers)i.isEnabled(s)&&i.move(s,t);s.destroyed?e.push(s):this.quadTree.insert(new ee(s.getPosition(),s))}for(const t of e)this.remove(t);await this.interactionManager.externalInteract(t);for(const i of this.array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||await this.interactionManager.particlesInteract(i,t)}delete i.canvas.resizeFactor}_applyDensity(t,i,e){if(!t.number.density?.enable)return;const s=t.number,o=this._initDensityFactor(s.density),n=s.value,a=s.limit>0?s.limit:n,r=Math.min(n,a)*o+i,l=Math.min(this.count,this.array.filter((t=>t.group===e)).length);this.limit=s.limit*o,l<r?this.push(Math.abs(r-l),void 0,t,e):l>r&&this.removeQuantity(l-r,e)}_initDensityFactor(t){const i=this.container;if(!i.canvas.element||!t.enable)return 1;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.factor*s**2*t.area)}_pushParticle(t,i,e,s){try{let o=this.pool.pop();o?o.init(this.nextId,t,i,e):o=new ie(this._engine,this.nextId,this.container,t,i,e);let n=!0;if(s&&(n=s(o)),!n)return;return this.array.push(o),this.zArray.push(o),this.nextId++,this._engine.dispatchEvent("particleAdded",{container:this.container,data:{particle:o}}),o}catch(t){return void console.warn(`error adding particle: ${t}`)}}}class le{container;attractDistance;maxSpeed;pixelRatio;reduceFactor;sizeAnimationSpeed;constructor(t){this.container=t}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=!i.detectRetina||D()?1:window.devicePixelRatio,this.reduceFactor=1;const e=this.pixelRatio;if(t.canvas.element){const i=t.canvas.element;t.canvas.size.width=i.offsetWidth*e,t.canvas.size.height=i.offsetHeight*e}const s=i.particles;this.attractDistance=v(s.move.attract.distance)*e,this.sizeAnimationSpeed=v(s.size.animation.speed)*e,this.maxSpeed=v(s.move.gravity.maxSpeed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,s=i.move.distance,o=t.retina;o.attractDistance=v(i.move.attract.distance)*e,o.moveDrift=v(i.move.drift)*e,o.moveSpeed=v(i.move.speed)*e,o.sizeAnimationSpeed=v(i.size.animation.speed)*e;const n=o.maxDistance;n.horizontal=void 0!==s.horizontal?s.horizontal*e:void 0,n.vertical=void 0!==s.vertical?s.vertical*e:void 0,o.maxSpeed=v(i.move.gravity.maxSpeed)*e}}function ce(t){return t&&!t.destroyed}function de(t,i,...e){const s=new Qi(t,i);return Ji(s,...e),s}const he={generate:t=>{const i=t.velocity.copy();return i.angle+=i.length*Math.PI/180,i},init:()=>{},update:()=>{}};class ue{id;actualOptions;canvas;destroyed;drawers;duration;fpsLimit;frameManager;interactivity;lastFrameTime;lifeTime;pageHidden;particles;pathGenerators;plugins;responsiveMaxWidth;retina;smooth;started;zLayers;_currentTheme;_delay;_delayTimeout;_drawAnimationFrame;_engine;_eventListeners;_firstStart;_initialSourceOptions;_intersectionObserver;_options;_paused;_sourceOptions;constructor(t,i,e){this.id=i,this._engine=t,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._sourceOptions=e,this._initialSourceOptions=e,this.retina=new le(this),this.canvas=new Gt(this),this.particles=new re(this._engine,this),this.frameManager=new Jt(this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.drawers=new Map,this._options=de(this._engine,this),this.actualOptions=de(this._engine,this),this._eventListeners=new Yt(this),"undefined"!=typeof IntersectionObserver&&IntersectionObserver&&(this._intersectionObserver=new IntersectionObserver((t=>this._intersectionManager(t)))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!ce(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!ce(this))return;const o=this.retina.pixelRatio,n={x:e.x*o,y:e.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(i,a)};let s=!1,o=!1;i.addEventListener("click",(t=>{if(!ce(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,1)})),i.addEventListener("touchstart",(()=>{ce(this)&&(s=!0,o=!1)})),i.addEventListener("touchmove",(()=>{ce(this)&&(o=!0)})),i.addEventListener("touchend",(t=>{if(ce(this)){if(s&&!o){const i=t;let s=i.touches[i.touches.length-1];if(!s&&(s=i.changedTouches[i.changedTouches.length-1],!s))return;const o=this.canvas.element,n=o?o.getBoundingClientRect():void 0,a={x:s.clientX-(n?n.left:0),y:s.clientY-(n?n.top:0)};e(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),i.addEventListener("touchcancel",(()=>{ce(this)&&(s=!1,o=!1)}))}addPath(t,i,e=!1){return!(!ce(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,i??he),!0)}destroy(){if(!ce(this))return;this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.drawers)t.destroy&&t.destroy(this);for(const t of this.drawers.keys())this.drawers.delete(t);this._engine.plugins.destroy(this),this.destroyed=!0;const t=this._engine.dom(),i=t.findIndex((t=>t===this));i>=0&&t.splice(i,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!ce(this))return;let i=t;this._drawAnimationFrame=I()((async t=>{i&&(this.lastFrameTime=void 0,i=!1),await this.frameManager.nextFrame(t)}))}exportConfiguration(){return JSON.stringify(this.actualOptions,((t,i)=>{if("_engine"!==t&&"_container"!==t)return i}),2)}exportImage(t,i,e){const s=this.canvas.element;s&&s.toBlob(t,i??"image/png",e)}exportImg(t){this.exportImage(t)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&ce(this)}handleClickMode(t){if(ce(this)){this.particles.handleClickMode(t);for(const[,i]of this.plugins)i.handleClickMode&&i.handleClickMode(t)}}async init(){if(!ce(this))return;const t=this._engine.plugins.getSupportedShapes();for(const i of t){const t=this._engine.plugins.getShapeDrawer(i);t&&this.drawers.set(i,t)}this._options=de(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=de(this._engine,this,this._options);const i=this._engine.plugins.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize(),this.zLayers=this.actualOptions.zLayers,this.duration=1e3*v(this.actualOptions.duration),this._delay=1e3*v(this.actualOptions.delay),this.lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this.smooth=this.actualOptions.smooth;for(const[,t]of this.drawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init&&await t.init();this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){ce(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(ce(this)&&(void 0!==this._drawAnimationFrame&&(A()(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!ce(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const[,t]of this.plugins)t.play&&t.play();this._engine.dispatchEvent("containerPlay",{container:this}),this.draw(i||!1)}else this._firstStart=!1}async refresh(){if(ce(this))return this.stop(),this.start()}async reset(){if(ce(this))return this._options=de(this._engine,this),this.refresh()}setNoise(t,i,e){ce(this)&&this.setPath(t,i,e)}setPath(t,i,e){if(!t||!ce(this))return;const s={...he};if("function"==typeof t)s.generate=t,i&&(s.init=i),e&&(s.update=e);else{const i=s;s.generate=t.generate||i.generate,s.init=t.init||i.init,s.update=t.update||i.update}this.addPath("default",s,!0)}async start(){ce(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{this._delayTimeout=setTimeout((async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)t.start&&await t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play(),t()}),this._delay)})))}stop(){if(ce(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.clear(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const[,t]of this.plugins)t.stop&&t.stop();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent("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)}_intersectionManager(t){if(ce(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play:this.pause)()}}async function pe(t,i){const e=Q(t,i);if(!e)return;const s=await fetch(e);if(s.ok)return s.json();var o;o=s.status,console.error(`tsParticles - Error ${o} while retrieving config file`)}class ve{_engine;constructor(t){this._engine=t}load(t,i,e){const s={index:e,remote:!1};return"string"==typeof t?s.tagId=t:s.options=t,"number"==typeof i?s.index=i:s.options=i??s.options,this.loadOptions(s)}async loadJSON(t,i,e){let s,o;return"number"==typeof i||void 0===i?s=t:(o=t,s=i),this.loadRemoteOptions({tagId:o,url:s,index:e,remote:!0})}async loadOptions(t){const i=t.tagId??`tsparticles${Math.floor(1e4*d())}`,{index:e,url:s,remote:o}=t,n=o?await pe(s,e):t.options;let a=t.element??document.getElementById(i);a||(a=document.createElement("div"),a.id=i,document.querySelector("body")?.append(a));const r=Q(n,e),l=this._engine.dom(),c=l.findIndex((t=>t.id===i));if(c>=0){const t=this._engine.domItem(c);t&&!t.destroyed&&(t.destroy(),l.splice(c,1))}let h;if("canvas"===a.tagName.toLowerCase())h=a,h.dataset[It]="false";else{const t=a.getElementsByTagName("canvas");t.length?(h=t[0],h.dataset[It]="false"):(h=document.createElement("canvas"),h.dataset[It]="true",a.appendChild(h))}h.style.width||(h.style.width="100%"),h.style.height||(h.style.height="100%");const u=new ue(this._engine,i,r);return c>=0?l.splice(c,0,u):l.push(u),u.canvas.loadCanvas(h),await u.start(),u}async loadRemoteOptions(t){return this.loadOptions(t)}async set(t,i,e,s){const o={index:s,remote:!1};return"string"==typeof t?o.tagId=t:o.element=t,i instanceof HTMLElement?o.element=i:o.options=i,"number"==typeof e?o.index=e:o.options=e??o.options,this.loadOptions(o)}async setJSON(t,i,e,s){let o,n,a,r;return t instanceof HTMLElement?(r=t,o=i,a=e):(n=t,r=i,o=e,a=s),this.loadRemoteOptions({tagId:n,url:o,index:a,element:r,remote:!0})}}function ye(t,i,e,s=!1){let o=i.get(t);return o&&!s||(o=[...e.values()].map((i=>i(t))),i.set(t,o)),o}class fe{drawers;interactors;movers;pathGenerators;plugins;presets;updaters;_engine;_initializers;constructor(t){this._engine=t,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.drawers=new Map,this.pathGenerators=new Map}addInteractor(t,i){this._initializers.interactors.set(t,i)}addParticleMover(t,i){this._initializers.movers.set(t,i)}addParticleUpdater(t,i){this._initializers.updaters.set(t,i)}addPathGenerator(t,i){this.getPathGenerator(t)||this.pathGenerators.set(t,i)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,i,e=!1){!e&&this.getPreset(t)||this.presets.set(t,i)}addShapeDrawer(t,i){this.getShapeDrawer(t)||this.drawers.set(t,i)}destroy(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}getAvailablePlugins(t){const i=new Map;for(const e of this.plugins)e.needsPlugin(t.actualOptions)&&i.set(e.id,e.getPlugin(t));return i}getInteractors(t,i=!1){return ye(t,this.interactors,this._initializers.interactors,i)}getMovers(t,i=!1){return ye(t,this.movers,this._initializers.movers,i)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((i=>i.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.drawers.get(t)}getSupportedShapes(){return this.drawers.keys()}getUpdaters(t,i=!1){return ye(t,this.updaters,this._initializers.updaters,i)}loadOptions(t,i){for(const e of this.plugins)e.loadOptions(t,i)}loadParticlesOptions(t,i,...e){const s=this.updaters.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(i,...e)}}class me{key;stringPrefix;constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const i=t.value.hsl??t.value;if(void 0!==i.h&&void 0!==i.l)return pt(i)}handleRangeColor(t){const i=t.value.hsl??t.value;if(void 0!==i.h&&void 0!==i.l)return pt({h:v(i.h),l:v(i.l),s:v(i.s)})}parseString(t){if(!t.startsWith("hsl"))return;const i=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?vt({a:i.length>4?S(i[5]):1,h:parseInt(i[1],10),l:parseInt(i[3],10),s:parseInt(i[2],10)}):void 0}}class ge{key;stringPrefix;constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const i=t.value.rgb??t.value;if(void 0!==i.r)return i}handleRangeColor(t){const i=t.value.rgb??t.value;if(void 0!==i.r)return{r:v(i.r),g:v(i.g),b:v(i.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const i=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?{a:i.length>4?S(i[5]):1,b:parseInt(i[3],10),g:parseInt(i[2],10),r:parseInt(i[1],10)}:void 0}}class be{container;type=0;constructor(t){this.container=t}}class we{container;type=1;constructor(t){this.container=t}}const xe=new ge,_e=new me;st(xe),st(_e);const ze=new class{plugins;_domArray;_eventDispatcher;_initialized;_loader;constructor(){this._domArray=[],this._eventDispatcher=new e,this._initialized=!1,this._loader=new ve(this),this.plugins=new fe(this)}addEventListener(t,i){this._eventDispatcher.addEventListener(t,i)}async addInteractor(t,i){this.plugins.addInteractor(t,i),await this.refresh()}async addMover(t,i){this.plugins.addParticleMover(t,i),await this.refresh()}async addParticleUpdater(t,i){this.plugins.addParticleUpdater(t,i),await this.refresh()}async addPathGenerator(t,i){this.plugins.addPathGenerator(t,i),await this.refresh()}async addPlugin(t){this.plugins.addPlugin(t),await this.refresh()}async addPreset(t,i,e=!1){this.plugins.addPreset(t,i,e),await this.refresh()}async addShape(t,i,e,s,o){let n;n="function"==typeof i?{afterEffect:s,destroy:o,draw:i,init:e}:i,this.plugins.addShapeDrawer(t,n),await this.refresh()}dispatchEvent(t,i){this._eventDispatcher.dispatchEvent(t,i)}dom(){return this._domArray}domItem(t){const i=this.dom(),e=i[t];if(e&&!e.destroyed)return e;i.splice(t,1)}init(){this._initialized||(this._initialized=!0)}async load(t,i){return this._loader.load(t,i)}async loadFromArray(t,i,e){return this._loader.load(t,i,e)}async loadJSON(t,i,e){return this._loader.loadJSON(t,i,e)}async refresh(){for(const t of this.dom())await t.refresh()}removeEventListener(t,i){this._eventDispatcher.removeEventListener(t,i)}async set(t,i,e){return this._loader.set(t,i,e)}async setJSON(t,i,e,s){return this._loader.setJSON(t,i,e,s)}setOnClickHandler(t){const i=this.dom();if(!i.length)throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");for(const e of i)e.addClickHandler(t)}};ze.init();class ke{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 Pe extends bi{constructor(){super(),this.density=5,this.value=50,this.limit=new ke}load(t){t&&(super.load(t),void 0!==t.density&&(this.density=t.density),"number"==typeof t.limit?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Me{constructor(){this.color=new Zt,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.size=new Pe}load(t){void 0!==t&&(void 0!==t.color&&(this.color=Zt.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=m(t.position.x)),void 0!==t.position.y&&(this.position.y=m(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))}}class Ce{constructor(t,i,e,s){var n,a,r;this.absorbers=t,this.container=i,this.initialPosition=s?o.create(s.x,s.y):void 0,e instanceof Me?this.options=e:(this.options=new Me,this.options.load(e)),this.dragging=!1,this.name=this.options.name,this.opacity=this.options.opacity,this.size=v(this.options.size.value)*i.retina.pixelRatio,this.mass=this.size*this.options.size.density*i.retina.reduceFactor;const l=this.options.size.limit;this.limit={radius:l.radius*i.retina.pixelRatio*i.retina.reduceFactor,mass:l.mass},this.color=null!==(n=at(this.options.color))&&void 0!==n?n:{b:0,g:0,r:0},this.position=null!==(r=null===(a=this.initialPosition)||void 0===a?void 0:a.copy())&&void 0!==r?r:this.calcPosition()}attract(t){const i=this.container,e=this.options;if(e.draggable){const t=i.interactivity.mouse;if(t.clicking&&t.downPosition){w(this.position,t.downPosition)<=this.size&&(this.dragging=!0)}else this.dragging=!1;this.dragging&&t.position&&(this.position.x=t.position.x,this.position.y=t.position.y)}const s=t.getPosition(),{dx:n,dy:a,distance:r}=b(this.position,s),l=o.create(n,a);if(l.length=this.mass/Math.pow(r,2)*i.retina.reduceFactor,r<this.size+t.getRadius()){const s=.033*t.getRadius()*i.retina.pixelRatio;this.size>t.getRadius()&&r<this.size-t.getRadius()||void 0!==t.absorberOrbit&&t.absorberOrbit.length<0?e.destroy?t.destroy():(t.needsNewPosition=!0,this.updateParticlePosition(t,l)):(e.destroy&&(t.size.value-=s),this.updateParticlePosition(t,l)),(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*i.retina.reduceFactor)}else this.updateParticlePosition(t,l)}draw(t){t.translate(this.position.x,this.position.y),t.beginPath(),t.arc(0,0,this.size,0,2*Math.PI,!1),t.closePath(),t.fillStyle=ft(this.color,this.opacity),t.fill()}resize(){const t=this.initialPosition;this.position=t&&V(t,this.container.canvas.size,o.origin)?t:this.calcPosition()}calcPosition(){const t=M({size:this.container.canvas.size,position:this.options.position});return o.create(t.x,t.y)}updateParticlePosition(t,i){var e;if(t.destroyed)return;const s=this.container,n=s.canvas.size;if(t.needsNewPosition){const i=P({size:n});t.position.setTo(i),t.velocity.setTo(t.initialVelocity),t.absorberOrbit=void 0,t.needsNewPosition=!1}if(this.options.orbits){if(void 0===t.absorberOrbit&&(t.absorberOrbit=o.create(0,0),t.absorberOrbit.length=w(t.getPosition(),this.position),t.absorberOrbit.angle=d()*Math.PI*2),t.absorberOrbit.length<=this.size&&!this.options.destroy){const i=Math.min(n.width,n.height);t.absorberOrbit.length=i*(.2*d()-.1+1)}void 0===t.absorberOrbitDirection&&(t.absorberOrbitDirection=t.velocity.x>=0?"clockwise":"counter-clockwise");const a=t.absorberOrbit.length,r=t.absorberOrbit.angle,l=t.absorberOrbitDirection;t.velocity.setTo(o.origin);const c={x:"clockwise"===l?Math.cos:Math.sin,y:"clockwise"===l?Math.sin:Math.cos};t.position.x=this.position.x+a*c.x(r),t.position.y=this.position.y+a*c.y(r),t.absorberOrbit.length-=i.length,t.absorberOrbit.angle+=(null!==(e=t.retina.moveSpeed)&&void 0!==e?e:0)*s.retina.pixelRatio/100*s.retina.reduceFactor}else{const e=o.origin;e.length=i.length,e.angle=i.angle,t.velocity.addTo(e)}}}class Oe{constructor(t){this.container=t,this.array=[],this.absorbers=[],this.interactivityAbsorbers=[],t.getAbsorber=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((i=>i.name===t)),t.addAbsorber=(t,i)=>this.addAbsorber(t,i)}addAbsorber(t,i){const e=new Ce(this,this.container,t,i);return this.array.push(e),e}draw(t){for(const i of this.array)i.draw(t)}handleClickMode(t){const i=this.absorbers,e=this.interactivityAbsorbers;if("absorber"===t){const t=Q(e),s=null!=t?t:Q(i),o=this.container.interactivity.mouse.clickPosition;this.addAbsorber(s,o)}}async init(){this.absorbers=this.container.actualOptions.absorbers,this.interactivityAbsorbers=this.container.actualOptions.interactivity.modes.absorbers,Z(this.absorbers,(t=>{this.addAbsorber(t)}))}particleUpdate(t){for(const i of this.array)if(i.attract(t),t.destroyed)break}removeAbsorber(t){const i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}}class Se{constructor(){this.id="absorbers"}getPlugin(t){return new Oe(t)}loadOptions(t,i){var e,s;(this.needsPlugin(t)||this.needsPlugin(i))&&((null==i?void 0:i.absorbers)&&(t.absorbers=Z(i.absorbers,(t=>{const i=new Me;return i.load(t),i}))),t.interactivity.modes.absorbers=Z(null===(s=null===(e=null==i?void 0:i.interactivity)||void 0===e?void 0:e.modes)||void 0===s?void 0:s.absorbers,(t=>{const i=new Me;return i.load(t),i})))}needsPlugin(t){var i,e,s;if(!t)return!1;const o=t.absorbers;return o instanceof Array?!!o.length:!!o||!(!(null===(s=null===(e=null===(i=t.interactivity)||void 0===i?void 0:i.events)||void 0===e?void 0:e.onClick)||void 0===s?void 0:s.mode)||!L("absorber",t.interactivity.events.onClick.mode))}}class Re{load(t){t&&(void 0!==t.bottom&&(this.bottom=m(t.bottom)),void 0!==t.left&&(this.left=m(t.left)),void 0!==t.right&&(this.right=m(t.right)),void 0!==t.top&&(this.top=m(t.top)))}}class De extends bi{constructor(){super(),this.value=3}}class Te extends bi{constructor(){super(),this.value={min:4,max:9}}}class Ee{constructor(){this.count=1,this.factor=new De,this.rate=new Te,this.sizeOffset=!0}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=Z(t.particles,(t=>U({},t))),void 0!==t.sizeOffset&&(this.sizeOffset=t.sizeOffset))}}class Ie{constructor(){this.bounds=new Re,this.mode="none",this.split=new Ee}load(t){t&&(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.split.load(t.split))}}class Ae{constructor(t,i){this.engine=t,this.container=i}init(t){const i=this.container,e=t.options.destroy;if(!e)return;t.splitCount=0;const s=e.bounds;t.destroyBounds||(t.destroyBounds={}),s.bottom&&(t.destroyBounds.bottom=v(s.bottom)*i.canvas.size.height/100),s.left&&(t.destroyBounds.left=v(s.left)*i.canvas.size.width/100),s.right&&(t.destroyBounds.right=v(s.right)*i.canvas.size.width/100),s.top&&(t.destroyBounds.top=v(s.top)*i.canvas.size.height/100)}isEnabled(t){return!t.destroyed}loadOptions(t,...i){t.destroy||(t.destroy=new Ie);for(const e of i)t.destroy.load(null==e?void 0:e.destroy)}particleDestroyed(t,i){if(i)return;const e=t.options.destroy;e&&"split"===e.mode&&this.split(t)}update(t){if(!this.isEnabled(t))return;const i=t.getPosition(),e=t.destroyBounds;e&&(void 0!==e.bottom&&i.y>=e.bottom||void 0!==e.left&&i.x<=e.left||void 0!==e.right&&i.x>=e.right||void 0!==e.top&&i.y<=e.top)&&t.destroy()}addSplitParticle(t,i){const e=t.options.destroy;if(!e)return;const s=e.split,o=Zi(this.engine,this.container,t.options),n=g(s.factor);o.color.load({value:{hsl:t.getFillColor()}}),o.move.load({center:{x:t.position.x,y:t.position.y,mode:"precise"}}),"number"==typeof o.size.value?o.size.value/=n:(o.size.value.min/=n,o.size.value.max/=n),o.load(i);const a=s.sizeOffset?m(-t.size.value,t.size.value):0,r={x:t.position.x+p(a),y:t.position.y+p(a)};return this.container.particles.addParticle(r,o,t.group,(i=>{var e;return!(i.size.value<.5)&&(i.velocity.length=p(m(t.velocity.length,i.velocity.length)),i.splitCount=(null!==(e=t.splitCount)&&void 0!==e?e:0)+1,i.unbreakable=!0,setTimeout((()=>{i.unbreakable=!1}),500),!0)}))}split(t){const i=t.options.destroy;if(!i)return;const e=i.split;if(e.count>=0&&(void 0===t.splitCount||t.splitCount++>e.count))return;const s=g(e.rate),o=Q(e.particles);for(let i=0;i<s;i++)this.addSplitParticle(t,o)}}class Le{randomPosition(t,i,e){const[s,o]=[i.width/2,i.height/2],n=((t,i)=>{const e=d()/4,s=Math.atan(i/t*Math.tan(2*Math.PI*e)),o=d();return o<.25?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),a=(h=n,(l=s)*(c=o)/Math.sqrt((c*Math.cos(h))**2+(l*Math.sin(h))**2)),r=e?a*Math.sqrt(d()):a;var l,c,h;return{x:t.x+r*Math.cos(n),y:t.y+r*Math.sin(n)}}}class He{constructor(){this.wait=!1}load(t){void 0!==t&&(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=t.delay),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.wait&&(this.wait=t.wait))}}class Fe{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=m(t.quantity)),void 0!==t.delay&&(this.delay=m(t.delay)))}}class qe{constructor(){this.mode="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 Ve{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new He,this.rate=new Fe,this.shape="square",this.startCount=0}load(t){void 0!==t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(void 0===this.size&&(this.size=new qe),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=Z(t.particles,(t=>U({},t))),this.rate.load(t.rate),void 0!==t.shape&&(this.shape=t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=m(t.position.x)),void 0!==t.position.y&&(this.position.y=m(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new yi),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class Be{constructor(t,i,e,s,o){var n,a,r,l,c,d,h,u;this.emitters=i,this.container=e,this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof Ve?this.options=s:(this.options=new Ve,this.options.load(s)),this._spawnDelay=1e3*(null!==(n=this.options.life.delay)&&void 0!==n?n:0)/this.container.retina.reduceFactor,this.position=null!==(a=this._initialPosition)&&void 0!==a?a:this.calcPosition(),this.name=this.options.name,this._shape=null===(r=this._engine.emitterShapeManager)||void 0===r?void 0:r.getShape(this.options.shape),this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let p=U({},this.options.particles);null!=p||(p={}),null!==(l=p.move)&&void 0!==l||(p.move={}),null!==(c=(u=p.move).direction)&&void 0!==c||(u.direction=this.options.direction),this.options.spawnColor&&(this.spawnColor=ct(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=p,this.size=null!==(d=this.options.size)&&void 0!==d?d:(()=>{const t=new qe;return t.load({height:0,mode:"percent",width:0}),t})(),this._lifeCount=null!==(h=this.options.life.count)&&void 0!==h?h:-1,this._immortal=this._lifeCount<=0,this._engine.dispatchEvent("emitterCreated",{container:e,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}getPosition(){if(this.options.domId){const t=this.container,i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{x:(e.x+e.width/2)*t.retina.pixelRatio,y:(e.y+e.height/2)*t.retina.pixelRatio}}}return this.position}getSize(){const t=this.container;if(this.options.domId){const i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{width:e.width*t.retina.pixelRatio,height:e.height*t.retina.pixelRatio}}}return{width:"percent"===this.size.mode?t.canvas.size.width*this.size.width/100:this.size.width,height:"percent"===this.size.mode?t.canvas.size.height*this.size.height/100:this.size.height}}pause(){this._paused||delete this._emitDelay}play(){var t;if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(null!==(t=this._spawnDelay)&&void 0!==t?t:0))){if(void 0===this._emitDelay){const t=v(this.options.rate.delay);this._emitDelay=1e3*t/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this.prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&V(t,this.container.canvas.size,o.origin)?t:this.calcPosition()}update(t){var i,e,s;this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=null!==(i=this._spawnDelay)&&void 0!==i?i:0,this._currentEmitDelay=null!==(e=this._emitDelay)&&void 0!==e?e: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._spawnDelay=1e3*(null!==(s=this.options.life.delay)&&void 0!==s?s:0)/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(){return M({size:this.container.canvas.size,position:this.options.position})}destroy(){this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})}emit(){if(this._paused)return;const t=v(this.options.rate.quantity);this.emitParticles(t)}emitParticles(t){var i,e,s;const o=this.getPosition(),n=this.getSize(),a=Q(this._particlesOptions);for(let r=0;r<t;r++){const t=U({},a);if(this.spawnColor){const e=null===(i=this.options.spawnColor)||void 0===i?void 0:i.animation;e&&(this.spawnColor.h=this.setColorAnimation(e.h,this.spawnColor.h,360),this.spawnColor.s=this.setColorAnimation(e.s,this.spawnColor.s,100),this.spawnColor.l=this.setColorAnimation(e.l,this.spawnColor.l,100)),t.color?t.color.value=this.spawnColor:t.color={value:this.spawnColor}}if(!o)return;const r=null!==(s=null===(e=this._shape)||void 0===e?void 0:e.randomPosition(o,n,this.fill))&&void 0!==s?s:o;this.container.particles.addParticle(r,t)}}prepareToDie(){var t;if(this._paused)return;const i=null===(t=this.options.life)||void 0===t?void 0:t.duration;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==i&&i>0&&(this._duration=1e3*i)}setColorAnimation(t,i,e){var s;const o=this.container;if(!t.enable)return i;const n=p(t.offset),a=1e3*v(this.options.rate.delay)/o.retina.reduceFactor;return(i+v(null!==(s=t.speed)&&void 0!==s?s:0)*o.fpsLimit/a+3.6*n)%e}}class We{constructor(t,i){this.container=i,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]},i.getEmitter=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((i=>i.name===t)),i.addEmitter=(t,i)=>this.addEmitter(t,i),i.removeEmitter=t=>{const e=i.getEmitter(t);e&&this.removeEmitter(e)},i.playEmitter=t=>{const e=i.getEmitter(t);e&&e.externalPlay()},i.pauseEmitter=t=>{const e=i.getEmitter(t);e&&e.externalPause()}}addEmitter(t,i){const e=new Ve;e.load(t);const s=new Be(this._engine,this,this.container,e,i);return this.array.push(s),s}handleClickMode(t){const i=this.emitters,e=this.interactivityEmitters;if("emitter"===t){let t;if(e&&e.value instanceof Array)if(e.value.length>0&&e.random.enable){t=[];const i=[];for(let s=0;s<e.random.count;s++){const o=F(e.value);i.includes(o)&&i.length<e.value.length?s--:(i.push(o),t.push(q(e.value,o)))}}else t=e.value;else t=null==e?void 0:e.value;const s=null!=t?t:i,o=this.container.interactivity.mouse.clickPosition;Z(s,(t=>{this.addEmitter(t,o)}))}}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters instanceof Array)for(const t of this.emitters)this.addEmitter(t);else 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 i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}update(t){for(const i of this.array)i.update(t)}}const Ue=new Map;class je{constructor(t){this._engine=t}addShape(t,i){this.getShape(t)||Ue.set(t,i)}getShape(t){return Ue.get(t)}getSupportedShapes(){return Ue.keys()}}function Ne(t,i){return t+i*(d()-.5)}class $e{randomPosition(t,i,e){if(e)return{x:Ne(t.x,i.width),y:Ne(t.y,i.height)};{const e=i.width/2,s=i.height/2,o=Math.floor(4*d()),n=2*(d()-.5);switch(o){case 0:return{x:t.x+n*e,y:t.y-s};case 1:return{x:t.x-e,y:t.y+n*s};case 2:return{x:t.x+n*e,y:t.y+s};default:return{x:t.x+e,y:t.y+n*s}}}}}class Ge{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return new We(this._engine,t)}loadOptions(t,i){var e,s,o,n,a,r;if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;(null==i?void 0:i.emitters)&&(t.emitters=Z(i.emitters,(t=>{const i=new Ve;return i.load(t),i})));const l=null===(s=null===(e=null==i?void 0:i.interactivity)||void 0===e?void 0:e.modes)||void 0===s?void 0:s.emitters;if(l)if(l instanceof Array)t.interactivity.modes.emitters={random:{count:1,enable:!0},value:l.map((t=>{const i=new Ve;return i.load(t),i}))};else{const i=l;if(void 0!==i.value)if(i.value instanceof Array)t.interactivity.modes.emitters={random:{count:null!==(o=i.random.count)&&void 0!==o?o:1,enable:null!==(n=i.random.enable)&&void 0!==n&&n},value:i.value.map((t=>{const i=new Ve;return i.load(t),i}))};else{const e=new Ve;e.load(i.value),t.interactivity.modes.emitters={random:{count:null!==(a=i.random.count)&&void 0!==a?a:1,enable:null!==(r=i.random.enable)&&void 0!==r&&r},value:e}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new Ve}).value.load(l)}}}needsPlugin(t){var i,e,s;if(!t)return!1;const o=t.emitters;return o instanceof Array&&!!o.length||void 0!==o||!!(null===(s=null===(e=null===(i=t.interactivity)||void 0===i?void 0:i.events)||void 0===e?void 0:e.onClick)||void 0===s?void 0:s.mode)&&L("emitter",t.interactivity.events.onClick.mode)}}class Xe{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=U({},t.particles)),void 0!==t.pauseOnStop&&(this.pauseOnStop=t.pauseOnStop))}}class Ye extends be{constructor(t){super(t),this._delay=0}clear(){}init(){}async interact(t){var i,e,s,o;if(!this.container.retina.reduceFactor)return;const n=this.container,a=n.actualOptions.interactivity.modes.trail;if(!a)return;const r=1e3*a.delay/this.container.retina.reduceFactor;if(this._delay<r&&(this._delay+=t.value),this._delay<r)return;let l=!0;a.pauseOnStop&&(n.interactivity.mouse.position===this._lastPosition||(null===(i=n.interactivity.mouse.position)||void 0===i?void 0:i.x)===(null===(e=this._lastPosition)||void 0===e?void 0:e.x)&&(null===(s=n.interactivity.mouse.position)||void 0===s?void 0:s.y)===(null===(o=this._lastPosition)||void 0===o?void 0:o.y))&&(l=!1),n.interactivity.mouse.position?this._lastPosition={x:n.interactivity.mouse.position.x,y:n.interactivity.mouse.position.y}:delete this._lastPosition,l&&n.particles.push(a.quantity,n.interactivity.mouse,a.particles),this._delay-=r}isEnabled(t){var i;const e=this.container,s=e.actualOptions,o=e.interactivity.mouse,n=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:s.interactivity).events;return o.clicking&&o.inside&&!!o.position&&L("trail",n.onClick.mode)||o.inside&&!!o.position&&L("trail",n.onHover.mode)}loadModeOptions(t,...i){t.trail||(t.trail=new Xe);for(const e of i)t.trail.load(null==e?void 0:e.trail)}reset(){}}class Je{constructor(){this.enable=!1,this.value=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.value&&(this.value=m(t.value)))}}class Ze{constructor(){this.darken=new Je,this.enable=!1,this.enlighten=new Je,this.mode="vertical",this.speed=25}load(t){t&&(void 0!==t.backColor&&(this.backColor=Zt.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=m(t.speed)))}}class Qe{getTransformValues(t){var i;const e=(null===(i=t.roll)||void 0===i?void 0:i.enable)&&t.roll,s=e&&e.horizontal,o=e&&e.vertical;return{a:s?Math.cos(e.angle):void 0,d:o?Math.sin(e.angle):void 0}}init(t){const i=t.options.roll;if(null==i?void 0:i.enable)if(t.roll={enable:i.enable,horizontal:"horizontal"===i.mode||"both"===i.mode,vertical:"vertical"===i.mode||"both"===i.mode,angle:d()*Math.PI*2,speed:v(i.speed)/360},i.backColor)t.backColor=ct(i.backColor);else if(i.darken.enable&&i.enlighten.enable){const e=d()>=.5?"darken":"enlighten";t.roll.alter={type:e,value:v("darken"===e?i.darken.value:i.enlighten.value)}}else i.darken.enable?t.roll.alter={type:"darken",value:v(i.darken.value)}:i.enlighten.enable&&(t.roll.alter={type:"enlighten",value:v(i.enlighten.value)});else t.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}isEnabled(t){const i=t.options.roll;return!t.destroyed&&!t.spawning&&!!(null==i?void 0:i.enable)}loadOptions(t,...i){t.roll||(t.roll=new Ze);for(const e of i)t.roll.load(null==e?void 0:e.roll)}update(t,i){this.isEnabled(t)&&function(t,i){const e=t.options.roll;if(!t.roll||!(null==e?void 0:e.enable))return;const s=t.roll.speed*i.factor,o=2*Math.PI;t.roll.angle+=s,t.roll.angle>o&&(t.roll.angle-=o)}(t,i)}}class Ke{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=m(t.speed)),void 0!==t.decay&&(this.decay=m(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class ts extends bi{constructor(){super(),this.animation=new Ke,this.direction="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))}}class is{constructor(t){this.container=t}init(t){const i=t.options.rotate;if(!i)return;t.rotate={enable:i.animation.enable,value:v(i.value)*Math.PI/180},t.pathRotation=i.path;let e=i.direction;if("random"===e){e=Math.floor(2*d())>0?"counter-clockwise":"clockwise"}switch(e){case"counter-clockwise":case"counterClockwise":t.rotate.status=1;break;case"clockwise":t.rotate.status=0}const s=i.animation;s.enable&&(t.rotate.decay=1-v(s.decay),t.rotate.velocity=v(s.speed)/360*this.container.retina.reduceFactor,s.sync||(t.rotate.velocity*=d())),t.rotation=t.rotate.value}isEnabled(t){const i=t.options.rotate;return!!i&&(!t.destroyed&&!t.spawning&&i.animation.enable&&!i.path)}loadOptions(t,...i){t.rotate||(t.rotate=new ts);for(const e of i)t.rotate.load(null==e?void 0:e.rotate)}update(t,i){var e,s;this.isEnabled(t)&&(!function(t,i){var e,s;const o=t.rotate,n=t.options.rotate;if(!o||!n)return;const a=n.animation,r=(null!==(e=o.velocity)&&void 0!==e?e:0)*i.factor,l=2*Math.PI,c=null!==(s=o.decay)&&void 0!==s?s:1;a.enable&&(0===o.status?(o.value+=r,o.value>l&&(o.value-=l)):(o.value-=r,o.value<0&&(o.value+=l)),o.velocity&&1!==c&&(o.velocity*=c))}(t,i),t.rotation=null!==(s=null===(e=t.rotate)||void 0===e?void 0:e.value)&&void 0!==s?s:0)}}class es{init(t){var i;const e=t.container,s=t.options,o=s.move.gravity,n=s.move.spin;if(t.gravity={enable:o.enable,acceleration:v(o.acceleration),inverse:o.inverse},n.enable){const s=null!==(i=n.position)&&void 0!==i?i:{x:50,y:50},o={x:s.x/100*e.canvas.size.width,y:s.y/100*e.canvas.size.height},a=w(t.getPosition(),o),r=v(n.acceleration);t.retina.spinAcceleration=r*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:a,acceleration:t.retina.spinAcceleration}}}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,i){var e,s,o,n,a;const r=t.options,l=r.move;if(!l.enable)return;const c=t.container,u=function(t){return t.slow.inRange?t.slow.factor:1}(t),p=(null!==(e=(n=t.retina).moveSpeed)&&void 0!==e?e:n.moveSpeed=v(l.speed)*c.retina.pixelRatio)*c.retina.reduceFactor,y=null!==(s=(a=t.retina).moveDrift)&&void 0!==s?s:a.moveDrift=v(t.options.move.drift)*c.retina.pixelRatio,m=f(r.size.value)*c.retina.pixelRatio,g=p*((l.size?t.getRadius()/m:1)*u*(i.factor||1))/2;if(l.spin.enable)!function(t,i){const e=t.container;if(!t.spin)return;const s={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?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(e.canvas.size.width,e.canvas.size.height);t.spin.radius>o/2?(t.spin.radius=o/2,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=i/100*(1-t.spin.radius/o)}(t,g);else{!function(t,i){var e;const s=t.options.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=i.value);const o=null===(e=t.pathGenerator)||void 0===e?void 0:e.generate(t);o&&t.velocity.addTo(o),s.clamp&&(t.velocity.x=h(t.velocity.x,-1,1),t.velocity.y=h(t.velocity.y,-1,1)),t.lastPathTime-=t.pathDelay}(t,i);const e=t.gravity,s=(null==e?void 0:e.enable)&&e.inverse?-1:1;(null==e?void 0:e.enable)&&g&&(t.velocity.y+=s*(e.acceleration*i.factor)/(60*g)),y&&g&&(t.velocity.x+=y*i.factor/(60*g));const n=t.moveDecay;1!=n&&t.velocity.multTo(n);const a=t.velocity.mult(g),r=null!==(o=t.retina.maxSpeed)&&void 0!==o?o:c.retina.maxSpeed;(null==e?void 0:e.enable)&&r>0&&(!e.inverse&&a.y>=0&&a.y>=r||e.inverse&&a.y<=0&&a.y<=-r)&&(a.y=s*r,g&&(t.velocity.y=a.y/g));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;1!=u&&a.multTo(u),t.position.addTo(a),l.vibrate&&(t.position.x+=Math.sin(t.position.x*Math.cos(t.position.y)),t.position.y+=Math.cos(t.position.y*Math.sin(t.position.x)))}!function(t){const i=t.initialPosition,{dx:e,dy:s}=b(i,t.position),o=Math.abs(e),n=Math.abs(s),a=t.retina.maxDistance.horizontal,r=t.retina.maxDistance.vertical;if(a||r)if((a&&o>=a||r&&n>=r)&&!t.misplaced)t.misplaced=!!a&&o>a||!!r&&n>r,a&&(t.velocity.x=t.velocity.y/2-t.velocity.x),r&&(t.velocity.y=t.velocity.x/2-t.velocity.y);else if((!a||o<a)&&(!r||n<r)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const e=t.position,s=t.velocity;a&&(e.x<i.x&&s.x<0||e.x>i.x&&s.x>0)&&(s.x*=-d()),r&&(e.y<i.y&&s.y<0||e.y>i.y&&s.y>0)&&(s.y*=-d())}}(t)}}class ss{draw(t,i,e){t.arc(0,0,e,0,2*Math.PI,!1)}getSidesCount(){return 12}}function os(t,i,e,s,o){var n,a;const r=i;if(!r||!e.enable)return;const l=p(e.offset),c=(null!==(n=i.velocity)&&void 0!==n?n:0)*t.factor+3.6*l,d=null!==(a=i.decay)&&void 0!==a?a:1;o&&0!==r.status?(r.value-=c,r.value<0&&(r.status=0,r.value+=r.value)):(r.value+=c,o&&r.value>s&&(r.status=1,r.value-=r.value%s)),r.velocity&&1!==d&&(r.velocity*=d),r.value>s&&(r.value%=s)}class ns{constructor(t){this.container=t}init(t){const i=ct(t.options.color,t.id,t.options.reduceDuplicates);i&&(t.color=_t(i,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){var i,e,s;const o=t.options.color.animation;return!t.destroyed&&!t.spawning&&(void 0!==(null===(i=t.color)||void 0===i?void 0:i.h.value)&&o.h.enable||void 0!==(null===(e=t.color)||void 0===e?void 0:e.s.value)&&o.s.enable||void 0!==(null===(s=t.color)||void 0===s?void 0:s.l.value)&&o.l.enable)}update(t,i){!function(t,i){var e,s,o;const n=t.options.color.animation;void 0!==(null===(e=t.color)||void 0===e?void 0:e.h)&&os(i,t.color.h,n.h,360,!1),void 0!==(null===(s=t.color)||void 0===s?void 0:s.s)&&os(i,t.color.s,n.s,100,!0),void 0!==(null===(o=t.color)||void 0===o?void 0:o.l)&&os(i,t.color.l,n.l,100,!0)}(t,i)}}class as{constructor(){this.distance=200,this.duration=.4,this.easing="ease-out-quad",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))}}class rs extends be{constructor(t,i){super(i),this._engine=t,i.attract||(i.attract={particles:[]}),this.handleClickMode=t=>{const e=this.container.actualOptions.interactivity.modes.attract;if(e&&"attract"===t){i.attract||(i.attract={particles:[]}),i.attract.clicking=!0,i.attract.count=0;for(const t of i.attract.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);i.attract.particles=[],i.attract.finish=!1,setTimeout((()=>{i.destroyed||(i.attract||(i.attract={particles:[]}),i.attract.clicking=!1)}),1e3*e.duration)}}}clear(){}init(){const t=this.container,i=t.actualOptions.interactivity.modes.attract;i&&(t.retina.attractModeDistance=i.distance*t.retina.pixelRatio)}async interact(){const t=this.container,i=t.actualOptions,e=t.interactivity.status===Ft,s=i.interactivity.events,o=s.onHover.enable,n=s.onHover.mode,a=s.onClick.enable,r=s.onClick.mode;e&&o&&L("attract",n)?this.hoverAttract():a&&L("attract",r)&&this.clickAttract()}isEnabled(t){var i;const e=this.container,s=e.actualOptions,o=e.interactivity.mouse,n=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:s.interactivity).events;if(!(o.position&&n.onHover.enable||o.clickPosition&&n.onClick.enable))return!1;const a=n.onHover.mode,r=n.onClick.mode;return L("attract",a)||L("attract",r)}loadModeOptions(t,...i){t.attract||(t.attract=new as);for(const e of i)t.attract.load(null==e?void 0:e.attract)}reset(){}clickAttract(){const t=this.container;if(t.attract||(t.attract={particles:[]}),t.attract.finish||(t.attract.count||(t.attract.count=0),t.attract.count++,t.attract.count===t.particles.count&&(t.attract.finish=!0)),t.attract.clicking){const i=t.interactivity.mouse.clickPosition,e=t.retina.attractModeDistance;if(!e||e<0||!i)return;this.processAttract(i,e,new oe(i.x,i.y,e))}else!1===t.attract.clicking&&(t.attract.particles=[])}hoverAttract(){const t=this.container,i=t.interactivity.mouse.position,e=t.retina.attractModeDistance;!e||e<0||!i||this.processAttract(i,e,new oe(i.x,i.y,e))}processAttract(t,i,e){const s=this.container,n=s.actualOptions.interactivity.modes.attract;if(!n)return;const a=s.particles.quadTree.query(e,(t=>this.isEnabled(t)));for(const e of a){const{dx:s,dy:a,distance:r}=b(e.position,t),c=n.speed*n.factor,d=h(l(n.easing)(1-r/i)*c,0,n.maxSpeed),u=o.create(0===r?c:s/r*d,0===r?c:a/r*d);e.position.subFrom(u)}}}class ls{constructor(){this.distance=200}load(t){t&&void 0!==t.distance&&(this.distance=t.distance)}}class cs extends be{constructor(t){super(t)}clear(){}init(){const t=this.container,i=t.actualOptions.interactivity.modes.bounce;i&&(t.retina.bounceModeDistance=i.distance*t.retina.pixelRatio)}async interact(){const t=this.container,i=t.actualOptions.interactivity.events,e=t.interactivity.status===Ft,s=i.onHover.enable,o=i.onHover.mode,n=i.onDiv;e&&s&&L("bounce",o)?this.processMouseBounce():N("bounce",n,((t,i)=>this.singleSelectorBounce(t,i)))}isEnabled(t){var i;const e=this.container,s=e.actualOptions,o=e.interactivity.mouse,n=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:s.interactivity).events,a=n.onDiv;return o.position&&n.onHover.enable&&L("bounce",n.onHover.mode)||j("bounce",a)}loadModeOptions(t,...i){t.bounce||(t.bounce=new ls);for(const e of i)t.bounce.load(null==e?void 0:e.bounce)}reset(){}processBounce(t,i,e){const s=this.container.particles.quadTree.query(e,(t=>this.isEnabled(t)));for(const n of s)e instanceof oe?Y(X(n),{position:t,radius:i,mass:i**2*Math.PI/2,velocity:o.origin,factor:o.origin}):e instanceof ne&&J(n,W(t,i))}processMouseBounce(){const t=this.container,i=10*t.retina.pixelRatio,e=t.interactivity.mouse.position,s=t.retina.bounceModeDistance;!s||s<0||!e||this.processBounce(e,s,new oe(e.x,e.y,s+i))}singleSelectorBounce(t,i){const e=this.container,s=document.querySelectorAll(t);s.length&&s.forEach((t=>{const s=t,o=e.retina.pixelRatio,n={x:(s.offsetLeft+s.offsetWidth/2)*o,y:(s.offsetTop+s.offsetHeight/2)*o},a=s.offsetWidth/2*o,r=10*o,l="circle"===i.type?new oe(n.x,n.y,a+r):new ne(s.offsetLeft*o-r,s.offsetTop*o-r,s.offsetWidth*o+2*r,s.offsetHeight*o+2*r);this.processBounce(n,a,l)}))}}class ds{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 i=this.color instanceof Array?void 0:this.color;this.color=Z(t.color,(t=>Zt.create(i,t)))}void 0!==t.size&&(this.size=t.size)}}}class hs extends ds{constructor(){super(),this.selectors=[]}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class us extends ds{load(t){super.load(t),t&&(this.divs=Z(t.divs,(t=>{const i=new hs;return i.load(t),i})))}}function ps(t,i,e,s){if(i>=e){return h(t+(i-e)*s,t,i)}if(i<e){return h(t-(e-i)*s,i,t)}}class vs extends be{constructor(t){super(t),t.bubble||(t.bubble={}),this.handleClickMode=i=>{"bubble"===i&&(t.bubble||(t.bubble={}),t.bubble.clicking=!0)}}clear(t,i,e){t.bubble.inRange&&!e||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,i=t.actualOptions.interactivity.modes.bubble;i&&(t.retina.bubbleModeDistance=i.distance*t.retina.pixelRatio,void 0!==i.size&&(t.retina.bubbleModeSize=i.size*t.retina.pixelRatio))}async interact(t){const i=this.container.actualOptions.interactivity.events,e=i.onHover,s=i.onClick,o=e.enable,n=e.mode,a=s.enable,r=s.mode,l=i.onDiv;o&&L("bubble",n)?this.hoverBubble(t):a&&L("bubble",r)?this.clickBubble(t):N("bubble",l,((i,e)=>this.singleSelectorHover(t,i,e)))}isEnabled(t){var i;const e=this.container,s=e.actualOptions,o=e.interactivity.mouse,n=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:s.interactivity).events,a=j("bubble",n.onDiv);if(!(a||n.onHover.enable&&o.position||n.onClick.enable&&o.clickPosition))return!1;const r=n.onHover.mode,l=n.onClick.mode;return L("bubble",r)||L("bubble",l)||a}loadModeOptions(t,...i){t.bubble||(t.bubble=new us);for(const e of i)t.bubble.load(null==e?void 0:e.bubble)}reset(t){t.bubble.inRange=!1}clickBubble(t){var i,e;const s=this.container,o=s.actualOptions,n=s.interactivity.mouse.clickPosition,a=o.interactivity.modes.bubble;if(!a||!n)return;s.bubble||(s.bubble={});const r=s.retina.bubbleModeDistance;if(!r||r<0)return;const l=s.particles.quadTree.queryCircle(n,r,(t=>this.isEnabled(t)));for(const t of l){if(!s.bubble.clicking)continue;t.bubble.inRange=!s.bubble.durationEnd;const o=w(t.getPosition(),n),l=((new Date).getTime()-(s.interactivity.mouse.clickTime||0))/1e3;l>a.duration&&(s.bubble.durationEnd=!0),l>2*a.duration&&(s.bubble.clicking=!1,s.bubble.durationEnd=!1);const c={bubbleObj:{optValue:s.retina.bubbleModeSize,value:t.bubble.radius},particlesObj:{optValue:f(t.options.size.value)*s.retina.pixelRatio,value:t.size.value},type:"size"};this.process(t,o,l,c);const d={bubbleObj:{optValue:a.opacity,value:t.bubble.opacity},particlesObj:{optValue:f(t.options.opacity.value),value:null!==(e=null===(i=t.opacity)||void 0===i?void 0:i.value)&&void 0!==e?e:1},type:"opacity"};this.process(t,o,l,d),s.bubble.durationEnd?delete t.bubble.color:o<=r?this.hoverBubbleColor(t,o):delete t.bubble.color}}hoverBubble(t){const i=this.container,e=i.interactivity.mouse.position,s=i.retina.bubbleModeDistance;if(!s||s<0||void 0===e)return;const o=i.particles.quadTree.queryCircle(e,s,(t=>this.isEnabled(t)));for(const t of o){t.bubble.inRange=!0;const o=w(t.getPosition(),e),n=1-o/s;o<=s?n>=0&&i.interactivity.status===Ft&&(this.hoverBubbleSize(t,n),this.hoverBubbleOpacity(t,n),this.hoverBubbleColor(t,n)):this.reset(t),i.interactivity.status===Bt&&this.reset(t)}}hoverBubbleColor(t,i,e){const s=this.container.actualOptions,o=null!=e?e:s.interactivity.modes.bubble;if(o){if(!t.bubble.finalColor){const i=o.color;if(!i)return;const e=Q(i);t.bubble.finalColor=ct(e)}if(t.bubble.finalColor)if(o.mix){t.bubble.color=void 0;const e=t.getFillColor();t.bubble.color=e?dt(gt(e,t.bubble.finalColor,1-i,i)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}}hoverBubbleOpacity(t,i,e){var s,o,n,a;const r=this.container.actualOptions,l=null!==(s=null==e?void 0:e.opacity)&&void 0!==s?s:null===(o=r.interactivity.modes.bubble)||void 0===o?void 0:o.opacity;if(!l)return;const c=t.options.opacity.value,d=ps(null!==(a=null===(n=t.opacity)||void 0===n?void 0:n.value)&&void 0!==a?a:1,l,f(c),i);void 0!==d&&(t.bubble.opacity=d)}hoverBubbleSize(t,i,e){const s=this.container,o=(null==e?void 0:e.size)?e.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===o)return;const n=f(t.options.size.value)*s.retina.pixelRatio,a=ps(t.size.value,o,n,i);void 0!==a&&(t.bubble.radius=a)}process(t,i,e,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,l=o.retina.bubbleModeDistance,c=s.particlesObj.optValue,d=s.bubbleObj.value,h=s.particlesObj.value||0,u=s.type;if(l&&!(l<0)&&n!==c)if(o.bubble||(o.bubble={}),o.bubble.durationEnd)d&&("size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity);else if(i<=l){if((null!=d?d:h)!==n){const i=h-e*(h-n)/r;"size"===u&&(t.bubble.radius=i),"opacity"===u&&(t.bubble.opacity=i)}}else"size"===u&&delete t.bubble.radius,"opacity"===u&&delete t.bubble.opacity}singleSelectorHover(t,i,e){const s=this.container,o=document.querySelectorAll(i),n=s.actualOptions.interactivity.modes.bubble;n&&o.length&&o.forEach((i=>{const o=i,a=s.retina.pixelRatio,r={x:(o.offsetLeft+o.offsetWidth/2)*a,y:(o.offsetTop+o.offsetHeight/2)*a},l=o.offsetWidth/2*a,c="circle"===e.type?new oe(r.x,r.y,l):new ne(o.offsetLeft*a,o.offsetTop*a,o.offsetWidth*a,o.offsetHeight*a),d=s.particles.quadTree.query(c,(t=>this.isEnabled(t)));for(const i of d){if(!c.contains(i.getPosition()))continue;i.bubble.inRange=!0;const e=G(n.divs,o);i.bubble.div&&i.bubble.div===o||(this.clear(i,t,!0),i.bubble.div=o),this.hoverBubbleSize(i,1,e),this.hoverBubbleOpacity(i,1,e),this.hoverBubbleColor(i,1,e)}}))}}class ys{constructor(){this.opacity=.5}load(t){t&&void 0!==t.opacity&&(this.opacity=t.opacity)}}class fs{constructor(){this.distance=80,this.links=new ys,this.radius=60}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){var i,e;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(e=null!==(i=t.links)&&void 0!==i?i:t.lineLinked)&&void 0!==e?e:t.line_linked),void 0!==t.radius&&(this.radius=t.radius))}}function ms(t,i,e,s){const o=t.actualOptions.interactivity.modes.connect;if(o)return function(t,i,e,s){const o=Math.floor(e.getRadius()/i.getRadius()),n=i.getFillColor(),a=e.getFillColor();if(!n||!a)return;const r=i.getPosition(),l=e.getPosition(),c=gt(n,a,i.getRadius(),e.getRadius()),d=t.createLinearGradient(r.x,r.y,l.x,l.y);return d.addColorStop(0,mt(n,s)),d.addColorStop(o>1?1:o,ft(c,s)),d.addColorStop(1,mt(a,s)),d}(i,e,s,o.links.opacity)}function gs(t,i,e){t.canvas.draw((s=>{var o;const n=ms(t,s,i,e);if(!n)return;const a=i.getPosition(),r=e.getPosition();!function(t,i,e,s,o){kt(t,s,o),t.lineWidth=i,t.strokeStyle=e,t.stroke()}(s,null!==(o=i.retina.linksWidth)&&void 0!==o?o:0,n,a,r)}))}class bs extends be{constructor(t){super(t)}clear(){}init(){const t=this.container,i=t.actualOptions.interactivity.modes.connect;i&&(t.retina.connectModeDistance=i.distance*t.retina.pixelRatio,t.retina.connectModeRadius=i.radius*t.retina.pixelRatio)}async interact(){const t=this.container;if(t.actualOptions.interactivity.events.onHover.enable&&"pointermove"===t.interactivity.status){const i=t.interactivity.mouse.position;if(!t.retina.connectModeDistance||t.retina.connectModeDistance<0||!t.retina.connectModeRadius||t.retina.connectModeRadius<0||!i)return;const e=Math.abs(t.retina.connectModeRadius),s=t.particles.quadTree.queryCircle(i,e,(t=>this.isEnabled(t)));let o=0;for(const i of s){const e=i.getPosition();for(const n of s.slice(o+1)){const s=n.getPosition(),o=Math.abs(t.retina.connectModeDistance),a=Math.abs(e.x-s.x),r=Math.abs(e.y-s.y);a<o&&r<o&&gs(t,i,n)}++o}}}isEnabled(t){var i;const e=this.container,s=e.interactivity.mouse,o=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:e.actualOptions.interactivity).events;return!(!o.onHover.enable||!s.position)&&L("connect",o.onHover.mode)}loadModeOptions(t,...i){t.connect||(t.connect=new fs);for(const e of i)t.connect.load(null==e?void 0:e.connect)}reset(){}}class ws{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=Zt.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class xs{constructor(){this.distance=100,this.links=new ws}get lineLinked(){return this.links}set lineLinked(t){this.links=t}get line_linked(){return this.links}set line_linked(t){this.links=t}load(t){var i,e;t&&(void 0!==t.distance&&(this.distance=t.distance),this.links.load(null!==(e=null!==(i=t.links)&&void 0!==i?i:t.lineLinked)&&void 0!==e?e:t.line_linked))}}function _s(t,i,e,s,o){t.canvas.draw((t=>{var n;const a=i.getPosition();!function(t,i,e,s,o,n){kt(t,e,s),t.strokeStyle=ft(o,n),t.lineWidth=i,t.stroke()}(t,null!==(n=i.retina.linksWidth)&&void 0!==n?n:0,a,o,e,s)}))}class zs extends be{constructor(t){super(t)}clear(){}init(){const t=this.container,i=t.actualOptions.interactivity.modes.grab;i&&(t.retina.grabModeDistance=i.distance*t.retina.pixelRatio)}async interact(){var t,i;const e=this.container,s=e.actualOptions.interactivity;if(!s.modes.grab||!s.events.onHover.enable||e.interactivity.status!==Ft)return;const o=e.interactivity.mouse.position;if(!o)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.quadTree.queryCircle(o,n,(t=>this.isEnabled(t)));for(const r of a){const a=w(r.getPosition(),o);if(a>n)continue;const l=s.modes.grab.links,c=l.opacity,d=c-a*c/n;if(d<=0)continue;const h=null!==(t=l.color)&&void 0!==t?t:null===(i=r.options.links)||void 0===i?void 0:i.color;if(!e.particles.grabLineColor&&h){const t=s.modes.grab.links;e.particles.grabLineColor=wt(h,t.blink,t.consent)}const u=bt(r,void 0,e.particles.grabLineColor);if(!u)return;_s(e,r,u,d,o)}}isEnabled(t){var i;const e=this.container,s=e.interactivity.mouse,o=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:e.actualOptions.interactivity).events;return o.onHover.enable&&!!s.position&&L("grab",o.onHover.mode)}loadModeOptions(t,...i){t.grab||(t.grab=new xs);for(const e of i)t.grab.load(null==e?void 0:e.grab)}reset(){}}class ks extends be{constructor(t){super(t),this.handleClickMode=t=>{if("pause"!==t)return;const i=this.container;i.getAnimationStatus()?i.pause():i.play()}}clear(){}init(){}async interact(){}isEnabled(){return!0}reset(){}}class Ps{constructor(){this.default=!0,this.groups=[],this.quantity=4}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var i;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=null!==(i=t.quantity)&&void 0!==i?i:t.particles_nb;void 0!==e&&(this.quantity=e)}}class Ms extends be{constructor(t){super(t),this.handleClickMode=t=>{if("push"!==t)return;const i=this.container,e=i.actualOptions.interactivity.modes.push;if(!e)return;const s=e.quantity;if(s<=0)return;const o=q([void 0,...e.groups]),n=void 0!==o?i.actualOptions.particles.groups[o]:void 0;i.particles.push(s,i.interactivity.mouse,n,o)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...i){t.push||(t.push=new Ps);for(const e of i)t.push.load(null==e?void 0:e.push)}reset(){}}class Cs{constructor(){this.quantity=2}get particles_nb(){return this.quantity}set particles_nb(t){this.quantity=t}load(t){var i;if(!t)return;const e=null!==(i=t.quantity)&&void 0!==i?i:t.particles_nb;void 0!==e&&(this.quantity=e)}}class Os extends be{constructor(t){super(t),this.handleClickMode=t=>{const i=this.container,e=i.actualOptions;if(!e.interactivity.modes.remove||"remove"!==t)return;const s=e.interactivity.modes.remove.quantity;i.particles.removeQuantity(s)}}clear(){}init(){}async interact(){}isEnabled(){return!0}loadModeOptions(t,...i){t.remove||(t.remove=new Cs);for(const e of i)t.remove.load(null==e?void 0:e.remove)}reset(){}}class Ss{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing="ease-out-quad"}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 Rs extends Ss{constructor(){super(),this.selectors=[]}get ids(){return Z(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=Z(t,(t=>`#${t}`))}load(t){super.load(t),t&&(void 0!==t.ids&&(this.ids=t.ids),void 0!==t.selectors&&(this.selectors=t.selectors))}}class Ds extends Ss{load(t){super.load(t),t&&(this.divs=Z(t.divs,(t=>{const i=new Rs;return i.load(t),i})))}}class Ts extends be{constructor(t,i){super(i),this._engine=t,i.repulse||(i.repulse={particles:[]}),this.handleClickMode=t=>{const e=this.container.actualOptions.interactivity.modes.repulse;if(e&&"repulse"===t){i.repulse||(i.repulse={particles:[]}),i.repulse.clicking=!0,i.repulse.count=0;for(const t of i.repulse.particles)this.isEnabled(t)&&t.velocity.setTo(t.initialVelocity);i.repulse.particles=[],i.repulse.finish=!1,setTimeout((()=>{i.destroyed||(i.repulse||(i.repulse={particles:[]}),i.repulse.clicking=!1)}),1e3*e.duration)}}}clear(){}init(){const t=this.container,i=t.actualOptions.interactivity.modes.repulse;i&&(t.retina.repulseModeDistance=i.distance*t.retina.pixelRatio)}async interact(){const t=this.container,i=t.actualOptions,e=t.interactivity.status===Ft,s=i.interactivity.events,o=s.onHover.enable,n=s.onHover.mode,a=s.onClick.enable,r=s.onClick.mode,l=s.onDiv;e&&o&&L("repulse",n)?this.hoverRepulse():a&&L("repulse",r)?this.clickRepulse():N("repulse",l,((t,i)=>this.singleSelectorRepulse(t,i)))}isEnabled(t){var i;const e=this.container,s=e.actualOptions,o=e.interactivity.mouse,n=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:s.interactivity).events,a=j("repulse",n.onDiv);if(!(a||n.onHover.enable&&o.position||n.onClick.enable&&o.clickPosition))return!1;const r=n.onHover.mode,l=n.onClick.mode;return L("repulse",r)||L("repulse",l)||a}loadModeOptions(t,...i){t.repulse||(t.repulse=new Ds);for(const e of i)t.repulse.load(null==e?void 0:e.repulse)}reset(){}clickRepulse(){const t=this.container,i=t.actualOptions.interactivity.modes.repulse;if(i)if(t.repulse||(t.repulse={particles:[]}),t.repulse.finish||(t.repulse.count||(t.repulse.count=0),t.repulse.count++,t.repulse.count===t.particles.count&&(t.repulse.finish=!0)),t.repulse.clicking){const e=t.retina.repulseModeDistance;if(!e||e<0)return;const s=Math.pow(e/6,3),n=t.interactivity.mouse.clickPosition;if(void 0===n)return;const a=new oe(n.x,n.y,s),r=t.particles.quadTree.query(a,(t=>this.isEnabled(t)));for(const e of r){const{dx:a,dy:r,distance:l}=b(n,e.position),c=l**2,d=i.speed,h=-s*d/c;if(c<=s){t.repulse.particles.push(e);const i=o.create(a,r);i.length=h,e.velocity.setTo(i)}}}else if(!1===t.repulse.clicking){for(const i of t.repulse.particles)i.velocity.setTo(i.initialVelocity);t.repulse.particles=[]}}hoverRepulse(){const t=this.container,i=t.interactivity.mouse.position,e=t.retina.repulseModeDistance;!e||e<0||!i||this.processRepulse(i,e,new oe(i.x,i.y,e))}processRepulse(t,i,e,s){var n;const a=this.container,r=a.particles.quadTree.query(e,(t=>this.isEnabled(t))),c=a.actualOptions.interactivity.modes.repulse;if(c)for(const e of r){const{dx:a,dy:r,distance:d}=b(e.position,t),u=(null!==(n=null==s?void 0:s.speed)&&void 0!==n?n:c.speed)*c.factor,p=h(l(c.easing)(1-d/i)*u,0,c.maxSpeed),v=o.create(0===d?u:a/d*p,0===d?u:r/d*p);e.position.addTo(v)}}singleSelectorRepulse(t,i){const e=this.container,s=e.actualOptions.interactivity.modes.repulse;if(!s)return;const o=document.querySelectorAll(t);o.length&&o.forEach((t=>{const o=t,n=e.retina.pixelRatio,a={x:(o.offsetLeft+o.offsetWidth/2)*n,y:(o.offsetTop+o.offsetHeight/2)*n},r=o.offsetWidth/2*n,l="circle"===i.type?new oe(a.x,a.y,r):new ne(o.offsetLeft*n,o.offsetTop*n,o.offsetWidth*n,o.offsetHeight*n),c=G(s.divs,o);this.processRepulse(a,r,l,c)}))}}class Es{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 Is extends be{constructor(t){super(t)}clear(t,i,e){t.slow.inRange&&!e||(t.slow.factor=1)}init(){const t=this.container,i=t.actualOptions.interactivity.modes.slow;i&&(t.retina.slowModeRadius=i.radius*t.retina.pixelRatio)}async interact(){}isEnabled(t){var i;const e=this.container,s=e.interactivity.mouse,o=(null!==(i=null==t?void 0:t.interactivity)&&void 0!==i?i:e.actualOptions.interactivity).events;return o.onHover.enable&&!!s.position&&L("slow",o.onHover.mode)}loadModeOptions(t,...i){t.slow||(t.slow=new Es);for(const e of i)t.slow.load(null==e?void 0:e.slow)}reset(t){t.slow.inRange=!1;const i=this.container,e=i.actualOptions,s=i.interactivity.mouse.position,o=i.retina.slowModeRadius,n=e.interactivity.modes.slow;if(!n||!o||o<0||!s)return;const a=w(s,t.getPosition()),r=a/o,l=n.factor;a<=o&&(t.slow.inRange=!0,t.slow.factor=r/l)}}const As=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Ls(t){return new Promise((i=>{t.loading=!0;const e=new Image;t.element=e,e.addEventListener("load",(()=>{t.loading=!1,i()})),e.addEventListener("error",(()=>{t.element=void 0,t.error=!0,t.loading=!1,console.error(`Error tsParticles - loading image: ${t.source}`),i()})),e.src=t.source}))}async function Hs(t){if("svg"!==t.type)return void await Ls(t);t.loading=!0;const i=await fetch(t.source);i.ok||(console.error("Error tsParticles - Image not found"),t.error=!0),t.error||(t.svgData=await i.text()),t.loading=!1}function Fs(t,i,e,s){var o,n,a;const r=function(t,i,e){const{svgData:s}=t;if(!s)return"";const o=mt(i,e);if(s.includes("fill"))return s.replace(As,(()=>o));const n=s.indexOf(">");return`${s.substring(0,n)} fill="${o}"${s.substring(n)}`}(t,e,null!==(n=null===(o=s.opacity)||void 0===o?void 0:o.value)&&void 0!==n?n:1),l={color:e,data:Object.assign(Object.assign({},t),{svgData:r}),loaded:!1,ratio:i.width/i.height,replaceColor:null!==(a=i.replaceColor)&&void 0!==a?a:i.replace_color,source:i.src};return new Promise((i=>{const e=new Blob([r],{type:"image/svg+xml"}),s=URL||window.URL||window.webkitURL||window,o=s.createObjectURL(e),n=new Image;n.addEventListener("load",(()=>{l.loaded=!0,l.element=n,i(l),s.revokeObjectURL(o)})),n.addEventListener("error",(async()=>{s.revokeObjectURL(o);const e=Object.assign(Object.assign({},t),{error:!1,loading:!0});await Ls(e),l.loaded=!0,l.element=e.element,i(l)})),n.src=o}))}class qs{constructor(){this._images=[]}addImage(t,i){const e=this.getImages(t);null==e||e.images.push(i)}destroy(){this._images=[]}draw(t,i,e,s){var o;const n=i.image,a=null==n?void 0:n.element;if(!a)return;const r=null!==(o=null==n?void 0:n.ratio)&&void 0!==o?o:1,l={x:-e,y:-e};t.globalAlpha=s,t.drawImage(a,l.x,l.y,2*e,2*e/r),t.globalAlpha=1}getImages(t){const i=this._images.find((i=>i.id===t.id));return i||(this._images.push({id:t.id,images:[]}),this.getImages(t))}getSidesCount(){return 12}loadShape(t){if("image"!==t.shape&&"images"!==t.shape)return;const i=t.container,e=this.getImages(i).images,s=t.shapeData;e.find((t=>t.source===s.src))||this.loadImageShape(i,s).then((()=>{this.loadShape(t)}))}particleInit(t,i){var e;if("image"!==i.shape&&"images"!==i.shape)return;const s=this.getImages(t).images,o=i.shapeData,n=i.getFillColor(),a=null!==(e=o.replaceColor)&&void 0!==e?e:o.replace_color,r=s.find((t=>t.source===o.src));r&&(r.loading?setTimeout((()=>{this.particleInit(t,i)})):(async()=>{var t,e;let s;s=r.svgData&&n?await Fs(r,o,n,i):{color:n,data:r,element:r.element,loaded:!0,ratio:o.width/o.height,replaceColor:a,source:o.src},s.ratio||(s.ratio=1);const l={image:s,fill:null!==(t=o.fill)&&void 0!==t?t:i.fill,close:null!==(e=o.close)&&void 0!==e?e:i.close};i.image=l.image,i.fill=l.fill,i.close=l.close})())}async loadImageShape(t,i){var e;const s=i.src;if(!s)throw new Error("Error tsParticles - No image.src");try{const o={source:s,type:s.substring(s.length-3),error:!1,loading:!0};this.addImage(t,o);const n=(null!==(e=i.replaceColor)&&void 0!==e?e:i.replace_color)?Hs:Ls;await n(o)}catch(t){throw new Error(`tsParticles error - ${i.src} not found`)}}}class Vs extends bi{constructor(){super(),this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Bs extends bi{constructor(){super(),this.random.minimumValue=1e-4,this.sync=!1}load(t){t&&(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class Ws{constructor(){this.count=0,this.delay=new Vs,this.duration=new Bs}load(t){t&&(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Us{constructor(t){this.container=t}init(t){const i=this.container,e=t.options.life;e&&(t.life={delay:i.retina.reduceFactor?v(e.delay.value)*(e.delay.sync?1:d())/i.retina.reduceFactor*1e3:0,delayTime:0,duration:i.retina.reduceFactor?v(e.duration.value)*(e.duration.sync?1:d())/i.retina.reduceFactor*1e3:0,time:0,count:e.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,...i){t.life||(t.life=new Ws);for(const e of i)t.life.load(null==e?void 0:e.life)}update(t,i){if(!this.isEnabled(t)||!t.life)return;const e=t.life;let s=!1;if(t.spawning){if(e.delayTime+=i.value,!(e.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,e.delayTime=0,e.time=0}if(-1===e.duration)return;if(t.spawning)return;if(s?e.time=0:e.time+=i.value,e.time<e.duration)return;if(e.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=this.container.canvas.size,n=m(0,o.width),a=m(0,o.width);t.position.x=p(n),t.position.y=p(a),t.spawning=!0,e.delayTime=0,e.time=0,t.reset();const r=t.options.life;r&&(e.delay=1e3*v(r.delay.value),e.duration=1e3*v(r.duration.value))}}class js{draw(t,i,e){t.moveTo(-e/2,0),t.lineTo(e/2,0)}getSidesCount(){return 1}}class Ns{constructor(t){this.container=t}init(t){const i=t.options.opacity;t.opacity={enable:i.animation.enable,max:f(i.value),min:y(i.value),value:v(i.value),loops:0,maxLoops:v(i.animation.count)};const e=i.animation;if(e.enable){t.opacity.decay=1-v(e.decay),t.opacity.status=0;const s=i.value;switch(t.opacity.min=y(s),t.opacity.max=f(s),e.startValue){case"min":t.opacity.value=t.opacity.min,t.opacity.status=0;break;case"random":t.opacity.value=p(t.opacity),t.opacity.status=d()>=.5?0:1;break;default:t.opacity.value=t.opacity.max,t.opacity.status=1}t.opacity.velocity=v(e.speed)/100*this.container.retina.reduceFactor,e.sync||(t.opacity.velocity*=d())}}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((null!==(i=t.opacity.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.opacity.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.opacity.loops)&&void 0!==s?s:0)<(null!==(o=t.opacity.maxLoops)&&void 0!==o?o:0))}reset(t){t.opacity&&(t.opacity.loops=0)}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,a,r;if(!t.opacity)return;const l=t.opacity.min,c=t.opacity.max,d=null!==(e=t.opacity.decay)&&void 0!==e?e:1;if(!(t.destroyed||!t.opacity.enable||(null!==(s=t.opacity.maxLoops)&&void 0!==s?s:0)>0&&(null!==(o=t.opacity.loops)&&void 0!==o?o:0)>(null!==(n=t.opacity.maxLoops)&&void 0!==n?n:0))){switch(t.opacity.status){case 0:t.opacity.value>=c?(t.opacity.status=1,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value+=(null!==(a=t.opacity.velocity)&&void 0!==a?a:0)*i.factor;break;case 1:t.opacity.value<=l?(t.opacity.status=0,t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value-=(null!==(r=t.opacity.velocity)&&void 0!==r?r:0)*i.factor}t.opacity.velocity&&1!==t.opacity.decay&&(t.opacity.velocity*=d),function(t,i,e,s){switch(t.options.opacity.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.opacity.value,l,c),t.destroyed||(t.opacity.value=h(t.opacity.value,l,c))}}(t,i)}}class $s{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,i,e,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,e,i)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,l=t.getRadius(),c=W(a,l),d=o.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode)return;t.bounds.right<0?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const i=t.particle.velocity.x;let e=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&i>0||"left"===t.direction&&t.bounds.left<=0&&i<0){const i=g(t.particle.options.bounce.horizontal);t.particle.velocity.x*=-i,e=!0}if(!e)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:c,canvasSize:d,offset:r,size:l}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode)return;t.bounds.bottom<0?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const i=t.particle.velocity.y;let e=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&i>0||"top"===t.direction&&t.bounds.top<=0&&i<0){const i=g(t.particle.options.bounce.vertical);t.particle.velocity.y*=-i,e=!0}if(!e)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:c,canvasSize:d,offset:r,size:l})}}class Gs{constructor(t){this.container=t,this.modes=["destroy"]}update(t,i,e,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case"normal":case"outside":if(V(t.position,n.canvas.size,o.origin,t.getRadius(),i))return;break;case"inside":{const{dx:i,dy:e}=b(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&i>t.moveCenter.radius||o<0&&e>t.moveCenter.radius||s>=0&&i<-t.moveCenter.radius||o>=0&&e<-t.moveCenter.radius)return;break}}n.particles.remove(t,void 0,!0)}}class Xs{constructor(t){this.container=t,this.modes=["none"]}update(t,i,e,s){if(!this.modes.includes(s))return;if(t.options.move.distance.horizontal&&("left"===i||"right"===i)||t.options.move.distance.vertical&&("top"===i||"bottom"===i))return;const n=t.options.move.gravity,a=this.container,r=a.canvas.size,l=t.getRadius();if(n.enable){const e=t.position;(!n.inverse&&e.y>r.height+l&&"bottom"===i||n.inverse&&e.y<-l&&"top"===i)&&a.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;V(t.position,a.canvas.size,o.origin,l,i)||a.particles.remove(t)}}}class Ys{constructor(t){this.container=t,this.modes=["out"]}update(t,i,e,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case"inside":{const{x:i,y:e}=t.velocity,s=o.origin;s.length=t.moveCenter.radius,s.angle=t.velocity.angle+Math.PI,s.addTo(o.create(t.moveCenter));const{dx:a,dy:r}=b(t.position,s);if(i<=0&&a>=0||e<=0&&r>=0||i>=0&&a<=0||e>=0&&r<=0)return;t.position.x=Math.floor(p({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(p({min:0,max:n.canvas.size.height}));const{dx:l,dy:c}=b(t.position,t.moveCenter);t.direction=Math.atan2(-c,-l),t.velocity.angle=t.direction;break}default:if(V(t.position,n.canvas.size,o.origin,t.getRadius(),i))return;switch(t.outType){case"outside":{t.position.x=Math.floor(p({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(p({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:i,dy:e}=b(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(e,i),t.velocity.angle=t.direction);break}case"normal":{const e=t.options.move.warp,s=n.canvas.size,o={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},a=t.getRadius(),r=W(t.position,a);"right"===i&&r.left>s.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,e||(t.position.y=d()*s.height,t.initialPosition.y=t.position.y)):"left"===i&&r.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,e||(t.position.y=d()*s.height,t.initialPosition.y=t.position.y)),"bottom"===i&&r.top>s.height+t.offset.y?(e||(t.position.x=d()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y):"top"===i&&r.bottom<-t.offset.y&&(e||(t.position.x=d()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y);break}}}}}class Js{constructor(t){this.container=t,this.updaters=[new $s(t),new Gs(t),new Ys(t),new Xs(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,i){var e,s,o,n;const a=t.options.move.outModes;this.updateOutMode(t,i,null!==(e=a.bottom)&&void 0!==e?e:a.default,"bottom"),this.updateOutMode(t,i,null!==(s=a.left)&&void 0!==s?s:a.default,"left"),this.updateOutMode(t,i,null!==(o=a.right)&&void 0!==o?o:a.default,"right"),this.updateOutMode(t,i,null!==(n=a.top)&&void 0!==n?n:a.default,"top")}updateOutMode(t,i,e,s){for(const o of this.updaters)o.update(t,s,i,e)}}class Zs{init(){}isEnabled(t){return!D()&&!t.destroyed&&t.container.actualOptions.interactivity.events.onHover.parallax.enable}move(t){const i=t.container,e=i.actualOptions;if(D()||!e.interactivity.events.onHover.parallax.enable)return;const s=e.interactivity.events.onHover.parallax.force,o=i.interactivity.mouse.position;if(!o)return;const n=i.canvas.size.width/2,a=i.canvas.size.height/2,r=e.interactivity.events.onHover.parallax.smooth,l=t.getRadius()/s,c=(o.x-n)*l,d=(o.y-a)*l;t.offset.x+=(c-t.offset.x)/r,t.offset.y+=(d-t.offset.y)/r}}class Qs extends we{constructor(t){super(t)}clear(){}init(){}async interact(t){var i;const e=this.container,s=null!==(i=t.retina.attractDistance)&&void 0!==i?i:e.retina.attractDistance,o=t.getPosition(),n=e.particles.quadTree.queryCircle(o,s);for(const i of n){if(t===i||!i.options.move.attract.enable||i.destroyed||i.spawning)continue;const e=i.getPosition(),{dx:s,dy:n}=b(o,e),a=t.options.move.attract.rotate,r=s/(1e3*a.x),l=n/(1e3*a.y),c=i.size.value/t.size.value,d=1/c;t.velocity.x-=r*c,t.velocity.y-=l*c,i.velocity.x+=r*d,i.velocity.y+=l*d}}isEnabled(t){return t.options.move.attract.enable}reset(){}}function Ks(t,i,e,s,o,n){const a=h(t.options.collisions.absorb.speed*o.factor/10,0,s);t.size.value+=a/2,e.size.value-=a,s<=n&&(e.size.value=0,e.destroy())}function to(t,i){Y(X(t),X(i))}function io(t,i,e,s){switch(t.options.collisions.mode){case"absorb":!function(t,i,e,s){const o=t.getRadius(),n=i.getRadius();void 0===o&&void 0!==n?t.destroy():void 0!==o&&void 0===n?i.destroy():void 0!==o&&void 0!==n&&(o>=n?Ks(t,0,i,n,e,s):Ks(i,0,t,o,e,s))}(t,i,e,s);break;case"bounce":to(t,i);break;case"destroy":!function(t,i){t.unbreakable||i.unbreakable||to(t,i),void 0===t.getRadius()&&void 0!==i.getRadius()?t.destroy():void 0!==t.getRadius()&&void 0===i.getRadius()?i.destroy():void 0!==t.getRadius()&&void 0!==i.getRadius()&&(t.getRadius()>=i.getRadius()?t:i).destroy()}(t,i)}}class eo extends we{constructor(t){super(t)}clear(){}init(){}async interact(t,i){const e=this.container,s=t.getPosition(),o=t.getRadius(),n=e.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;w(s,n)>o+r||io(t,a,i,e.retina.pixelRatio)}}isEnabled(t){return t.options.collisions.enable}reset(){}}class so extends oe{constructor(t,i,e,s){super(t,i,e),this.canvasSize=s,this.canvasSize=Object.assign({},s)}contains(t){if(super.contains(t))return!0;const i={x:t.x-this.canvasSize.width,y:t.y};if(super.contains(i))return!0;const e={x:t.x-this.canvasSize.width,y:t.y-this.canvasSize.height};if(super.contains(e))return!0;const s={x:t.x,y:t.y-this.canvasSize.height};return super.contains(s)}intersects(t){if(super.intersects(t))return!0;const i=t,e=t,s={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==e.radius){const t=new oe(s.x,s.y,2*e.radius);return super.intersects(t)}if(void 0!==i.size){const t=new ne(s.x,s.y,2*i.size.width,2*i.size.height);return super.intersects(t)}return!1}}class oo{constructor(){this.blur=5,this.color=new Zt,this.color.value="#000",this.enable=!1}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=Zt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class no{constructor(){this.enable=!1,this.frequency=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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 ao{constructor(){this.blink=!1,this.color=new Zt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new oo,this.triangles=new no,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=Zt.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))}}function ro(t,i,e,s,o){let n=w(t,i);if(!o||n<=e)return n;if(n=w(t,{x:i.x-s.width,y:i.y}),n<=e)return n;if(n=w(t,{x:i.x-s.width,y:i.y-s.height}),n<=e)return n;return n=w(t,{x:i.x,y:i.y-s.height}),n}class lo extends we{constructor(t){super(t),this.linkContainer=t}clear(){}init(){this.linkContainer.particles.linksColors=new Map}async interact(t){var i;if(!t.options.links)return;t.links=[];const e=t.getPosition(),s=this.container,o=s.canvas.size;if(e.x<0||e.y<0||e.x>o.width||e.y>o.height)return;const n=t.options.links,a=n.opacity,r=null!==(i=t.retina.linksDistance)&&void 0!==i?i:0,l=n.warp,c=l?new so(e.x,e.y,r,o):new oe(e.x,e.y,r),d=s.particles.quadTree.query(c);for(const i of d){const s=i.options.links;if(t===i||!(null==s?void 0:s.enable)||n.id!==s.id||i.spawning||i.destroyed||!i.links||-1!==t.links.map((t=>t.destination)).indexOf(i)||-1!==i.links.map((t=>t.destination)).indexOf(t))continue;const c=i.getPosition();if(c.x<0||c.y<0||c.x>o.width||c.y>o.height)continue;const d=ro(e,c,r,o,l&&s.warp);if(d>r)return;const h=(1-d/r)*a;this.setColor(t),t.links.push({destination:i,opacity:h})}}isEnabled(t){var i;return!!(null===(i=t.options.links)||void 0===i?void 0:i.enable)}loadParticlesOptions(t,...i){var e,s;t.links||(t.links=new ao);for(const o of i)t.links.load(null!==(s=null!==(e=null==o?void 0:o.links)&&void 0!==e?e:null==o?void 0:o.lineLinked)&&void 0!==s?s:null==o?void 0:o.line_linked)}reset(){}setColor(t){if(!t.options.links)return;const i=this.linkContainer,e=t.options.links;let s=void 0===e.id?i.particles.linksColor:i.particles.linksColors.get(e.id);if(s)return;s=wt(e.color,e.blink,e.consent),void 0===e.id?i.particles.linksColor=s:i.particles.linksColors.set(e.id,s)}}function co(t,i){const e=((s=t.map((t=>t.id))).sort(((t,i)=>t-i)),s.join("_"));var s;let o=i.get(e);return void 0===o&&(o=d(),i.set(e,o)),o}class ho{constructor(t){this.container=t,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,i){var e;const s=this.container,o=i.options;if(!i.links||i.links.length<=0)return;const n=i.links.filter((t=>o.links&&this.getLinkFrequency(i,t.destination)<=o.links.frequency));for(const t of n)this.drawTriangles(s,o,i,t,n),t.opacity>0&&(null!==(e=i.retina.linksWidth)&&void 0!==e?e:0)>0&&this.drawLinkLine(i,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map}particleCreated(t){if(t.links=[],!t.options.links)return;const i=this.container.retina.pixelRatio;t.retina.linksDistance=t.options.links.distance*i,t.retina.linksWidth=t.options.links.width*i}particleDestroyed(t){t.links=[]}drawLinkLine(t,i){const e=this.container,s=e.actualOptions,o=i.destination,n=t.getPosition(),a=o.getPosition();let r=i.opacity;e.canvas.draw((i=>{var l,c,h;if(!t.options.links)return;let u;const p=null===(l=t.options.twinkle)||void 0===l?void 0:l.lines;if(null==p?void 0:p.enable){const t=p.frequency,i=at(p.color);d()<t&&i&&(u=i,r=v(p.opacity))}if(!u){const i=t.options.links,s=void 0!==(null==i?void 0:i.id)?e.particles.linksColors.get(i.id):e.particles.linksColor;u=bt(t,o,s)}if(!u)return;const y=null!==(c=t.retina.linksWidth)&&void 0!==c?c:0,f=null!==(h=t.retina.linksDistance)&&void 0!==h?h:0;!function(t,i,e,s,o,n,a,r,l,c,d,h){let u=!1;if(w(e,s)<=o)kt(t,e,s),u=!0;else if(a){let i,a;const r=b(e,{x:s.x-n.width,y:s.y});if(r.distance<=o){const t=e.y-r.dy/r.dx*e.x;i={x:0,y:t},a={x:n.width,y:t}}else{const t=b(e,{x:s.x,y:s.y-n.height});if(t.distance<=o){const s=-(e.y-t.dy/t.dx*e.x)/(t.dy/t.dx);i={x:s,y:0},a={x:s,y:n.height}}else{const t=b(e,{x:s.x-n.width,y:s.y-n.height});if(t.distance<=o){const s=e.y-t.dy/t.dx*e.x;i={x:-s/(t.dy/t.dx),y:s},a={x:i.x+n.width,y:i.y+n.height}}}}i&&a&&(kt(t,e,i),kt(t,s,a),u=!0)}if(u){if(t.lineWidth=i,r&&(t.globalCompositeOperation=l),t.strokeStyle=ft(c,d),h.enable){const i=at(h.color);i&&(t.shadowBlur=h.blur,t.shadowColor=ft(i))}t.stroke()}}(i,y,n,a,f,e.canvas.size,t.options.links.warp,s.backgroundMask.enable,s.backgroundMask.composite,u,r,t.options.links.shadow)}))}drawLinkTriangle(t,i,e){var s;if(!t.options.links)return;const o=this.container,n=o.actualOptions,a=i.destination,r=e.destination,l=t.options.links.triangles,c=null!==(s=l.opacity)&&void 0!==s?s:(i.opacity+e.opacity)/2;c<=0||o.canvas.draw((i=>{var e;const s=t.getPosition(),d=a.getPosition(),h=r.getPosition(),u=null!==(e=t.retina.linksDistance)&&void 0!==e?e:0;if(w(s,d)>u||w(h,d)>u||w(h,s)>u)return;let p=at(l.color);if(!p){const i=t.options.links,e=void 0!==(null==i?void 0:i.id)?o.particles.linksColors.get(i.id):o.particles.linksColor;p=bt(t,a,e)}p&&function(t,i,e,s,o,n,a,r){Pt(t,i,e,s),o&&(t.globalCompositeOperation=n),t.fillStyle=ft(a,r),t.fill()}(i,s,d,h,n.backgroundMask.enable,n.backgroundMask.composite,p,c)}))}drawTriangles(t,i,e,s,o){var n,a,r;const l=s.destination;if(!(null===(n=i.links)||void 0===n?void 0:n.triangles.enable)||!(null===(a=l.options.links)||void 0===a?void 0:a.triangles.enable))return;const c=null===(r=l.links)||void 0===r?void 0:r.filter((t=>{const i=this.getLinkFrequency(l,t.destination);return l.options.links&&i<=l.options.links.frequency&&o.findIndex((i=>i.destination===t.destination))>=0}));if(null==c?void 0:c.length)for(const t of c){const o=t.destination;this.getTriangleFrequency(e,l,o)>i.links.triangles.frequency||this.drawLinkTriangle(e,s,t)}}getLinkFrequency(t,i){return co([t,i],this._freqs.links)}getTriangleFrequency(t,i,e){return co([t,i,e],this._freqs.triangles)}}class uo{constructor(){this.id="links"}getPlugin(t){return new ho(t)}loadOptions(){}needsPlugin(){return!0}}async function po(t){await async function(t){await t.addInteractor("particlesLinks",(t=>new lo(t)))}(t),await async function(t){const i=new uo;await t.addPlugin(i)}(t)}class vo{draw(t,i,e){const s=this.getCenter(i,e),o=this.getSidesData(i,e),n=o.count.numerator*o.count.denominator,a=o.count.numerator/o.count.denominator,r=180*(a-2)/a,l=Math.PI-Math.PI*r/180;if(t){t.beginPath(),t.translate(s.x,s.y),t.moveTo(0,0);for(let i=0;i<n;i++)t.lineTo(o.length,0),t.translate(o.length,0),t.rotate(l)}}getSidesCount(t){var i,e;const s=t.shapeData;return null!==(e=null!==(i=null==s?void 0:s.sides)&&void 0!==i?i:null==s?void 0:s.nb_sides)&&void 0!==e?e:5}}class yo extends vo{getCenter(t,i){return{x:-i/(this.getSidesCount(t)/3.5),y:-i/.76}}getSidesData(t,i){var e,s;const o=t.shapeData,n=null!==(s=null!==(e=null==o?void 0:o.sides)&&void 0!==e?e:null==o?void 0:o.nb_sides)&&void 0!==s?s:5;return{count:{denominator:1,numerator:n},length:2.66*i/(n/3)}}}class fo extends vo{getCenter(t,i){return{x:-i,y:i/1.66}}getSidesCount(){return 3}getSidesData(t,i){return{count:{denominator:2,numerator:3},length:2*i}}}async function mo(t){await async function(t){await t.addShape("polygon",new yo)}(t),await async function(t){await t.addShape("triangle",new fo)}(t)}class go{init(t){var i;const e=t.container,s=t.options.size.animation;s.enable&&(t.size.velocity=(null!==(i=t.retina.sizeAnimationSpeed)&&void 0!==i?i:e.retina.sizeAnimationSpeed)/100*e.retina.reduceFactor,s.sync||(t.size.velocity*=d()))}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&t.size.enable&&((null!==(i=t.size.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.size.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.size.loops)&&void 0!==s?s:0)<(null!==(o=t.size.maxLoops)&&void 0!==o?o:0))}reset(t){t.size.loops=0}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,a;const r=(null!==(e=t.size.velocity)&&void 0!==e?e:0)*i.factor,l=t.size.min,c=t.size.max,d=null!==(s=t.size.decay)&&void 0!==s?s:1;if(!(t.destroyed||!t.size.enable||(null!==(o=t.size.maxLoops)&&void 0!==o?o:0)>0&&(null!==(n=t.size.loops)&&void 0!==n?n:0)>(null!==(a=t.size.maxLoops)&&void 0!==a?a:0))){switch(t.size.status){case 0:t.size.value>=c?(t.size.status=1,t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value+=r;break;case 1:t.size.value<=l?(t.size.status=0,t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value-=r}t.size.velocity&&1!==d&&(t.size.velocity*=d),function(t,i,e,s){switch(t.options.size.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.size.value,l,c),t.destroyed||(t.size.value=h(t.size.value,l,c))}}(t,i)}}const bo=Math.sqrt(2);class wo{draw(t,i,e){t.rect(-e/bo,-e/bo,2*e/bo,2*e/bo)}getSidesCount(){return 4}}class xo{draw(t,i,e){var s;const o=i.shapeData,n=this.getSidesCount(i),a=null!==(s=null==o?void 0:o.inset)&&void 0!==s?s:2;t.moveTo(0,0-e);for(let i=0;i<n;i++)t.rotate(Math.PI/n),t.lineTo(0,0-e*a),t.rotate(Math.PI/n),t.lineTo(0,0-e)}getSidesCount(t){var i,e;const s=t.shapeData;return null!==(e=null!==(i=null==s?void 0:s.sides)&&void 0!==i?i:null==s?void 0:s.nb_sides)&&void 0!==e?e:5}}function _o(t,i,e,s,o){var n,a;const r=i;if(!r||!r.enable)return;const l=p(e.offset),c=(null!==(n=i.velocity)&&void 0!==n?n:0)*t.factor+3.6*l,d=null!==(a=i.decay)&&void 0!==a?a:1;o&&0!==r.status?(r.value-=c,r.value<0&&(r.status=0,r.value+=r.value)):(r.value+=c,o&&r.value>s&&(r.status=1,r.value-=r.value%s)),r.velocity&&1!==d&&(r.velocity*=d),r.value>s&&(r.value%=s)}class zo{constructor(t){this.container=t}init(t){var i,e;const s=this.container;t.stroke=Q(t.options.stroke,t.id,t.options.reduceDuplicates),t.strokeWidth=t.stroke.width*s.retina.pixelRatio;const o=null!==(i=ct(t.stroke.color))&&void 0!==i?i:t.getFillColor();o&&(t.strokeColor=_t(o,null===(e=t.stroke.color)||void 0===e?void 0:e.animation,s.retina.reduceFactor))}isEnabled(t){var i,e,s,o;const n=null===(i=t.stroke)||void 0===i?void 0:i.color;return!t.destroyed&&!t.spawning&&!!n&&(void 0!==(null===(e=t.strokeColor)||void 0===e?void 0:e.h.value)&&n.animation.h.enable||void 0!==(null===(s=t.strokeColor)||void 0===s?void 0:s.s.value)&&n.animation.s.enable||void 0!==(null===(o=t.strokeColor)||void 0===o?void 0:o.l.value)&&n.animation.l.enable)}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,a,r,l,c,d,h;if(!(null===(e=t.stroke)||void 0===e?void 0:e.color))return;const u=t.stroke.color.animation,p=null!==(o=null===(s=t.strokeColor)||void 0===s?void 0:s.h)&&void 0!==o?o:null===(n=t.color)||void 0===n?void 0:n.h;p&&_o(i,p,u.h,360,!1);const v=null!==(r=null===(a=t.strokeColor)||void 0===a?void 0:a.s)&&void 0!==r?r:null===(l=t.color)||void 0===l?void 0:l.s;v&&_o(i,v,u.s,100,!0);const y=null!==(d=null===(c=t.strokeColor)||void 0===c?void 0:c.l)&&void 0!==d?d:null===(h=t.color)||void 0===h?void 0:h.l;y&&_o(i,y,u.l,100,!0)}(t,i)}}const ko=["text","character","char"];class Po{draw(t,i,e,s){var o,n,a;const r=i.shapeData;if(void 0===r)return;const l=r.value;if(void 0===l)return;const c=i;void 0===c.text&&(c.text=Q(l,i.randomIndexData));const d=c.text,h=null!==(o=r.style)&&void 0!==o?o:"",u=null!==(n=r.weight)&&void 0!==n?n:"400",p=2*Math.round(e),v=null!==(a=r.font)&&void 0!==a?a:"Verdana",y=i.fill,f=d.length*e/2;t.font=`${h} ${u} ${p}px "${v}"`;const m={x:-f,y:e/2};t.globalAlpha=s,y?t.fillText(d,m.x,m.y):t.strokeText(d,m.x,m.y),t.globalAlpha=1}getSidesCount(){return 12}async init(t){const i=t.actualOptions;if(ko.find((t=>L(t,i.particles.shape.type)))){const t=ko.map((t=>i.particles.shape.options[t])).find((t=>!!t)),e=[];Z(t,(t=>{e.push(H(t.font,t.weight))})),await Promise.all(e)}}}async function Mo(t){await async function(t){t.addMover("base",(()=>new es))}(t),await async function(t){t.addMover("parallax",(()=>new Zs))}(t),await async function(t){await t.addInteractor("externalAttract",(i=>new rs(t,i)))}(t),await async function(t){await t.addInteractor("externalBounce",(t=>new cs(t)))}(t),await async function(t){await t.addInteractor("externalBubble",(t=>new vs(t)))}(t),await async function(t){await t.addInteractor("externalConnect",(t=>new bs(t)))}(t),await async function(t){await t.addInteractor("externalGrab",(t=>new zs(t)))}(t),await function(t){t.addInteractor("externalPause",(t=>new ks(t)))}(t),await async function(t){await t.addInteractor("externalPush",(t=>new Ms(t)))}(t),await function(t){t.addInteractor("externalRemove",(t=>new Os(t)))}(t),await async function(t){await t.addInteractor("externalRepulse",(i=>new Ts(t,i)))}(t),await async function(t){await t.addInteractor("externalSlow",(t=>new Is(t)))}(t),await async function(t){await t.addInteractor("particlesAttract",(t=>new Qs(t)))}(t),await async function(t){await t.addInteractor("particlesCollisions",(t=>new eo(t)))}(t),await po(t),await async function(t){await t.addShape("circle",new ss)}(t),await async function(t){const i=new qs;await t.addShape("image",i),await t.addShape("images",i)}(t),await async function(t){await t.addShape("line",new js)}(t),await mo(t),await async function(t){const i=new wo;await t.addShape("edge",i),await t.addShape("square",i)}(t),await async function(t){await t.addShape("star",new xo)}(t),await async function(t){const i=new Po;for(const e of ko)await t.addShape(e,i)}(t),await async function(t){await t.addParticleUpdater("life",(t=>new Us(t)))}(t),await async function(t){await t.addParticleUpdater("opacity",(t=>new Ns(t)))}(t),await async function(t){await t.addParticleUpdater("size",(()=>new go))}(t),await async function(t){await t.addParticleUpdater("rotate",(t=>new is(t)))}(t),await async function(t){await t.addParticleUpdater("color",(t=>new ns(t)))}(t),await async function(t){await t.addParticleUpdater("strokeColor",(t=>new zo(t)))}(t),await async function(t){await t.addParticleUpdater("outModes",(t=>new Js(t)))}(t),await(t=>{const i=(i,e)=>t.load(i,e);return i.load=(i,e,s)=>{t.loadJSON(i,e).then((t=>{t&&s(t)})).catch((()=>{s(void 0)}))},i.setOnClickHandler=i=>{t.setOnClickHandler(i)},{particlesJS:i,pJSDom:t.dom()}})(t)}class Co{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=m(t.speed)),void 0!==t.decay&&(this.decay=m(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Oo extends bi{constructor(){super(),this.animation=new Co,this.direction="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))}}class So{constructor(t){this.container=t}getTransformValues(t){var i;const e=(null===(i=t.tilt)||void 0===i?void 0:i.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){var i;const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:v(e.value)*Math.PI/180,sinDirection:d()>=.5?1:-1,cosDirection:d()>=.5?1:-1};let s=e.direction;if("random"===s){s=Math.floor(2*d())>0?"counter-clockwise":"clockwise"}switch(s){case"counter-clockwise":case"counterClockwise":t.tilt.status=1;break;case"clockwise":t.tilt.status=0}const o=null===(i=t.options.tilt)||void 0===i?void 0:i.animation;(null==o?void 0:o.enable)&&(t.tilt.decay=1-v(o.decay),t.tilt.velocity=v(o.speed)/360*this.container.retina.reduceFactor,o.sync||(t.tilt.velocity*=d()))}isEnabled(t){var i;const e=null===(i=t.options.tilt)||void 0===i?void 0:i.animation;return!t.destroyed&&!t.spawning&&!!(null==e?void 0:e.enable)}loadOptions(t,...i){t.tilt||(t.tilt=new Oo);for(const e of i)t.tilt.load(null==e?void 0:e.tilt)}update(t,i){this.isEnabled(t)&&function(t,i){var e,s;if(!t.tilt||!t.options.tilt)return;const o=t.options.tilt.animation,n=(null!==(e=t.tilt.velocity)&&void 0!==e?e:0)*i.factor,a=2*Math.PI,r=null!==(s=t.tilt.decay)&&void 0!==s?s:1;o.enable&&(0===t.tilt.status?(t.tilt.value+=n,t.tilt.value>a&&(t.tilt.value-=a)):(t.tilt.value-=n,t.tilt.value<0&&(t.tilt.value+=a)),t.tilt.velocity&&1!==r&&(t.tilt.velocity*=r))}(t,i)}}class Ro{constructor(){this.enable=!1,this.frequency=.05,this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=Zt.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=m(t.opacity)))}}class Do{constructor(){this.lines=new Ro,this.particles=new Ro}load(t){t&&(this.lines.load(t.lines),this.particles.load(t.particles))}}class To{getColorStyles(t,i,e,s){const o=t.options.twinkle;if(!o)return{};const n=o.particles,a=n.enable&&d()<n.frequency,r=t.options.zIndex,l=(1-t.zIndexFactor)**r.opacityRate,c=a?v(n.opacity)*l:s,h=ct(n.color),u=h?mt(h,c):void 0,p={},y=a&&u;return p.fill=y?u:void 0,p.stroke=y?u:void 0,p}init(){}isEnabled(t){const i=t.options.twinkle;return!!i&&i.particles.enable}loadOptions(t,...i){t.twinkle||(t.twinkle=new Do);for(const e of i)t.twinkle.load(null==e?void 0:e.twinkle)}update(){}}class Eo{constructor(){this.angle=50,this.move=10}load(t){t&&(void 0!==t.angle&&(this.angle=m(t.angle)),void 0!==t.move&&(this.move=m(t.move)))}}class Io{constructor(){this.distance=5,this.enable=!1,this.speed=new Eo}load(t){if(t&&(void 0!==t.distance&&(this.distance=m(t.distance)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed))if("number"==typeof t.speed)this.speed.load({angle:t.speed});else{const i=t.speed;void 0!==i.min?this.speed.load({angle:i}):this.speed.load(t.speed)}}}class Ao{constructor(t){this.container=t}init(t){var i;const e=t.options.wobble;(null==e?void 0:e.enable)?t.wobble={angle:d()*Math.PI*2,angleSpeed:v(e.speed.angle)/360,moveSpeed:v(e.speed.move)/10}:t.wobble={angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=v(null!==(i=null==e?void 0:e.distance)&&void 0!==i?i:0)*this.container.retina.pixelRatio}isEnabled(t){var i;return!t.destroyed&&!t.spawning&&!!(null===(i=t.options.wobble)||void 0===i?void 0:i.enable)}loadOptions(t,...i){t.wobble||(t.wobble=new Io);for(const e of i)t.wobble.load(null==e?void 0:e.wobble)}update(t,i){this.isEnabled(t)&&function(t,i){var e;const s=t.options.wobble;if(!(null==s?void 0:s.enable)||!t.wobble)return;const o=t.wobble.angleSpeed*i.factor,n=t.wobble.moveSpeed*i.factor*((null!==(e=t.retina.wobbleDistance)&&void 0!==e?e:0)*i.factor)/(1e3/60),a=2*Math.PI;t.wobble.angle+=o,t.wobble.angle>a&&(t.wobble.angle-=a),t.position.x+=n*Math.cos(t.wobble.angle),t.position.y+=n*Math.abs(Math.sin(t.wobble.angle))}(t,i)}}async function Lo(t){await Mo(t),await async function(t){await t.addParticleUpdater("destroy",(i=>new Ae(t,i)))}(t),await async function(t){await t.addParticleUpdater("roll",(()=>new Qe))}(t),await async function(t){await t.addParticleUpdater("tilt",(t=>new So(t)))}(t),await async function(t){await t.addParticleUpdater("twinkle",(()=>new To))}(t),await async function(t){await t.addParticleUpdater("wobble",(t=>new Ao(t)))}(t),await async function(t){await t.addInteractor("externalTrail",(t=>new Ye(t)))}(t),await async function(t){const i=new Se;await t.addPlugin(i)}(t),await async function(t){t.emitterShapeManager||(t.emitterShapeManager=new je(t)),t.addEmitterShape||(t.addEmitterShape=(i,e)=>{var s;null===(s=t.emitterShapeManager)||void 0===s||s.addShape(i,e)});const i=new Ge(t);await t.addPlugin(i),t.addEmitterShape("circle",new Le),t.addEmitterShape("square",new $e)}(t)}return Lo(ze),i})()));
|