(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[80],{97498:function(e,t){"use strict";var i,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(t,{PrefetchKind:function(){return i},ACTION_REFRESH:function(){return s},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return r},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return c},ACTION_FAST_REFRESH:function(){return d},ACTION_SERVER_ACTION:function(){return h}});let s="refresh",o="navigate",r="restore",l="server-patch",c="prefetch",d="fast-refresh",h="server-action";(a=i||(i={})).AUTO="auto",a.FULL="full",a.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},10030:function(e,t,i){"use strict";function getDomainLocale(e,t,i,a){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return getDomainLocale}}),i(22866),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65170:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return w}});let a=i(38754),s=a._(i(67294)),o=i(74450),r=i(92227),l=i(64364),c=i(10109),d=i(73607),h=i(11823),u=i(89031),p=i(40920),g=i(10030),m=i(77192),v=i(97498),y=new Set;function prefetch(e,t,i,a,s,o){if(!o&&!(0,r.isLocalURL)(t))return;if(!a.bypassPrefetchedCheck){let s=void 0!==a.locale?a.locale:"locale"in e?e.locale:void 0,o=t+"%"+i+"%"+s;if(y.has(o))return;y.add(o)}let l=o?e.prefetch(t,s):e.prefetch(t,i,a);Promise.resolve(l).catch(e=>{})}function formatStringOrUrl(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let b=s.default.forwardRef(function(e,t){let i,a;let{href:l,as:y,children:b,prefetch:w=null,passHref:x,replace:_,shallow:C,scroll:k,locale:R,onClick:O,onMouseEnter:M,onTouchStart:S,legacyBehavior:P=!1,...z}=e;i=b,P&&("string"==typeof i||"number"==typeof i)&&(i=s.default.createElement("a",null,i));let I=s.default.useContext(h.RouterContext),T=s.default.useContext(u.AppRouterContext),D=null!=I?I:T,E=!I,L=!1!==w,A=null===w?v.PrefetchKind.AUTO:v.PrefetchKind.FULL,{href:B,as:V}=s.default.useMemo(()=>{if(!I){let e=formatStringOrUrl(l);return{href:e,as:y?formatStringOrUrl(y):e}}let[e,t]=(0,o.resolveHref)(I,l,!0);return{href:e,as:y?(0,o.resolveHref)(I,y):t||e}},[I,l,y]),F=s.default.useRef(B),q=s.default.useRef(V);P&&(a=s.default.Children.only(i));let H=P?a&&"object"==typeof a&&a.ref:t,[W,U,G]=(0,p.useIntersection)({rootMargin:"200px"}),j=s.default.useCallback(e=>{(q.current!==V||F.current!==B)&&(G(),q.current=V,F.current=B),W(e),H&&("function"==typeof H?H(e):"object"==typeof H&&(H.current=e))},[V,H,B,G,W]);s.default.useEffect(()=>{D&&U&&L&&prefetch(D,B,V,{locale:R},{kind:A},E)},[V,B,U,R,L,null==I?void 0:I.locale,D,E,A]);let N={ref:j,onClick(e){P||"function"!=typeof O||O(e),P&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(e),D&&!e.defaultPrevented&&function(e,t,i,a,o,l,c,d,h,u){let{nodeName:p}=e.currentTarget,g="A"===p.toUpperCase();if(g&&(function(e){let t=e.currentTarget,i=t.getAttribute("target");return i&&"_self"!==i||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!h&&!(0,r.isLocalURL)(i)))return;e.preventDefault();let navigate=()=>{let e=null==c||c;"beforePopState"in t?t[o?"replace":"push"](i,a,{shallow:l,locale:d,scroll:e}):t[o?"replace":"push"](a||i,{forceOptimisticNavigation:!u,scroll:e})};h?s.default.startTransition(navigate):navigate()}(e,D,B,V,_,C,k,R,E,L)},onMouseEnter(e){P||"function"!=typeof M||M(e),P&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),D&&(L||!E)&&prefetch(D,B,V,{locale:R,priority:!0,bypassPrefetchedCheck:!0},{kind:A},E)},onTouchStart(e){P||"function"!=typeof S||S(e),P&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),D&&(L||!E)&&prefetch(D,B,V,{locale:R,priority:!0,bypassPrefetchedCheck:!0},{kind:A},E)}};if((0,c.isAbsoluteUrl)(V))N.href=V;else if(!P||x||"a"===a.type&&!("href"in a.props)){let e=void 0!==R?R:null==I?void 0:I.locale,t=(null==I?void 0:I.isLocaleDomain)&&(0,g.getDomainLocale)(V,e,null==I?void 0:I.locales,null==I?void 0:I.domainLocales);N.href=t||(0,m.addBasePath)((0,d.addLocale)(V,e,null==I?void 0:I.defaultLocale))}return P?s.default.cloneElement(a,N):s.default.createElement("a",{...z,...N},i)}),w=b;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},40920:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return useIntersection}});let a=i(67294),s=i(63436),o="function"==typeof IntersectionObserver,r=new Map,l=[];function useIntersection(e){let{rootRef:t,rootMargin:i,disabled:c}=e,d=c||!o,[h,u]=(0,a.useState)(!1),p=(0,a.useRef)(null),g=(0,a.useCallback)(e=>{p.current=e},[]);(0,a.useEffect)(()=>{if(o){if(d||h)return;let e=p.current;if(e&&e.tagName){let a=function(e,t,i){let{id:a,observer:s,elements:o}=function(e){let t;let i={root:e.root||null,margin:e.rootMargin||""},a=l.find(e=>e.root===i.root&&e.margin===i.margin);if(a&&(t=r.get(a)))return t;let s=new Map,o=new IntersectionObserver(e=>{e.forEach(e=>{let t=s.get(e.target),i=e.isIntersecting||e.intersectionRatio>0;t&&i&&t(i)})},e);return t={id:i,observer:o,elements:s},l.push(i),r.set(i,t),t}(i);return o.set(e,t),s.observe(e),function(){if(o.delete(e),s.unobserve(e),0===o.size){s.disconnect(),r.delete(a);let e=l.findIndex(e=>e.root===a.root&&e.margin===a.margin);e>-1&&l.splice(e,1)}}}(e,e=>e&&u(e),{root:null==t?void 0:t.current,rootMargin:i});return a}}else if(!h){let e=(0,s.requestIdleCallback)(()=>u(!0));return()=>(0,s.cancelIdleCallback)(e)}},[d,i,t,h,p.current]);let m=(0,a.useCallback)(()=>{u(!1)},[]);return[g,h,m]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},41664:function(e,t,i){e.exports=i(65170)},92703:function(e,t,i){"use strict";var a=i(50414);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,e.exports=function(){function shim(e,t,i,s,o,r){if(r!==a){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}},45697:function(e,t,i){e.exports=i(92703)()},50414:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1455:function(e,t,i){"use strict";var a,s,o,r,l,c,d,h,u,p,g,m,v,y,b,w,x,_,C,k,R,O,M,S,P,z,I,T,D,E,L,A,B,V,F,q,H,W,U,G,j,N,$,Y,Z,K,X,Q,J,ee;i.d(t,{NV1:function(){return o},Cdc:function(){return Circle},Dpx:function(){return b},Hyf:function(){return r},gqJ:function(){return m},nxi:function(){return P},L8z:function(){return ExternalInteractorBase},OzF:function(){return OptionsColor},Voc:function(){return w},DYc:function(){return l},Igb:function(){return C},$Sh:function(){return ParticlesInteractorBase},AeJ:function(){return Rectangle},RnL:function(){return M},SWe:function(){return ValueWithRandom},OWs:function(){return Vector},bx6:function(){return addEasing},M_G:function(){return calculateBounds},kRC:function(){return circleBounce},gy4:function(){return circleBounceDataFromParticle},uZ5:function(){return clamp},ocL:function(){return colorMix},Idc:function(){return degToRad},iCg:function(){return divMode},XDe:function(){return divModeExecute},pSR:function(){return drawLine},gK4:function(){return es},KH1:function(){return executeOnSingleOrMultiple},Spd:function(){return getDistance},oW6:function(){return getDistances},_Xd:function(){return getEasing},bS$:function(){return getHslAnimationFromHsl},BEi:function(){return getLinkColor},Dt5:function(){return getLinkRandomColor},jl5:function(){return getLogger},sZz:function(){return getRandom},KIV:function(){return getRangeMax},Gu7:function(){return getRangeValue},vzQ:function(){return getStyleFromHsl},izR:function(){return getStyleFromRgb},V0:function(){return initParticleNumericAnimationValue},kJL:function(){return isArray},wm$:function(){return isDivModeEnabled},dBL:function(){return isInArray},Kn2:function(){return isObject},Ac:function(){return isPointInside},KrJ:function(){return isSsr},c86:function(){return itemFromArray},wA_:function(){return itemFromSingleOrMultiple},mxw:function(){return loadFont},X5o:function(){return er},aMP:function(){return ei},WtO:function(){return ea},tZy:function(){return eo},vdf:function(){return randomInRange},lNs:function(){return rangeColorToHsl},tXk:function(){return rangeColorToRgb},dpV:function(){return rectBounce},lCU:function(){return rgbToHsl},Cst:function(){return setRangeValue},S6T:function(){return eC},CrJ:function(){return updateAnimation},PBz:function(){return updateColor}});let et="generated",ei="pointerleave",ea="pointermove",en="touchend",es="tsParticles - Error",eo=100,er=1e3;function isBoolean(e){return"boolean"==typeof e}function isString(e){return"string"==typeof e}function isNumber(e){return"number"==typeof e}function isObject(e){return"object"==typeof e&&null!==e}function isArray(e){return Array.isArray(e)}(z=a||(a={})).bottom="bottom",z.bottomLeft="bottom-left",z.bottomRight="bottom-right",z.left="left",z.none="none",z.right="right",z.top="top",z.topLeft="top-left",z.topRight="top-right",z.outside="outside",z.inside="inside";let el={x:0,y:0,z:0};let Vector3d=class Vector3d{constructor(e,t,i){if(this._updateFromAngle=(e,t)=>{this.x=Math.cos(e)*t,this.y=Math.sin(e)*t},!isNumber(e)&&e)this.x=e.x,this.y=e.y,this.z=e.z?e.z:el.z;else if(void 0!==e&&void 0!==t)this.x=e,this.y=t,this.z=i??el.z;else throw Error(`${es} Vector3d not initialized correctly`)}static get origin(){return Vector3d.create(el.x,el.y,el.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(e){this._updateFromAngle(e,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(e){this._updateFromAngle(this.angle,e)}static clone(e){return Vector3d.create(e.x,e.y,e.z)}static create(e,t,i){return new Vector3d(e,t,i)}add(e){return Vector3d.create(this.x+e.x,this.y+e.y,this.z+e.z)}addTo(e){this.x+=e.x,this.y+=e.y,this.z+=e.z}copy(){return Vector3d.clone(this)}distanceTo(e){return this.sub(e).length}distanceToSq(e){return this.sub(e).getLengthSq()}div(e){return Vector3d.create(this.x/e,this.y/e,this.z/e)}divTo(e){this.x/=e,this.y/=e,this.z/=e}getLengthSq(){return this.x**2+this.y**2}mult(e){return Vector3d.create(this.x*e,this.y*e,this.z*e)}multTo(e){this.x*=e,this.y*=e,this.z*=e}normalize(){let e=this.length;0!=e&&this.multTo(1/e)}rotate(e){return Vector3d.create(this.x*Math.cos(e)-this.y*Math.sin(e),this.x*Math.sin(e)+this.y*Math.cos(e),el.z)}setTo(e){this.x=e.x,this.y=e.y,this.z=e.z?e.z:el.z}sub(e){return Vector3d.create(this.x-e.x,this.y-e.y,this.z-e.z)}subFrom(e){this.x-=e.x,this.y-=e.y,this.z-=e.z}};let Vector=class Vector extends Vector3d{constructor(e,t){super(e,t,el.z)}static get origin(){return Vector.create(el.x,el.y)}static clone(e){return Vector.create(e.x,e.y)}static create(e,t){return new Vector(e,t)}};let ec=Math.random,ed={nextFrame:e=>requestAnimationFrame(e),cancel:e=>cancelAnimationFrame(e)},eh=new Map,eu=2*Math.PI;function addEasing(e,t){eh.get(e)||eh.set(e,t)}function getEasing(e){return eh.get(e)??(e=>e)}function getRandom(){return clamp(ec(),0,1-Number.EPSILON)}function clamp(e,t,i){return Math.min(Math.max(e,t),i)}function mix(e,t,i,a){return Math.floor((e*i+t*a)/(i+a))}function randomInRange(e){let t=getRangeMax(e),i=getRangeMin(e);return t===i&&(i=0),getRandom()*(t-i)+i}function getRangeValue(e){return isNumber(e)?e:randomInRange(e)}function getRangeMin(e){return isNumber(e)?e:e.min}function getRangeMax(e){return isNumber(e)?e:e.max}function setRangeValue(e,t){if(e===t||void 0===t&&isNumber(e))return e;let i=getRangeMin(e),a=getRangeMax(e);return void 0!==t?{min:Math.min(i,t),max:Math.max(a,t)}:setRangeValue(i,a)}function getDistances(e,t){let i=e.x-t.x,a=e.y-t.y;return{dx:i,dy:a,distance:Math.sqrt(i**2+a**2)}}function getDistance(e,t){return getDistances(e,t).distance}function degToRad(e){return e*Math.PI/180}function collisionVelocity(e,t,i,a){return Vector.create(e.x*(i-a)/(i+a)+2*t.x*a/(i+a),e.y)}function parseAlpha(e){return e?e.endsWith("%")?parseFloat(e)/eo:parseFloat(e):1}(I=s||(s={})).auto="auto",I.increase="increase",I.decrease="decrease",I.random="random",(T=o||(o={})).increasing="increasing",T.decreasing="decreasing",(D=r||(r={})).none="none",D.max="max",D.min="min",(E=l||(l={})).bottom="bottom",E.left="left",E.right="right",E.top="top",(L=c||(c={})).precise="precise",L.percent="percent",(A=d||(d={})).max="max",A.min="min",A.random="random";let ep={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function getLogger(){return ep}function rectSideBounce(e){let t={bounced:!1},{pSide:i,pOtherSide:a,rectSide:s,rectOtherSide:o,velocity:r,factor:l}=e;return a.min<o.min||a.min>o.max||a.max<o.min||a.max>o.max||(i.max>=s.min&&i.max<=(s.max+s.min)*.5&&r>0||i.min<=s.max&&i.min>(s.max+s.min)*.5&&r<0)&&(t.velocity=-(r*l),t.bounced=!0),t}function isSsr(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function safeMatchMedia(e){if(!isSsr()&&"undefined"!=typeof matchMedia)return matchMedia(e)}function isInArray(e,t){return e===t||isArray(t)&&t.indexOf(e)>-1}async function loadFont(e,t){try{await document.fonts.load(`${t??"400"} 36px '${e??"Verdana"}'`)}catch{}}function itemFromArray(e,t,i=!0){return e[void 0!==t&&i?t%e.length:Math.floor(getRandom()*e.length)]}function isPointInside(e,t,i,a,s){var o;let r;return o=calculateBounds(e,a??0),r=!0,s&&s!==l.bottom||(r=o.top<t.height+i.x),r&&(!s||s===l.left)&&(r=o.right>i.x),r&&(!s||s===l.right)&&(r=o.left<t.width+i.y),r&&(!s||s===l.top)&&(r=o.bottom>i.y),r}function calculateBounds(e,t){return{bottom:e.y+t,left:e.x-t,right:e.x+t,top:e.y-t}}function deepExtend(e,...t){for(let i of t){if(null==i)continue;if(!isObject(i)){e=i;continue}let t=Array.isArray(i);for(let a in t&&(isObject(e)||!e||!Array.isArray(e))?e=[]:!t&&(isObject(e)||!e||Array.isArray(e))&&(e={}),i){if("__proto__"===a)continue;let t=i[a],s=e;s[a]=isObject(t)&&Array.isArray(t)?t.map(e=>deepExtend(s[a],e)):deepExtend(s[a],t)}}return e}function isDivModeEnabled(e,t){return!!findItemFromSingleOrMultiple(t,t=>t.enable&&isInArray(e,t.mode))}function divModeExecute(e,t,i){executeOnSingleOrMultiple(t,t=>{let a=t.mode,s=t.enable;s&&isInArray(e,a)&&function(e,t){let i=e.selectors;executeOnSingleOrMultiple(i,i=>{t(i,e)})}(t,i)})}function divMode(e,t){if(t&&e)return findItemFromSingleOrMultiple(e,e=>(function(e,t){let i=executeOnSingleOrMultiple(t,t=>e.matches(t));return isArray(i)?i.some(e=>e):i})(t,e.selectors))}function circleBounceDataFromParticle(e){return{position:e.getPosition(),radius:e.getRadius(),mass:e.getMass(),velocity:e.velocity,factor:Vector.create(getRangeValue(e.options.bounce.horizontal.value),getRangeValue(e.options.bounce.vertical.value))}}function circleBounce(e,t){let{x:i,y:a}=e.velocity.sub(t.velocity),[s,o]=[e.position,t.position],{dx:r,dy:l}=getDistances(o,s);if(i*r+a*l<0)return;let c=-Math.atan2(l,r),d=e.mass,h=t.mass,u=e.velocity.rotate(c),p=t.velocity.rotate(c),g=collisionVelocity(u,p,d,h),m=collisionVelocity(p,u,d,h),v=g.rotate(-c),y=m.rotate(-c);e.velocity.x=v.x*e.factor.x,e.velocity.y=v.y*e.factor.y,t.velocity.x=y.x*t.factor.x,t.velocity.y=y.y*t.factor.y}function rectBounce(e,t){let i=e.getPosition(),a=e.getRadius(),s=calculateBounds(i,a),o=e.options.bounce,r=rectSideBounce({pSide:{min:s.left,max:s.right},pOtherSide:{min:s.top,max:s.bottom},rectSide:{min:t.left,max:t.right},rectOtherSide:{min:t.top,max:t.bottom},velocity:e.velocity.x,factor:getRangeValue(o.horizontal.value)});r.bounced&&(void 0!==r.velocity&&(e.velocity.x=r.velocity),void 0!==r.position&&(e.position.x=r.position));let l=rectSideBounce({pSide:{min:s.top,max:s.bottom},pOtherSide:{min:s.left,max:s.right},rectSide:{min:t.top,max:t.bottom},rectOtherSide:{min:t.left,max:t.right},velocity:e.velocity.y,factor:getRangeValue(o.vertical.value)});l.bounced&&(void 0!==l.velocity&&(e.velocity.y=l.velocity),void 0!==l.position&&(e.position.y=l.position))}function executeOnSingleOrMultiple(e,t){return isArray(e)?e.map((e,i)=>t(e,i)):t(e,0)}function itemFromSingleOrMultiple(e,t,i){return isArray(e)?itemFromArray(e,t,i):e}function findItemFromSingleOrMultiple(e,t){return isArray(e)?e.find((e,i)=>t(e,i)):t(e,0)?e:void 0}function initParticleNumericAnimationValue(e,t){let i=e.value,a=e.animation,r={delayTime:getRangeValue(a.delay)*er,enable:a.enable,value:getRangeValue(e.value)*t,max:getRangeMax(i)*t,min:getRangeMin(i)*t,loops:0,maxLoops:getRangeValue(a.count),time:0};if(a.enable){switch(r.decay=1-getRangeValue(a.decay),a.mode){case s.increase:r.status=o.increasing;break;case s.decrease:r.status=o.decreasing;break;case s.random:r.status=getRandom()>=.5?o.increasing:o.decreasing}let e=a.mode===s.auto;switch(a.startValue){case d.min:r.value=r.min,e&&(r.status=o.increasing);break;case d.max:r.value=r.max,e&&(r.status=o.decreasing);break;case d.random:default:r.value=randomInRange(r),e&&(r.status=getRandom()>=.5?o.increasing:o.decreasing)}}return r.initialValue=r.value,r}function getPosition(e,t){return function(e,t){let i=e.mode===c.percent;if(!i){let{mode:t,...i}=e;return i}return"x"in e?{x:e.x/eo*t.width,y:e.y/eo*t.height}:{width:e.width/eo*t.width,height:e.height/eo*t.height}}(e,t)}function updateAnimation(e,t,i,a,s){if(e.destroyed||!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;let l=(t.velocity??0)*s.factor,c=t.min,d=t.max,h=t.decay??1;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=s.value),!((t.delayTime??0)>0)||!(t.time<(t.delayTime??0))){switch(t.status){case o.increasing:t.value>=d?(i?t.status=o.decreasing:t.value-=d,t.loops||(t.loops=0),t.loops++):t.value+=l;break;case o.decreasing:t.value<=c?(i?t.status=o.increasing:t.value+=d,t.loops||(t.loops=0),t.loops++):t.value-=l}t.velocity&&1!==h&&(t.velocity*=h),function(e,t,i,a,s){switch(t){case r.max:i>=s&&e.destroy();break;case r.min:i<=a&&e.destroy()}}(e,a,t.value,c,d),e.destroyed||(t.value=clamp(t.value,c,d))}}(B=h||(h={})).darken="darken",B.enlighten="enlighten",(V=u||(u={}))[V.r=1]="r",V[V.g=2]="g",V[V.b=3]="b",V[V.a=4]="a";let ef="random",eg=new Map;function addColorManager(e){eg.set(e.key,e)}function rangeColorToRgb(e,t,i=!0){if(!e)return;let a=isString(e)?{value:e}:e;if(isString(a.value))return function colorToRgb(e,t,i=!0){if(!e)return;let a=isString(e)?{value:e}:e;if(isString(a.value))return a.value===ef?getRandomRgbColor():function(e){for(let[,t]of eg)if(e.startsWith(t.stringPrefix))return t.parseString(e);let t=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,(e,t,i,a,s)=>t+t+i+i+a+a+(void 0!==s?s+s:"")),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);return i?{a:void 0!==i[u.a]?parseInt(i[u.a],16)/255:1,b:parseInt(i[u.b],16),g:parseInt(i[u.g],16),r:parseInt(i[u.r],16)}:void 0}(a.value);if(isArray(a.value))return colorToRgb({value:itemFromArray(a.value,t,i)});for(let[,e]of eg){let t=e.handleColor(a);if(t)return t}}(a.value,t,i);if(isArray(a.value))return rangeColorToRgb({value:itemFromArray(a.value,t,i)});for(let[,e]of eg){let t=e.handleRangeColor(a);if(t)return t}}function rangeColorToHsl(e,t,i=!0){let a=rangeColorToRgb(e,t,i);return a?rgbToHsl(a):void 0}function rgbToHsl(e){let t=e.r/255,i=e.g/255,a=e.b/255,s=Math.max(t,i,a),o=Math.min(t,i,a),r={h:0,l:(s+o)*.5,s:0};return s!==o&&(r.s=r.l<.5?(s-o)/(s+o):(s-o)/(2-s-o),r.h=t===s?(i-a)/(s-o):r.h=i===s?2+(a-t)/(s-o):4+(t-i)/(s-o)),r.l*=100,r.s*=100,r.h*=60,r.h<0&&(r.h+=360),r.h>=360&&(r.h-=360),r}function hslToRgb(e){let t=(e.h%360+360)%360,i=Math.max(0,Math.min(100,e.s)),a=Math.max(0,Math.min(100,e.l)),s=t/360,o=i/100,r=a/100;if(0===i){let e=Math.round(255*r);return{r:e,g:e,b:e}}let channel=(e,t,i)=>(i<0&&i++,i>1&&i--,6*i<1)?e+(t-e)*6*i:2*i<1?t:3*i<2?e+(t-e)*(.6666666666666666-i)*6:e,l=r<.5?r*(1+o):r+o-r*o,c=2*r-l,d=Math.min(255,255*channel(c,l,s+.3333333333333333)),h=Math.min(255,255*channel(c,l,s)),u=Math.min(255,255*channel(c,l,s-.3333333333333333));return{r:Math.round(d),g:Math.round(h),b:Math.round(u)}}function getRandomRgbColor(e){let t=e??0;return{b:Math.floor(randomInRange(setRangeValue(t,256))),g:Math.floor(randomInRange(setRangeValue(t,256))),r:Math.floor(randomInRange(setRangeValue(t,256)))}}function getStyleFromRgb(e,t){return`rgba(${e.r}, ${e.g}, ${e.b}, ${t??1})`}function getStyleFromHsl(e,t){return`hsla(${e.h}, ${e.s}%, ${e.l}%, ${t??1})`}function colorMix(e,t,i,a){let s=e,o=t;return void 0===s.r&&(s=hslToRgb(e)),void 0===o.r&&(o=hslToRgb(t)),{b:mix(s.b,o.b,i,a),g:mix(s.g,o.g,i,a),r:mix(s.r,o.r,i,a)}}function getLinkColor(e,t,i){if(i===ef)return getRandomRgbColor();if("mid"!==i)return i;{let i=e.getFillColor()??e.getStrokeColor(),a=t?.getFillColor()??t?.getStrokeColor();if(i&&a&&t)return colorMix(i,a,e.getRadius(),t.getRadius());{let e=i??a;if(e)return hslToRgb(e)}}}function getLinkRandomColor(e,t,i){let a=isString(e)?e:e.value;return a===ef?i?rangeColorToRgb({value:a}):t?ef:"mid":"mid"===a?"mid":rangeColorToRgb({value:a})}function getHslFromAnimation(e){return void 0!==e?{h:e.h.value,s:e.s.value,l:e.l.value}:void 0}function getHslAnimationFromHsl(e,t,i){let a={h:{enable:!1,value:e.h},s:{enable:!1,value:e.s},l:{enable:!1,value:e.l}};return t&&(setColorAnimation(a.h,t.h,i),setColorAnimation(a.s,t.s,i),setColorAnimation(a.l,t.l,i)),a}function setColorAnimation(e,t,i){e.enable=t.enable,e.enable?(e.velocity=getRangeValue(t.speed)/eo*i,e.decay=1-getRangeValue(t.decay),e.status=o.increasing,e.loops=0,e.maxLoops=getRangeValue(t.count),e.time=0,e.delayTime=getRangeValue(t.delay)*er,t.sync||(e.velocity*=getRandom(),e.value*=getRandom()),e.initialValue=e.value,e.offset=setRangeValue(t.offset)):e.velocity=0}function updateColorValue(e,t,i,a){if(!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0)||(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=a.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0)))return;let s=e.offset?randomInRange(e.offset):0,r=(e.velocity??0)*a.factor+3.6*s,l=e.decay??1,c=getRangeMax(t),d=getRangeMin(t);i&&e.status!==o.increasing?(e.value-=r,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status=o.increasing)):(e.value+=r,e.value>c&&(e.loops||(e.loops=0),e.loops++,i?e.status=o.decreasing:e.value-=c)),e.velocity&&1!==l&&(e.velocity*=l),e.value=clamp(e.value,d,c)}function updateColor(e,t){if(!e)return;let{h:i,s:a,l:s}=e,o={h:{min:0,max:360},s:{min:0,max:100},l:{min:0,max:100}};i&&updateColorValue(i,o.h,!1,t),a&&updateColorValue(a,o.s,!0,t),s&&updateColorValue(s,o.l,!0,t)}let em={x:0,y:0},ev={a:1,b:0,c:0,d:1};function drawLine(e,t,i){e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(i.x,i.y),e.closePath()}function clear(e,t){e.clearRect(em.x,em.y,t.width,t.height)}function setStyle(e,t,i=!1){if(!t||!e)return;let a=e.style;if(a)for(let e in t){let s=t[e];s&&a.setProperty(e,s,i?"important":"")}}let Canvas=class Canvas{constructor(e){this.container=e,this._applyPostDrawUpdaters=e=>{for(let t of this._postDrawUpdaters)t.afterDraw?.(e)},this._applyPreDrawUpdaters=(e,t,i,a,s,o)=>{for(let r of this._preDrawUpdaters){if(r.getColorStyles){let{fill:o,stroke:l}=r.getColorStyles(t,e,i,a);o&&(s.fill=o),l&&(s.stroke=l)}if(r.getTransformValues){let e=r.getTransformValues(t);for(let t in e)!function(e,t,i){let a=t[i];void 0!==a&&(e[i]=(e[i]??1)*a)}(o,e,t)}r.beforeDraw?.(t)}},this._applyResizePlugins=()=>{for(let e of this._resizePlugins)e.resize?.()},this._getPluginParticleColors=e=>{let t,i;for(let a of this._colorPlugins)if(!t&&a.particleFillColor&&(t=rangeColorToHsl(a.particleFillColor(e))),!i&&a.particleStrokeColor&&(i=rangeColorToHsl(a.particleStrokeColor(e))),t&&i)break;return[t,i]},this._initCover=async()=>{let e=this.container.actualOptions,t=e.backgroundMask.cover,i=t.color;if(i){let e=rangeColorToRgb(i);if(e){let i={...e,a:t.opacity};this._coverColorStyle=getStyleFromRgb(i,i.a)}}else await new Promise((e,i)=>{if(!t.image)return;let a=document.createElement("img");a.addEventListener("load",()=>{this._coverImage={image:a,opacity:t.opacity},e()}),a.addEventListener("error",e=>{i(e.error)}),a.src=t.image})},this._initStyle=()=>{let e=this.element,t=this.container.actualOptions;if(e)for(let i in this._fullScreen?(this._originalStyle=deepExtend({},e.style),this._setFullScreenStyle()):this._resetOriginalStyle(),t.style){if(!i||!t.style)continue;let a=t.style[i];a&&e.style.setProperty(i,a,"important")}},this._initTrail=async()=>{let e=this.container.actualOptions,t=e.particles.move.trail,i=t.fill;if(!t.enable)return;let a=1/t.length;if(i.color){let e=rangeColorToRgb(i.color);if(!e)return;this._trailFill={color:{...e},opacity:a}}else await new Promise((e,t)=>{if(!i.image)return;let s=document.createElement("img");s.addEventListener("load",()=>{this._trailFill={image:s,opacity:a},e()}),s.addEventListener("error",e=>{t(e.error)}),s.src=i.image})},this._paintBase=e=>{this.draw(t=>{var i;return i=this.size,void(t.fillStyle=e??"rgba(0,0,0,0)",t.fillRect(em.x,em.y,i.width,i.height))})},this._paintImage=(e,t)=>{this.draw(i=>{var a;return a=this.size,void(e&&(i.globalAlpha=t,i.drawImage(e,em.x,em.y,a.width,a.height),i.globalAlpha=1))})},this._repairStyle=()=>{let e=this.element;e&&(this._safeMutationObserver(e=>e.disconnect()),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{e&&e instanceof Node&&t.observe(e,{attributes:!0})}))},this._resetOriginalStyle=()=>{let e=this.element,t=this._originalStyle;e&&t&&setStyle(e,t)},this._safeMutationObserver=e=>{this._mutationObserver&&e(this._mutationObserver)},this._setFullScreenStyle=()=>{let e=this.element;e&&setStyle(e,{position:"fixed",zIndex:this.container.actualOptions.fullScreen.zIndex.toString(10),top:"0",left:"0",width:"100%",height:"100%"},!0)},this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){let e=this.container.actualOptions,t=e.particles.move.trail,i=this._trailFill;e.backgroundMask.enable?this.paint():t.enable&&t.length>0&&i?i.color?this._paintBase(getStyleFromRgb(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):e.clear&&this.draw(e=>{clear(e,this.size)})}destroy(){if(this.stop(),this._generated){let e=this.element;e?.remove()}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(e){let t=this._context;if(t)return e(t)}drawAsync(e){let t=this._context;if(t)return e(t)}drawParticle(e,t){if(e.spawning||e.destroyed)return;let i=e.getRadius();if(i<=0)return;let a=e.getFillColor(),s=e.getStrokeColor()??a,[o,r]=this._getPluginParticleColors(e);o||(o=a),r||(r=s),(o||r)&&this.draw(a=>{let s=this.container,l=s.actualOptions,c=e.options.zIndex,d=1-e.zIndexFactor,h=d**c.opacityRate,u=e.bubble.opacity??e.opacity?.value??1,p=e.strokeOpacity??u,g=u*h,m={},v={fill:o?getStyleFromHsl(o,g):void 0};v.stroke=r?getStyleFromHsl(r,p*h):v.fill,this._applyPreDrawUpdaters(a,e,i,g,v,m),function(e){let{container:t,context:i,particle:a,delta:s,colorStyles:o,backgroundMask:r,composite:l,radius:c,opacity:d,shadow:h,transform:u}=e,p=a.getPosition(),g=a.rotation+(a.pathRotation?a.velocity.angle:0),m={sin:Math.sin(g),cos:Math.cos(g)},v=!!g,y={a:m.cos*(u.a??ev.a),b:v?m.sin*(u.b??1):u.b??ev.b,c:v?-m.sin*(u.c??1):u.c??ev.c,d:m.cos*(u.d??ev.d)};i.setTransform(y.a,y.b,y.c,y.d,p.x,p.y),r&&(i.globalCompositeOperation=l);let b=a.shadowColor;h.enable&&b&&(i.shadowBlur=h.blur,i.shadowColor=getStyleFromRgb(b),i.shadowOffsetX=h.offset.x,i.shadowOffsetY=h.offset.y),o.fill&&(i.fillStyle=o.fill);let w=a.strokeWidth??0;i.lineWidth=w,o.stroke&&(i.strokeStyle=o.stroke);let x={container:t,context:i,particle:a,radius:c,opacity:d,delta:s,transformData:y,strokeWidth:w};(function(e){let{container:t,context:i,particle:a,radius:s,opacity:o,delta:r,strokeWidth:l,transformData:c}=e;if(!a.shape)return;let d=t.shapeDrawers.get(a.shape);d&&(i.beginPath(),d.draw({context:i,particle:a,radius:s,opacity:o,delta:r,pixelRatio:t.retina.pixelRatio,transformData:{...c}}),a.shapeClose&&i.closePath(),l>0&&i.stroke(),a.shapeFill&&i.fill())})(x),function(e){let{container:t,context:i,particle:a,radius:s,opacity:o,delta:r,transformData:l}=e;if(!a.shape)return;let c=t.shapeDrawers.get(a.shape);c?.afterDraw&&c.afterDraw({context:i,particle:a,radius:s,opacity:o,delta:r,pixelRatio:t.retina.pixelRatio,transformData:{...l}})}(x),function(e){let{container:t,context:i,particle:a,radius:s,opacity:o,delta:r,transformData:l}=e;if(!a.effect)return;let c=t.effectDrawers.get(a.effect);c&&c.draw({context:i,particle:a,radius:s,opacity:o,delta:r,pixelRatio:t.retina.pixelRatio,transformData:{...l}})}(x),i.globalCompositeOperation="source-over",i.resetTransform()}({container:s,context:a,particle:e,delta:t,colorStyles:v,backgroundMask:l.backgroundMask.enable,composite:l.backgroundMask.composite,radius:i*d**c.sizeRate,opacity:g,shadow:e.options.shadow,transform:m}),this._applyPostDrawUpdaters(e)})}drawParticlePlugin(e,t,i){this.draw(a=>{e.drawParticle&&e.drawParticle(a,t,i)})}drawPlugin(e,t){this.draw(i=>{e.draw&&e.draw(i,t)})}async init(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=function(e){if(!isSsr()&&"undefined"!=typeof MutationObserver)return new MutationObserver(e)}(e=>{for(let t of e)"attributes"===t.type&&"style"===t.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(e){ep.error(e)}this.initBackground(),this._safeMutationObserver(e=>{this.element&&this.element instanceof Node&&e.observe(this.element,{attributes:!0})}),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){let e=this.container.actualOptions,t=e.background,i=this.element;if(!i)return;let a=i.style;if(a){if(t.color){let e=rangeColorToRgb(t.color);a.backgroundColor=e?getStyleFromRgb(e,t.opacity):""}else a.backgroundColor="";a.backgroundImage=t.image||"",a.backgroundPosition=t.position||"",a.backgroundRepeat=t.repeat||"",a.backgroundSize=t.size||""}}initPlugins(){for(let[,e]of(this._resizePlugins=[],this.container.plugins))e.resize&&this._resizePlugins.push(e),(e.particleFillColor??e.particleStrokeColor)&&this._colorPlugins.push(e)}initUpdaters(){for(let e of(this._preDrawUpdaters=[],this._postDrawUpdaters=[],this.container.particles.updaters))e.afterDraw&&this._postDrawUpdaters.push(e),(e.getColorStyles??e.getTransformValues??e.beforeDraw)&&this._preDrawUpdaters.push(e)}loadCanvas(e){this._generated&&this.element&&this.element.remove(),this._generated=e.dataset&&et in e.dataset?"true"===e.dataset[et]:this._generated,this.element=e,this.element.ariaHidden="true",this._originalStyle=deepExtend({},this.element.style),this.size.height=e.offsetHeight,this.size.width=e.offsetWidth,this._context=this.element.getContext("2d"),this._safeMutationObserver(e=>{this.element&&this.element instanceof Node&&e.observe(this.element,{attributes:!0})}),this.container.retina.init(),this.initBackground()}paint(){let e=this.container.actualOptions;this.draw(t=>{e.backgroundMask.enable&&e.backgroundMask.cover?(clear(t,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()})}resize(){if(!this.element)return!1;let e=this.container,t=e.retina.pixelRatio,i=e.canvas.size,a={width:this.element.offsetWidth*t,height:this.element.offsetHeight*t};if(a.height===i.height&&a.width===i.width&&a.height===this.element.height&&a.width===this.element.width)return!1;let s={...i};return this.element.width=i.width=this.element.offsetWidth*t,this.element.height=i.height=this.element.offsetHeight*t,this.container.started&&e.particles.setResizeFactor({width:i.width/s.width,height:i.height/s.height}),!0}stop(){this._safeMutationObserver(e=>e.disconnect()),this._mutationObserver=void 0,this.draw(e=>clear(e,this.size))}async windowResize(){if(!this.element||!this.resize())return;let e=this.container,t=e.updateActualOptions();e.particles.setDensity(),this._applyResizePlugins(),t&&await e.refresh()}};function manageListener(e,t,i,a,s){if(a){let a={passive:!0};isBoolean(s)?a.capture=s:void 0!==s&&(a=s),e.addEventListener(t,i,a)}else e.removeEventListener(t,i,s)}(F=p||(p={})).canvas="canvas",F.parent="parent",F.window="window";let EventListeners=class EventListeners{constructor(e){this.container=e,this._doMouseTouchClick=e=>{let t=this.container,i=t.actualOptions;if(this._canPush){let e=t.interactivity.mouse,a=e.position;if(!a)return;e.clickPosition={...a},e.clickTime=new Date().getTime();let s=i.interactivity.events.onClick;executeOnSingleOrMultiple(s.mode,e=>this.container.handleClickMode(e))}"touchend"===e.type&&setTimeout(()=>this._mouseTouchFinish(),500)},this._handleThemeChange=e=>{let t=this.container,i=t.options,a=i.defaultThemes,s=e.matches?a.dark:a.light,o=i.themes.find(e=>e.name===s);o?.default.auto&&t.loadTheme(s)},this._handleVisibilityChange=()=>{let e=this.container,t=e.actualOptions;this._mouseTouchFinish(),t.pauseOnBlur&&(document?.hidden?(e.pageHidden=!0,e.pause()):(e.pageHidden=!1,e.animationStatus?e.play(!0):e.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);let handleResize=async()=>{let e=this.container.canvas;await e?.windowResize()};this._resizeTimeout=setTimeout(()=>void handleResize(),this.container.actualOptions.interactivity.events.resize.delay*er)},this._manageInteractivityListeners=(e,t)=>{let i=this._handlers,a=this.container,s=a.actualOptions,o=a.interactivity.element;if(!o)return;let r=a.canvas.element;r&&(r.style.pointerEvents=o===r?"initial":"none"),(s.interactivity.events.onHover.enable||s.interactivity.events.onClick.enable)&&(manageListener(o,ea,i.mouseMove,t),manageListener(o,"touchstart",i.touchStart,t),manageListener(o,"touchmove",i.touchMove,t),s.interactivity.events.onClick.enable?(manageListener(o,en,i.touchEndClick,t),manageListener(o,"pointerup",i.mouseUp,t),manageListener(o,"pointerdown",i.mouseDown,t)):manageListener(o,en,i.touchEnd,t),manageListener(o,e,i.mouseLeave,t),manageListener(o,"touchcancel",i.touchCancel,t))},this._manageListeners=e=>{let t=this._handlers,i=this.container,a=i.actualOptions,s=a.interactivity.detectsOn,o=i.canvas.element,r=ei;s===p.window?(i.interactivity.element=window,r="pointerout"):s===p.parent&&o?i.interactivity.element=o.parentElement??o.parentNode:i.interactivity.element=o,this._manageMediaMatch(e),this._manageResize(e),this._manageInteractivityListeners(r,e),document&&manageListener(document,"visibilitychange",t.visibilityChange,e,!1)},this._manageMediaMatch=e=>{let t=this._handlers,i=safeMatchMedia("(prefers-color-scheme: dark)");if(i){if(void 0!==i.addEventListener){manageListener(i,"change",t.themeChange,e);return}void 0!==i.addListener&&(e?i.addListener(t.oldThemeChange):i.removeListener(t.oldThemeChange))}},this._manageResize=e=>{let t=this._handlers,i=this.container,a=i.actualOptions;if(!a.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver){manageListener(window,"resize",t.resize,e);return}let s=i.canvas.element;this._resizeObserver&&!e?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&e&&s&&(this._resizeObserver=new ResizeObserver(e=>{let t=e.find(e=>e.target===s);t&&this._handleWindowResize()}),this._resizeObserver.observe(s))},this._mouseDown=()=>{let{interactivity:e}=this.container;if(!e)return;let{mouse:t}=e;t.clicking=!0,t.downPosition=t.position},this._mouseTouchClick=e=>{let t=this.container,i=t.actualOptions,{mouse:a}=t.interactivity;a.inside=!0;let s=!1,o=a.position;if(o&&i.interactivity.events.onClick.enable){for(let[,e]of t.plugins)if(e.clickPositionValid&&(s=e.clickPositionValid(o)))break;s||this._doMouseTouchClick(e),a.clicking=!1}},this._mouseTouchFinish=()=>{let e=this.container.interactivity;if(!e)return;let t=e.mouse;delete t.position,delete t.clickPosition,delete t.downPosition,e.status=ei,t.inside=!1,t.clicking=!1},this._mouseTouchMove=e=>{let t;let i=this.container,a=i.actualOptions,s=i.interactivity,o=i.canvas.element;if(!s?.element)return;if(s.mouse.inside=!0,e.type.startsWith("pointer")){if(this._canPush=!0,s.element===window){if(o){let i=o.getBoundingClientRect();t={x:e.clientX-i.left,y:e.clientY-i.top}}}else if(a.interactivity.detectsOn===p.parent){let i=e.target,a=e.currentTarget;if(i&&a&&o){let s=i.getBoundingClientRect(),r=a.getBoundingClientRect(),l=o.getBoundingClientRect();t={x:e.offsetX+2*s.left-(r.left+l.left),y:e.offsetY+2*s.top-(r.top+l.top)}}else t={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===o&&(t={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==e.type,o){let i=e.touches[e.touches.length-1],a=o.getBoundingClientRect();t={x:i.clientX-(a.left??0),y:i.clientY-(a.top??0)}}let r=i.retina.pixelRatio;t&&(t.x*=r,t.y*=r),s.mouse.position=t,s.status=ea},this._touchEnd=e=>{let t=Array.from(e.changedTouches);for(let e of t)this._touches.delete(e.identifier);this._mouseTouchFinish()},this._touchEndClick=e=>{let t=Array.from(e.changedTouches);for(let e of t)this._touches.delete(e.identifier);this._mouseTouchClick(e)},this._touchStart=e=>{let t=Array.from(e.changedTouches);for(let e of t)this._touches.set(e.identifier,performance.now());this._mouseTouchMove(e)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:e=>this._mouseTouchMove(e),mouseUp:e=>this._mouseTouchClick(e),touchStart:e=>this._touchStart(e),touchMove:e=>this._mouseTouchMove(e),touchEnd:e=>this._touchEnd(e),touchCancel:e=>this._touchEnd(e),touchEndClick:e=>this._touchEndClick(e),visibilityChange:()=>this._handleVisibilityChange(),themeChange:e=>this._handleThemeChange(e),oldThemeChange:e=>this._handleThemeChange(e),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}};(q=g||(g={})).configAdded="configAdded",q.containerInit="containerInit",q.particlesSetup="particlesSetup",q.containerStarted="containerStarted",q.containerStopped="containerStopped",q.containerDestroyed="containerDestroyed",q.containerPaused="containerPaused",q.containerPlay="containerPlay",q.containerBuilt="containerBuilt",q.particleAdded="particleAdded",q.particleDestroyed="particleDestroyed",q.particleRemoved="particleRemoved";let OptionsColor=class OptionsColor{constructor(){this.value=""}static create(e,t){let i=new OptionsColor;return i.load(e),void 0!==t&&(isString(t)||isArray(t)?i.load({value:t}):i.load(t)),i}load(e){e?.value!==void 0&&(this.value=e.value)}};let Background=class Background{constructor(){this.color=new OptionsColor,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(e){e&&(void 0!==e.color&&(this.color=OptionsColor.create(this.color,e.color)),void 0!==e.image&&(this.image=e.image),void 0!==e.position&&(this.position=e.position),void 0!==e.repeat&&(this.repeat=e.repeat),void 0!==e.size&&(this.size=e.size),void 0!==e.opacity&&(this.opacity=e.opacity))}};let BackgroundMaskCover=class BackgroundMaskCover{constructor(){this.opacity=1}load(e){e&&(void 0!==e.color&&(this.color=OptionsColor.create(this.color,e.color)),void 0!==e.image&&(this.image=e.image),void 0!==e.opacity&&(this.opacity=e.opacity))}};let BackgroundMask=class BackgroundMask{constructor(){this.composite="destination-out",this.cover=new BackgroundMaskCover,this.enable=!1}load(e){if(e){if(void 0!==e.composite&&(this.composite=e.composite),void 0!==e.cover){let t=e.cover,i=isString(e.cover)?{color:e.cover}:e.cover;this.cover.load(void 0!==t.color||void 0!==t.image?t:{color:i})}void 0!==e.enable&&(this.enable=e.enable)}}};let FullScreen=class FullScreen{constructor(){this.enable=!0,this.zIndex=0}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.zIndex&&(this.zIndex=e.zIndex))}};let ClickEvent=class ClickEvent{constructor(){this.enable=!1,this.mode=[]}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.mode&&(this.mode=e.mode))}};(H=m||(m={})).circle="circle",H.rectangle="rectangle";let DivEvent=class DivEvent{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=m.circle}load(e){e&&(void 0!==e.selectors&&(this.selectors=e.selectors),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.type&&(this.type=e.type))}};let Parallax=class Parallax{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.force&&(this.force=e.force),void 0!==e.smooth&&(this.smooth=e.smooth))}};let HoverEvent=class HoverEvent{constructor(){this.enable=!1,this.mode=[],this.parallax=new Parallax}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.mode&&(this.mode=e.mode),this.parallax.load(e.parallax))}};let ResizeEvent=class ResizeEvent{constructor(){this.delay=.5,this.enable=!0}load(e){void 0!==e&&(void 0!==e.delay&&(this.delay=e.delay),void 0!==e.enable&&(this.enable=e.enable))}};let Events=class Events{constructor(){this.onClick=new ClickEvent,this.onDiv=new DivEvent,this.onHover=new HoverEvent,this.resize=new ResizeEvent}load(e){if(!e)return;this.onClick.load(e.onClick);let t=e.onDiv;void 0!==t&&(this.onDiv=executeOnSingleOrMultiple(t,e=>{let t=new DivEvent;return t.load(e),t})),this.onHover.load(e.onHover),this.resize.load(e.resize)}};let Modes=class Modes{constructor(e,t){this._engine=e,this._container=t}load(e){if(!e||!this._container)return;let t=this._engine.interactors.get(this._container);if(t)for(let i of t)i.loadModeOptions&&i.loadModeOptions(this,e)}};let Interactivity=class Interactivity{constructor(e,t){this.detectsOn=p.window,this.events=new Events,this.modes=new Modes(e,t)}load(e){if(!e)return;let t=e.detectsOn;void 0!==t&&(this.detectsOn=t),this.events.load(e.events),this.modes.load(e.modes)}};let ManualParticle=class ManualParticle{load(e){e&&(e.position&&(this.position={x:e.position.x??50,y:e.position.y??50,mode:e.position.mode??c.percent}),e.options&&(this.options=deepExtend({},e.options)))}};(W=v||(v={})).screen="screen",W.canvas="canvas";let Responsive=class Responsive{constructor(){this.maxWidth=1/0,this.options={},this.mode=v.canvas}load(e){e&&(void 0!==e.maxWidth&&(this.maxWidth=e.maxWidth),void 0!==e.mode&&(e.mode===v.screen?this.mode=v.screen:this.mode=v.canvas),void 0!==e.options&&(this.options=deepExtend({},e.options)))}};(U=y||(y={})).any="any",U.dark="dark",U.light="light";let ThemeDefault=class ThemeDefault{constructor(){this.auto=!1,this.mode=y.any,this.value=!1}load(e){e&&(void 0!==e.auto&&(this.auto=e.auto),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.value&&(this.value=e.value))}};let Theme=class Theme{constructor(){this.name="",this.default=new ThemeDefault}load(e){e&&(void 0!==e.name&&(this.name=e.name),this.default.load(e.default),void 0!==e.options&&(this.options=deepExtend({},e.options)))}};let AnimationOptions=class AnimationOptions{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(e){e&&(void 0!==e.count&&(this.count=setRangeValue(e.count)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=setRangeValue(e.speed)),void 0!==e.decay&&(this.decay=setRangeValue(e.decay)),void 0!==e.delay&&(this.delay=setRangeValue(e.delay)),void 0!==e.sync&&(this.sync=e.sync))}};let RangedAnimationOptions=class RangedAnimationOptions extends AnimationOptions{constructor(){super(),this.mode=s.auto,this.startValue=d.random}load(e){super.load(e),e&&(void 0!==e.mode&&(this.mode=e.mode),void 0!==e.startValue&&(this.startValue=e.startValue))}};let ColorAnimation=class ColorAnimation extends AnimationOptions{constructor(){super(),this.offset=0,this.sync=!0}load(e){super.load(e),e&&void 0!==e.offset&&(this.offset=setRangeValue(e.offset))}};let HslAnimation=class HslAnimation{constructor(){this.h=new ColorAnimation,this.s=new ColorAnimation,this.l=new ColorAnimation}load(e){e&&(this.h.load(e.h),this.s.load(e.s),this.l.load(e.l))}};let AnimatableColor=class AnimatableColor extends OptionsColor{constructor(){super(),this.animation=new HslAnimation}static create(e,t){let i=new AnimatableColor;return i.load(e),void 0!==t&&(isString(t)||isArray(t)?i.load({value:t}):i.load(t)),i}load(e){if(super.load(e),!e)return;let t=e.animation;void 0!==t&&(void 0!==t.enable?this.animation.h.load(t):this.animation.load(e.animation))}};(G=b||(b={})).absorb="absorb",G.bounce="bounce",G.destroy="destroy";let CollisionsAbsorb=class CollisionsAbsorb{constructor(){this.speed=2}load(e){e&&void 0!==e.speed&&(this.speed=e.speed)}};let CollisionsOverlap=class CollisionsOverlap{constructor(){this.enable=!0,this.retries=0}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.retries&&(this.retries=e.retries))}};let ValueWithRandom=class ValueWithRandom{constructor(){this.value=0}load(e){e&&void 0!==e.value&&(this.value=setRangeValue(e.value))}};let AnimationValueWithRandom=class AnimationValueWithRandom extends ValueWithRandom{constructor(){super(),this.animation=new AnimationOptions}load(e){if(super.load(e),!e)return;let t=e.animation;void 0!==t&&this.animation.load(t)}};let RangedAnimationValueWithRandom=class RangedAnimationValueWithRandom extends AnimationValueWithRandom{constructor(){super(),this.animation=new RangedAnimationOptions}load(e){super.load(e)}};let ParticlesBounceFactor=class ParticlesBounceFactor extends ValueWithRandom{constructor(){super(),this.value=1}};let ParticlesBounce=class ParticlesBounce{constructor(){this.horizontal=new ParticlesBounceFactor,this.vertical=new ParticlesBounceFactor}load(e){e&&(this.horizontal.load(e.horizontal),this.vertical.load(e.vertical))}};let Collisions=class Collisions{constructor(){this.absorb=new CollisionsAbsorb,this.bounce=new ParticlesBounce,this.enable=!1,this.maxSpeed=50,this.mode=b.bounce,this.overlap=new CollisionsOverlap}load(e){e&&(this.absorb.load(e.absorb),this.bounce.load(e.bounce),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.maxSpeed&&(this.maxSpeed=setRangeValue(e.maxSpeed)),void 0!==e.mode&&(this.mode=e.mode),this.overlap.load(e.overlap))}};let Effect=class Effect{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(e){if(!e)return;let t=e.options;if(void 0!==t)for(let e in t){let i=t[e];i&&(this.options[e]=deepExtend(this.options[e]??{},i))}void 0!==e.close&&(this.close=e.close),void 0!==e.fill&&(this.fill=e.fill),void 0!==e.type&&(this.type=e.type)}};let MoveAngle=class MoveAngle{constructor(){this.offset=0,this.value=90}load(e){e&&(void 0!==e.offset&&(this.offset=setRangeValue(e.offset)),void 0!==e.value&&(this.value=setRangeValue(e.value)))}};let MoveAttract=class MoveAttract{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(e){if(e&&(void 0!==e.distance&&(this.distance=setRangeValue(e.distance)),void 0!==e.enable&&(this.enable=e.enable),e.rotate)){let t=e.rotate.x;void 0!==t&&(this.rotate.x=t);let i=e.rotate.y;void 0!==i&&(this.rotate.y=i)}}};let MoveCenter=class MoveCenter{constructor(){this.x=50,this.y=50,this.mode=c.percent,this.radius=0}load(e){e&&(void 0!==e.x&&(this.x=e.x),void 0!==e.y&&(this.y=e.y),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.radius&&(this.radius=e.radius))}};let MoveGravity=class MoveGravity{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(e){e&&(void 0!==e.acceleration&&(this.acceleration=setRangeValue(e.acceleration)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.inverse&&(this.inverse=e.inverse),void 0!==e.maxSpeed&&(this.maxSpeed=setRangeValue(e.maxSpeed)))}};let MovePath=class MovePath{constructor(){this.clamp=!0,this.delay=new ValueWithRandom,this.enable=!1,this.options={}}load(e){e&&(void 0!==e.clamp&&(this.clamp=e.clamp),this.delay.load(e.delay),void 0!==e.enable&&(this.enable=e.enable),this.generator=e.generator,e.options&&(this.options=deepExtend(this.options,e.options)))}};let MoveTrailFill=class MoveTrailFill{load(e){e&&(void 0!==e.color&&(this.color=OptionsColor.create(this.color,e.color)),void 0!==e.image&&(this.image=e.image))}};let MoveTrail=class MoveTrail{constructor(){this.enable=!1,this.length=10,this.fill=new MoveTrailFill}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.fill&&this.fill.load(e.fill),void 0!==e.length&&(this.length=e.length))}};(j=w||(w={})).bounce="bounce",j.none="none",j.out="out",j.destroy="destroy",j.split="split";let OutModes=class OutModes{constructor(){this.default=w.out}load(e){e&&(void 0!==e.default&&(this.default=e.default),this.bottom=e.bottom??e.default,this.left=e.left??e.default,this.right=e.right??e.default,this.top=e.top??e.default)}};let Spin=class Spin{constructor(){this.acceleration=0,this.enable=!1}load(e){e&&(void 0!==e.acceleration&&(this.acceleration=setRangeValue(e.acceleration)),void 0!==e.enable&&(this.enable=e.enable),e.position&&(this.position=deepExtend({},e.position)))}};let Move=class Move{constructor(){this.angle=new MoveAngle,this.attract=new MoveAttract,this.center=new MoveCenter,this.decay=0,this.distance={},this.direction=a.none,this.drift=0,this.enable=!1,this.gravity=new MoveGravity,this.path=new MovePath,this.outModes=new OutModes,this.random=!1,this.size=!1,this.speed=2,this.spin=new Spin,this.straight=!1,this.trail=new MoveTrail,this.vibrate=!1,this.warp=!1}load(e){if(!e)return;this.angle.load(isNumber(e.angle)?{value:e.angle}:e.angle),this.attract.load(e.attract),this.center.load(e.center),void 0!==e.decay&&(this.decay=setRangeValue(e.decay)),void 0!==e.direction&&(this.direction=e.direction),void 0!==e.distance&&(this.distance=isNumber(e.distance)?{horizontal:e.distance,vertical:e.distance}:{...e.distance}),void 0!==e.drift&&(this.drift=setRangeValue(e.drift)),void 0!==e.enable&&(this.enable=e.enable),this.gravity.load(e.gravity);let t=e.outModes;void 0!==t&&(isObject(t)?this.outModes.load(t):this.outModes.load({default:t})),this.path.load(e.path),void 0!==e.random&&(this.random=e.random),void 0!==e.size&&(this.size=e.size),void 0!==e.speed&&(this.speed=setRangeValue(e.speed)),this.spin.load(e.spin),void 0!==e.straight&&(this.straight=e.straight),this.trail.load(e.trail),void 0!==e.vibrate&&(this.vibrate=e.vibrate),void 0!==e.warp&&(this.warp=e.warp)}};let OpacityAnimation=class OpacityAnimation extends RangedAnimationOptions{constructor(){super(),this.destroy=r.none,this.speed=2}load(e){super.load(e),e&&void 0!==e.destroy&&(this.destroy=e.destroy)}};let Opacity=class Opacity extends RangedAnimationValueWithRandom{constructor(){super(),this.animation=new OpacityAnimation,this.value=1}load(e){if(!e)return;super.load(e);let t=e.animation;void 0!==t&&this.animation.load(t)}};let ParticlesDensity=class ParticlesDensity{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(e){if(!e)return;void 0!==e.enable&&(this.enable=e.enable);let t=e.width;void 0!==t&&(this.width=t);let i=e.height;void 0!==i&&(this.height=i)}};(N=x||(x={})).delete="delete",N.wait="wait";let ParticlesNumberLimit=class ParticlesNumberLimit{constructor(){this.mode=x.delete,this.value=0}load(e){e&&(void 0!==e.mode&&(this.mode=e.mode),void 0!==e.value&&(this.value=e.value))}};let ParticlesNumber=class ParticlesNumber{constructor(){this.density=new ParticlesDensity,this.limit=new ParticlesNumberLimit,this.value=0}load(e){e&&(this.density.load(e.density),this.limit.load(e.limit),void 0!==e.value&&(this.value=e.value))}};let Shadow=class Shadow{constructor(){this.blur=0,this.color=new OptionsColor,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(e){e&&(void 0!==e.blur&&(this.blur=e.blur),this.color=OptionsColor.create(this.color,e.color),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.offset&&(void 0!==e.offset.x&&(this.offset.x=e.offset.x),void 0!==e.offset.y&&(this.offset.y=e.offset.y)))}};let Shape=class Shape{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(e){if(!e)return;let t=e.options;if(void 0!==t)for(let e in t){let i=t[e];i&&(this.options[e]=deepExtend(this.options[e]??{},i))}void 0!==e.close&&(this.close=e.close),void 0!==e.fill&&(this.fill=e.fill),void 0!==e.type&&(this.type=e.type)}};let SizeAnimation=class SizeAnimation extends RangedAnimationOptions{constructor(){super(),this.destroy=r.none,this.speed=5}load(e){super.load(e),e&&void 0!==e.destroy&&(this.destroy=e.destroy)}};let Size=class Size extends RangedAnimationValueWithRandom{constructor(){super(),this.animation=new SizeAnimation,this.value=3}load(e){if(super.load(e),!e)return;let t=e.animation;void 0!==t&&this.animation.load(t)}};let Stroke=class Stroke{constructor(){this.width=0}load(e){e&&(void 0!==e.color&&(this.color=AnimatableColor.create(this.color,e.color)),void 0!==e.width&&(this.width=setRangeValue(e.width)),void 0!==e.opacity&&(this.opacity=setRangeValue(e.opacity)))}};let ZIndex=class ZIndex extends ValueWithRandom{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(e){super.load(e),e&&(void 0!==e.opacityRate&&(this.opacityRate=e.opacityRate),void 0!==e.sizeRate&&(this.sizeRate=e.sizeRate),void 0!==e.velocityRate&&(this.velocityRate=e.velocityRate))}};let ParticlesOptions=class ParticlesOptions{constructor(e,t){this._engine=e,this._container=t,this.bounce=new ParticlesBounce,this.collisions=new Collisions,this.color=new AnimatableColor,this.color.value="#fff",this.effect=new Effect,this.groups={},this.move=new Move,this.number=new ParticlesNumber,this.opacity=new Opacity,this.reduceDuplicates=!1,this.shadow=new Shadow,this.shape=new Shape,this.size=new Size,this.stroke=new Stroke,this.zIndex=new ZIndex}load(e){if(!e)return;if(void 0!==e.groups)for(let t of Object.keys(e.groups)){if(!Object.hasOwn(e.groups,t))continue;let i=e.groups[t];void 0!==i&&(this.groups[t]=deepExtend(this.groups[t]??{},i))}void 0!==e.reduceDuplicates&&(this.reduceDuplicates=e.reduceDuplicates),this.bounce.load(e.bounce),this.color.load(AnimatableColor.create(this.color,e.color)),this.effect.load(e.effect),this.move.load(e.move),this.number.load(e.number),this.opacity.load(e.opacity),this.shape.load(e.shape),this.size.load(e.size),this.shadow.load(e.shadow),this.zIndex.load(e.zIndex),this.collisions.load(e.collisions),void 0!==e.interactivity&&(this.interactivity=deepExtend({},e.interactivity));let t=e.stroke;if(t&&(this.stroke=executeOnSingleOrMultiple(t,e=>{let t=new Stroke;return t.load(e),t})),this._container){let t=this._engine.updaters.get(this._container);if(t)for(let i of t)i.loadOptions&&i.loadOptions(this,e);let i=this._engine.interactors.get(this._container);if(i)for(let t of i)t.loadParticlesOptions&&t.loadParticlesOptions(this,e)}}};function loadOptions(e,...t){for(let i of t)e.load(i)}function loadParticlesOptions(e,t,...i){let a=new ParticlesOptions(e,t);return loadOptions(a,...i),a}let Options=class Options{constructor(e,t){this._findDefaultTheme=e=>this.themes.find(t=>t.default.value&&t.default.mode===e)??this.themes.find(e=>e.default.value&&e.default.mode===y.any),this._importPreset=e=>{this.load(this._engine.getPreset(e))},this._engine=e,this._container=t,this.autoPlay=!0,this.background=new Background,this.backgroundMask=new BackgroundMask,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new FullScreen,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new Interactivity(e,t),this.manualParticles=[],this.particles=loadParticlesOptions(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(e){if(!e)return;void 0!==e.preset&&executeOnSingleOrMultiple(e.preset,e=>this._importPreset(e)),void 0!==e.autoPlay&&(this.autoPlay=e.autoPlay),void 0!==e.clear&&(this.clear=e.clear),void 0!==e.key&&(this.key=e.key),void 0!==e.name&&(this.name=e.name),void 0!==e.delay&&(this.delay=setRangeValue(e.delay));let t=e.detectRetina;void 0!==t&&(this.detectRetina=t),void 0!==e.duration&&(this.duration=setRangeValue(e.duration));let i=e.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==e.pauseOnBlur&&(this.pauseOnBlur=e.pauseOnBlur),void 0!==e.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=e.pauseOnOutsideViewport),void 0!==e.zLayers&&(this.zLayers=e.zLayers),this.background.load(e.background);let a=e.fullScreen;isBoolean(a)?this.fullScreen.enable=a:this.fullScreen.load(a),this.backgroundMask.load(e.backgroundMask),this.interactivity.load(e.interactivity),e.manualParticles&&(this.manualParticles=e.manualParticles.map(e=>{let t=new ManualParticle;return t.load(e),t})),this.particles.load(e.particles),this.style=deepExtend(this.style,e.style),this._engine.loadOptions(this,e),void 0!==e.smooth&&(this.smooth=e.smooth);let s=this._engine.interactors.get(this._container);if(s)for(let t of s)t.loadOptions&&t.loadOptions(this,e);if(void 0!==e.responsive)for(let t of e.responsive){let e=new Responsive;e.load(t),this.responsive.push(e)}if(this.responsive.sort((e,t)=>e.maxWidth-t.maxWidth),void 0!==e.themes)for(let t of e.themes){let e=this.themes.find(e=>e.name===t.name);if(e)e.load(t);else{let e=new Theme;e.load(t),this.themes.push(e)}}this.defaultThemes.dark=this._findDefaultTheme(y.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(y.light)?.name}setResponsive(e,t,i){this.load(i);let a=this.responsive.find(i=>i.mode===v.screen&&screen?i.maxWidth>screen.availWidth:i.maxWidth*t>e);return this.load(a?.options),a?.maxWidth}setTheme(e){if(e){let t=this.themes.find(t=>t.name===e);t&&this.load(t.options)}else{let e=safeMatchMedia("(prefers-color-scheme: dark)"),t=e?.matches,i=this._findDefaultTheme(t?y.dark:y.light);i&&this.load(i.options)}}};($=_||(_={})).external="external",$.particles="particles";let InteractionManager=class InteractionManager{constructor(e,t){this.container=t,this._engine=e,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(e){for(let t of this._externalInteractors)t.isEnabled()&&t.interact(e)}handleClickMode(e){for(let t of this._externalInteractors)t.handleClickMode?.(e)}async init(){for(let e of(this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[],this._interactors)){switch(e.type){case _.external:this._externalInteractors.push(e);break;case _.particles:this._particleInteractors.push(e)}e.init()}}particlesInteract(e,t){for(let i of this._externalInteractors)i.clear(e,t);for(let i of this._particleInteractors)i.isEnabled(e)&&i.interact(e,t)}reset(e){for(let t of this._externalInteractors)t.isEnabled()&&t.reset(e);for(let t of this._particleInteractors)t.isEnabled(e)&&t.reset(e)}};(Y=C||(C={})).normal="normal",Y.inside="inside",Y.outside="outside";let ey=0,eb="random";function fixOutMode(e){if(!isInArray(e.outMode,e.checkModes))return;let t=2*e.radius;e.coord>e.maxCoord-t?e.setCb(-e.radius):e.coord<t&&e.setCb(e.radius)}let Particle=class Particle{constructor(e,t){this.container=t,this._calcPosition=(e,t,i,a=ey)=>{var s;for(let[,a]of e.plugins){let e=void 0!==a.particlePosition?a.particlePosition(t,this):void 0;if(e)return Vector3d.create(e.x,e.y,i)}let o=e.canvas.size,r=(s={size:o,position:t},{x:s.position?.x??getRandom()*s.size.width,y:s.position?.y??getRandom()*s.size.height}),l=Vector3d.create(r.x,r.y,i),c=this.getRadius(),d=this.options.move.outModes,fixHorizontal=t=>{fixOutMode({outMode:t,checkModes:[w.bounce],coord:l.x,maxCoord:e.canvas.size.width,setCb:e=>l.x+=e,radius:c})},fixVertical=t=>{fixOutMode({outMode:t,checkModes:[w.bounce],coord:l.y,maxCoord:e.canvas.size.height,setCb:e=>l.y+=e,radius:c})};return(fixHorizontal(d.left??d.default),fixHorizontal(d.right??d.default),fixVertical(d.top??d.default),fixVertical(d.bottom??d.default),this._checkOverlap(l,a))?this._calcPosition(e,void 0,i,a+1):l},this._calculateVelocity=()=>{let e=function(e){let t=Vector.origin;return t.length=1,t.angle=e,t}(this.direction),t=e.copy(),i=this.options.move;if(i.direction===a.inside||i.direction===a.outside)return t;let s=degToRad(getRangeValue(i.angle.value)),o=degToRad(getRangeValue(i.angle.offset)),r={left:o-.5*s,right:o+.5*s};return i.straight||(t.angle+=randomInRange(setRangeValue(r.left,r.right))),i.random&&"number"==typeof i.speed&&(t.length*=getRandom()),t},this._checkOverlap=(e,t=ey)=>{let i=this.options.collisions,a=this.getRadius();if(!i.enable)return!1;let s=i.overlap;if(s.enable)return!1;let o=s.retries;if(o>=0&&t>o)throw Error(`${es} particle is overlapping and can't be placed`);return!!this.container.particles.find(t=>getDistance(e,t.position)<a+t.getRadius())},this._getRollColor=e=>{if(!e||!this.roll||!this.backColor&&!this.roll.alter)return e;let t=this.roll.horizontal&&this.roll.vertical?2:1,i=this.roll.horizontal?.5*Math.PI:0,a=Math.floor(((this.roll.angle??0)+i)/(Math.PI/t))%2;if(!a)return e;if(this.backColor)return this.backColor;if(this.roll.alter){var s,o;return s=this.roll.alter.type,o=this.roll.alter.value,{h:e.h,s:e.s,l:e.l+(s===h.darken?-1:1)*o}}return e},this._initPosition=e=>{let t=this.container,i=getRangeValue(this.options.zIndex.value);this.position=this._calcPosition(t,e,clamp(i,0,t.zLayers)),this.initialPosition=this.position.copy();let s=t.canvas.size;switch(this.moveCenter={...getPosition(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??c.percent},this.direction=function(e,t,i){if(isNumber(e))return degToRad(e);switch(e){case a.top:return-(.5*Math.PI);case a.topRight:return-(.25*Math.PI);case a.right:return 0;case a.bottomRight:return .25*Math.PI;case a.bottom:return .5*Math.PI;case a.bottomLeft:return .75*Math.PI;case a.left:return Math.PI;case a.topLeft:return-(.75*Math.PI);case a.inside:return Math.atan2(i.y-t.y,i.x-t.x);case a.outside:return Math.atan2(t.y-i.y,t.x-i.x);default:return getRandom()*eu}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case a.inside:this.outType=C.inside;break;case a.outside:this.outType=C.outside}this.offset=Vector.origin},this._engine=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;let t=this.container,i=this.pathGenerator,a=t.shapeDrawers.get(this.shape);for(let[,i]of(a?.particleDestroy?.(this),t.plugins))i.particleDestroyed?.(this,e);for(let i of t.particles.updaters)i.particleDestroyed?.(this,e);i?.reset(this),this._engine.dispatchEvent(g.particleDestroyed,{container:this.container,data:{particle:this}})}draw(e){let t=this.container,i=t.canvas;for(let[,a]of t.plugins)i.drawParticlePlugin(a,this,e);i.drawParticle(this,e)}getFillColor(){return this._getRollColor(this.bubble.color??getHslFromAnimation(this.color))}getMass(){return this.getRadius()**2*Math.PI*.5}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){return this.bubble.radius??this.size.value}getStrokeColor(){return this._getRollColor(this.bubble.color??getHslFromAnimation(this.strokeColor))}init(e,t,i,a){let s=this.container,o=this._engine;this.id=e,this.group=a,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=C.normal,this.ignoresResizeRatio=!0;let r=s.retina.pixelRatio,l=s.actualOptions,c=loadParticlesOptions(this._engine,s,l.particles),{reduceDuplicates:d}=c,h=c.effect.type,u=c.shape.type;this.effect=itemFromSingleOrMultiple(h,this.id,d),this.shape=itemFromSingleOrMultiple(u,this.id,d);let p=c.effect,g=c.shape;if(i){if(i.effect?.type){let e=i.effect.type,t=itemFromSingleOrMultiple(e,this.id,d);t&&(this.effect=t,p.load(i.effect))}if(i.shape?.type){let e=i.shape.type,t=itemFromSingleOrMultiple(e,this.id,d);t&&(this.shape=t,g.load(i.shape))}}if(this.effect===eb){let e=[...this.container.effectDrawers.keys()];this.effect=e[Math.floor(Math.random()*e.length)]}if(this.shape===eb){let e=[...this.container.shapeDrawers.keys()];this.shape=e[Math.floor(Math.random()*e.length)]}this.effectData=function(e,t,i,a){let s=t.options[e];if(s)return deepExtend({close:t.close,fill:t.fill},itemFromSingleOrMultiple(s,i,a))}(this.effect,p,this.id,d),this.shapeData=function(e,t,i,a){let s=t.options[e];if(s)return deepExtend({close:t.close,fill:t.fill},itemFromSingleOrMultiple(s,i,a))}(this.shape,g,this.id,d),c.load(i);let m=this.effectData;m&&c.load(m.particles);let v=this.shapeData;v&&c.load(v.particles);let y=new Interactivity(o,s);y.load(s.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=m?.fill??c.effect.fill,this.effectClose=m?.close??c.effect.close,this.shapeFill=v?.fill??c.shape.fill,this.shapeClose=v?.close??c.shape.close,this.options=c;let b=this.options.move.path;this.pathDelay=getRangeValue(b.delay.value)*er,b.generator&&(this.pathGenerator=this._engine.getPathGenerator(b.generator),this.pathGenerator&&s.addPath(b.generator,this.pathGenerator)&&this.pathGenerator.init(s)),s.retina.initParticle(this),this.size=initParticleNumericAnimationValue(this.options.size,r),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(t),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-getRangeValue(this.options.move.decay);let w=s.particles;w.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/s.zLayers,this.sides=24;let x=s.effectDrawers.get(this.effect);!x&&(x=this._engine.getEffectDrawer(this.effect))&&s.effectDrawers.set(this.effect,x),x?.loadEffect&&x.loadEffect(this);let _=s.shapeDrawers.get(this.shape);!_&&(_=this._engine.getShapeDrawer(this.shape))&&s.shapeDrawers.set(this.shape,_),_?.loadShape&&_.loadShape(this);let k=_?.getSidesCount;for(let e of(k&&(this.sides=k(this)),this.spawning=!1,this.shadowColor=rangeColorToRgb(this.options.shadow.color),w.updaters))e.init(this);for(let e of w.movers)e.init?.(this);for(let[,e]of(x?.particleInit?.(s,this),_?.particleInit?.(s,this),s.plugins))e.particleCreated?.(this)}isInsideCanvas(){let e=this.getRadius(),t=this.container.canvas.size,i=this.position;return i.x>=-e&&i.y>=-e&&i.y<=t.height+e&&i.x<=t.width+e}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(let e of this.container.particles.updaters)e.reset?.(this)}};let Point=class Point{constructor(e,t){this.position=e,this.particle=t}};(Z=k||(k={})).circle="circle",Z.rectangle="rectangle";let BaseRange=class BaseRange{constructor(e,t,i){this.position={x:e,y:t},this.type=i}};let Circle=class Circle extends BaseRange{constructor(e,t,i){super(e,t,k.circle),this.radius=i}contains(e){return getDistance(e,this.position)<=this.radius}intersects(e){let t=this.position,i=e.position,a={x:Math.abs(i.x-t.x),y:Math.abs(i.y-t.y)},s=this.radius;if(e instanceof Circle||e.type===k.circle){let t=s+e.radius,i=Math.sqrt(a.x**2+a.y**2);return t>i}if(e instanceof Rectangle||e.type===k.rectangle){let{width:t,height:i}=e.size,o=Math.pow(a.x-t,2)+Math.pow(a.y-i,2);return o<=s**2||a.x<=s+t&&a.y<=s+i||a.x<=t||a.y<=i}return!1}};let Rectangle=class Rectangle extends BaseRange{constructor(e,t,i,a){super(e,t,k.rectangle),this.size={height:a,width:i}}contains(e){let t=this.size.width,i=this.size.height,a=this.position;return e.x>=a.x&&e.x<=a.x+t&&e.y>=a.y&&e.y<=a.y+i}intersects(e){if(e instanceof Circle)return e.intersects(this);let t=this.size.width,i=this.size.height,a=this.position,s=e.position,o=e instanceof Rectangle?e.size:{width:0,height:0},r=o.width,l=o.height;return s.x<a.x+t&&s.x+r>a.x&&s.y<a.y+i&&s.y+l>a.y}};let QuadTree=class QuadTree{constructor(e,t){this.rectangle=e,this.capacity=t,this._subdivide=()=>{let{x:e,y:t}=this.rectangle.position,{width:i,height:a}=this.rectangle.size,{capacity:s}=this;for(let o=0;o<4;o++){let r=o%2;this._subs.push(new QuadTree(new Rectangle(e+.5*i*r,t+.5*a*(Math.round(.5*o)-r),.5*i,.5*a),s))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(e){return!!this.rectangle.contains(e.position)&&(this._points.length<this.capacity?(this._points.push(e),!0):(this._divided||this._subdivide(),this._subs.some(t=>t.insert(e))))}query(e,t){let i=[];if(!e.intersects(this.rectangle))return[];for(let a of this._points)!e.contains(a.position)&&getDistance(e.position,a.position)>a.particle.getRadius()&&(!t||t(a.particle))||i.push(a.particle);if(this._divided)for(let a of this._subs)i.push(...a.query(e,t));return i}queryCircle(e,t,i){return this.query(new Circle(e.x,e.y,t),i)}queryRectangle(e,t,i){return this.query(new Rectangle(e.x,e.y,t.width,t.height),i)}};let qTreeRectangle=e=>{let{height:t,width:i}=e;return new Rectangle(-.25*i,-.25*t,1.5*i,1.5*t)};let Particles=class Particles{constructor(e,t){this._addToPool=(...e)=>{this._pool.push(...e)},this._applyDensity=(e,t,i)=>{let a=e.number;if(!e.number.density?.enable){void 0===i?this._limit=a.limit.value:a.limit&&this._groupLimits.set(i,a.limit.value);return}let s=this._initDensityFactor(a.density),o=a.value,r=a.limit.value>0?a.limit.value:o,l=Math.min(o,r)*s+t,c=Math.min(this.count,this.filter(e=>e.group===i).length);void 0===i?this._limit=a.limit.value*s:this._groupLimits.set(i,a.limit.value*s),c<l?this.push(Math.abs(l-c),void 0,e,i):c>l&&this.removeQuantity(c-l,i)},this._initDensityFactor=e=>{let t=this._container;if(!t.canvas.element||!e.enable)return 1;let i=t.canvas.element,a=t.retina.pixelRatio;return i.width*i.height/(e.height*e.width*a**2)},this._pushParticle=(e,t,i,a)=>{try{let s=this._pool.pop();s||(s=new Particle(this._engine,this._container)),s.init(this._nextId,e,t,i);let o=!0;if(a&&(o=a(s)),!o)return;return this._array.push(s),this._zArray.push(s),this._nextId++,this._engine.dispatchEvent(g.particleAdded,{container:this._container,data:{particle:s}}),s}catch(e){ep.warning(`${es} adding particle: ${e}`)}},this._removeParticle=(e,t,i)=>{let a=this._array[e];if(!a||a.group!==t)return!1;let s=this._zArray.indexOf(a);return this._array.splice(e,1),this._zArray.splice(s,1),a.destroy(i),this._engine.dispatchEvent(g.particleRemoved,{container:this._container,data:{particle:a}}),this._addToPool(a),!0},this._engine=e,this._container=t,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new InteractionManager(e,t),this._pluginsInitialized=!1;let i=t.canvas.size;this.quadTree=new QuadTree(qTreeRectangle(i),4),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){let e=this._container,t=e.actualOptions;t.manualParticles.forEach(t=>this.addParticle(t.position?getPosition(t.position,e.canvas.size):void 0,t.options))}addParticle(e,t,i,a){let s=this._container.actualOptions.particles.number.limit.mode,o=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,r=this.count;if(o>0)switch(s){case x.delete:{let e=r+1-o;e>0&&this.removeQuantity(e);break}case x.wait:if(r>=o)return}return this._pushParticle(e,t,i,a)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(e){let t=this._container,i=t.canvas;for(let[,a]of(i.clear(),this.update(e),t.plugins))i.drawPlugin(a,e);for(let t of this._zArray)t.draw(e)}filter(e){return this._array.filter(e)}find(e){return this._array.find(e)}get(e){return this._array[e]}handleClickMode(e){this._interactionManager.handleClickMode(e)}async init(){let e=this._container,t=e.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let i=!1;for(let[,t]of e.plugins)if(i=t.particlesInitialization?.()??i)break;if(this.addManualParticles(),!i){let e=t.particles,i=e.groups;for(let t in i){let a=i[t];for(let i=this.count,s=0;s<a.number?.value&&i<e.number.value;i++,s++)this.addParticle(void 0,a,t)}for(let t=this.count;t<e.number.value;t++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;let e=this._container;for(let[,t]of(this.movers=await this._engine.getMovers(e,!0),this.updaters=await this._engine.getUpdaters(e,!0),await this._interactionManager.init(),e.pathGenerators))t.init(e)}push(e,t,i,a){for(let s=0;s<e;s++)this.addParticle(t?.position,i,a)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(e,t,i){this.removeAt(this._array.indexOf(e),void 0,t,i)}removeAt(e,t=1,i,a){if(e<0||e>this.count)return;let s=0;for(let o=e;s<t&&o<this.count;o++)this._removeParticle(o--,i,a)&&s++}removeQuantity(e,t){this.removeAt(0,e,t)}setDensity(){let e=this._container.actualOptions,t=e.particles.groups;for(let e in t)this._applyDensity(t[e],0,e);this._applyDensity(e.particles,e.manualParticles.length)}setLastZIndex(e){this._lastZIndex=e,this._needsSort=this._needsSort||this._lastZIndex<e}setResizeFactor(e){this._resizeFactor=e}update(e){let t=this._container,i=new Set;for(let[,e]of(this.quadTree=new QuadTree(qTreeRectangle(t.canvas.size),4),t.pathGenerators))e.update();for(let[,i]of t.plugins)i.update?.(e);let a=this._resizeFactor;for(let t of this._array){for(let[,i]of(a&&!t.ignoresResizeRatio&&(t.position.x*=a.width,t.position.y*=a.height,t.initialPosition.x*=a.width,t.initialPosition.y*=a.height),t.ignoresResizeRatio=!1,this._interactionManager.reset(t),this._container.plugins)){if(t.destroyed)break;i.particleUpdate?.(t,e)}for(let i of this.movers)i.isEnabled(t)&&i.move(t,e);if(t.destroyed){i.add(t);continue}this.quadTree.insert(new Point(t.getPosition(),t))}if(i.size){let checkDelete=e=>!i.has(e);for(let e of(this._array=this.filter(checkDelete),this._zArray=this._zArray.filter(checkDelete),i))this._engine.dispatchEvent(g.particleRemoved,{container:this._container,data:{particle:e}});this._addToPool(...i)}for(let t of(this._interactionManager.externalInteract(e),this._array)){for(let i of this.updaters)i.update(t,e);t.destroyed||t.spawning||this._interactionManager.particlesInteract(t,e)}if(delete this._resizeFactor,this._needsSort){let e=this._zArray;e.sort((e,t)=>t.position.z-e.position.z||e.id-t.id),this._lastZIndex=e[e.length-1].position.z,this._needsSort=!1}}};let Retina=class Retina{constructor(e){this.container=e,this.pixelRatio=1,this.reduceFactor=1}init(){let e=this.container,t=e.actualOptions;this.pixelRatio=!t.detectRetina||isSsr()?1:window.devicePixelRatio,this.reduceFactor=1;let i=this.pixelRatio,a=e.canvas;if(a.element){let e=a.element;a.size.width=e.offsetWidth*i,a.size.height=e.offsetHeight*i}let s=t.particles,o=s.move;this.maxSpeed=getRangeValue(o.gravity.maxSpeed)*i,this.sizeAnimationSpeed=getRangeValue(s.size.animation.speed)*i}initParticle(e){let t=e.options,i=this.pixelRatio,a=t.move,s=a.distance,o=e.retina;o.moveDrift=getRangeValue(a.drift)*i,o.moveSpeed=getRangeValue(a.speed)*i,o.sizeAnimationSpeed=getRangeValue(t.size.animation.speed)*i;let r=o.maxDistance;r.horizontal=void 0!==s.horizontal?s.horizontal*i:void 0,r.vertical=void 0!==s.vertical?s.vertical*i:void 0,o.maxSpeed=getRangeValue(a.gravity.maxSpeed)*i}};function guardCheck(e){return e&&!e.destroyed}function loadContainerOptions(e,t,...i){let a=new Options(e,t);return loadOptions(a,...i),a}let Container=class Container{constructor(e,t,i){this._intersectionManager=e=>{if(guardCheck(this)&&this.actualOptions.pauseOnOutsideViewport)for(let t of e)t.target===this.interactivity.element&&(t.isIntersecting?this.play():this.pause())},this._nextFrame=e=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&e<this._lastFrameTime+er/this.fpsLimit){this.draw(!1);return}this._lastFrameTime??=e;let t=function(e,t=60,i=!1){return{value:e,factor:i?60/t:60*e/er}}(e-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(t.value),this._lastFrameTime=e,t.value>er){this.draw(!1);return}if(this.particles.draw(t),!this.alive()){this.destroy();return}this.animationStatus&&this.draw(!1)}catch(e){ep.error(`${es} in animation loop`,e)}},this._engine=e,this.id=Symbol(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._clickHandlers=new Map,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new Retina(this),this.canvas=new Canvas(this),this.particles=new Particles(this._engine,this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this._options=loadContainerOptions(this._engine,this),this.actualOptions=loadContainerOptions(this._engine,this),this._eventListeners=new EventListeners(this),this._intersectionObserver=function(e){if(!isSsr()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(e)}(e=>this._intersectionManager(e)),this._engine.dispatchEvent(g.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&guardCheck(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(e){if(!guardCheck(this))return;let t=this.interactivity.element;if(!t)return;let clickOrTouchHandler=(t,i,a)=>{if(!guardCheck(this))return;let s=this.retina.pixelRatio,o={x:i.x*s,y:i.y*s},r=this.particles.quadTree.queryCircle(o,a*s);e(t,r)},i=!1,a=!1;for(let[e,s]of(this._clickHandlers.set("click",e=>{if(!guardCheck(this))return;let t={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};clickOrTouchHandler(e,t,1)}),this._clickHandlers.set("touchstart",()=>{guardCheck(this)&&(i=!0,a=!1)}),this._clickHandlers.set("touchmove",()=>{guardCheck(this)&&(a=!0)}),this._clickHandlers.set("touchend",e=>{if(guardCheck(this)){if(i&&!a){let t=e.touches[e.touches.length-1];if(!t&&!(t=e.changedTouches[e.changedTouches.length-1]))return;let i=this.canvas.element,a=i?i.getBoundingClientRect():void 0,s={x:t.clientX-(a?a.left:0),y:t.clientY-(a?a.top:0)};clickOrTouchHandler(e,s,Math.max(t.radiusX,t.radiusY))}i=!1,a=!1}}),this._clickHandlers.set("touchcancel",()=>{guardCheck(this)&&(i=!1,a=!1)}),this._clickHandlers))t.addEventListener(e,s)}addLifeTime(e){this._lifeTime+=e}addPath(e,t,i=!1){return!(!guardCheck(this)||!i&&this.pathGenerators.has(e))&&(this.pathGenerators.set(e,t),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(guardCheck(this)){for(let[e,t]of this._clickHandlers)this.interactivity.element?.removeEventListener(e,t);this._clickHandlers.clear()}}destroy(e=!0){if(guardCheck(this)){for(let[,e]of(this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy(),this.effectDrawers))e.destroy?.(this);for(let[,e]of this.shapeDrawers)e.destroy?.(this);for(let e of this.effectDrawers.keys())this.effectDrawers.delete(e);for(let e of this.shapeDrawers.keys())this.shapeDrawers.delete(e);if(this._engine.clearPlugins(this),this.destroyed=!0,e){let e=this._engine.items,t=e.findIndex(e=>e===this);t>=0&&e.splice(t,1)}this._engine.dispatchEvent(g.containerDestroyed,{container:this})}}draw(e){if(!guardCheck(this))return;let t=e,frame=e=>{t&&(this._lastFrameTime=void 0,t=!1),this._nextFrame(e)};this._drawAnimationFrame=ed.nextFrame(e=>frame(e))}async export(e,t={}){for(let[,i]of this.plugins){if(!i.export)continue;let a=await i.export(e,t);if(a.supported)return a.blob}ep.error(`${es} - Export plugin with type ${e} not found`)}handleClickMode(e){if(guardCheck(this))for(let[,t]of(this.particles.handleClickMode(e),this.plugins))t.handleClickMode?.(e)}async init(){if(!guardCheck(this))return;let e=this._engine.getSupportedEffects();for(let t of e){let e=this._engine.getEffectDrawer(t);e&&this.effectDrawers.set(t,e)}let t=this._engine.getSupportedShapes();for(let e of t){let t=this._engine.getShapeDrawer(e);t&&this.shapeDrawers.set(e,t)}await this.particles.initPlugins(),this._options=loadContainerOptions(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=loadContainerOptions(this._engine,this,this._options);let i=await this._engine.getAvailablePlugins(this);for(let[e,t]of i)this.plugins.set(e,t);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();let{zLayers:a,duration:s,delay:o,fpsLimit:r,smooth:l}=this.actualOptions;for(let[,e]of(this.zLayers=a,this._duration=getRangeValue(s)*er,this._delay=getRangeValue(o)*er,this._lifeTime=0,this.fpsLimit=r>0?r:120,this._smooth=l,this.effectDrawers))await e.init?.(this);for(let[,e]of this.shapeDrawers)await e.init?.(this);for(let[,e]of this.plugins)await e.init?.();for(let[,e]of(this._engine.dispatchEvent(g.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity(),this.plugins))e.particlesSetup?.();this._engine.dispatchEvent(g.particlesSetup,{container:this})}async loadTheme(e){guardCheck(this)&&(this._currentTheme=e,await this.refresh())}pause(){if(guardCheck(this)){if(void 0!==this._drawAnimationFrame){var e;e=this._drawAnimationFrame,ed.cancel(e),delete this._drawAnimationFrame}if(!this._paused){for(let[,e]of this.plugins)e.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(g.containerPaused,{container:this})}}}play(e){if(!guardCheck(this))return;let t=this._paused||e;if(this._firstStart&&!this.actualOptions.autoPlay){this._firstStart=!1;return}if(this._paused&&(this._paused=!1),t)for(let[,e]of this.plugins)e.play&&e.play();this._engine.dispatchEvent(g.containerPlay,{container:this}),this.draw(t??!1)}async refresh(){if(guardCheck(this))return this.stop(),this.start()}async reset(e){if(guardCheck(this))return this._initialSourceOptions=e,this._sourceOptions=e,this._options=loadContainerOptions(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=loadContainerOptions(this._engine,this,this._options),this.refresh()}async start(){guardCheck(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{let start=async()=>{for(let[,e]of(this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element),this.plugins))await e.start?.();this._engine.dispatchEvent(g.containerStarted,{container:this}),this.play(),e()};this._delayTimeout=setTimeout(()=>void start(),this._delay)}))}stop(){if(guardCheck(this)&&this.started){for(let[,e]of(this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element),this.plugins))e.stop?.();for(let e of this.plugins.keys())this.plugins.delete(e);this._sourceOptions=this._options,this._engine.dispatchEvent(g.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];let e=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==e&&(this._responsiveMaxWidth=e,!0)}};let EventDispatcher=class EventDispatcher{constructor(){this._listeners=new Map}addEventListener(e,t){this.removeEventListener(e,t);let i=this._listeners.get(e);i||(i=[],this._listeners.set(e,i)),i.push(t)}dispatchEvent(e,t){let i=this._listeners.get(e);i?.forEach(e=>e(t))}hasEventListener(e){return!!this._listeners.get(e)}removeAllEventListeners(e){e?this._listeners.delete(e):this._listeners=new Map}removeEventListener(e,t){let i=this._listeners.get(e);if(!i)return;let a=i.length,s=i.indexOf(t);s<0||(1===a?this._listeners.delete(e):i.splice(s,1))}};async function getItemsFromInitializer(e,t,i,a=!1){let s=t.get(e);return(!s||a)&&(s=await Promise.all([...i.values()].map(t=>t(e))),t.set(e,s)),s}async function getDataFromUrl(e){let t=itemFromSingleOrMultiple(e.url,e.index);if(!t)return e.fallback;let i=await fetch(t);return i.ok?await i.json():(ep.error(`${es} ${i.status} while retrieving config file`),e.fallback)}let ew="true",ex="false",e_="canvas",getCanvasFromContainer=e=>{let t;if(e instanceof HTMLCanvasElement||e.tagName.toLowerCase()===e_)(t=e).dataset[et]||(t.dataset[et]=ex);else{let i=e.getElementsByTagName(e_);i.length?(t=i[0]).dataset[et]=ex:((t=document.createElement(e_)).dataset[et]=ew,e.appendChild(t))}let i="100%";return t.style.width||(t.style.width=i),t.style.height||(t.style.height=i),t},getDomContainer=(e,t)=>{let i=t??document.getElementById(e);return i||((i=document.createElement("div")).id=e,i.dataset[et]=ew,document.body.append(i)),i};let Engine=class Engine{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new EventDispatcher,this._initialized=!1,this.plugins=[],this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){let e={};for(let[t,i]of this._configs)e[t]=i;return e}get items(){return this._domArray}get version(){return"3.5.0"}addConfig(e){let t=e.key??e.name??"default";this._configs.set(t,e),this._eventDispatcher.dispatchEvent(g.configAdded,{data:{name:t,config:e}})}async addEffect(e,t,i=!0){executeOnSingleOrMultiple(e,e=>{this.getEffectDrawer(e)||this.effectDrawers.set(e,t)}),await this.refresh(i)}addEventListener(e,t){this._eventDispatcher.addEventListener(e,t)}async addInteractor(e,t,i=!0){this._initializers.interactors.set(e,t),await this.refresh(i)}async addMover(e,t,i=!0){this._initializers.movers.set(e,t),await this.refresh(i)}async addParticleUpdater(e,t,i=!0){this._initializers.updaters.set(e,t),await this.refresh(i)}async addPathGenerator(e,t,i=!0){this.getPathGenerator(e)||this.pathGenerators.set(e,t),await this.refresh(i)}async addPlugin(e,t=!0){this.getPlugin(e.id)||this.plugins.push(e),await this.refresh(t)}async addPreset(e,t,i=!1,a=!0){(i||!this.getPreset(e))&&this.presets.set(e,t),await this.refresh(a)}async addShape(e,t=!0){for(let t of e.validTypes)this.getShapeDrawer(t)||this.shapeDrawers.set(t,e);await this.refresh(t)}clearPlugins(e){this.updaters.delete(e),this.movers.delete(e),this.interactors.delete(e)}dispatchEvent(e,t){this._eventDispatcher.dispatchEvent(e,t)}dom(){return this.items}domItem(e){return this.item(e)}async getAvailablePlugins(e){let t=new Map;for(let i of this.plugins)i.needsPlugin(e.actualOptions)&&t.set(i.id,await i.getPlugin(e));return t}getEffectDrawer(e){return this.effectDrawers.get(e)}async getInteractors(e,t=!1){return getItemsFromInitializer(e,this.interactors,this._initializers.interactors,t)}async getMovers(e,t=!1){return getItemsFromInitializer(e,this.movers,this._initializers.movers,t)}getPathGenerator(e){return this.pathGenerators.get(e)}getPlugin(e){return this.plugins.find(t=>t.id===e)}getPreset(e){return this.presets.get(e)}getShapeDrawer(e){return this.shapeDrawers.get(e)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(e,t=!1){return getItemsFromInitializer(e,this.updaters,this._initializers.updaters,t)}init(){this._initialized||(this._initialized=!0)}item(e){let{items:t}=this,i=t[e];if(!i||i.destroyed){t.splice(e,1);return}return i}async load(e){let t=e.id??e.element?.id??`tsparticles${Math.floor(1e4*getRandom())}`,{index:i,url:a}=e,s=a?await getDataFromUrl({fallback:e.options,url:a,index:i}):e.options,o=itemFromSingleOrMultiple(s,i),{items:r}=this,l=r.findIndex(e=>e.id.description===t),c=new Container(this,t,o);if(l>=0){let e=this.item(l);e&&!e.destroyed&&e.destroy(!1),r.splice(l,e?1:0,c)}else r.push(c);let d=getDomContainer(t,e.element),h=getCanvasFromContainer(d);return c.canvas.loadCanvas(h),await c.start(),c}loadOptions(e,t){this.plugins.forEach(i=>i.loadOptions?.(e,t))}loadParticlesOptions(e,t,...i){let a=this.updaters.get(e);a&&a.forEach(e=>e.loadOptions?.(t,...i))}async refresh(e=!0){e&&await Promise.all(this.items.map(e=>e.refresh()))}removeEventListener(e,t){this._eventDispatcher.removeEventListener(e,t)}setOnClickHandler(e){let{items:t}=this;if(!t.length)throw Error(`${es} can only set click handlers after calling tsParticles.load()`);t.forEach(t=>t.addClickHandler(e))}};(K=R||(R={}))[K.h=1]="h",K[K.s=2]="s",K[K.l=3]="l",K[K.a=5]="a";let HslColorManager=class HslColorManager{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(e){let t=e.value,i=t.hsl??e.value;if(void 0!==i.h&&void 0!==i.s&&void 0!==i.l)return hslToRgb(i)}handleRangeColor(e){let t=e.value,i=t.hsl??e.value;if(void 0!==i.h&&void 0!==i.l)return hslToRgb({h:getRangeValue(i.h),l:getRangeValue(i.l),s:getRangeValue(i.s)})}parseString(e){if(!e.startsWith("hsl"))return;let t=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(e);return t?function(e){let t=hslToRgb(e);return{a:e.a,b:t.b,g:t.g,r:t.r}}({a:t.length>4?parseAlpha(t[R.a]):1,h:parseInt(t[R.h],10),l:parseInt(t[R.l],10),s:parseInt(t[R.s],10)}):void 0}};(X=O||(O={}))[X.r=1]="r",X[X.g=2]="g",X[X.b=3]="b",X[X.a=5]="a";let RgbColorManager=class RgbColorManager{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(e){let t=e.value,i=t.rgb??e.value;if(void 0!==i.r)return i}handleRangeColor(e){let t=e.value,i=t.rgb??e.value;if(void 0!==i.r)return{r:getRangeValue(i.r),g:getRangeValue(i.g),b:getRangeValue(i.b)}}parseString(e){if(!e.startsWith(this.stringPrefix))return;let t=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(e);return t?{a:t.length>4?parseAlpha(t[O.a]):1,b:parseInt(t[O.b],10),g:parseInt(t[O.g],10),r:parseInt(t[O.r],10)}:void 0}};let ExternalInteractorBase=class ExternalInteractorBase{constructor(e){this.type=_.external,this.container=e}};let ParticlesInteractorBase=class ParticlesInteractorBase{constructor(e){this.type=_.particles,this.container=e}};(Q=M||(M={})).clockwise="clockwise",Q.counterClockwise="counter-clockwise",Q.random="random",(J=S||(S={})).linear="linear",J.radial="radial",J.random="random",(ee=P||(P={})).easeInBack="ease-in-back",ee.easeInCirc="ease-in-circ",ee.easeInCubic="ease-in-cubic",ee.easeInLinear="ease-in-linear",ee.easeInQuad="ease-in-quad",ee.easeInQuart="ease-in-quart",ee.easeInQuint="ease-in-quint",ee.easeInExpo="ease-in-expo",ee.easeInSine="ease-in-sine",ee.easeOutBack="ease-out-back",ee.easeOutCirc="ease-out-circ",ee.easeOutCubic="ease-out-cubic",ee.easeOutLinear="ease-out-linear",ee.easeOutQuad="ease-out-quad",ee.easeOutQuart="ease-out-quart",ee.easeOutQuint="ease-out-quint",ee.easeOutExpo="ease-out-expo",ee.easeOutSine="ease-out-sine",ee.easeInOutBack="ease-in-out-back",ee.easeInOutCirc="ease-in-out-circ",ee.easeInOutCubic="ease-in-out-cubic",ee.easeInOutLinear="ease-in-out-linear",ee.easeInOutQuad="ease-in-out-quad",ee.easeInOutQuart="ease-in-out-quart",ee.easeInOutQuint="ease-in-out-quint",ee.easeInOutExpo="ease-in-out-expo",ee.easeInOutSine="ease-in-out-sine";let eC=function(){let e=new RgbColorManager,t=new HslColorManager;addColorManager(e),addColorManager(t);let i=new Engine;return i.init(),i}();isSsr()||(window.tsParticles=eC)},37119:function(e,t,i){"use strict";i.d(t,{ZP:function(){return f},bP:function(){return n}});var a=i(1455),s=i(85893),o=i(67294);let f=e=>{let t=e.id??"tsparticles";return(0,o.useEffect)(()=>{let i;return a.S6T.load({id:t,url:e.url,options:e.options}).then(t=>{var a;i=t,null==(a=e.particlesLoaded)||a.call(e,t)}),()=>{null==i||i.destroy()}},[t,e,e.url,e.options]),(0,s.jsx)("div",{id:t,className:e.className})};async function n(e){await e(a.S6T)}},47360:function(e,t,i){"use strict";i.d(t,{S:function(){return loadSlim}});var a,s,o,r,l,c,d=i(1455);let BaseMover=class BaseMover{init(e){let t=e.options,i=t.move.gravity;e.gravity={enable:i.enable,acceleration:(0,d.Gu7)(i.acceleration),inverse:i.inverse},function(e){let t=e.container,i=e.options,a=i.move.spin;if(!a.enable)return;let s=a.position??{x:50,y:50},o={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},r=e.getPosition(),l=(0,d.Spd)(r,o),c=(0,d.Gu7)(a.acceleration);e.retina.spinAcceleration=c*t.retina.pixelRatio,e.spin={center:o,direction:e.velocity.x>=0?d.RnL.clockwise:d.RnL.counterClockwise,angle:e.velocity.angle,radius:l,acceleration:e.retina.spinAcceleration}}(e)}isEnabled(e){return!e.destroyed&&e.options.move.enable}move(e,t){let i=e.options,a=i.move;if(!a.enable)return;let s=e.container,o=s.retina.pixelRatio;e.retina.moveSpeed??=(0,d.Gu7)(a.speed)*o,e.retina.moveDrift??=(0,d.Gu7)(e.options.move.drift)*o;let r=e.slow.inRange?e.slow.factor:1,l=e.retina.moveSpeed*s.retina.reduceFactor,c=e.retina.moveDrift,h=(0,d.KIV)(i.size.value)*o,u=a.size?e.getRadius()/h:1,p=t.factor||1,g=l*u*r*p/2,m=e.retina.maxSpeed??s.retina.maxSpeed;a.spin.enable?function(e,t){let i=e.container;if(!e.spin)return;let a={x:e.spin.direction===d.RnL.clockwise?Math.cos:Math.sin,y:e.spin.direction===d.RnL.clockwise?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*a.x(e.spin.angle),e.position.y=e.spin.center.y+e.spin.radius*a.y(e.spin.angle),e.spin.radius+=e.spin.acceleration;let s=Math.max(i.canvas.size.width,i.canvas.size.height),o=.5*s;e.spin.radius>o?(e.spin.radius=o,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*t*(1-e.spin.radius/s)}(e,g):function(e,t,i,a,s,o){(function(e,t){let i=e.options,a=i.move.path,s=a.enable;if(!s)return;if(e.lastPathTime<=e.pathDelay){e.lastPathTime+=t.value;return}let o=e.pathGenerator?.generate(e,t);o&&e.velocity.addTo(o),a.clamp&&(e.velocity.x=(0,d.uZ5)(e.velocity.x,-1,1),e.velocity.y=(0,d.uZ5)(e.velocity.y,-1,1)),e.lastPathTime-=e.pathDelay})(e,o);let r=e.gravity,l=r?.enable&&r.inverse?-1:1;s&&i&&(e.velocity.x+=s*o.factor/(60*i)),r?.enable&&i&&(e.velocity.y+=l*(r.acceleration*o.factor)/(60*i));let c=e.moveDecay;e.velocity.multTo(c);let h=e.velocity.mult(i);r?.enable&&a>0&&(!r.inverse&&h.y>=0&&h.y>=a||r.inverse&&h.y<=0&&h.y<=-a)&&(h.y=l*a,i&&(e.velocity.y=h.y/i));let u=e.options.zIndex,p=(1-e.zIndexFactor)**u.velocityRate;h.multTo(p);let{position:g}=e;g.addTo(h),t.vibrate&&(g.x+=Math.sin(g.x*Math.cos(g.y)),g.y+=Math.cos(g.y*Math.sin(g.x)))}(e,a,g,m,c,t),function(e){let t=e.initialPosition,{dx:i,dy:a}=(0,d.oW6)(t,e.position),s=Math.abs(i),o=Math.abs(a),{maxDistance:r}=e.retina,l=r.horizontal,c=r.vertical;if(l||c){if((l&&s>=l||c&&o>=c)&&!e.misplaced)e.misplaced=!!l&&s>l||!!c&&o>c,l&&(e.velocity.x=.5*e.velocity.y-e.velocity.x),c&&(e.velocity.y=.5*e.velocity.x-e.velocity.y);else if((!l||s<l)&&(!c||o<c)&&e.misplaced)e.misplaced=!1;else if(e.misplaced){let i=e.position,a=e.velocity;l&&(i.x<t.x&&a.x<0||i.x>t.x&&a.x>0)&&(a.x*=-(0,d.sZz)()),c&&(i.y<t.y&&a.y<0||i.y>t.y&&a.y>0)&&(a.y*=-(0,d.sZz)())}}}(e)}};async function loadBaseMover(e,t=!0){await e.addMover("base",()=>Promise.resolve(new BaseMover),t)}let h=2*Math.PI;let CircleDrawer=class CircleDrawer{constructor(){this.validTypes=["circle"]}draw(e){!function(e){let{context:t,particle:i,radius:a}=e;i.circleRange||(i.circleRange={min:0,max:h});let s=i.circleRange;t.arc(0,0,a,s.min,s.max,!1)}(e)}getSidesCount(){return 12}particleInit(e,t){let i=t.shapeData,a=i?.angle??{max:360,min:0};t.circleRange=(0,d.Kn2)(a)?{min:(0,d.Idc)(a.min),max:(0,d.Idc)(a.max)}:{min:0,max:(0,d.Idc)(a)}}};async function loadCircleShape(e,t=!0){await e.addShape(new CircleDrawer,t)}let ColorUpdater=class ColorUpdater{constructor(e){this.container=e}init(e){let t=(0,d.lNs)(e.options.color,e.id,e.options.reduceDuplicates);t&&(e.color=(0,d.bS$)(t,e.options.color.animation,this.container.retina.reduceFactor))}isEnabled(e){let{h:t,s:i,l:a}=e.options.color.animation,{color:s}=e;return!e.destroyed&&!e.spawning&&(s?.h.value!==void 0&&t.enable||s?.s.value!==void 0&&i.enable||s?.l.value!==void 0&&a.enable)}update(e,t){(0,d.PBz)(e.color,t)}};async function loadColorUpdater(e,t=!0){await e.addParticleUpdater("color",e=>Promise.resolve(new ColorUpdater(e)),t)}let OpacityUpdater=class OpacityUpdater{constructor(e){this.container=e}init(e){let t=e.options.opacity;e.opacity=(0,d.V0)(t,1);let i=t.animation;i.enable&&(e.opacity.velocity=(0,d.Gu7)(i.speed)/d.tZy*this.container.retina.reduceFactor,i.sync||(e.opacity.velocity*=(0,d.sZz)()))}isEnabled(e){return!e.destroyed&&!e.spawning&&!!e.opacity&&e.opacity.enable&&((e.opacity.maxLoops??0)<=0||(e.opacity.maxLoops??0)>0&&(e.opacity.loops??0)<(e.opacity.maxLoops??0))}reset(e){e.opacity&&(e.opacity.time=0,e.opacity.loops=0)}update(e,t){this.isEnabled(e)&&e.opacity&&(0,d.CrJ)(e,e.opacity,!0,e.options.opacity.animation.destroy,t)}};async function loadOpacityUpdater(e,t=!0){await e.addParticleUpdater("opacity",e=>Promise.resolve(new OpacityUpdater(e)),t)}let BounceOutMode=class BounceOutMode{constructor(e){this.container=e,this.modes=[d.Voc.bounce,d.Voc.split]}update(e,t,i,a){if(!this.modes.includes(a))return;let s=this.container,o=!1;for(let[,a]of s.plugins)if(void 0!==a.particleBounce&&(o=a.particleBounce(e,i,t)),o)break;if(o)return;let r=e.getPosition(),l=e.offset,c=e.getRadius(),h=(0,d.M_G)(r,c),u=s.canvas.size;!function(e){if(e.outMode!==d.Voc.bounce&&e.outMode!==d.Voc.split||e.direction!==d.DYc.left&&e.direction!==d.DYc.right)return;e.bounds.right<0&&e.direction===d.DYc.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===d.DYc.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);let t=e.particle.velocity.x,i=!1;if(e.direction===d.DYc.right&&e.bounds.right>=e.canvasSize.width&&t>0||e.direction===d.DYc.left&&e.bounds.left<=0&&t<0){let t=(0,d.Gu7)(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,i=!0}if(!i)return;let a=e.offset.x+e.size;e.bounds.right>=e.canvasSize.width&&e.direction===d.DYc.right?e.particle.position.x=e.canvasSize.width-a:e.bounds.left<=0&&e.direction===d.DYc.left&&(e.particle.position.x=a),e.outMode===d.Voc.split&&e.particle.destroy()}({particle:e,outMode:a,direction:t,bounds:h,canvasSize:u,offset:l,size:c}),function(e){if(e.outMode!==d.Voc.bounce&&e.outMode!==d.Voc.split||e.direction!==d.DYc.bottom&&e.direction!==d.DYc.top)return;e.bounds.bottom<0&&e.direction===d.DYc.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===d.DYc.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);let t=e.particle.velocity.y,i=!1;if(e.direction===d.DYc.bottom&&e.bounds.bottom>=e.canvasSize.height&&t>0||e.direction===d.DYc.top&&e.bounds.top<=0&&t<0){let t=(0,d.Gu7)(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,i=!0}if(!i)return;let a=e.offset.y+e.size;e.bounds.bottom>=e.canvasSize.height&&e.direction===d.DYc.bottom?e.particle.position.y=e.canvasSize.height-a:e.bounds.top<=0&&e.direction===d.DYc.top&&(e.particle.position.y=a),e.outMode===d.Voc.split&&e.particle.destroy()}({particle:e,outMode:a,direction:t,bounds:h,canvasSize:u,offset:l,size:c})}};let DestroyOutMode=class DestroyOutMode{constructor(e){this.container=e,this.modes=[d.Voc.destroy]}update(e,t,i,a){if(!this.modes.includes(a))return;let s=this.container;switch(e.outType){case d.Igb.normal:case d.Igb.outside:if((0,d.Ac)(e.position,s.canvas.size,d.OWs.origin,e.getRadius(),t))return;break;case d.Igb.inside:{let{dx:t,dy:i}=(0,d.oW6)(e.position,e.moveCenter),{x:a,y:s}=e.velocity;if(a<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||a>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return}}s.particles.remove(e,void 0,!0)}};let NoneOutMode=class NoneOutMode{constructor(e){this.container=e,this.modes=[d.Voc.none]}update(e,t,i,a){if(!this.modes.includes(a)||((e.options.move.distance.horizontal&&(t===d.DYc.left||t===d.DYc.right))??(e.options.move.distance.vertical&&(t===d.DYc.top||t===d.DYc.bottom))))return;let s=e.options.move.gravity,o=this.container,r=o.canvas.size,l=e.getRadius();if(s.enable){let i=e.position;(!s.inverse&&i.y>r.height+l&&t===d.DYc.bottom||s.inverse&&i.y<-l&&t===d.DYc.top)&&o.particles.remove(e)}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;(0,d.Ac)(e.position,o.canvas.size,d.OWs.origin,l,t)||o.particles.remove(e)}}};let OutOutMode=class OutOutMode{constructor(e){this.container=e,this.modes=[d.Voc.out]}update(e,t,i,a){if(!this.modes.includes(a))return;let s=this.container;if(e.outType===d.Igb.inside){let{x:t,y:i}=e.velocity,a=d.OWs.origin;a.length=e.moveCenter.radius,a.angle=e.velocity.angle+Math.PI,a.addTo(d.OWs.create(e.moveCenter));let{dx:o,dy:r}=(0,d.oW6)(e.position,a);if(t<=0&&o>=0||i<=0&&r>=0||t>=0&&o<=0||i>=0&&r<=0)return;e.position.x=Math.floor((0,d.vdf)({min:0,max:s.canvas.size.width})),e.position.y=Math.floor((0,d.vdf)({min:0,max:s.canvas.size.height}));let{dx:l,dy:c}=(0,d.oW6)(e.position,e.moveCenter);e.direction=Math.atan2(-c,-l),e.velocity.angle=e.direction}else{if((0,d.Ac)(e.position,s.canvas.size,d.OWs.origin,e.getRadius(),t))return;switch(e.outType){case d.Igb.outside:{e.position.x=Math.floor((0,d.vdf)({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor((0,d.vdf)({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;let{dx:t,dy:i}=(0,d.oW6)(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction);break}case d.Igb.normal:{let i=e.options.move.warp,a=s.canvas.size,o={bottom:a.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:a.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=(0,d.M_G)(e.position,r);t===d.DYc.right&&l.left>a.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,i||(e.position.y=(0,d.sZz)()*a.height,e.initialPosition.y=e.position.y)):t===d.DYc.left&&l.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,i||(e.position.y=(0,d.sZz)()*a.height,e.initialPosition.y=e.position.y)),t===d.DYc.bottom&&l.top>a.height+e.offset.y?(i||(e.position.x=(0,d.sZz)()*a.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y):t===d.DYc.top&&l.bottom<-e.offset.y&&(i||(e.position.x=(0,d.sZz)()*a.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y)}}}}};let checkOutMode=(e,t)=>e.default===t||e.bottom===t||e.left===t||e.right===t||e.top===t;let OutOfCanvasUpdater=class OutOfCanvasUpdater{constructor(e){this._updateOutMode=(e,t,i,a)=>{for(let s of this.updaters)s.update(e,a,t,i)},this.container=e,this.updaters=[]}init(e){this.updaters=[];let t=e.options.move.outModes;checkOutMode(t,d.Voc.bounce)?this.updaters.push(new BounceOutMode(this.container)):checkOutMode(t,d.Voc.out)?this.updaters.push(new OutOutMode(this.container)):checkOutMode(t,d.Voc.destroy)?this.updaters.push(new DestroyOutMode(this.container)):checkOutMode(t,d.Voc.none)&&this.updaters.push(new NoneOutMode(this.container))}isEnabled(e){return!e.destroyed&&!e.spawning}update(e,t){let i=e.options.move.outModes;this._updateOutMode(e,t,i.bottom??i.default,d.DYc.bottom),this._updateOutMode(e,t,i.left??i.default,d.DYc.left),this._updateOutMode(e,t,i.right??i.default,d.DYc.right),this._updateOutMode(e,t,i.top??i.default,d.DYc.top)}};async function loadOutModesUpdater(e,t=!0){await e.addParticleUpdater("outModes",e=>Promise.resolve(new OutOfCanvasUpdater(e)),t)}let SizeUpdater=class SizeUpdater{init(e){let t=e.container,i=e.options.size,a=i.animation;a.enable&&(e.size.velocity=(e.retina.sizeAnimationSpeed??t.retina.sizeAnimationSpeed)/d.tZy*t.retina.reduceFactor,a.sync||(e.size.velocity*=(0,d.sZz)()))}isEnabled(e){return!e.destroyed&&!e.spawning&&e.size.enable&&((e.size.maxLoops??0)<=0||(e.size.maxLoops??0)>0&&(e.size.loops??0)<(e.size.maxLoops??0))}reset(e){e.size.loops=0}update(e,t){this.isEnabled(e)&&(0,d.CrJ)(e,e.size,!0,e.options.size.animation.destroy,t)}};async function loadSizeUpdater(e,t=!0){await e.addParticleUpdater("size",()=>Promise.resolve(new SizeUpdater),t)}async function loadBasic(e,t=!0){await loadBaseMover(e,!1),await loadCircleShape(e,!1),await loadColorUpdater(e,!1),await loadOpacityUpdater(e,!1),await loadOutModesUpdater(e,!1),await loadSizeUpdater(e,!1),await e.refresh(t)}async function loadEasingQuadPlugin(){(0,d.bx6)(d.nxi.easeInQuad,e=>e**2),(0,d.bx6)(d.nxi.easeOutQuad,e=>1-(1-e)**2),(0,d.bx6)(d.nxi.easeInOutQuad,e=>e<.5?2*e**2:1-(-2*e+2)**2/2),await Promise.resolve()}let u='"Twemoji Mozilla", Apple Color Emoji, "Segoe UI Emoji", "Noto Color Emoji", "EmojiOne Color"';let EmojiDrawer=class EmojiDrawer{constructor(){this.validTypes=["emoji"],this._emojiShapeDict=new Map}destroy(){for(let[e,t]of this._emojiShapeDict)t instanceof ImageBitmap&&(t?.close(),this._emojiShapeDict.delete(e))}draw(e){!function(e){let{context:t,particle:i,radius:a,opacity:s}=e,o=i.emojiData,r=2*a,l=t.globalAlpha;o&&(t.globalAlpha=s,t.drawImage(o,-a,-a,r,r),t.globalAlpha=l)}(e)}async init(e){let t=e.actualOptions,{validTypes:i}=this;if(!i.find(e=>(0,d.dBL)(e,t.particles.shape.type)))return;let a=[(0,d.mxw)(u)],s=i.map(e=>t.particles.shape.options[e]).find(e=>!!e);s&&(0,d.KH1)(s,e=>{e.font&&a.push((0,d.mxw)(e.font))}),await Promise.all(a)}particleDestroy(e){delete e.emojiData}particleInit(e,t){let i;let a=t.shapeData;if(!a?.value)return;let s=(0,d.wA_)(a.value,t.randomIndexData),o=a.font??u;if(!s)return;let r=`${s}_${o}`,l=this._emojiShapeDict.get(r);if(l){t.emojiData=l;return}let c=2*(0,d.KIV)(t.size.value),h=(0,d.KIV)(t.size.value);if("undefined"!=typeof OffscreenCanvas){let e=new OffscreenCanvas(c,c),t=e.getContext("2d");if(!t)return;t.font=`400 ${2*h}px ${o}`,t.textBaseline="middle",t.textAlign="center",t.fillText(s,h,h),i=e.transferToImageBitmap()}else{let e=document.createElement("canvas");e.width=c,e.height=c;let t=e.getContext("2d");if(!t)return;t.font=`400 ${2*h}px ${o}`,t.textBaseline="middle",t.textAlign="center",t.fillText(s,h,h),i=e}this._emojiShapeDict.set(r,i),t.emojiData=i}};async function loadEmojiShape(e,t=!0){await e.addShape(new EmojiDrawer,t)}function processAttract(e,t,i,a,s){let o=e.actualOptions.interactivity.modes.attract;if(!o)return;let r=e.particles.quadTree.query(a,s);for(let e of r){let{dx:a,dy:s,distance:r}=(0,d.oW6)(e.position,t),l=o.speed*o.factor,c=(0,d.uZ5)((0,d._Xd)(o.easing)(1-r/i)*l,1,o.maxSpeed),h=d.OWs.create(r?a/r*c:l,r?s/r*c:l);e.position.subFrom(h)}}let Attract=class Attract{constructor(){this.distance=200,this.duration=.4,this.easing=d.nxi.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1}load(e){e&&(void 0!==e.distance&&(this.distance=e.distance),void 0!==e.duration&&(this.duration=e.duration),void 0!==e.easing&&(this.easing=e.easing),void 0!==e.factor&&(this.factor=e.factor),void 0!==e.maxSpeed&&(this.maxSpeed=e.maxSpeed),void 0!==e.speed&&(this.speed=e.speed))}};let p="attract";let Attractor=class Attractor extends d.L8z{constructor(e,t){super(t),this._engine=e,t.attract||(t.attract={particles:[]}),this.handleClickMode=e=>{let i=this.container.actualOptions,a=i.interactivity.modes.attract;if(a&&e===p){for(let e of(t.attract||(t.attract={particles:[]}),t.attract.clicking=!0,t.attract.count=0,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)},a.duration*d.X5o)}}}clear(){}init(){let e=this.container,t=e.actualOptions.interactivity.modes.attract;t&&(e.retina.attractModeDistance=t.distance*e.retina.pixelRatio)}interact(){let e=this.container,t=e.actualOptions,i=e.interactivity.status===d.WtO,a=t.interactivity.events,{enable:s,mode:o}=a.onHover,{enable:r,mode:l}=a.onClick;i&&s&&(0,d.dBL)(p,o)?function(e,t){let i=e.interactivity.mouse.position,a=e.retina.attractModeDistance;a&&!(a<0)&&i&&processAttract(e,i,a,new d.Cdc(i.x,i.y,a),e=>t(e))}(this.container,e=>this.isEnabled(e)):r&&(0,d.dBL)(p,l)&&function(e,t){e.attract||(e.attract={particles:[]});let{attract:i}=e;if(i.finish||(i.count||(i.count=0),i.count++,i.count!==e.particles.count||(i.finish=!0)),i.clicking){let i=e.interactivity.mouse.clickPosition,a=e.retina.attractModeDistance;if(!a||a<0||!i)return;processAttract(e,i,a,new d.Cdc(i.x,i.y,a),e=>t(e))}else!1===i.clicking&&(i.particles=[])}(this.container,e=>this.isEnabled(e))}isEnabled(e){let t=this.container,i=t.actualOptions,a=t.interactivity.mouse,s=(e?.interactivity??i.interactivity).events;if((!a.position||!s.onHover.enable)&&(!a.clickPosition||!s.onClick.enable))return!1;let o=s.onHover.mode,r=s.onClick.mode;return(0,d.dBL)(p,o)||(0,d.dBL)(p,r)}loadModeOptions(e,...t){for(let i of(e.attract||(e.attract=new Attract),t))e.attract.load(i?.attract)}reset(){}};async function loadExternalAttractInteraction(e,t=!0){await e.addInteractor("externalAttract",t=>Promise.resolve(new Attractor(e,t)),t)}let g=.5*Math.PI;function processBounce(e,t,i,a,s){let o=e.particles.quadTree.query(a,s);for(let e of o)a instanceof d.Cdc?(0,d.kRC)((0,d.gy4)(e),{position:t,radius:i,mass:i**2*g,velocity:d.OWs.origin,factor:d.OWs.origin}):a instanceof d.AeJ&&(0,d.dpV)(e,(0,d.M_G)(t,i))}let Bounce=class Bounce{constructor(){this.distance=200}load(e){e&&void 0!==e.distance&&(this.distance=e.distance)}};let m="bounce";let Bouncer=class Bouncer extends d.L8z{constructor(e){super(e)}clear(){}init(){let e=this.container,t=e.actualOptions.interactivity.modes.bounce;t&&(e.retina.bounceModeDistance=t.distance*e.retina.pixelRatio)}interact(){let e=this.container,t=e.actualOptions,i=t.interactivity.events,a=e.interactivity.status===d.WtO,s=i.onHover.enable,o=i.onHover.mode,r=i.onDiv;if(a&&s&&(0,d.dBL)(m,o))!function(e,t){let i=e.retina.pixelRatio,a=e.interactivity.mouse.position,s=e.retina.bounceModeDistance;s&&!(s<0)&&a&&processBounce(e,a,s,new d.Cdc(a.x,a.y,s+10*i),t)}(this.container,e=>this.isEnabled(e));else{var l,c;l=this.container,c=e=>this.isEnabled(e),(0,d.XDe)(m,r,(e,t)=>(function(e,t,i,a){let s=document.querySelectorAll(t);s.length&&s.forEach(t=>{let s=e.retina.pixelRatio,o={x:(t.offsetLeft+.5*t.offsetWidth)*s,y:(t.offsetTop+.5*t.offsetHeight)*s},r=.5*t.offsetWidth*s,l=10*s,c=i.type===d.gqJ.circle?new d.Cdc(o.x,o.y,r+l):new d.AeJ(t.offsetLeft*s-l,t.offsetTop*s-l,t.offsetWidth*s+2*l,t.offsetHeight*s+2*l);a(o,r,c)})})(l,e,t,(e,t,i)=>processBounce(l,e,t,i,c)))}}isEnabled(e){let t=this.container,i=t.actualOptions,a=t.interactivity.mouse,s=(e?.interactivity??i.interactivity).events,o=s.onDiv;return!!a.position&&s.onHover.enable&&(0,d.dBL)(m,s.onHover.mode)||(0,d.wm$)(m,o)}loadModeOptions(e,...t){for(let i of(e.bounce||(e.bounce=new Bounce),t))e.bounce.load(i?.bounce)}reset(){}};async function loadExternalBounceInteraction(e,t=!0){await e.addInteractor("externalBounce",e=>Promise.resolve(new Bouncer(e)),t)}let BubbleBase=class BubbleBase{constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(e){if(e){if(void 0!==e.distance&&(this.distance=e.distance),void 0!==e.duration&&(this.duration=e.duration),void 0!==e.mix&&(this.mix=e.mix),void 0!==e.opacity&&(this.opacity=e.opacity),void 0!==e.color){let t=(0,d.kJL)(this.color)?void 0:this.color;this.color=(0,d.KH1)(e.color,e=>d.OzF.create(t,e))}void 0!==e.size&&(this.size=e.size)}}};let BubbleDiv=class BubbleDiv extends BubbleBase{constructor(){super(),this.selectors=[]}load(e){super.load(e),e&&void 0!==e.selectors&&(this.selectors=e.selectors)}};let Bubble=class Bubble extends BubbleBase{load(e){super.load(e),e&&(this.divs=(0,d.KH1)(e.divs,e=>{let t=new BubbleDiv;return t.load(e),t}))}};function calculateBubbleValue(e,t,i,a){if(t>=i){let s=e+(t-i)*a;return(0,d.uZ5)(s,e,t)}if(t<i){let s=e-(i-t)*a;return(0,d.uZ5)(s,t,e)}}(a=r||(r={})).color="color",a.opacity="opacity",a.size="size";let v="bubble";let Bubbler=class Bubbler extends d.L8z{constructor(e){super(e),this._clickBubble=()=>{let e=this.container,t=e.actualOptions,i=e.interactivity.mouse.clickPosition,a=t.interactivity.modes.bubble;if(!a||!i)return;e.bubble||(e.bubble={});let s=e.retina.bubbleModeDistance;if(!s||s<0)return;let o=e.particles.quadTree.queryCircle(i,s,e=>this.isEnabled(e)),{bubble:l}=e;for(let t of o){if(!l.clicking)continue;t.bubble.inRange=!l.durationEnd;let o=t.getPosition(),c=(0,d.Spd)(o,i),h=(new Date().getTime()-(e.interactivity.mouse.clickTime??0))/d.X5o;h>a.duration&&(l.durationEnd=!0),h>2*a.duration&&(l.clicking=!1,l.durationEnd=!1);let u={bubbleObj:{optValue:e.retina.bubbleModeSize,value:t.bubble.radius},particlesObj:{optValue:(0,d.KIV)(t.options.size.value)*e.retina.pixelRatio,value:t.size.value},type:r.size};this._process(t,c,h,u);let p={bubbleObj:{optValue:a.opacity,value:t.bubble.opacity},particlesObj:{optValue:(0,d.KIV)(t.options.opacity.value),value:t.opacity?.value??1},type:r.opacity};this._process(t,c,h,p),!l.durationEnd&&c<=s?this._hoverBubbleColor(t,c):delete t.bubble.color}},this._hoverBubble=()=>{let e=this.container,t=e.interactivity.mouse.position,i=e.retina.bubbleModeDistance;if(!i||i<0||!t)return;let a=e.particles.quadTree.queryCircle(t,i,e=>this.isEnabled(e));for(let s of a){s.bubble.inRange=!0;let a=s.getPosition(),o=(0,d.Spd)(a,t),r=1-o/i;o<=i?r>=0&&e.interactivity.status===d.WtO&&(this._hoverBubbleSize(s,r),this._hoverBubbleOpacity(s,r),this._hoverBubbleColor(s,r)):this.reset(s),e.interactivity.status===d.aMP&&this.reset(s)}},this._hoverBubbleColor=(e,t,i)=>{let a=this.container.actualOptions,s=i??a.interactivity.modes.bubble;if(s){if(!e.bubble.finalColor){let t=s.color;if(!t)return;let i=(0,d.wA_)(t);e.bubble.finalColor=(0,d.lNs)(i)}if(e.bubble.finalColor){if(s.mix){e.bubble.color=void 0;let i=e.getFillColor();e.bubble.color=i?(0,d.lCU)((0,d.ocL)(i,e.bubble.finalColor,1-t,t)):e.bubble.finalColor}else e.bubble.color=e.bubble.finalColor}}},this._hoverBubbleOpacity=(e,t,i)=>{let a=this.container,s=a.actualOptions,o=i?.opacity??s.interactivity.modes.bubble?.opacity;if(!o)return;let r=e.options.opacity.value,l=e.opacity?.value??1,c=calculateBubbleValue(l,o,(0,d.KIV)(r),t);void 0!==c&&(e.bubble.opacity=c)},this._hoverBubbleSize=(e,t,i)=>{let a=this.container,s=i?.size?i.size*a.retina.pixelRatio:a.retina.bubbleModeSize;if(void 0===s)return;let o=(0,d.KIV)(e.options.size.value)*a.retina.pixelRatio,r=e.size.value,l=calculateBubbleValue(r,s,o,t);void 0!==l&&(e.bubble.radius=l)},this._process=(e,t,i,a)=>{let s=this.container,o=a.bubbleObj.optValue,l=s.actualOptions,c=l.interactivity.modes.bubble;if(!c||void 0===o)return;let d=c.duration,h=s.retina.bubbleModeDistance,u=a.particlesObj.optValue,p=a.bubbleObj.value,g=a.particlesObj.value??0,m=a.type;if(h&&!(h<0)&&o!==u){if(s.bubble||(s.bubble={}),s.bubble.durationEnd)p&&(m===r.size&&delete e.bubble.radius,m===r.opacity&&delete e.bubble.opacity);else if(t<=h){if((p??g)!==o){let t=g-i*(g-o)/d;m===r.size&&(e.bubble.radius=t),m===r.opacity&&(e.bubble.opacity=t)}}else m===r.size&&delete e.bubble.radius,m===r.opacity&&delete e.bubble.opacity}},this._singleSelectorHover=(e,t,i)=>{let a=this.container,s=document.querySelectorAll(t),o=a.actualOptions.interactivity.modes.bubble;o&&s.length&&s.forEach(t=>{let s=a.retina.pixelRatio,r={x:(t.offsetLeft+.5*t.offsetWidth)*s,y:(t.offsetTop+.5*t.offsetHeight)*s},l=.5*t.offsetWidth*s,c=i.type===d.gqJ.circle?new d.Cdc(r.x,r.y,l):new d.AeJ(t.offsetLeft*s,t.offsetTop*s,t.offsetWidth*s,t.offsetHeight*s),h=a.particles.quadTree.query(c,e=>this.isEnabled(e));for(let i of h){if(!c.contains(i.getPosition()))continue;i.bubble.inRange=!0;let a=o.divs,s=(0,d.iCg)(a,t);i.bubble.div&&i.bubble.div===t||(this.clear(i,e,!0),i.bubble.div=t),this._hoverBubbleSize(i,1,s),this._hoverBubbleOpacity(i,1,s),this._hoverBubbleColor(i,1,s)}})},e.bubble||(e.bubble={}),this.handleClickMode=t=>{t===v&&(e.bubble||(e.bubble={}),e.bubble.clicking=!0)}}clear(e,t,i){(!e.bubble.inRange||i)&&(delete e.bubble.div,delete e.bubble.opacity,delete e.bubble.radius,delete e.bubble.color)}init(){let e=this.container,t=e.actualOptions.interactivity.modes.bubble;t&&(e.retina.bubbleModeDistance=t.distance*e.retina.pixelRatio,void 0!==t.size&&(e.retina.bubbleModeSize=t.size*e.retina.pixelRatio))}interact(e){let t=this.container.actualOptions,i=t.interactivity.events,a=i.onHover,s=i.onClick,o=a.enable,r=a.mode,l=s.enable,c=s.mode,h=i.onDiv;o&&(0,d.dBL)(v,r)?this._hoverBubble():l&&(0,d.dBL)(v,c)?this._clickBubble():(0,d.XDe)(v,h,(t,i)=>this._singleSelectorHover(e,t,i))}isEnabled(e){let t=this.container,i=t.actualOptions,a=t.interactivity.mouse,s=(e?.interactivity??i.interactivity).events,{onClick:o,onDiv:r,onHover:l}=s,c=(0,d.wm$)(v,r);return(!!c||!!l.enable&&!!a.position||!!o.enable&&!!a.clickPosition)&&((0,d.dBL)(v,l.mode)||(0,d.dBL)(v,o.mode)||c)}loadModeOptions(e,...t){for(let i of(e.bubble||(e.bubble=new Bubble),t))e.bubble.load(i?.bubble)}reset(e){e.bubble.inRange=!1}};async function loadExternalBubbleInteraction(e,t=!0){await e.addInteractor("externalBubble",e=>Promise.resolve(new Bubbler(e)),t)}let ConnectLinks=class ConnectLinks{constructor(){this.opacity=.5}load(e){e&&void 0!==e.opacity&&(this.opacity=e.opacity)}};let Connect=class Connect{constructor(){this.distance=80,this.links=new ConnectLinks,this.radius=60}load(e){e&&(void 0!==e.distance&&(this.distance=e.distance),this.links.load(e.links),void 0!==e.radius&&(this.radius=e.radius))}};let Connector=class Connector extends d.L8z{constructor(e){super(e)}clear(){}init(){let e=this.container,t=e.actualOptions.interactivity.modes.connect;t&&(e.retina.connectModeDistance=t.distance*e.retina.pixelRatio,e.retina.connectModeRadius=t.radius*e.retina.pixelRatio)}interact(){let e=this.container,t=e.actualOptions;if(t.interactivity.events.onHover.enable&&"pointermove"===e.interactivity.status){let t=e.interactivity.mouse.position,{connectModeDistance:i,connectModeRadius:a}=e.retina;if(!i||i<0||!a||a<0||!t)return;let s=e.particles.quadTree.queryCircle(t,Math.abs(a),e=>this.isEnabled(e));s.forEach((t,a)=>{let o=t.getPosition();for(let r of s.slice(a+1)){let a=r.getPosition(),s=Math.abs(i),l=Math.abs(o.x-a.x),c=Math.abs(o.y-a.y);l<s&&c<s&&function(e,t,i){e.canvas.draw(a=>{var s;let o=function(e,t,i,a){let s=e.actualOptions,o=s.interactivity.modes.connect;if(o)return function(e,t,i,a){let s=Math.floor(i.getRadius()/t.getRadius()),o=t.getFillColor(),r=i.getFillColor();if(!o||!r)return;let l=t.getPosition(),c=i.getPosition(),h=(0,d.ocL)(o,r,t.getRadius(),i.getRadius()),u=e.createLinearGradient(l.x,l.y,c.x,c.y);return u.addColorStop(0,(0,d.vzQ)(o,a)),u.addColorStop((0,d.uZ5)(s,0,1),(0,d.izR)(h,a)),u.addColorStop(1,(0,d.vzQ)(r,a)),u}(t,i,a,o.links.opacity)}(e,a,t,i);if(!o)return;let r=t.getPosition(),l=i.getPosition();s=t.retina.linksWidth??0,(0,d.pSR)(a,r,l),a.lineWidth=s,a.strokeStyle=o,a.stroke()})}(e,t,r)}})}}isEnabled(e){let t=this.container,i=t.interactivity.mouse,a=(e?.interactivity??t.actualOptions.interactivity).events;return!!a.onHover.enable&&!!i.position&&(0,d.dBL)("connect",a.onHover.mode)}loadModeOptions(e,...t){for(let i of(e.connect||(e.connect=new Connect),t))e.connect.load(i?.connect)}reset(){}};async function loadExternalConnectInteraction(e,t=!0){await e.addInteractor("externalConnect",e=>Promise.resolve(new Connector(e)),t)}let GrabLinks=class GrabLinks{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(e){e&&(void 0!==e.blink&&(this.blink=e.blink),void 0!==e.color&&(this.color=d.OzF.create(this.color,e.color)),void 0!==e.consent&&(this.consent=e.consent),void 0!==e.opacity&&(this.opacity=e.opacity))}};let Grab=class Grab{constructor(){this.distance=100,this.links=new GrabLinks}load(e){e&&(void 0!==e.distance&&(this.distance=e.distance),this.links.load(e.links))}};let Grabber=class Grabber extends d.L8z{constructor(e){super(e)}clear(){}init(){let e=this.container,t=e.actualOptions.interactivity.modes.grab;t&&(e.retina.grabModeDistance=t.distance*e.retina.pixelRatio)}interact(){let e=this.container,t=e.actualOptions,i=t.interactivity;if(!i.modes.grab||!i.events.onHover.enable||e.interactivity.status!==d.WtO)return;let a=e.interactivity.mouse.position;if(!a)return;let s=e.retina.grabModeDistance;if(!s||s<0)return;let o=e.particles.quadTree.queryCircle(a,s,e=>this.isEnabled(e));for(let t of o){let o=t.getPosition(),r=(0,d.Spd)(o,a);if(r>s)continue;let l=i.modes.grab.links,c=l.opacity,h=c-r*c/s;if(h<=0)continue;let u=l.color??t.options.links?.color;if(!e.particles.grabLineColor&&u){let t=i.modes.grab.links;e.particles.grabLineColor=(0,d.Dt5)(u,t.blink,t.consent)}let p=(0,d.BEi)(t,void 0,e.particles.grabLineColor);p&&function(e,t,i,a,s){e.canvas.draw(e=>{var o;let r=t.getPosition();o=t.retina.linksWidth??0,(0,d.pSR)(e,r,s),e.strokeStyle=(0,d.izR)(i,a),e.lineWidth=o,e.stroke()})}(e,t,p,h,a)}}isEnabled(e){let t=this.container,i=t.interactivity.mouse,a=(e?.interactivity??t.actualOptions.interactivity).events;return a.onHover.enable&&!!i.position&&(0,d.dBL)("grab",a.onHover.mode)}loadModeOptions(e,...t){for(let i of(e.grab||(e.grab=new Grab),t))e.grab.load(i?.grab)}reset(){}};async function loadExternalGrabInteraction(e,t=!0){await e.addInteractor("externalGrab",e=>Promise.resolve(new Grabber(e)),t)}let Pauser=class Pauser extends d.L8z{constructor(e){super(e),this.handleClickMode=e=>{if("pause"!==e)return;let t=this.container;t.animationStatus?t.pause():t.play()}}clear(){}init(){}interact(){}isEnabled(){return!0}reset(){}};async function loadExternalPauseInteraction(e,t=!0){await e.addInteractor("externalPause",e=>Promise.resolve(new Pauser(e)),t)}let Push=class Push{constructor(){this.default=!0,this.groups=[],this.quantity=4}load(e){if(!e)return;void 0!==e.default&&(this.default=e.default),void 0!==e.groups&&(this.groups=e.groups.map(e=>e)),this.groups.length||(this.default=!0);let t=e.quantity;void 0!==t&&(this.quantity=(0,d.Cst)(t))}};let Pusher=class Pusher extends d.L8z{constructor(e){super(e),this.handleClickMode=e=>{if("push"!==e)return;let t=this.container,i=t.actualOptions,a=i.interactivity.modes.push;if(!a)return;let s=(0,d.Gu7)(a.quantity);if(s<=0)return;let o=(0,d.c86)([void 0,...a.groups]),r=void 0!==o?t.actualOptions.particles.groups[o]:void 0;t.particles.push(s,t.interactivity.mouse,r,o)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...t){for(let i of(e.push||(e.push=new Push),t))e.push.load(i?.push)}reset(){}};async function loadExternalPushInteraction(e,t=!0){await e.addInteractor("externalPush",e=>Promise.resolve(new Pusher(e)),t)}let Remove=class Remove{constructor(){this.quantity=2}load(e){if(!e)return;let t=e.quantity;void 0!==t&&(this.quantity=(0,d.Cst)(t))}};let Remover=class Remover extends d.L8z{constructor(e){super(e),this.handleClickMode=e=>{let t=this.container,i=t.actualOptions;if(!i.interactivity.modes.remove||"remove"!==e)return;let a=(0,d.Gu7)(i.interactivity.modes.remove.quantity);t.particles.removeQuantity(a)}}clear(){}init(){}interact(){}isEnabled(){return!0}loadModeOptions(e,...t){for(let i of(e.remove||(e.remove=new Remove),t))e.remove.load(i?.remove)}reset(){}};async function loadExternalRemoveInteraction(e,t=!0){await e.addInteractor("externalRemove",e=>Promise.resolve(new Remover(e)),t)}let RepulseBase=class RepulseBase{constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=d.nxi.easeOutQuad}load(e){e&&(void 0!==e.distance&&(this.distance=e.distance),void 0!==e.duration&&(this.duration=e.duration),void 0!==e.easing&&(this.easing=e.easing),void 0!==e.factor&&(this.factor=e.factor),void 0!==e.speed&&(this.speed=e.speed),void 0!==e.maxSpeed&&(this.maxSpeed=e.maxSpeed))}};let RepulseDiv=class RepulseDiv extends RepulseBase{constructor(){super(),this.selectors=[]}load(e){super.load(e),e&&void 0!==e.selectors&&(this.selectors=e.selectors)}};let Repulse=class Repulse extends RepulseBase{load(e){super.load(e),e&&(this.divs=(0,d.KH1)(e.divs,e=>{let t=new RepulseDiv;return t.load(e),t}))}};let y="repulse";let Repulser=class Repulser extends d.L8z{constructor(e,t){super(t),this._clickRepulse=()=>{let e=this.container,t=e.actualOptions.interactivity.modes.repulse;if(!t)return;let i=e.repulse??{particles:[]};if(i.finish||(i.count||(i.count=0),i.count++,i.count!==e.particles.count||(i.finish=!0)),i.clicking){let a=e.retina.repulseModeDistance;if(!a||a<0)return;let s=Math.pow(a/6,3),o=e.interactivity.mouse.clickPosition;if(void 0===o)return;let r=new d.Cdc(o.x,o.y,s),l=e.particles.quadTree.query(r,e=>this.isEnabled(e));for(let e of l){let{dx:a,dy:r,distance:l}=(0,d.oW6)(o,e.position),c=l**2,h=t.speed,u=-s*h/c;if(c<=s){i.particles.push(e);let t=d.OWs.create(a,r);t.length=u,e.velocity.setTo(t)}}}else if(!1===i.clicking){for(let e of i.particles)e.velocity.setTo(e.initialVelocity);i.particles=[]}},this._hoverRepulse=()=>{let e=this.container,t=e.interactivity.mouse.position,i=e.retina.repulseModeDistance;i&&!(i<0)&&t&&this._processRepulse(t,i,new d.Cdc(t.x,t.y,i))},this._processRepulse=(e,t,i,a)=>{let s=this.container,o=s.particles.quadTree.query(i,e=>this.isEnabled(e)),r=s.actualOptions.interactivity.modes.repulse;if(!r)return;let{easing:l,speed:c,factor:h,maxSpeed:u}=r,p=(0,d._Xd)(l),g=(a?.speed??c)*h;for(let i of o){let{dx:a,dy:s,distance:o}=(0,d.oW6)(i.position,e),r=(0,d.uZ5)(p(1-o/t)*g,0,u),l=d.OWs.create(o?a/o*r:g,o?s/o*r:g);i.position.addTo(l)}},this._singleSelectorRepulse=(e,t)=>{let i=this.container,a=i.actualOptions.interactivity.modes.repulse;if(!a)return;let s=document.querySelectorAll(e);s.length&&s.forEach(e=>{let s=i.retina.pixelRatio,o={x:(e.offsetLeft+.5*e.offsetWidth)*s,y:(e.offsetTop+.5*e.offsetHeight)*s},r=.5*e.offsetWidth*s,l=t.type===d.gqJ.circle?new d.Cdc(o.x,o.y,r):new d.AeJ(e.offsetLeft*s,e.offsetTop*s,e.offsetWidth*s,e.offsetHeight*s),c=a.divs,h=(0,d.iCg)(c,e);this._processRepulse(o,r,l,h)})},this._engine=e,t.repulse||(t.repulse={particles:[]}),this.handleClickMode=e=>{let i=this.container.actualOptions,a=i.interactivity.modes.repulse;if(!a||e!==y)return;t.repulse||(t.repulse={particles:[]});let s=t.repulse;for(let e of(s.clicking=!0,s.count=0,t.repulse.particles))this.isEnabled(e)&&e.velocity.setTo(e.initialVelocity);s.particles=[],s.finish=!1,setTimeout(()=>{t.destroyed||(s.clicking=!1)},a.duration*d.X5o)}}clear(){}init(){let e=this.container,t=e.actualOptions.interactivity.modes.repulse;t&&(e.retina.repulseModeDistance=t.distance*e.retina.pixelRatio)}interact(){let e=this.container,t=e.actualOptions,i=e.interactivity.status===d.WtO,a=t.interactivity.events,s=a.onHover,o=s.enable,r=s.mode,l=a.onClick,c=l.enable,h=l.mode,u=a.onDiv;i&&o&&(0,d.dBL)(y,r)?this._hoverRepulse():c&&(0,d.dBL)(y,h)?this._clickRepulse():(0,d.XDe)(y,u,(e,t)=>this._singleSelectorRepulse(e,t))}isEnabled(e){let t=this.container,i=t.actualOptions,a=t.interactivity.mouse,s=(e?.interactivity??i.interactivity).events,o=s.onDiv,r=s.onHover,l=s.onClick,c=(0,d.wm$)(y,o);if(!(c||r.enable&&a.position||l.enable&&a.clickPosition))return!1;let h=r.mode,u=l.mode;return(0,d.dBL)(y,h)||(0,d.dBL)(y,u)||c}loadModeOptions(e,...t){for(let i of(e.repulse||(e.repulse=new Repulse),t))e.repulse.load(i?.repulse)}reset(){}};async function loadExternalRepulseInteraction(e,t=!0){await e.addInteractor("externalRepulse",t=>Promise.resolve(new Repulser(e,t)),t)}let Slow=class Slow{constructor(){this.factor=3,this.radius=200}load(e){e&&(void 0!==e.factor&&(this.factor=e.factor),void 0!==e.radius&&(this.radius=e.radius))}};let Slower=class Slower extends d.L8z{constructor(e){super(e)}clear(e,t,i){(!e.slow.inRange||i)&&(e.slow.factor=1)}init(){let e=this.container,t=e.actualOptions.interactivity.modes.slow;t&&(e.retina.slowModeRadius=t.radius*e.retina.pixelRatio)}interact(){}isEnabled(e){let t=this.container,i=t.interactivity.mouse,a=(e?.interactivity??t.actualOptions.interactivity).events;return a.onHover.enable&&!!i.position&&(0,d.dBL)("slow",a.onHover.mode)}loadModeOptions(e,...t){for(let i of(e.slow||(e.slow=new Slow),t))e.slow.load(i?.slow)}reset(e){e.slow.inRange=!1;let t=this.container,i=t.actualOptions,a=t.interactivity.mouse.position,s=t.retina.slowModeRadius,o=i.interactivity.modes.slow;if(!o||!s||s<0||!a)return;let r=e.getPosition(),l=(0,d.Spd)(a,r),c=o.factor,{slow:h}=e;l>s||(h.inRange=!0,h.factor=l/s/c)}};async function loadExternalSlowInteraction(e,t=!0){await e.addInteractor("externalSlow",e=>Promise.resolve(new Slower(e)),t)}let b=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function loadImage(e){return new Promise(t=>{e.loading=!0;let i=new Image;e.element=i,i.addEventListener("load",()=>{e.loading=!1,t()}),i.addEventListener("error",()=>{e.element=void 0,e.error=!0,e.loading=!1,(0,d.jl5)().error(`${d.gK4} loading image: ${e.source}`),t()}),i.src=e.source})}async function downloadSvgImage(e){if("svg"!==e.type){await loadImage(e);return}e.loading=!0;let t=await fetch(e.source);t.ok?e.svgData=await t.text():((0,d.jl5)().error(`${d.gK4} Image not found`),e.error=!0),e.loading=!1}let w=[0,4,2,1],x=[8,8,4,2];let ByteStream=class ByteStream{constructor(e){this.pos=0,this.data=new Uint8ClampedArray(e)}getString(e){let t=this.data.slice(this.pos,this.pos+e);return this.pos+=t.length,t.reduce((e,t)=>e+String.fromCharCode(t),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let e="",t=0;do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let e=this.data[this.pos],t=0;for(let i=0;0!==e;i+=e+1,e=this.data[this.pos+i])t+=e;let i=new Uint8Array(t);e=this.data[this.pos++];for(let t=0;0!==e;e=this.data[this.pos++])for(let a=e;--a>=0;i[t++]=this.data[this.pos++]);return i}skipSubBlocks(){for(;0!==this.data[this.pos];this.pos+=this.data[this.pos]+1);this.pos++}};(s=l||(l={}))[s.Replace=0]="Replace",s[s.Combine=1]="Combine",s[s.RestoreBackground=2]="RestoreBackground",s[s.RestorePrevious=3]="RestorePrevious",s[s.UndefinedA=4]="UndefinedA",s[s.UndefinedB=5]="UndefinedB",s[s.UndefinedC=6]="UndefinedC",s[s.UndefinedD=7]="UndefinedD",(o=c||(c={}))[o.Extension=33]="Extension",o[o.ApplicationExtension=255]="ApplicationExtension",o[o.GraphicsControlExtension=249]="GraphicsControlExtension",o[o.PlainTextExtension=1]="PlainTextExtension",o[o.CommentExtension=254]="CommentExtension",o[o.Image=44]="Image",o[o.EndOfFile=59]="EndOfFile";let _={x:0,y:0};function parseColorTable(e,t){let i=[];for(let a=0;a<t;a++)i.push({r:e.data[e.pos],g:e.data[e.pos+1],b:e.data[e.pos+2]}),e.pos+=3;return i}async function parseImageBlock(e,t,i,a,s,o){let r=t.frames[a(!0)];r.left=e.nextTwoBytes(),r.top=e.nextTwoBytes(),r.width=e.nextTwoBytes(),r.height=e.nextTwoBytes();let l=e.nextByte(),c=(128&l)==128;r.sortFlag=(32&l)==32,r.reserved=(24&l)>>>3,c&&(r.localColorTable=parseColorTable(e,1<<(7&l)+1));let getColor=e=>{let{r:a,g:o,b:l}=(c?r.localColorTable:t.globalColorTable)[e];return e!==s(null)?{r:a,g:o,b:l,a:255}:{r:a,g:o,b:l,a:i?~~((a+o+l)/3):0}},d=(()=>{try{return new ImageData(r.width,r.height,{colorSpace:"srgb"})}catch(e){if(e instanceof DOMException&&"IndexSizeError"===e.name)return null;throw e}})();if(null==d)throw EvalError("GIF frame size is to large");let h=e.nextByte(),u=e.readSubBlocksBin(),p=1<<h,readBits=(e,t)=>{let i=e>>>3,a=7&e;return(u[i]+(u[i+1]<<8)+(u[i+2]<<16)&(1<<t)-1<<a)>>>a};if((64&l)==64){for(let i=0,s=h+1,l=0,c=[[0]],u=0;u<4;u++){if(w[u]<r.height){let e=0,t=0,a=!1;for(;!a;){let o=i;if(i=readBits(l,s),l+=s+1,i===p){s=h+1,c.length=p+2;for(let e=0;e<c.length;e++)c[e]=e<p?[e]:[]}else{for(let a of(i>=c.length?c.push(c[o].concat(c[o][0])):o!==p&&c.push(c[o].concat(c[i][0])),c[i])){let{r:i,g:s,b:o,a:l}=getColor(a);d.data.set([i,s,o,l],w[u]*r.width+x[u]*t+e%(4*r.width)),e+=4}c.length===1<<s&&s<12&&s++}e===4*r.width*(t+1)&&(t++,w[u]+x[u]*t>=r.height&&(a=!0))}}o?.(e.pos/(e.data.length-1),a(!1)+1,d,{x:r.left,y:r.top},{width:t.width,height:t.height})}r.image=d,r.bitmap=await createImageBitmap(d)}else{let i=0,s=h+1,l=0,c=-4,u=!1,g=[[0]];for(;!u;){let e=i;if(i=readBits(l,s),l+=s,i===p){s=h+1,g.length=p+2;for(let e=0;e<g.length;e++)g[e]=e<p?[e]:[]}else{if(i===p+1){u=!0;break}for(let t of(i>=g.length?g.push(g[e].concat(g[e][0])):e!==p&&g.push(g[e].concat(g[i][0])),g[i])){let{r:e,g:i,b:a,a:s}=getColor(t);d.data.set([e,i,a,s],c+=4)}g.length>=1<<s&&s<12&&s++}}r.image=d,r.bitmap=await createImageBitmap(d),o?.((e.pos+1)/e.data.length,a(!1)+1,r.image,{x:r.left,y:r.top},{width:t.width,height:t.height})}}async function parseBlock(e,t,i,a,s,o){switch(e.nextByte()){case c.EndOfFile:return!0;case c.Image:await parseImageBlock(e,t,i,a,s,o);break;case c.Extension:!function(e,t,i,a){switch(e.nextByte()){case c.GraphicsControlExtension:{let s=t.frames[i(!1)];e.pos++;let o=e.nextByte();s.GCreserved=(224&o)>>>5,s.disposalMethod=(28&o)>>>2,s.userInputDelayFlag=(2&o)==2,s.delayTime=10*e.nextTwoBytes();let r=e.nextByte();(1&o)==1&&a(r),e.pos++;break}case c.ApplicationExtension:{e.pos++;let i={identifier:e.getString(8),authenticationCode:e.getString(3),data:e.readSubBlocksBin()};t.applicationExtensions.push(i);break}case c.CommentExtension:t.comments.push([i(!1),e.readSubBlocks()]);break;case c.PlainTextExtension:if(0===t.globalColorTable.length)throw EvalError("plain text extension without global color table");e.pos++,t.frames[i(!1)].plainTextData={left:e.nextTwoBytes(),top:e.nextTwoBytes(),width:e.nextTwoBytes(),height:e.nextTwoBytes(),charSize:{width:e.nextTwoBytes(),height:e.nextTwoBytes()},foregroundColor:e.nextByte(),backgroundColor:e.nextByte(),text:e.readSubBlocks()};break;default:e.skipSubBlocks()}}(e,t,a,s);break;default:throw EvalError("undefined block found")}return!1}async function decodeGIF(e,t,i){i||(i=!1);let a=await fetch(e);if(!a.ok&&404===a.status)throw EvalError("file not found");let s=await a.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,{colorSpace:"srgb"}),comments:[],applicationExtensions:[]},r=new ByteStream(new Uint8ClampedArray(s));if("GIF89a"!==r.getString(6))throw Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();let c=r.nextByte(),d=(128&c)==128;o.colorRes=(112&c)>>>4,o.sortFlag=(8&c)==8;let h=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),d&&(o.globalColorTable=parseColorTable(r,1<<(7&c)+1));let u=(()=>{try{return new ImageData(o.width,o.height,{colorSpace:"srgb"})}catch(e){if(e instanceof DOMException&&"IndexSizeError"===e.name)return null;throw e}})();if(null==u)throw Error("GIF frame size is to large");let{r:p,g,b:m}=o.globalColorTable[h];u.data.set(d?[p,g,m,255]:[0,0,0,0]);for(let e=4;e<u.data.length;e*=2)u.data.copyWithin(e,0,e);o.backgroundImage=u;let v=-1,y=!0,b=-1,getframeIndex=e=>(e&&(y=!0),v),getTransparencyIndex=e=>(null!=e&&(b=e),b);try{do y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:l.Replace,image:new ImageData(1,1,{colorSpace:"srgb"}),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),v++,b=-1,y=!1);while(!await parseBlock(r,o,i,getframeIndex,getTransparencyIndex,t));for(let e of(o.frames.length--,o.frames)){if(e.userInputDelayFlag&&0===e.delayTime){o.totalTime=1/0;break}o.totalTime+=e.delayTime}return o}catch(e){if(e instanceof EvalError)throw Error(`error while parsing frame ${v} "${e.message}"`);throw e}}async function loadGifImage(e){if("gif"!==e.type){await loadImage(e);return}e.loading=!0;try{e.gifData=await decodeGIF(e.source),e.gifLoopCount=function(e){for(let t of e.applicationExtensions)if(t.identifier+t.authenticationCode==="NETSCAPE2.0")return t.data[1]+(t.data[2]<<8);return NaN}(e.gifData)??0,e.gifLoopCount||(e.gifLoopCount=1/0)}catch{e.error=!0}e.loading=!1}let ImageDrawer=class ImageDrawer{constructor(e){this.validTypes=["image","images"],this.loadImageShape=async e=>{if(!this._engine.loadImage)throw Error(`${d.gK4} image shape not initialized`);await this._engine.loadImage({gif:e.gif,name:e.name,replaceColor:e.replaceColor??!1,src:e.src})},this._engine=e}addImage(e){this._engine.images||(this._engine.images=[]),this._engine.images.push(e)}draw(e){let{context:t,radius:i,particle:a,opacity:s}=e,o=a.image,r=o?.element;if(o){if(t.globalAlpha=s,o.gif&&o.gifData)!function(e){let{context:t,radius:i,particle:a,delta:s}=e,o=a.image;if(!o?.gifData||!o.gif)return;let r=new OffscreenCanvas(o.gifData.width,o.gifData.height),c=r.getContext("2d");if(!c)throw Error("could not create offscreen canvas context");c.imageSmoothingQuality="low",c.imageSmoothingEnabled=!1,c.clearRect(_.x,_.y,r.width,r.height),void 0===a.gifLoopCount&&(a.gifLoopCount=o.gifLoopCount??0);let d=a.gifFrame??0,h={x:-(.5*o.gifData.width),y:-(.5*o.gifData.height)},u=o.gifData.frames[d];if(void 0===a.gifTime&&(a.gifTime=0),u.bitmap){switch(t.scale(i/o.gifData.width,i/o.gifData.height),u.disposalMethod){case l.UndefinedA:case l.UndefinedB:case l.UndefinedC:case l.UndefinedD:case l.Replace:c.drawImage(u.bitmap,u.left,u.top),t.drawImage(r,h.x,h.y),c.clearRect(_.x,_.y,r.width,r.height);break;case l.Combine:c.drawImage(u.bitmap,u.left,u.top),t.drawImage(r,h.x,h.y);break;case l.RestoreBackground:c.drawImage(u.bitmap,u.left,u.top),t.drawImage(r,h.x,h.y),c.clearRect(_.x,_.y,r.width,r.height),o.gifData.globalColorTable.length?c.putImageData(o.gifData.backgroundImage,h.x,h.y):c.putImageData(o.gifData.frames[0].image,h.x+u.left,h.y+u.top);break;case l.RestorePrevious:{let e=c.getImageData(_.x,_.y,r.width,r.height);c.drawImage(u.bitmap,u.left,u.top),t.drawImage(r,h.x,h.y),c.clearRect(_.x,_.y,r.width,r.height),c.putImageData(e,_.x,_.y)}}if(a.gifTime+=s.value,a.gifTime>u.delayTime){if(a.gifTime-=u.delayTime,++d>=o.gifData.frames.length){if(--a.gifLoopCount<=0)return;d=0,c.clearRect(_.x,_.y,r.width,r.height)}a.gifFrame=d}t.scale(o.gifData.width/i,o.gifData.height/i)}}(e);else if(r){let e=o.ratio,a={x:-i,y:-i},s=2*i;t.drawImage(r,a.x,a.y,s,s/e)}t.globalAlpha=1}}getSidesCount(){return 12}async init(e){let t=e.actualOptions;if(t.preload&&this._engine.loadImage)for(let e of t.preload)await this._engine.loadImage(e)}loadShape(e){if("image"!==e.shape&&"images"!==e.shape)return;this._engine.images||(this._engine.images=[]);let t=e.shapeData;if(!t)return;let i=this._engine.images.find(e=>e.name===t.name||e.source===t.src);i||this.loadImageShape(t).then(()=>{this.loadShape(e)})}particleInit(e,t){if("image"!==t.shape&&"images"!==t.shape)return;this._engine.images||(this._engine.images=[]);let i=this._engine.images,a=t.shapeData;if(!a)return;let s=t.getFillColor(),o=i.find(e=>e.name===a.name||e.source===a.src);if(!o)return;let r=a.replaceColor??o.replaceColor;if(o.loading){setTimeout(()=>{this.particleInit(e,t)});return}(async()=>{let e;(e=o.svgData&&s?await function(e,t,i,a){let s=function(e,t,i){let{svgData:a}=e;if(!a)return"";let s=(0,d.vzQ)(t,i);if(a.includes("fill"))return a.replace(b,()=>s);let o=a.indexOf(">");return`${a.substring(0,o)} fill="${s}"${a.substring(o)}`}(e,i,a.opacity?.value??1),o={color:i,gif:t.gif,data:{...e,svgData:s},loaded:!1,ratio:t.width/t.height,replaceColor:t.replaceColor,source:t.src};return new Promise(t=>{let i=new Blob([s],{type:"image/svg+xml"}),a=URL||window.URL||window.webkitURL||window,r=a.createObjectURL(i),l=new Image;l.addEventListener("load",()=>{o.loaded=!0,o.element=l,t(o),a.revokeObjectURL(r)});let errorHandler=async()=>{a.revokeObjectURL(r);let i={...e,error:!1,loading:!0};await loadImage(i),o.loaded=!0,o.element=i.element,t(o)};l.addEventListener("error",()=>void errorHandler()),l.src=r})}(o,a,s,t):{color:s,data:o,element:o.element,gif:o.gif,gifData:o.gifData,gifLoopCount:o.gifLoopCount,loaded:!0,ratio:a.width&&a.height?a.width/a.height:o.ratio??1,replaceColor:r,source:a.src}).ratio||(e.ratio=1);let i=a.fill??t.shapeFill,l=a.close??t.shapeClose,c={image:e,fill:i,close:l};t.image=c.image,t.shapeFill=c.fill,t.shapeClose=c.close})()}};let Preload=class Preload{constructor(){this.src="",this.gif=!1}load(e){e&&(void 0!==e.gif&&(this.gif=e.gif),void 0!==e.height&&(this.height=e.height),void 0!==e.name&&(this.name=e.name),void 0!==e.replaceColor&&(this.replaceColor=e.replaceColor),void 0!==e.src&&(this.src=e.src),void 0!==e.width&&(this.width=e.width))}};let ImagePreloaderPlugin=class ImagePreloaderPlugin{constructor(e){this.id="imagePreloader",this._engine=e}async getPlugin(){return await Promise.resolve(),{}}loadOptions(e,t){if(!t?.preload)return;e.preload||(e.preload=[]);let i=e.preload;for(let e of t.preload){let t=i.find(t=>t.name===e.name||t.src===e.src);if(t)t.load(e);else{let t=new Preload;t.load(e),i.push(t)}}}needsPlugin(){return!0}};async function loadImageShape(e,t=!0){e.loadImage||(e.loadImage=async t=>{if(!t.name&&!t.src)throw Error(`${d.gK4} no image source provided`);if(e.images||(e.images=[]),!e.images.find(e=>e.name===t.name||e.source===t.src))try{let i;let a={gif:t.gif??!1,name:t.name??t.src,source:t.src,type:t.src.substring(t.src.length-3),error:!1,loading:!0,replaceColor:t.replaceColor,ratio:t.width&&t.height?t.width/t.height:void 0};e.images.push(a),i=t.gif?loadGifImage:t.replaceColor?downloadSvgImage:loadImage,await i(a)}catch{throw Error(`${d.gK4} ${t.name??t.src} not found`)}});let i=new ImagePreloaderPlugin(e);await e.addPlugin(i,t),await e.addShape(new ImageDrawer(e),t)}let LifeDelay=class LifeDelay extends d.SWe{constructor(){super(),this.sync=!1}load(e){e&&(super.load(e),void 0!==e.sync&&(this.sync=e.sync))}};let LifeDuration=class LifeDuration extends d.SWe{constructor(){super(),this.sync=!1}load(e){e&&(super.load(e),void 0!==e.sync&&(this.sync=e.sync))}};let Life=class Life{constructor(){this.count=0,this.delay=new LifeDelay,this.duration=new LifeDuration}load(e){e&&(void 0!==e.count&&(this.count=e.count),this.delay.load(e.delay),this.duration.load(e.duration))}};let LifeUpdater=class LifeUpdater{constructor(e){this.container=e}init(e){let t=this.container,i=e.options,a=i.life;a&&(e.life={delay:t.retina.reduceFactor?(0,d.Gu7)(a.delay.value)*(a.delay.sync?1:(0,d.sZz)())/t.retina.reduceFactor*d.X5o:0,delayTime:0,duration:t.retina.reduceFactor?(0,d.Gu7)(a.duration.value)*(a.duration.sync?1:(0,d.sZz)())/t.retina.reduceFactor*d.X5o:0,time:0,count:a.count},e.life.duration<=0&&(e.life.duration=-1),e.life.count<=0&&(e.life.count=-1),e.life&&(e.spawning=e.life.delay>0))}isEnabled(e){return!e.destroyed}loadOptions(e,...t){for(let i of(e.life||(e.life=new Life),t))e.life.load(i?.life)}update(e,t){this.isEnabled(e)&&e.life&&function(e,t,i){if(!e.life)return;let a=e.life,s=!1;if(e.spawning){if(a.delayTime+=t.value,!(a.delayTime>=e.life.delay))return;s=!0,e.spawning=!1,a.delayTime=0,a.time=0}if(-1===a.duration||e.spawning||(s?a.time=0:a.time+=t.value,a.time<a.duration))return;if(a.time=0,e.life.count>0&&e.life.count--,0===e.life.count){e.destroy();return}let o=(0,d.Cst)(0,i.width),r=(0,d.Cst)(0,i.width);e.position.x=(0,d.vdf)(o),e.position.y=(0,d.vdf)(r),e.spawning=!0,a.delayTime=0,a.time=0,e.reset();let l=e.options.life;l&&(a.delay=(0,d.Gu7)(l.delay.value)*d.X5o,a.duration=(0,d.Gu7)(l.duration.value)*d.X5o)}(e,t,this.container.canvas.size)}};async function loadLifeUpdater(e,t=!0){await e.addParticleUpdater("life",async e=>Promise.resolve(new LifeUpdater(e)),t)}let LineDrawer=class LineDrawer{constructor(){this.validTypes=["line"]}draw(e){!function(e){let{context:t,particle:i,radius:a}=e,s=i.shapeData;t.moveTo(-a,0),t.lineTo(a,0),t.lineCap=s?.cap??"butt"}(e)}getSidesCount(){return 1}};async function loadLineShape(e,t=!0){await e.addShape(new LineDrawer,t)}let ParallaxMover=class ParallaxMover{init(){}isEnabled(e){return!(0,d.KrJ)()&&!e.destroyed&&e.container.actualOptions.interactivity.events.onHover.parallax.enable}move(e){let t=e.container,i=t.actualOptions,a=i.interactivity.events.onHover.parallax;if((0,d.KrJ)()||!a.enable)return;let s=a.force,o=t.interactivity.mouse.position;if(!o)return;let r=t.canvas.size,l={x:.5*r.width,y:.5*r.height},c=a.smooth,h=e.getRadius()/s,u={x:(o.x-l.x)*h,y:(o.y-l.y)*h},{offset:p}=e;p.x+=(u.x-p.x)/c,p.y+=(u.y-p.y)/c}};async function loadParallaxMover(e,t=!0){await e.addMover("parallax",()=>Promise.resolve(new ParallaxMover),t)}let Attractor_Attractor=class Attractor_Attractor extends d.$Sh{constructor(e){super(e)}clear(){}init(){}interact(e){let t=this.container;void 0===e.attractDistance&&(e.attractDistance=(0,d.Gu7)(e.options.move.attract.distance)*t.retina.pixelRatio);let i=e.attractDistance,a=e.getPosition(),s=t.particles.quadTree.queryCircle(a,i);for(let t of s){if(e===t||!t.options.move.attract.enable||t.destroyed||t.spawning)continue;let i=t.getPosition(),{dx:s,dy:o}=(0,d.oW6)(a,i),r=e.options.move.attract.rotate,l=s/(1e3*r.x),c=o/(1e3*r.y),h=t.size.value/e.size.value,u=1/h;e.velocity.x-=l*h,e.velocity.y-=c*h,t.velocity.x+=l*u,t.velocity.y+=c*u}}isEnabled(e){return e.options.move.attract.enable}reset(){}};async function loadParticlesAttractInteraction(e,t=!0){await e.addInteractor("particlesAttract",e=>Promise.resolve(new Attractor_Attractor(e)),t)}function updateAbsorb(e,t,i,a,s,o){let r=(0,d.uZ5)(e.options.collisions.absorb.speed*s.factor/10,0,a);e.size.value+=.5*r,i.size.value-=r,a<=o&&(i.size.value=0,i.destroy())}let fixBounceSpeed=e=>{void 0===e.collisionMaxSpeed&&(e.collisionMaxSpeed=(0,d.Gu7)(e.options.collisions.maxSpeed)),e.velocity.length>e.collisionMaxSpeed&&(e.velocity.length=e.collisionMaxSpeed)};function bounce(e,t){(0,d.kRC)((0,d.gy4)(e),(0,d.gy4)(t)),fixBounceSpeed(e),fixBounceSpeed(t)}let Collider=class Collider extends d.$Sh{constructor(e){super(e)}clear(){}init(){}interact(e,t){if(e.destroyed||e.spawning)return;let i=this.container,a=e.getPosition(),s=e.getRadius(),o=i.particles.quadTree.queryCircle(a,2*s);for(let r of o){if(e===r||!r.options.collisions.enable||e.options.collisions.mode!==r.options.collisions.mode||r.destroyed||r.spawning)continue;let o=r.getPosition(),l=r.getRadius();if(Math.abs(Math.round(a.z)-Math.round(o.z))>s+l)continue;let c=(0,d.Spd)(a,o),h=s+l;c>h||function(e,t,i,a){switch(e.options.collisions.mode){case d.Dpx.absorb:!function(e,t,i,a){let s=e.getRadius(),o=t.getRadius();void 0===s&&void 0!==o?e.destroy():void 0!==s&&void 0===o?t.destroy():void 0!==s&&void 0!==o&&(s>=o?updateAbsorb(e,s,t,o,i,a):updateAbsorb(t,o,e,s,i,a))}(e,t,i,a);break;case d.Dpx.bounce:bounce(e,t);break;case d.Dpx.destroy:!function(e,t){if(e.unbreakable||t.unbreakable||bounce(e,t),void 0===e.getRadius()&&void 0!==t.getRadius())e.destroy();else if(void 0!==e.getRadius()&&void 0===t.getRadius())t.destroy();else if(void 0!==e.getRadius()&&void 0!==t.getRadius()){let i=e.getRadius()>=t.getRadius()?t:e;i.destroy()}}(e,t)}}(e,r,t,i.retina.pixelRatio)}}isEnabled(e){return e.options.collisions.enable}reset(){}};async function loadParticlesCollisionsInteraction(e,t=!0){await e.addInteractor("particlesCollisions",e=>Promise.resolve(new Collider(e)),t)}let CircleWarp=class CircleWarp extends d.Cdc{constructor(e,t,i,a){super(e,t,i),this.canvasSize=a,this.canvasSize={...a}}contains(e){let{width:t,height:i}=this.canvasSize,{x:a,y:s}=e;return super.contains(e)||super.contains({x:a-t,y:s})||super.contains({x:a-t,y:s-i})||super.contains({x:a,y:s-i})}intersects(e){if(super.intersects(e))return!0;let t={x:e.position.x-this.canvasSize.width,y:e.position.y-this.canvasSize.height};if(void 0!==e.radius){let i=new d.Cdc(t.x,t.y,2*e.radius);return super.intersects(i)}if(void 0!==e.size){let i=new d.AeJ(t.x,t.y,2*e.size.width,2*e.size.height);return super.intersects(i)}return!1}};let LinksShadow=class LinksShadow{constructor(){this.blur=5,this.color=new d.OzF,this.color.value="#000",this.enable=!1}load(e){e&&(void 0!==e.blur&&(this.blur=e.blur),this.color=d.OzF.create(this.color,e.color),void 0!==e.enable&&(this.enable=e.enable))}};let LinksTriangle=class LinksTriangle{constructor(){this.enable=!1,this.frequency=1}load(e){e&&(void 0!==e.color&&(this.color=d.OzF.create(this.color,e.color)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.frequency&&(this.frequency=e.frequency),void 0!==e.opacity&&(this.opacity=e.opacity))}};let Links=class Links{constructor(){this.blink=!1,this.color=new d.OzF,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new LinksShadow,this.triangles=new LinksTriangle,this.width=1,this.warp=!1}load(e){e&&(void 0!==e.id&&(this.id=e.id),void 0!==e.blink&&(this.blink=e.blink),this.color=d.OzF.create(this.color,e.color),void 0!==e.consent&&(this.consent=e.consent),void 0!==e.distance&&(this.distance=e.distance),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.frequency&&(this.frequency=e.frequency),void 0!==e.opacity&&(this.opacity=e.opacity),this.shadow.load(e.shadow),this.triangles.load(e.triangles),void 0!==e.width&&(this.width=e.width),void 0!==e.warp&&(this.warp=e.warp))}};let C={x:0,y:0};let Linker=class Linker extends d.$Sh{constructor(e){super(e),this._setColor=e=>{if(!e.options.links)return;let t=this.linkContainer,i=e.options.links,a=void 0===i.id?t.particles.linksColor:t.particles.linksColors.get(i.id);if(a)return;let s=i.color;a=(0,d.Dt5)(s,i.blink,i.consent),void 0===i.id?t.particles.linksColor=a:t.particles.linksColors.set(i.id,a)},this.linkContainer=e}clear(){}init(){this.linkContainer.particles.linksColor=void 0,this.linkContainer.particles.linksColors=new Map}interact(e){let t;if(!e.options.links)return;e.links=[];let i=e.getPosition(),a=this.container,s=a.canvas.size;if(i.x<C.x||i.y<C.y||i.x>s.width||i.y>s.height)return;let o=e.options.links,r=o.opacity,l=e.retina.linksDistance??0,c=o.warp;t=c?new CircleWarp(i.x,i.y,l,s):new d.Cdc(i.x,i.y,l);let h=a.particles.quadTree.query(t);for(let t of h){let a=t.options.links;if(e===t||!a?.enable||o.id!==a.id||t.spawning||t.destroyed||!t.links||e.links.some(e=>e.destination===t)||t.links.some(t=>t.destination===e))continue;let h=t.getPosition();if(h.x<C.x||h.y<C.y||h.x>s.width||h.y>s.height)continue;let u=function(e,t,i,a,s){let{dx:o,dy:r,distance:l}=(0,d.oW6)(e,t);if(!s||l<=i)return l;let c={x:Math.abs(o),y:Math.abs(r)},h={x:Math.min(c.x,a.width-c.x),y:Math.min(c.y,a.height-c.y)};return Math.sqrt(h.x**2+h.y**2)}(i,h,l,s,c&&a.warp);if(u>l)continue;let p=(1-u/l)*r;this._setColor(e),e.links.push({destination:t,opacity:p})}}isEnabled(e){return!!e.options.links?.enable}loadParticlesOptions(e,...t){for(let i of(e.links||(e.links=new Links),t))e.links.load(i?.links)}reset(){}};async function loadLinksInteraction(e,t=!0){await e.addInteractor("particlesLinks",async e=>Promise.resolve(new Linker(e)),t)}function setLinkFrequency(e,t){var i;let a=((i=e.map(e=>e.id)).sort((e,t)=>e-t),i.join("_")),s=t.get(a);return void 0===s&&(s=(0,d.sZz)(),t.set(a,s)),s}let LinkInstance=class LinkInstance{constructor(e){this.container=e,this._drawLinkLine=(e,t)=>{let i=e.options.links;if(!i?.enable)return;let a=this.container,s=a.actualOptions,o=t.destination,r=e.getPosition(),l=o.getPosition(),c=t.opacity;a.canvas.draw(t=>{let h;let u=e.options.twinkle?.lines;if(u?.enable){let e=u.frequency,t=(0,d.tXk)(u.color),i=(0,d.sZz)()<e;i&&t&&(h=t,c=(0,d.Gu7)(u.opacity))}if(!h){let t=void 0!==i.id?a.particles.linksColors.get(i.id):a.particles.linksColor;h=(0,d.BEi)(e,o,t)}if(!h)return;let p=e.retina.linksWidth??0,g=e.retina.linksDistance??0,{backgroundMask:m}=s;!function(e){let t=!1,{begin:i,end:a,maxDistance:s,context:o,canvasSize:r,width:l,backgroundMask:c,colorLine:h,opacity:u,links:p}=e;if((0,d.Spd)(i,a)<=s)(0,d.pSR)(o,i,a),t=!0;else if(p.warp){let e,l;let c={x:a.x-r.width,y:a.y},h=(0,d.oW6)(i,c);if(h.distance<=s){let t=i.y-h.dy/h.dx*i.x;e={x:0,y:t},l={x:r.width,y:t}}else{let t={x:a.x,y:a.y-r.height},o=(0,d.oW6)(i,t);if(o.distance<=s){let t=i.y-o.dy/o.dx*i.x,a=-t/(o.dy/o.dx);e={x:a,y:0},l={x:a,y:r.height}}else{let t={x:a.x-r.width,y:a.y-r.height},o=(0,d.oW6)(i,t);if(o.distance<=s){let t=i.y-o.dy/o.dx*i.x,a=-t/(o.dy/o.dx);l={x:(e={x:a,y:t}).x+r.width,y:e.y+r.height}}}}e&&l&&((0,d.pSR)(o,i,e),(0,d.pSR)(o,a,l),t=!0)}if(!t)return;o.lineWidth=l,c.enable&&(o.globalCompositeOperation=c.composite),o.strokeStyle=(0,d.izR)(h,u);let{shadow:g}=p;if(g.enable){let e=(0,d.tXk)(g.color);e&&(o.shadowBlur=g.blur,o.shadowColor=(0,d.izR)(e))}o.stroke()}({context:t,width:p,begin:r,end:l,maxDistance:g,canvasSize:a.canvas.size,links:i,backgroundMask:m,colorLine:h,opacity:c})})},this._drawLinkTriangle=(e,t,i)=>{let a=e.options.links;if(!a?.enable)return;let s=a.triangles;if(!s.enable)return;let o=this.container,r=o.actualOptions,l=t.destination,c=i.destination,h=s.opacity??(t.opacity+i.opacity)*.5;h<=0||o.canvas.draw(t=>{let i=e.getPosition(),u=l.getPosition(),p=c.getPosition(),g=e.retina.linksDistance??0;if((0,d.Spd)(i,u)>g||(0,d.Spd)(p,u)>g||(0,d.Spd)(p,i)>g)return;let m=(0,d.tXk)(s.color);if(!m){let t=void 0!==a.id?o.particles.linksColors.get(a.id):o.particles.linksColor;m=(0,d.BEi)(e,l,t)}m&&function(e){let{context:t,pos1:i,pos2:a,pos3:s,backgroundMask:o,colorTriangle:r,opacityTriangle:l}=e;t.beginPath(),t.moveTo(i.x,i.y),t.lineTo(a.x,a.y),t.lineTo(s.x,s.y),t.closePath(),o.enable&&(t.globalCompositeOperation=o.composite),t.fillStyle=(0,d.izR)(r,l),t.fill()}({context:t,pos1:i,pos2:u,pos3:p,backgroundMask:r.backgroundMask,colorTriangle:m,opacityTriangle:h})})},this._drawTriangles=(e,t,i,a)=>{let s=i.destination;if(!(e.links?.triangles.enable&&s.options.links?.triangles.enable))return;let o=s.links?.filter(e=>{let t=this._getLinkFrequency(s,e.destination);return s.options.links&&t<=s.options.links.frequency&&a.findIndex(t=>t.destination===e.destination)>=0});if(o?.length)for(let a of o){let o=a.destination,r=this._getTriangleFrequency(t,s,o);r>e.links.triangles.frequency||this._drawLinkTriangle(t,i,a)}},this._getLinkFrequency=(e,t)=>setLinkFrequency([e,t],this._freqs.links),this._getTriangleFrequency=(e,t,i)=>setLinkFrequency([e,t,i],this._freqs.triangles),this._freqs={links:new Map,triangles:new Map}}drawParticle(e,t){let{links:i,options:a}=t;if(!i?.length)return;let s=i.filter(e=>a.links&&(a.links.frequency>=1||this._getLinkFrequency(t,e.destination)<=a.links.frequency));for(let e of s)this._drawTriangles(a,t,e,s),e.opacity>0&&(t.retina.linksWidth??0)>0&&this._drawLinkLine(t,e)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(e){if(e.links=[],!e.options.links)return;let t=this.container.retina.pixelRatio,{retina:i}=e,{distance:a,width:s}=e.options.links;i.linksDistance=a*t,i.linksWidth=s*t}particleDestroyed(e){e.links=[]}};let LinksPlugin=class LinksPlugin{constructor(){this.id="links"}getPlugin(e){return Promise.resolve(new LinkInstance(e))}loadOptions(){}needsPlugin(){return!0}};async function loadLinksPlugin(e,t=!0){let i=new LinksPlugin;await e.addPlugin(i,t)}async function loadParticlesLinksInteraction(e,t=!0){await loadLinksInteraction(e,t),await loadLinksPlugin(e,t)}let k={x:0,y:0};let PolygonDrawerBase=class PolygonDrawerBase{draw(e){let{particle:t,radius:i}=e,a=this.getCenter(t,i),s=this.getSidesData(t,i);!function(e,t,i){let{context:a}=e,s=i.count.numerator*i.count.denominator,o=i.count.numerator/i.count.denominator,r=Math.PI-(0,d.Idc)(180*(o-2)/o);if(a){a.beginPath(),a.translate(t.x,t.y),a.moveTo(k.x,k.y);for(let e=0;e<s;e++)a.lineTo(i.length,k.y),a.translate(i.length,k.y),a.rotate(r)}}(e,a,s)}getSidesCount(e){let t=e.shapeData;return Math.round((0,d.Gu7)(t?.sides??5))}};let PolygonDrawer=class PolygonDrawer extends PolygonDrawerBase{constructor(){super(...arguments),this.validTypes=["polygon"]}getCenter(e,t){return{x:-t/(e.sides/3.5),y:-t/.76}}getSidesData(e,t){let i=e.sides;return{count:{denominator:1,numerator:i},length:2.66*t/(i/3)}}};let TriangleDrawer=class TriangleDrawer extends PolygonDrawerBase{constructor(){super(...arguments),this.validTypes=["triangle"]}getCenter(e,t){return{x:-t,y:t/1.66}}getSidesCount(){return 3}getSidesData(e,t){return{count:{denominator:2,numerator:3},length:2*t}}};async function loadGenericPolygonShape(e,t=!0){await e.addShape(new PolygonDrawer,t)}async function loadTriangleShape(e,t=!0){await e.addShape(new TriangleDrawer,t)}async function loadPolygonShape(e,t=!0){await loadGenericPolygonShape(e,t),await loadTriangleShape(e,t)}let RotateAnimation=class RotateAnimation{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=(0,d.Cst)(e.speed)),void 0!==e.decay&&(this.decay=(0,d.Cst)(e.decay)),void 0!==e.sync&&(this.sync=e.sync))}};let Rotate=class Rotate extends d.SWe{constructor(){super(),this.animation=new RotateAnimation,this.direction=d.RnL.clockwise,this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}};let R=2*Math.PI;let RotateUpdater=class RotateUpdater{constructor(e){this.container=e}init(e){let t=e.options.rotate;if(!t)return;e.rotate={enable:t.animation.enable,value:(0,d.Idc)((0,d.Gu7)(t.value)),min:0,max:R},e.pathRotation=t.path;let i=t.direction;if(i===d.RnL.random){let e=Math.floor(2*(0,d.sZz)());i=e>0?d.RnL.counterClockwise:d.RnL.clockwise}switch(i){case d.RnL.counterClockwise:case"counterClockwise":e.rotate.status=d.NV1.decreasing;break;case d.RnL.clockwise:e.rotate.status=d.NV1.increasing}let a=t.animation;a.enable&&(e.rotate.decay=1-(0,d.Gu7)(a.decay),e.rotate.velocity=(0,d.Gu7)(a.speed)/360*this.container.retina.reduceFactor,a.sync||(e.rotate.velocity*=(0,d.sZz)())),e.rotation=e.rotate.value}isEnabled(e){let t=e.options.rotate;return!!t&&!e.destroyed&&!e.spawning&&(!!t.value||t.animation.enable||t.path)}loadOptions(e,...t){for(let i of(e.rotate||(e.rotate=new Rotate),t))e.rotate.load(i?.rotate)}update(e,t){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&((0,d.CrJ)(e,e.rotate,!1,d.Hyf.none,t),e.rotation=e.rotate.value))}};async function loadRotateUpdater(e,t=!0){await e.addParticleUpdater("rotate",e=>Promise.resolve(new RotateUpdater(e)),t)}let O=Math.sqrt(2);let SquareDrawer=class SquareDrawer{constructor(){this.validTypes=["edge","square"]}draw(e){!function(e){let{context:t,radius:i}=e,a=i/O,s=2*a;t.rect(-a,-a,s,s)}(e)}getSidesCount(){return 4}};async function loadSquareShape(e,t=!0){await e.addShape(new SquareDrawer,t)}let M={x:0,y:0};let StarDrawer=class StarDrawer{constructor(){this.validTypes=["star"]}draw(e){!function(e){let{context:t,particle:i,radius:a}=e,s=i.sides,o=i.starInset??2;t.moveTo(M.x,M.y-a);for(let e=0;e<s;e++)t.rotate(Math.PI/s),t.lineTo(M.x,M.y-a*o),t.rotate(Math.PI/s),t.lineTo(M.x,M.y-a)}(e)}getSidesCount(e){let t=e.shapeData;return Math.round((0,d.Gu7)(t?.sides??5))}particleInit(e,t){let i=t.shapeData;t.starInset=(0,d.Gu7)(i?.inset??2)}};async function loadStarShape(e,t=!0){await e.addShape(new StarDrawer,t)}let StrokeColorUpdater=class StrokeColorUpdater{constructor(e){this.container=e}init(e){let t=this.container,i=e.options,a=(0,d.wA_)(i.stroke,e.id,i.reduceDuplicates);e.strokeWidth=(0,d.Gu7)(a.width)*t.retina.pixelRatio,e.strokeOpacity=(0,d.Gu7)(a.opacity??1),e.strokeAnimation=a.color?.animation;let s=(0,d.lNs)(a.color)??e.getFillColor();s&&(e.strokeColor=(0,d.bS$)(s,e.strokeAnimation,t.retina.reduceFactor))}isEnabled(e){let t=e.strokeAnimation,{strokeColor:i}=e;return!e.destroyed&&!e.spawning&&!!t&&(i?.h.value!==void 0&&i.h.enable||i?.s.value!==void 0&&i.s.enable||i?.l.value!==void 0&&i.l.enable)}update(e,t){this.isEnabled(e)&&(0,d.PBz)(e.strokeColor,t)}};async function loadStrokeColorUpdater(e,t=!0){await e.addParticleUpdater("strokeColor",e=>Promise.resolve(new StrokeColorUpdater(e)),t)}async function loadSlim(e,t=!0){await loadParallaxMover(e,!1),await loadExternalAttractInteraction(e,!1),await loadExternalBounceInteraction(e,!1),await loadExternalBubbleInteraction(e,!1),await loadExternalConnectInteraction(e,!1),await loadExternalGrabInteraction(e,!1),await loadExternalPauseInteraction(e,!1),await loadExternalPushInteraction(e,!1),await loadExternalRemoveInteraction(e,!1),await loadExternalRepulseInteraction(e,!1),await loadExternalSlowInteraction(e,!1),await loadParticlesAttractInteraction(e,!1),await loadParticlesCollisionsInteraction(e,!1),await loadParticlesLinksInteraction(e,!1),await loadEasingQuadPlugin(),await loadEmojiShape(e,!1),await loadImageShape(e,!1),await loadLineShape(e,!1),await loadPolygonShape(e,!1),await loadSquareShape(e,!1),await loadStarShape(e,!1),await loadLifeUpdater(e,!1),await loadRotateUpdater(e,!1),await loadStrokeColorUpdater(e,!1),await loadBasic(e,t)}}}]);