UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 99.2 kB
export const __webpack_ids__=["92996"];export const __webpack_modules__={35709:function(t,e,i){var s=i(27847),n=i(72309),o=i(13465).f,a=s("unscopables"),r=Array.prototype;void 0===r[a]&&o(r,a,{configurable:!0,value:n(null)}),t.exports=function(t){r[a][t]=!0}},17743:function(t,e,i){var s=i(13053);t.exports=function(t,e,i){for(var n=0,o=arguments.length>2?i:s(e),a=new t(o);o>n;)a[n]=e[n++];return a}},37595:function(t,e,i){var s=i(31269),n=i(72878),o=i(25091),a=i(12360),r=i(70273),c=i(13053),h=i(72309),l=i(17743),d=Array,u=n([].push);t.exports=function(t,e,i,n){for(var p,f,v,g=a(t),y=o(g),m=s(e,i),w=h(null),_=c(y),b=0;_>b;b++)v=y[b],(f=r(m(v,b,g)))in w?u(w[f],v):w[f]=[v];if(n&&(p=n(g))!==d)for(f in w)w[f]=l(p,w[f]);return w}},22139:function(t,e,i){var s=i(40810),n=i(37595),o=i(35709);s({target:"Array",proto:!0},{group:function(t){return n(this,t,arguments.length>1?arguments[1]:void 0)}}),o("group")},95031:function(t,e,i){i.d(e,{BVM:()=>yt,V0:()=>Yt,uZ5:()=>at,izR:()=>me,S6T:()=>ps,PBz:()=>Pe,RnL:()=>rs,CrJ:()=>Ut,DYc:()=>zt,bS$:()=>ke,Spd:()=>ft,Voc:()=>ae,M_G:()=>At,BEi:()=>_e,Ft:()=>tt,Gu7:()=>ht,veL:()=>ve,Cdc:()=>Xi,Dt5:()=>be,Ac:()=>Ft,vdf:()=>ct,Kn2:()=>J,tXk:()=>de,$Sh:()=>as,oW6:()=>pt,AeJ:()=>Ni,OWs:()=>it,sZz:()=>ot,Y6v:()=>ge,KIV:()=>dt,pSR:()=>Oe,Idc:()=>vt,Igb:()=>qi,tZy:()=>c,lNs:()=>pe,OzF:()=>Ee});i(92745),i(9359),i(1331),i(31526),i(70104);const s="generated",n="pointerleave",o="pointermove",a="touchend",r="tsParticles - Error",c=100,h=.5,l=1e3,d=0,u=0,p=0,f=1,v=0,g=0,y=1,m="random",w="mid",_=2,b=Math.PI*_,x="true",k="false",z="canvas",M=255,P=360,O=100,C=100,S=0,D=0,I=60,T=.25,R=h+T,L=1,E=1,F=1,A=0,V=255,q=3,W=6,Y=1,B=1,G=0,U=0,H=0,$=0;var Z,X;i(52924);function N(t){return"boolean"==typeof t}function Q(t){return"string"==typeof t}function j(t){return"number"==typeof t}function J(t){return"object"==typeof t&&null!==t}function K(t){return Array.isArray(t)}function tt(t){return null==t}(X=Z||(Z={})).bottom="bottom",X.bottomLeft="bottom-left",X.bottomRight="bottom-right",X.left="left",X.none="none",X.right="right",X.top="top",X.topLeft="top-left",X.topRight="top-right",X.outside="outside",X.inside="inside";class et{constructor(t,e,i){if(this._updateFromAngle=(t,e)=>{this.x=Math.cos(t)*e,this.y=Math.sin(t)*e},!j(t)&&t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:p}else{if(void 0===t||void 0===e)throw new Error(`${r} Vector3d not initialized correctly`);this.x=t,this.y=e,this.z=i??p}}static get origin(){return et.create(d,u,p)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return et.create(t.x,t.y,t.z)}static create(t,e,i){return new et(t,e,i)}add(t){return et.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return et.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return et.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return et.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return et.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),p)}setTo(t){this.x=t.x,this.y=t.y;const e=t;this.z=e.z?e.z:p}sub(t){return et.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}}class it extends et{constructor(t,e){super(t,e,p)}static get origin(){return it.create(d,u)}static clone(t){return it.create(t.x,t.y)}static create(t,e){return new it(t,e)}}let st=Math.random;const nt={nextFrame:t=>requestAnimationFrame(t),cancel:t=>cancelAnimationFrame(t)};function ot(){return at(st(),0,1-Number.EPSILON)}function at(t,e,i){return Math.min(Math.max(t,e),i)}function rt(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function ct(t){const e=dt(t);let i=lt(t);return e===i&&(i=0),ot()*(e-i)+i}function ht(t){return j(t)?t:ct(t)}function lt(t){return j(t)?t:t.min}function dt(t){return j(t)?t:t.max}function ut(t,e){if(t===e||void 0===e&&j(t))return t;const i=lt(t),s=dt(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:ut(i,s)}function pt(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.sqrt(i**2+s**2)}}function ft(t,e){return pt(t,e).distance}function vt(t){return t*Math.PI/180}function gt(t){return{x:t.position?.x??ot()*t.size.width,y:t.position?.y??ot()*t.size.height}}function yt(t){return t?t.endsWith("%")?parseFloat(t)/c:parseFloat(t):1}var mt,wt,_t,bt,xt,kt,zt,Mt,Pt,Ot,Ct,St;(wt=mt||(mt={})).auto="auto",wt.increase="increase",wt.decrease="decrease",wt.random="random",(bt=_t||(_t={})).increasing="increasing",bt.decreasing="decreasing",(kt=xt||(xt={})).none="none",kt.max="max",kt.min="min",(Mt=zt||(zt={})).bottom="bottom",Mt.left="left",Mt.right="right",Mt.top="top",(Ot=Pt||(Pt={})).precise="precise",Ot.percent="percent",(St=Ct||(Ct={})).max="max",St.min="min",St.random="random";const Dt={debug:console.debug,error:console.error,info:console.info,log:console.log,verbose:console.log,warning:console.warn};function It(){return Dt}function Tt(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function Rt(t){if(!Tt()&&"undefined"!=typeof matchMedia)return matchMedia(t)}function Lt(t,e){return t===e||K(e)&&e.indexOf(t)>-1}function Et(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(ot()*t.length)}(t)]}function Ft(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==zt.bottom||(n=t.top<e.height+i.x);!n||s&&s!==zt.left||(n=t.right>i.x);!n||s&&s!==zt.right||(n=t.left<e.width+i.y);!n||s&&s!==zt.top||(n=t.bottom>i.y);return n}(At(t,s??0),e,i,n)}function At(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Vt(t,...e){for(const i of e){if(null==i)continue;if(!J(i)){t=i;continue}const e=Array.isArray(i);!e||!J(t)&&t&&Array.isArray(t)?e||!J(t)&&t&&!Array.isArray(t)||(t={}):t=[];for(const e in i){if("__proto__"===e)continue;const s=i[e],n=t;n[e]=J(s)&&Array.isArray(s)?s.map((t=>Vt(n[e],t))):Vt(n[e],s)}}return t}function qt(t,e){return K(t)?t.map(((t,i)=>e(t,i))):e(t,0)}function Wt(t,e,i){return K(t)?Et(t,e,i):t}function Yt(t,e){const i=t.value,s=t.animation,n={delayTime:ht(s.delay)*l,enable:s.enable,value:ht(t.value)*e,max:dt(i)*e,min:lt(i)*e,loops:0,maxLoops:ht(s.count),time:0};if(s.enable){switch(n.decay=1-ht(s.decay),s.mode){case mt.increase:n.status=_t.increasing;break;case mt.decrease:n.status=_t.decreasing;break;case mt.random:n.status=ot()>=h?_t.increasing:_t.decreasing}const t=s.mode===mt.auto;switch(s.startValue){case Ct.min:n.value=n.min,t&&(n.status=_t.increasing);break;case Ct.max:n.value=n.max,t&&(n.status=_t.decreasing);break;case Ct.random:default:n.value=ct(n),t&&(n.status=ot()>=h?_t.increasing:_t.decreasing)}}return n.initialValue=n.value,n}function Bt(t,e){if(!(t.mode===Pt.percent)){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/c*e.width,y:t.y/c*e.height}:{width:t.width/c*e.width,height:t.height/c*e.height}}function Gt(t,e){return Bt(t,e)}function Ut(t,e,i,s,n){if(t.destroyed||!e||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const o=(e.velocity??0)*n.factor,a=e.min,r=e.max,c=e.decay??1;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case _t.increasing:e.value>=r?(i?e.status=_t.decreasing:e.value-=r,e.loops||(e.loops=0),e.loops++):e.value+=o;break;case _t.decreasing:e.value<=a?(i?e.status=_t.increasing:e.value+=r,e.loops||(e.loops=0),e.loops++):e.value-=o}e.velocity&&1!==c&&(e.velocity*=c),function(t,e,i,s,n){switch(e){case xt.max:i>=n&&t.destroy();break;case xt.min:i<=s&&t.destroy()}}(t,s,e.value,a,r),t.destroyed||(e.value=at(e.value,a,r))}}const Ht=function(t){const e=new Map;return(...i)=>{const s=JSON.stringify(i);if(e.has(s))return e.get(s);const n=t(...i);return e.set(s,n),n}}((function(t){const e=document.createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0"};for(const t in i){const s=i[t];e.setProperty(t,s)}return e}));var $t,Zt,Xt,Nt,Qt,jt,Jt,Kt,te,ee,ie,se,ne,oe,ae,re,ce,he;i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814);function le(t,e){if(e)for(const i of t.colorManagers.values())if(e.startsWith(i.stringPrefix))return i.parseString(e)}function de(t,e,i,s=!0){if(!e)return;const n=Q(e)?{value:e}:e;if(Q(n.value))return ue(t,n.value,i,s);if(K(n.value))return de(t,{value:Et(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ue(t,e,i,s=!0){if(!e)return;const n=Q(e)?{value:e}:e;if(Q(n.value))return n.value===m?ye():function(t,e){return le(t,e)}(t,n.value);if(K(n.value))return ue(t,{value:Et(n.value,i,s)});for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function pe(t,e,i,s=!0){const n=de(t,e,i,s);return n?fe(n):void 0}function fe(t){const e=t.r/M,i=t.g/M,s=t.b/M,n=Math.max(e,i,s),o=Math.min(e,i,s),a={h:S,l:(n+o)*h,s:D};return n!==o&&(a.s=a.l<h?(n-o)/(n+o):(n-o)/(_-n-o),a.h=e===n?(i-s)/(n-o):a.h=i===n?_+(s-e)/(n-o):_*_+(e-i)/(n-o)),a.l*=C,a.s*=O,a.h*=I,a.h<S&&(a.h+=P),a.h>=P&&(a.h-=P),a}function ve(t){const e=(t.h%P+P)%P,i=Math.max(D,Math.min(O,t.s)),s=Math.max(A,Math.min(C,t.l)),n=e/P,o=i/O,a=s/C;if(i===D){const t=Math.round(a*V);return{r:t,g:t,b:t}}const r=(t,e,i)=>{if(i<0&&i++,i>1&&i--,i*W<1)return t+(e-t)*W*i;if(i*_<1)return e;if(i*q<1*_){return t+(e-t)*(_/q-i)*W}return t},c=a<h?a*(Y+o):a+o-a*o,l=_*a-c,d=B/q,u=Math.min(V,V*r(l,c,n+d)),p=Math.min(V,V*r(l,c,n)),f=Math.min(V,V*r(l,c,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ge(t){const e=ve(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ye(t){const e=t??G,i=M+F;return{b:Math.floor(ct(ut(e,i))),g:Math.floor(ct(ut(e,i))),r:Math.floor(ct(ut(e,i)))}}function me(t,e){return`rgba(${t.r}, ${t.g}, ${t.b}, ${e??L})`}function we(t,e){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${e??L})`}function _e(t,e,i){if(i===m)return ye();if(i!==w)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return function(t,e,i,s){let n=t,o=e;return void 0===n.r&&(n=ve(t)),void 0===o.r&&(o=ve(e)),{b:rt(n.b,o.b,i,s),g:rt(n.g,o.g,i,s),r:rt(n.r,o.r,i,s)}}(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ve(t)}}}function be(t,e,i,s){const n=Q(e)?e:e.value;return n===m?s?de(t,{value:n}):i?m:w:n===w?w:de(t,{value:n})}function xe(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function ke(t,e,i){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return e&&(ze(s.h,e.h,i),ze(s.s,e.s,i),ze(s.l,e.l,i)),s}function ze(t,e,i){t.enable=e.enable,t.enable?(t.velocity=ht(e.speed)/c*i,t.decay=E-ht(e.decay),t.status=_t.increasing,t.loops=H,t.maxLoops=ht(e.count),t.time=$,t.delayTime=ht(e.delay)*l,e.sync||(t.velocity*=ot(),t.value*=ot()),t.initialValue=t.value,t.offset=ut(e.offset)):t.velocity=U}function Me(t,e,i,s){if(!t||!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time||(t.time=0),(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=s.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const n=t.offset?ct(t.offset):0,o=(t.velocity??0)*s.factor+3.6*n,a=t.decay??1,r=dt(e),c=lt(e);if(i&&t.status!==_t.increasing){t.value-=o;const e=0;t.value<e&&(t.loops||(t.loops=0),t.loops++,t.status=_t.increasing)}else t.value+=o,t.value>r&&(t.loops||(t.loops=0),t.loops++,i?t.status=_t.decreasing:t.value-=r);t.velocity&&1!==a&&(t.velocity*=a),t.value=at(t.value,c,r)}function Pe(t,e){if(!t)return;const{h:i,s,l:n}=t,o={min:0,max:100},a={min:0,max:100};i&&Me(i,{min:0,max:360},!1,e),s&&Me(s,o,!0,e),n&&Me(n,a,!0,e)}function Oe(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}function Ce(t,e){t.clearRect(d,u,e.width,e.height)}function Se(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,backgroundMask:a,composite:r,radius:c,opacity:h,shadow:l,transform:d}=t,u=s.getPosition(),p=s.rotation+(s.pathRotation?s.velocity.angle:0),m=Math.sin(p),w=Math.cos(p),_=!!p,b={a:w*(d.a??f),b:_?m*(d.b??F):d.b??v,c:_?-m*(d.c??F):d.c??g,d:w*(d.d??y)};i.setTransform(b.a,b.b,b.c,b.d,u.x,u.y),a&&(i.globalCompositeOperation=r);const x=s.shadowColor;l.enable&&x&&(i.shadowBlur=l.blur,i.shadowColor=me(x),i.shadowOffsetX=l.offset.x,i.shadowOffsetY=l.offset.y),o.fill&&(i.fillStyle=o.fill);const k=s.strokeWidth??0;i.lineWidth=k,o.stroke&&(i.strokeStyle=o.stroke);const z={container:e,context:i,particle:s,radius:c,opacity:h,delta:n,transformData:b,strokeWidth:k};!function(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,strokeWidth:r,transformData:c}=t;if(!s.shape)return;const h=e.shapeDrawers.get(s.shape);if(!h)return;i.beginPath(),h.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...c}}),s.shapeClose&&i.closePath();r>0&&i.stroke();s.shapeFill&&i.fill()}(z),function(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.shape)return;const c=e.shapeDrawers.get(s.shape);if(!c?.afterDraw)return;c.afterDraw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}(z),function(t){const{container:e,context:i,particle:s,radius:n,opacity:o,delta:a,transformData:r}=t;if(!s.effect)return;const c=e.effectDrawers.get(s.effect);if(!c)return;c.draw({context:i,particle:s,radius:n,opacity:o,delta:a,pixelRatio:e.retina.pixelRatio,transformData:{...r}})}(z),i.globalCompositeOperation="source-over",i.resetTransform()}function De(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}function Ie(t,e,i=!1){if(!e)return;if(!t)return;const s=t.style;if(!s)return;const n=new Set;for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&n.add(s[t]);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.add(e[t]);for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}(Zt=$t||($t={})).darken="darken",Zt.enlighten="enlighten";class Te{constructor(t,e){this.container=t,this._applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)},this._applyPreDrawUpdaters=(t,e,i,s,n,o)=>{for(const a of this._preDrawUpdaters){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)De(o,t,e)}a.beforeDraw?.(e)}},this._applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()},this._getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=pe(this._engine,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=pe(this._engine,s.particleStrokeColor(t))),e&&i)break;return[e,i]},this._initCover=async()=>{const t=this.container.actualOptions.backgroundMask.cover,e=t.color;if(e){const i=de(this._engine,e);if(i){const e={...i,a:t.opacity};this._coverColorStyle=me(e,e.a)}}else await new Promise(((e,i)=>{if(!t.image)return;const s=document.createElement("img");s.addEventListener("load",(()=>{this._coverImage={image:s,opacity:t.opacity},e()})),s.addEventListener("error",(t=>{i(t.error)})),s.src=t.image}))},this._initStyle=()=>{const t=this.element,e=this.container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!e.style||!Object.prototype.hasOwnProperty.call(e.style,i))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}},this._initTrail=async()=>{const t=this.container.actualOptions.particles.move.trail,e=t.fill;if(!t.enable)return;const i=1/t.length;if(e.color){const t=de(this._engine,e.color);if(!t)return;this._trailFill={color:{...t},opacity:i}}else await new Promise(((t,s)=>{if(!e.image)return;const n=document.createElement("img");n.addEventListener("load",(()=>{this._trailFill={image:n,opacity:i},t()})),n.addEventListener("error",(t=>{s(t.error)})),n.src=e.image}))},this._paintBase=t=>{this.draw((e=>function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(d,u,e.width,e.height)}(e,this.size,t)))},this._paintImage=(t,e)=>{this.draw((i=>function(t,e,i,s){i&&(t.globalAlpha=s,t.drawImage(i,d,u,e.width,e.height),t.globalAlpha=1)}(i,this.size,t,e)))},this._repairStyle=()=>{const t=this.element;t&&(this._safeMutationObserver((t=>t.disconnect())),this._initStyle(),this.initBackground(),this._safeMutationObserver((e=>{t&&t instanceof Node&&e.observe(t,{attributes:!0})})))},this._resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&Ie(t,e,!0)},this._safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)},this._setFullScreenStyle=()=>{const t=this.element;t&&Ie(t,Ht(this.container.actualOptions.fullScreen.zIndex),!0)},this._engine=e,this._standardSize={height:0,width:0};const i=t.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){const t=this.container.actualOptions,e=t.particles.move.trail,i=this._trailFill;t.backgroundMask.enable?this.paint():e.enable&&e.length>0&&i?i.color?this._paintBase(me(i.color,i.opacity)):i.image&&this._paintImage(i.image,i.opacity):t.clear&&this.draw((t=>{Ce(t,this.size)}))}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawAsync(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor()??s;let[o,a]=this._getPluginParticleColors(t);o||(o=s),a||(a=n),(o||a)&&this.draw((s=>{const n=this.container,r=n.actualOptions,c=t.options.zIndex,h=1-t.zIndexFactor,l=h**c.opacityRate,d=t.bubble.opacity??t.opacity?.value??L,u=d*l,p=(t.strokeOpacity??d)*l,f={},v={fill:o?we(o,u):void 0};v.stroke=a?we(a,p):v.fill,this._applyPreDrawUpdaters(s,t,i,u,v,f),Se({container:n,context:s,particle:t,delta:e,colorStyles:v,backgroundMask:r.backgroundMask.enable,composite:r.backgroundMask.composite,radius:i*h**c.sizeRate,opacity:u,shadow:t.options.shadow,transform:f}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,e,i){this.draw((s=>function(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}(s,t,e,i)))}drawPlugin(t,e){this.draw((i=>function(t,e,i){e.draw&&e.draw(t,i)}(i,t,e)))}async init(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=function(t){if(!Tt()&&"undefined"!=typeof MutationObserver)return new MutationObserver(t)}((t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()})),this.resize(),this._initStyle(),await this._initCover();try{await this._initTrail()}catch(t){It().error(t)}this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})),this.initUpdaters(),this.initPlugins(),this.paint()}initBackground(){const t=this.container.actualOptions.background,e=this.element;if(!e)return;const i=e.style;if(i){if(t.color){const e=de(this._engine,t.color);i.backgroundColor=e?me(e,t.opacity):""}else i.backgroundColor="";i.backgroundImage=t.image||"",i.backgroundPosition=t.position||"",i.backgroundRepeat=t.repeat||"",i.backgroundSize=t.size||""}}initPlugins(){this._resizePlugins=[];for(const t of this.container.plugins.values())t.resize&&this._resizePlugins.push(t),(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove(),this._generated=t.dataset&&s in t.dataset?"true"===t.dataset[s]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=function(t){const e=document.createElement("div").style;if(!t)return e;for(const i in t){const s=t[i];if(!Object.prototype.hasOwnProperty.call(t,i)||tt(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty?.(s,n,o):e.setProperty?.(s,n)}return e}(this.element.style);const e=this._standardSize;e.height=t.offsetHeight,e.width=t.offsetWidth;const i=this.container.retina.pixelRatio,n=this.size;t.height=n.height=e.height*i,t.width=n.width=e.width*i,this._context=this.element.getContext("2d"),this._safeMutationObserver((t=>t.disconnect())),this.container.retina.init(),this.initBackground(),this._safeMutationObserver((t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}))}paint(){const t=this.container.actualOptions;this.draw((e=>{t.backgroundMask.enable&&t.backgroundMask.cover?(Ce(e,this.size),this._coverImage?this._paintImage(this._coverImage.image,this._coverImage.opacity):this._coverColorStyle?this._paintBase(this._coverColorStyle):this._paintBase()):this._paintBase()}))}resize(){if(!this.element)return!1;const t=this.container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const o={...e};e.height=i.height,e.width=i.width;const a=this.size;return this.element.width=a.width=n.width,this.element.height=a.height=n.height,this.container.started&&t.particles.setResizeFactor({width:e.width/o.width,height:e.height/o.height}),!0}stop(){this._safeMutationObserver((t=>t.disconnect())),this._mutationObserver=void 0,this.draw((t=>Ce(t,this.size)))}async windowResize(){if(!this.element||!this.resize())return;const t=this.container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}}function Re(t,e,i,s,n){if(s){let s={passive:!0};N(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}(Nt=Xt||(Xt={})).canvas="canvas",Nt.parent="parent",Nt.window="window";class Le{constructor(t){this.container=t,this._doMouseTouchClick=t=>{const e=this.container,i=e.actualOptions;if(this._canPush){const t=e.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition={...s},t.clickTime=(new Date).getTime();qt(i.interactivity.events.onClick.mode,(t=>this.container.handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),500)},this._handleThemeChange=t=>{const e=t,i=this.container,s=i.options,n=s.defaultThemes,o=e.matches?n.dark:n.light,a=s.themes.find((t=>t.name===o));a?.default.auto&&i.loadTheme(o)},this._handleVisibilityChange=()=>{const t=this.container,e=t.actualOptions;this._mouseTouchFinish(),e.pauseOnBlur&&(document?.hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))},this._handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await(t?.windowResize())};this._resizeTimeout=setTimeout((()=>{t()}),this.container.actualOptions.interactivity.events.resize.delay*l)},this._manageInteractivityListeners=(t,e)=>{const i=this._handlers,s=this.container,n=s.actualOptions,r=s.interactivity.element;if(!r)return;const c=r,h=s.canvas.element;h&&(h.style.pointerEvents=c===h?"initial":"none"),(n.interactivity.events.onHover.enable||n.interactivity.events.onClick.enable)&&(Re(r,o,i.mouseMove,e),Re(r,"touchstart",i.touchStart,e),Re(r,"touchmove",i.touchMove,e),n.interactivity.events.onClick.enable?(Re(r,a,i.touchEndClick,e),Re(r,"pointerup",i.mouseUp,e),Re(r,"pointerdown",i.mouseDown,e)):Re(r,a,i.touchEnd,e),Re(r,t,i.mouseLeave,e),Re(r,"touchcancel",i.touchCancel,e))},this._manageListeners=t=>{const e=this._handlers,i=this.container,s=i.actualOptions.interactivity.detectsOn,o=i.canvas.element;let a=n;s===Xt.window?(i.interactivity.element=window,a="pointerout"):s===Xt.parent&&o?i.interactivity.element=o.parentElement??o.parentNode:i.interactivity.element=o,this._manageMediaMatch(t),this._manageResize(t),this._manageInteractivityListeners(a,t),document&&Re(document,"visibilitychange",e.visibilityChange,t,!1)},this._manageMediaMatch=t=>{const e=this._handlers,i=Rt("(prefers-color-scheme: dark)");i&&(void 0===i.addEventListener?void 0!==i.addListener&&(t?i.addListener(e.oldThemeChange):i.removeListener(e.oldThemeChange)):Re(i,"change",e.themeChange,t))},this._manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.interactivity.events.resize)return;if("undefined"==typeof ResizeObserver)return void Re(window,"resize",e.resize,t);const s=i.canvas.element;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===s))&&this._handleWindowResize()})),this._resizeObserver.observe(s))},this._mouseDown=()=>{const{interactivity:t}=this.container;if(!t)return;const{mouse:e}=t;e.clicking=!0,e.downPosition=e.position},this._mouseTouchClick=t=>{const e=this.container,i=e.actualOptions,{mouse:s}=e.interactivity;s.inside=!0;let n=!1;const o=s.position;if(o&&i.interactivity.events.onClick.enable){for(const t of e.plugins.values())if(t.clickPositionValid&&(n=t.clickPositionValid(o),n))break;n||this._doMouseTouchClick(t),s.clicking=!1}},this._mouseTouchFinish=()=>{const t=this.container.interactivity;if(!t)return;const e=t.mouse;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=n,e.inside=!1,e.clicking=!1},this._mouseTouchMove=t=>{const e=this.container,i=e.actualOptions,s=e.interactivity,n=e.canvas.element;if(!s?.element)return;let a;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(s.element===window){if(n){const t=n.getBoundingClientRect();a={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(i.interactivity.detectsOn===Xt.parent){const t=e.target,i=e.currentTarget;if(t&&i&&n){const s=t.getBoundingClientRect(),o=i.getBoundingClientRect(),r=n.getBoundingClientRect();a={x:e.offsetX+_*s.left-(o.left+r.left),y:e.offsetY+_*s.top-(o.top+r.top)}}else a={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY}}else e.target===n&&(a={x:e.offsetX??e.clientX,y:e.offsetY??e.clientY})}else if(this._canPush="touchmove"!==t.type,n){const e=t,i=e.touches[e.touches.length-1],s=n.getBoundingClientRect();a={x:i.clientX-(s.left??0),y:i.clientY-(s.top??0)}}const r=e.retina.pixelRatio;a&&(a.x*=r,a.y*=r),s.mouse.position=a,s.status=o},this._touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()},this._touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)},this._touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)},this._canPush=!0,this._touches=new Map,this._handlers={mouseDown:()=>this._mouseDown(),mouseLeave:()=>this._mouseTouchFinish(),mouseMove:t=>this._mouseTouchMove(t),mouseUp:t=>this._mouseTouchClick(t),touchStart:t=>this._touchStart(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:t=>this._touchEnd(t),touchCancel:t=>this._touchEnd(t),touchEndClick:t=>this._touchEndClick(t),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}}(jt=Qt||(Qt={})).configAdded="configAdded",jt.containerInit="containerInit",jt.particlesSetup="particlesSetup",jt.containerStarted="containerStarted",jt.containerStopped="containerStopped",jt.containerDestroyed="containerDestroyed",jt.containerPaused="containerPaused",jt.containerPlay="containerPlay",jt.containerBuilt="containerBuilt",jt.particleAdded="particleAdded",jt.particleDestroyed="particleDestroyed",jt.particleRemoved="particleRemoved";class Ee{constructor(){this.value=""}static create(t,e){const i=new Ee;return i.load(t),void 0!==e&&(Q(e)||K(e)?i.load({value:e}):i.load(e)),i}load(t){tt(t)||tt(t.value)||(this.value=t.value)}}class Fe{constructor(){this.color=new Ee,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){tt(t)||(void 0!==t.color&&(this.color=Ee.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ae{constructor(){this.opacity=1}load(t){tt(t)||(void 0!==t.color&&(this.color=Ee.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ve{constructor(){this.composite="destination-out",this.cover=new Ae,this.enable=!1}load(t){if(!tt(t)){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const e=t.cover,i=Q(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color||void 0!==e.image?e:{color:i})}void 0!==t.enable&&(this.enable=t.enable)}}}class qe{constructor(){this.enable=!0,this.zIndex=0}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class We{constructor(){this.enable=!1,this.mode=[]}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}(Kt=Jt||(Jt={})).circle="circle",Kt.rectangle="rectangle";class Ye{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=Jt.circle}load(t){tt(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class Be{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class Ge{constructor(){this.enable=!1,this.mode=[],this.parallax=new Be}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class Ue{constructor(){this.delay=.5,this.enable=!0}load(t){tt(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class He{constructor(){this.onClick=new We,this.onDiv=new Ye,this.onHover=new Ge,this.resize=new Ue}load(t){if(tt(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=qt(e,(t=>{const e=new Ye;return e.load(t),e}))),this.onHover.load(t.onHover),this.resize.load(t.resize)}}class $e{constructor(t,e){this._engine=t,this._container=e}load(t){if(tt(t))return;if(!this._container)return;const e=this._engine.interactors.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class Ze{constructor(t,e){this.detectsOn=Xt.window,this.events=new He,this.modes=new $e(t,e)}load(t){if(tt(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Xe{load(t){tt(t)||(t.position&&(this.position={x:t.position.x??50,y:t.position.y??50,mode:t.position.mode??Pt.percent}),t.options&&(this.options=Vt({},t.options)))}}(ee=te||(te={})).screen="screen",ee.canvas="canvas";class Ne{constructor(){this.maxWidth=1/0,this.options={},this.mode=te.canvas}load(t){tt(t)||(tt(t.maxWidth)||(this.maxWidth=t.maxWidth),tt(t.mode)||(t.mode===te.screen?this.mode=te.screen:this.mode=te.canvas),tt(t.options)||(this.options=Vt({},t.options)))}}(se=ie||(ie={})).any="any",se.dark="dark",se.light="light";class Qe{constructor(){this.auto=!1,this.mode=ie.any,this.value=!1}load(t){tt(t)||(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class je{constructor(){this.name="",this.default=new Qe}load(t){tt(t)||(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=Vt({},t.options)))}}class Je{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){tt(t)||(void 0!==t.count&&(this.count=ut(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=ut(t.speed)),void 0!==t.decay&&(this.decay=ut(t.decay)),void 0!==t.delay&&(this.delay=ut(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class Ke extends Je{constructor(){super(),this.mode=mt.auto,this.startValue=Ct.random}load(t){super.load(t),tt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ti extends Je{constructor(){super(),this.offset=0,this.sync=!0}load(t){super.load(t),tt(t)||void 0!==t.offset&&(this.offset=ut(t.offset))}}class ei{constructor(){this.h=new ti,this.s=new ti,this.l=new ti}load(t){tt(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ii extends Ee{constructor(){super(),this.animation=new ei}static create(t,e){const i=new ii;return i.load(t),void 0!==e&&(Q(e)||K(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),tt(t))return;const e=t.animation;void 0!==e&&(void 0!==e.enable?this.animation.h.load(e):this.animation.load(t.animation))}}(oe=ne||(ne={})).absorb="absorb",oe.bounce="bounce",oe.destroy="destroy";class si{constructor(){this.speed=2}load(t){tt(t)||void 0!==t.speed&&(this.speed=t.speed)}}class ni{constructor(){this.enable=!0,this.retries=0}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class oi{constructor(){this.value=0}load(t){tt(t)||tt(t.value)||(this.value=ut(t.value))}}class ai extends oi{constructor(){super(),this.animation=new Je}load(t){if(super.load(t),tt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ri extends ai{constructor(){super(),this.animation=new Ke}load(t){super.load(t)}}class ci extends oi{constructor(){super(),this.value=1}}class hi{constructor(){this.horizontal=new ci,this.vertical=new ci}load(t){tt(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class li{constructor(){this.absorb=new si,this.bounce=new hi,this.enable=!1,this.maxSpeed=50,this.mode=ne.bounce,this.overlap=new ni}load(t){tt(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=ut(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class di{constructor(){this.close=!0,this.fill=!0,this.options={},this.type=[]}load(t){if(tt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Vt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class ui{constructor(){this.offset=0,this.value=90}load(t){tt(t)||(void 0!==t.offset&&(this.offset=ut(t.offset)),void 0!==t.value&&(this.value=ut(t.value)))}}class pi{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(!tt(t)&&(void 0!==t.distance&&(this.distance=ut(t.distance)),void 0!==t.enable&&(this.enable=t.enable),t.rotate)){const e=t.rotate.x;void 0!==e&&(this.rotate.x=e);const i=t.rotate.y;void 0!==i&&(this.rotate.y=i)}}}class fi{constructor(){this.x=50,this.y=50,this.mode=Pt.percent,this.radius=0}load(t){tt(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class vi{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){tt(t)||(void 0!==t.acceleration&&(this.acceleration=ut(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=ut(t.maxSpeed)))}}class gi{constructor(){this.clamp=!0,this.delay=new oi,this.enable=!1,this.options={}}load(t){tt(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Vt(this.options,t.options)))}}class yi{load(t){tt(t)||(void 0!==t.color&&(this.color=Ee.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class mi{constructor(){this.enable=!1,this.length=10,this.fill=new yi}load(t){tt(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.fill&&this.fill.load(t.fill),void 0!==t.length&&(this.length=t.length))}}(re=ae||(ae={})).bounce="bounce",re.none="none",re.out="out",re.destroy="destroy",re.split="split";class wi{constructor(){this.default=ae.out}load(t){tt(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class _i{constructor(){this.acceleration=0,this.enable=!1}load(t){tt(t)||(void 0!==t.acceleration&&(this.acceleration=ut(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Vt({},t.position)))}}class bi{constructor(){this.angle=new ui,this.attract=new pi,this.center=new fi,this.decay=0,this.distance={},this.direction=Z.none,this.drift=0,this.enable=!1,this.gravity=new vi,this.path=new gi,this.outModes=new wi,this.random=!1,this.size=!1,this.speed=2,this.spin=new _i,this.straight=!1,this.trail=new mi,this.vibrate=!1,this.warp=!1}load(t){if(tt(t))return;this.angle.load(j(t.angle)?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=ut(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=j(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=ut(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(J(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=ut(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class xi extends Ke{constructor(){super(),this.destroy=xt.none,this.speed=2}load(t){super.load(t),tt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ki extends ri{constructor(){super(),this.animation=new xi,this.value=1}load(t){if(tt(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class zi{constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(tt(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}(he=ce||(ce={})).delete="delete",he.wait="wait";class Mi{constructor(){this.mode=ce.delete,this.value=0}load(t){tt(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Pi{constructor(){this.density=new zi,this.limit=new Mi,this.value=0}load(t){tt(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Oi{constructor(){this.blur=0,this.color=new Ee,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){tt(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=Ee.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class Ci{constructor(){this.close=!0,this.fill=!0,this.options={},this.type="circle"}load(t){if(tt(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Vt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill),void 0!==t.type&&(this.type=t.type)}}class Si extends Ke{constructor(){super(),this.destroy=xt.none,this.speed=5}load(t){super.load(t),tt(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Di extends ri{constructor(){super(),this.animation=new Si,this.value=3}load(t){if(super.load(t),tt(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ii{constructor(){this.width=0}load(t){tt(t)||(void 0!==t.color&&(this.color=ii.create(this.color,t.color)),void 0!==t.width&&(this.width=ut(t.width)),void 0!==t.opacity&&(this.opacity=ut(t.opacity)))}}class Ti extends oi{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),tt(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Ri{constructor(t,e){this._engine=t,this._container=e,this.bounce=new hi,this.collisions=new li,this.color=new ii,this.color.value="#fff",this.effect=new di,this.groups={},this.move=new bi,this.number=new Pi,this.opacity=new ki,this.reduceDuplicates=!1,this.shadow=new Oi,this.shape=new Ci,this.size=new Di,this.stroke=new Ii,this.zIndex=new Ti}load(t){if(tt(t))return;if(void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!Object.hasOwn(t.groups,e))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Vt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.color.load(ii.create(this.color,t.color)),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=Vt({},t.interactivity));const e=t.stroke;if(e&&(this.stroke=qt(e,(t=>{const e=new Ii;return e.load(t),e}))),this._container){const e=this._engine.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t);const i=this._engine.interactors.get(this._container);if(i)for(const e of i)e.loadParticlesOptions&&e.loadParticlesOptions(this,t)}}}function Li(t,...e){for(const i of e)t.load(i)}function Ei(t,e,...i){const s=new Ri(t,e);return Li(s,...i),s}class Fi{constructor(t,e){this._findDefaultTheme=t=>this.themes.find((e=>e.default.value&&e.default.mode===t))??this.themes.find((t=>t.default.value&&t.default.mode===ie.any)),this._importPreset=t=>{this.load(this._engine.getPreset(t))},this._engine=t,this._container=e,this.autoPlay=!0,this.background=new Fe,this.backgroundMask=new Ve,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new qe,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new Ze(t,e),this.manualParticles=[],this.particles=Ei(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}load(t){if(tt(t))return;void 0!==t.preset&&qt(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=ut(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=ut(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;N(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const e=new Xe;return e.load(t),e}))),this.particles.load(t.particles),this.style=Vt(this.style,t.style),this._engine.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const n=this._engine.interactors.get(this._container);if(n)for(const e of n)e.loadOptions&&e.loadOptions(this,t);if(void 0!==t.responsive)for(const e of t.responsive){const t=new Ne;t.load(e),this.responsive.push(t)}if(this.responsive.sort(((t,e)=>t.maxWidth-e.maxWidth)),void 0!==t.themes)for(const e of t.themes){const t=this.themes.find((t=>t.name===e.name));if(t)t.load(e);else{const t=new je;t.load(e),this.themes.push(t)}}this.defaultThemes.dark=this._findDefaultTheme(ie.dark)?.name,this.defaultThemes.light=this._findDefaultTheme(ie.light)?.name}setResponsive(t,e,i){this.load(i);const s=this.responsive.find((i=>i.mode===te.screen&&screen?i.maxWidth>screen.availWidth:i.maxWidth*e>t));return this.load(s?.options),s?.maxWidth}setTheme(t){if(t){const e=this.themes.find((e=>e.name===t));e&&this.load(e.options)}else{const t=Rt("(prefers-color-scheme: dark)"),e=t?.matches,i=this._findDefaultTheme(e?ie.dark:ie.light);i&&this.load(i.options)}}}var Ai,Vi,qi,Wi,Yi,Bi;i(56475),i(22139);(Vi=Ai||(Ai={})).external="external",Vi.particles="particles";class Gi{constructor(t,e){this.container=e,this._engine=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[]}externalInteract(t){for(const e of this._externalInteractors)e.isEnabled()&&e.interact(t)}handleClickMode(t){for(const e of this._externalInteractors)e.handleClickMode?.(t)}async init(){this._interactors=await this._engine.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case Ai.external:this._externalInteractors.push(t);break;case Ai.particles:this._particleInteractors.push(t)}t.init()}}particlesInteract(t,e){for(const i of this._externalInteractors)i.clear(t,e);for(const i of this._particleInteractors)i.isEnabled(t)&&i.interact(t,e)}reset(t){for(const e of this._externalInteractors)e.isEnabled()&&e.reset(t);for(const e of this._particleInteractors)e.isEnabled(t)&&e.reset(t)}}function Ui(t){if(!Lt(t.outMode,t.checkModes))return;const e=t.radius*_;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}(Wi=qi||(qi={})).normal="normal",Wi.inside="inside",Wi.outside="outside";class Hi{constructor(t,e){this.container=e,this._calcPosition=(t,e,i,s=0)=>{for(const s of t.plugins.values()){const t=void 0!==s.particlePosition?s.particlePosition(e,this):void 0;if(t)return et.create(t.x,t.y,i)}const n=gt({size:t.canvas.size,position:e}),o=et.create(n.x,n.y,i),a=this.getRadius(),r=this.options.move.outModes,c=e=>{Ui({outMode:e,checkModes:[ae.bounce],coord:o.x,maxCoord:t.canvas.size.width,setCb:t=>o.x+=t,radius:a})},h=e=>{Ui({outMode:e,checkModes:[ae.bounce],coord:o.y,maxCoord:t.canvas.size.height,setCb:t=>o.y+=t,radius:a})};return c(r.left??r.default),c(r.right??r.default),h(r.top??r.default),h(r.bottom??r.default),this._checkOverlap(o,s)?this._calcPosition(t,void 0,i,s+1):o},this._calculateVelocity=()=>{const t=function(t){const e=it.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===Z.inside||e.direction===Z.outside)return t;const i=vt(ht(e.angle.value)),s=vt(ht(e.angle.offset)),n={left:s-i*h,right:s+i*h};return e.straight||(t.angle+=ct(ut(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=ot()),t},this._checkOverlap=(t,e=0)=>{const i=this.options.collisions,s=this.getRadius();if(!i.enable)return!1;const n=i.overlap;if(n.enable)return!1;const o=n.retries;if(o>=0&&e>o)throw new Error(`${r} particle is overlapping and can't be placed`);return!!this.container.particles.find((e=>ft(t,e.position)<s+e.getRadius()))},this._getRollColor=t=>{if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?1*_:1,i=this.roll.horizontal?Math.PI*h:0;return Math.floor(((this.roll.angle??0)+i)/(Math.PI/e))%_?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===$t.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t},this._initPosition=t=>{const e=this.container,i=ht(this.options.zIndex.value);this.position=this._calcPosition(e,t,at(i,0,e.zLayers)),this.initialPosition=this.position.copy();const s=e.canvas.size;switch(this.moveCenter={...Gt(this.options.move.center,s),radius:this.options.move.center.radius??0,mode:this.options.move.center.mode??Pt.percent},this.direction=function(t,e,i){if(j(t))return vt(t);switch(t){case Z.top:return-Math.PI*h;case Z.topRight:return-Math.PI*T;case Z.right:return 0;case Z.bottomRight:return Math.PI*T;case Z.bottom:return Math.PI*h;case Z.bottomLeft:return Math.PI*R;case Z.left:return Math.PI;case Z.topLeft:return-Math.PI*R;case Z.inside:return Math.atan2(i.y-e.y,i.x-e.x);case Z.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return ot()*b}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case Z.inside:this.outType=qi.inside;break;case Z.outside:this.outType=qi.outside}this.offset=it.origin},this._engine=t}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.container,i=this.pathGenerator,s=e.shapeDrawers.get(this.shape);s?.particleDestroy?.(this);for(const i of e.plugins.values())i.particleDestroyed?.(this,t);for(const i of e.particles.updaters)i.particleDestroyed?.(this,t);i?.reset(this),this._engine.dispatchEvent(Qt.particleDestroyed,{container:this.container,data:{particle:this}})}draw(t){const e=this.container,i=e.canvas;for(const s of e.plugins.values())i.drawParticlePlugin(s,this,t);i.drawParticle(this,t)}getFillColor(){return this._getRollColor(this.bubble.color??xe(this.color))}getMass(){return this.getRadius()**2*Math.PI*h}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??xe(this.strokeColor))}init(t,e,i,s){const n=this.container,o=this._engine;this.id=t,this.group=s,this.effectClose=!0,this.effectFill=!0,this.shapeClose=!0,this.shapeFill=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType=qi.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,r=n.actualOptions,c=Ei(this._engine,n,r.particles),{reduceDuplicates:h}=c,d=c.effect.type,u=c.shape.type;this.effect=Wt(d,this.id,h),this.shape=Wt(u,this.id,h);const p=c.effect,f=c.shape;if(i){if(i.effect?.type){const t=Wt(i.effect.type,this.id,h);t&&(this.effect=t,p.load(i.effect))}if(i.shape?.type){const t=Wt(i.shape.type,this.id,h);t&&(this.shape=t,f.load(i.shape))}}if(this.effect===m){const t=[...this.container.effectDrawers.keys()];this.effect=t[Math.floor(Math.random()*t.length)]}if(this.shape===m){const t=[...this.container.shapeDrawers.keys()];this.shape=t[Math.floor(Math.random()*t.length)]}this.effectData=function(t,e,i,s){const n=e.options[t];if(n)return Vt({close:e.close,fill:e.fill},Wt(n,i,s))}(this.effect,p,this.id,h),this.shapeData=function(t,e,i,s){const n=e.options[t];if(n)return Vt({close:e.close,fill:e.fill},Wt(n,i,s))}(this.shape,f,this.id,h),c.load(i);const v=this.effectData;v&&c.load(v.particles);const g=this.shapeData;g&&c.load(g.particles);const y=new Ze(o,n);y.load(n.actualOptions.interactivity),y.load(c.interactivity),this.interactivity=y,this.effectFill=v?.fill??c.effect.fill,this.effectClose=v?.close??c.effect.close,this.shapeFill=g?.fill??c.shape.fill,this.shapeClose=g?.close??c.shape.close,this.options=c;const w=this.options.move.path;this.pathDelay=ht(w.delay.value)*l,w.generator&&(this.pathGenerator=this._engine.getPathGenerator(w.generator),this.pathGenerator&&n.addPath(w.generator,this.pathGenerator)&&this.pathGenerator.init(n)),n.retina.initParticle(this),this.size=Yt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=E-ht(this.options.move.decay);const _=n.particles;_.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24;let b=n.effectDrawers.get(this.effect);b||(b=this._engine.getEffectDrawer(this.effect),b&&n.effectDrawers.set(this.effect,b)),b?.loadEffect&&b.loadEffect(this);let x=n.shapeDrawers.get(this.shape);x||(x=this._engine.getShapeDrawer(this.shape),x&&n.shapeDrawers.set(this.shape,x)),x?.loadShape&&x.loadShape(this);const k=x?.getSidesCount;k&&(this.sides=k(this)),this.spawning=!1,this.shadowColor=de(this._engine,this.options.shadow.color);for(const t of _.updaters)t.init(this);for(const t of _.movers)t.init?.(this);b?.particleInit?.(n,this),x?.particleInit?.(n,this);for(const t of n.plugins.values())t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this.container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.container.particles.updaters)t.reset?.(this)}}class $i{constructor(t,e){this.position=t,this.particle=e}}(Bi=Yi||(Yi={})).circle="circle",Bi.rectangle="rectangle";class Zi{constructor(t,e,i){this.position={x:t,y:e},this.type=i}}class Xi extends Zi{constructor(t,e,i){super(t,e,Yi.circle),this.radius=i}contains(t){return ft(t,this.position)<=this.radius}intersects(t){const e=this.position,i=t.position,s=Math.abs(i.x-e.x),n=Math.abs(i.y-e.y),o=this.radius;if(t instanceof Xi||t.type===Yi.circle){return o+t.radius>Math.sqrt(s**2+n**2)}if(t instanceof Ni||t.type===Yi.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,2)+Math.pow(n-a,2)<=o**2||s<=o+i&&n<=o+a||s<=i||n<=a}return!1}}class Ni extends Zi{constructor(t,e,i,s){super(t,e,Yi.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Xi)return t.intersects(this);const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t instanceof Ni?t.size:{width:0,height:0},a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>s.x&&n.y<s.y+i&&n.y+r>s.y}}class Qi{constructor(t,e){this.rectangle=t,this.capacity=e,this._subdivide=()=>{const{x:t,y:e}=this.rectangle.position,{width:i,height:s}=this.rectangle.size,{capacity:n}=this;for(let o=0;o<4;o++){const a=o%_;this._subs.push(new Qi(new Ni(t+i*h*a,e+s*h*(Math.round(o*h)-a),i*h,s*h),n))}this._divided=!0},this._points=[],this._divided=!1,this._subs=[]}insert(t){return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this._subdivide(),this._subs.some((e=>e.insert(t)))))}query(t,e){const i=[];if(!t.intersects(this.rectangle))return[];for(const s of this._points)!t.contains(s.position)&&ft(t.position,s.position)>s.particle.getRadius()&&(!e||e(s.particle))||i.push(s.particle);if(this._divided)for(const s of this._subs)i.push(...s.query(t,e));return i}queryCircle(t,e,i){return this.query(new Xi(t.x,t.y,e),i)}queryRectangle(t,e,i){return this.query(new Ni(t.x,t.y,e.width,e.height),i)}}const ji=t=>{const{height:e,width:i}=t;return new Ni(-.25*i,-.25*e,1.5*i,1.5*e)};class Ji{constructor(t,e){this._addToPool=(...t)=>{this._pool.push(...t)},this._applyDensity=(t,e,i)=>{const s=t.number;if(!t.number.density?.enable)return void(void 0===i?this._limit=s.limit.value:s.limit&&this._groupLimits.set(i,s.limit.value));const n=this._initDensityFactor(s.density),o=s.value,a=s.limit.value>0?s.limit.value:o,r=Math.min(o,a)*n+e,c=Math.min(this.count,this.filter((t=>t.group===i)).length);void 0===i?this._limit=s.limit.value*n:this._groupLimits.set(i,s.limit.value*n),c<r?this.push(Math.abs(r-c),void 0,t,i):c>r&&this.removeQuantity(c-r,i)},this._initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)},this._pushParticle=(t,e,i,s)=>{try{let n=this._pool.pop();n||(n=new Hi(this._engine,this._container)),n.init(this._nextId,t,e,i);let o=!0;if(s&&(o=s(n)),!o)return;return this._array.push(n),this._zArray.push(n),this._nextId++,this._engine.dispatchEvent(Qt.particleAdded,{container:this._container,data:{particle:n}}),n}catch(t){It().warning(`${r} adding particle: ${t}`)}},this._removeParticle=(t,e,i)=>{const s=this._array[t];if(!s||s.group!==e)return!1;const n=this._zArray.indexOf(s);return this._array.splice(t,1),this._zArray.splice(n,1),s.destroy(i),this._engine.dispatchEvent(Qt.particleRemoved,{container:this._container,data:{particle:s}}),this._addToPool(s),!0},this._engine=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._lastZIndex=0,this._interactionManager=new Gi(t,e),this._pluginsInitialized=!1;const i=e.canvas.size;this.quadTree=new Qi(ji(i),4),this.movers=[],this.updaters=[]}get count(){return this._array.length}addManualParticles(){const t=this._container;t.actualOptions.manualParticles.forEach((e=>this.addParticle(e.position?Gt(e.position,t.canvas.size):void 0,e.options)))}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,o=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,a=this.count;if(o>0)switch(n){case ce.delete:{const t=a+1-o;t>0&&this.removeQuantity(t);break}case ce.wait:if(a>=o)return}return this._pushParticle(t,e,i,s)}clear(){this._array=[],this._zArray=[],this._pluginsInitialized=!1}destroy(){this._array=[],this._zArray=[],this.movers=[],this.updaters=[]}draw(t){const e=this._container,i=e.canvas;i.clear(),this.update(t);for(const s of e.plugins.values())i.drawPlugin(s,t);for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}handleClickMode(t){this._interactionManager.handleClickMode(t)}async init(){const t=this._container,e=t.actualOptions;this._lastZIndex=0,this._needsSort=!1,await this.initPlugins();let i=!1;for(const e of t.plugins.values())if(i=e.particlesInitialization?.()??i,i)break;if(this.addManualParticles(),!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];for(let i=this.count,n=0;n<s.number?.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}async initPlugins(){if(this._pluginsInitialized)return;const t=this._container;this.movers=await this._engine.getMovers(t,!0),this.updaters=await this._engine.getUpdaters(t,!0),await this._interactionManager.init();for(const e of t.pathGenerators.values())e.init(t)}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e?.position,i,s)}async redraw(){this.clear(),await this.init(),this.draw({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this._removeParticle(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;for(const t in e)this._applyDensity(e[t],0,t);this._applyDensity(t.particles,t.manualParticles.length)}setLastZIndex(t){this._lastZIndex=t,this._needsSort=this._needsSort||this._lastZIndex<t}setResizeFactor(t){this._resizeFactor=t}update(t){const e=this._container,i=new Set;this.quadTree=new Qi(ji(e.canvas.size),4);for(const t of e.pathGenerators.values())t.update();for(const i of e.plugins.values())i.update?.(t);const s=this._resizeFactor;for(const e of this._array){s&&!e.ignoresResizeRatio&&(e.position.x*=s.width,e.position.y*=s.height,e.initialPosition.x*=s.width,e.initialPosition.y*=s.height),e.ignoresResizeRatio=!1,this._interactionManager.reset(e);for(const i of this._container.plugins.values()){if(e.destroyed)break;i.particleUpdate?.(e,t)}for(const i of this.movers)i.isEnabled(e)&&i.move(e,t);e.destroyed?i.add(e):this.quadTree.insert(new $i(e.getPosition(),e))}if(i.size){const t=t=>!i.has(t);this._array=this.filter(t),this._zArray=this._zArray.filter(t);for(const t of i)this._engine.dispatchEvent(Qt.particleRemoved,{container:this._container,data:{particle:t}});this._addToPool(...i)}this._interactionManager.externalInteract(t);for(const e of this._array){for(const i of this.updaters)i.update(e,t);e.destroyed||e.spawning||this._interactionManager.particlesInteract(e,t)}if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort(((t,e)=>e.position.z-t.position.z||t.id-e.id)),this._lastZIndex=t[t.length-1].position.z,this._needsSort=!1}}}class Ki{constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=!e.detectRetina||Tt()?1:window.devicePixelRatio,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}const n=e.particles,o=n.move;this.maxSpeed=ht(o.gravity.maxSpeed)*i,this.sizeAnimationSpeed=ht(n.size.animation.speed)*i}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.moveDrift=ht(s.drift)*i,o.moveSpeed=ht(s.speed)*i,o.sizeAnimationSpeed=ht(e.size.animation.speed)*i;const a=o.maxDistance;a.horizontal=void 0!==n.horizontal?n.horizontal*i:void 0,a.vertical=void 0!==n.vertical?n.vertical*i:void 0,o.maxSpeed=ht(s.gravity.maxSpeed)*i}}function ts(t){return t&&!t.destroyed}function es(t,e,...i){const s=new Fi(t,e);return Li(s,...i),s}class is{constructor(t,e,i){this._intersectionManager=t=>{if(ts(this)&&this.actualOptions.pauseOnOutsideViewport)for(const e of t)e.target===this.interactivity.element&&(e.isIntersecting?this.play():this.pause())},this._nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+l/this.fpsLimit)return void this.draw(!1);this._lastFrameTime??=t;const e=function(t,e=60,i=!1){return{value:t,factor:i?60/e:60*t/l}}(t-this._lastFrameTime,this.fpsLimit,this._smooth);if(this.addLifeTime(e.value),this._lastFrameTime=t,e.value>l)return void this.draw(!1);if(this.particles.draw(e),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){It().error(`${r} in animation loop`,t)}},this._engine=t,this.id=Symbol(e),this.fpsLimit=120,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._clickHandlers=new Map,this._sourceOptions=i,this._initialSourceOptions=i,this.retina=new Ki(this),this.canvas=new Te(this,this._engine),this.particles=new Ji(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=es(this._engine,this),this.actualOptions=es(this._engine,this),this._eventListeners=new Le(this),this._intersectionObserver=function(t){if(!Tt()&&"undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}((t=>this._intersectionManager(t))),this._engine.dispatchEvent(Qt.containerBuilt,{container:this})}get animationStatus(){return!this._paused&&!this.pageHidden&&ts(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!ts(this))return;const e=this.interactivity.element;if(!e)return;const i=(e,i,s)=>{if(!ts(this))return;const n=this.retina.pixelRatio,o={x:i.x*n,y:i.y*n},a=this.particles.quadTree.queryCircle(o,s*n);t(e,a)};let s=!1,n=!1;this._clickHandlers.set("click",(t=>{if(!ts(this))return;const e=t,s={x:e.offsetX||e.clientX,y:e.offsetY||e.clientY};i(t,s,1)})),this._clickHandlers.set("touchstart",(()=>{ts(this)&&(s=!0,n=!1)})),this._clickHandlers.set("touchmove",(()=>{ts(this)&&(n=!0)})),this._clickHandlers.set("touchend",(t=>{if(ts(this)){if(s&&!n){const e=t;let s=e.touches[e.touches.length-1];if(!s&&(s=e.changedTouches[e.changedTouches.length-1],!s))return;const n=this.canvas.element,o=n?n.getBoundingClientRect():void 0,a={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};i(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,n=!1}})),this._clickHandlers.set("touchcancel",(()=>{ts(this)&&(s=!1,n=!1)}));for(const[t,i]of this._clickHandlers)e.addEventListener(t,i)}addLifeTime(t){this._lifeTime+=t}addPath(t,e,i=!1){return!(!ts(this)||!i&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,e),!0)}alive(){return!this._duration||this._lifeTime<=this._duration}clearClickHandlers(){if(ts(this)){for(const[t,e]of this._clickHandlers)this.interactivity.element?.removeEventListener(t,e);this._clickHandlers.clear()}}destroy(t=!0){if(ts(this)){this.stop(),this.clearClickHandlers(),this.particles.destroy(),this.canvas.destroy();for(const t of this.effectDrawers.values())t.destroy?.(this);for(const t of this.shapeDrawers.values())t.destroy?.(this);for(const t of this.effectDrawers.keys())this.effectDrawers.delete(t);for(const t of this.shapeDrawers.keys())this.shapeDrawers.delete(t);if(this._engine.clearPlugins(this),this.destroyed=!0,t){const t=this._engine.items,e=t.findIndex((t=>t===this));e>=0&&t.splice(e,1)}this._engine.dispatchEvent(Qt.containerDestroyed,{container:this})}}draw(t){if(!ts(this))return;let e=t;const i=t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(t)};var s;this._drawAnimationFrame=(s=t=>i(t),nt.nextFrame(s))}async export(t,e={}){for(const i of this.plugins.values()){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}It().error(`${r} - Export plugin with type ${t} not found`)}handleClickMode(t){if(ts(this)){this.particles.handleClickMode(t);for(const e of this.plugins.values())e.handleClickMode?.(t)}}async init(){if(!ts(this))return;const t=this._engine.getSupportedEffects();for(const e of t){const t=this._engine.getEffectDrawer(e);t&&this.effectDrawers.set(e,t)}const e=this._engine.getSupportedShapes();for(const t of e){const e=this._engine.getShapeDrawer(t);e&&this.shapeDrawers.set(t,e)}await this.particles.initPlugins(),this._options=es(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=es(this._engine,this,this._options);const i=await this._engine.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{zLayers:s,duration:n,delay:o,fpsLimit:a,smooth:r}=this.actualOptions;this.zLayers=s,this._duration=ht(n)*l,this._delay=ht(o)*l,this._lifeTime=0,this.fpsLimit=a>0?a:120,this._smooth=r;for(const t of this.effectDrawers.values())await(t.init?.(this));for(const t of this.shapeDrawers.values())await(t.init?.(this));for(const t of this.plugins.values())await(t.init?.());this._engine.dispatchEvent(Qt.containerInit,{container:this}),await this.particles.init(),this.particles.setDensity();for(const t of this.plugins.values())t.particlesSetup?.();this._engine.dispatchEvent(Qt.particlesSetup,{container:this})}async loadTheme(t){ts(this)&&(this._currentTheme=t,await this.refresh())}pause(){var t;if(ts(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,nt.cancel(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins.values())t.pause?.();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent(Qt.containerPaused,{container:this})}}play(t){if(!ts(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins.values())t.play&&t.play();this._engine.dispatchEvent(Qt.containerPlay,{container:this}),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(ts(this))return this.stop(),this.start()}async reset(t){if(ts(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=es(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=es(this._engine,this,this._options),this.refresh()}async start(){ts(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{const e=async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const t of this.plugins.values())await(t.start?.());this._engine.dispatchEvent(Qt.containerStarted,{container:this}),this.play(),t()};this._delayTimeout=setTimeout((()=>{e()}),this._delay)})))}stop(){if(ts(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const t of this.plugins.values())t.stop?.();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent(Qt.containerStopped,{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this._responsiveMaxWidth!==t&&(this._responsiveMaxWidth=t,!0)}}class ss{constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach((t=>t(e)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}async function ns(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map((e=>e(t)))),e.set(t,n)),n}class os{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new ss,this._initialized=!1,this.plugins=[],this.colorManagers=new Map,this.easingFunctions=new Map,this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.pathGenerators=new Map}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}get items(){return this._domArray}get version(){return"3.8.1"}async addColorManager(t,e=!0){this.colorManagers.set(t.key,t),await this.refresh(e)}addConfig(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._eventDispatcher.dispatchEvent(Qt.configAdded,{data:{name:e,config:t}})}async addEasing(t,e,i=!0){this.getEasing(t)||(this.easingFunctions.set(t,e),await this.refresh(i))}async addEffect(t,e,i=!0){qt(t,(t=>{this.getEffectDrawer(t)||this.effectDrawers.set(t,e)})),await this.refresh(i)}addEventListener(t,e){this._eventDispatcher.addEventListener(t,e)}async addInteractor(t,e,i=!0){this._initializers.interactors.set(t,e),await this.refresh(i)}async addMover(t,e,i=!0){this._initializers.movers.set(t,e),await this.refresh(i)}async addParticleUpdater(t,e,i=!0){this._initializers.updaters.set(t,e),await this.refresh(i)}async addPathGenerator(t,e,i=!0){this.getPathGenerator(t)||this.pathGenerators.set(t,e),await this.refresh(i)}async addPlugin(t,e=!0){this.getPlugin(t.id)||this.plugins.push(t),await this.refresh(e)}async addPreset(t,e,i=!1,s=!0){!i&&this.getPreset(t)||this.presets.set(t,e),await this.refresh(s)}async addShape(t,e=!0){for(const e of t.validTypes)this.getShapeDrawer(e)||this.shapeDrawers.set(e,t);await this.refresh(e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}clearPlugins(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}dispatchEvent(t,e){this._eventDispatcher.dispatchEvent(t,e)}dom(){return this.items}domItem(t){return this.item(t)}async getAvailablePlugins(t){const e=new Map;for(const i of this.plugins)i.needsPlugin(t.actualOptions)&&e.set(i.id,await i.getPlugin(t));return e}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawer(t){return this.effectDrawers.get(t)}async getInteractors(t,e=!1){return ns(t,this.interactors,this._initializers.interactors,e)}async getMovers(t,e=!1){return ns(t,this.movers,this._initializers.movers,e)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((e=>e.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.shapeDrawers.get(t)}getSupportedEffects(){return this.effectDrawers.keys()}getSupportedShapes(){return this.shapeDrawers.keys()}async getUpdaters(t,e=!1){return ns(t,this.updaters,this._initializers.updaters,e)}init(){this._initialized||(this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(i&&!i.destroyed)return i;e.splice(t,1)}async load(t){const e=t.id??t.element?.id??`tsparticles${Math.floor(1e4*ot())}`,{index:i,url:n}=t,o=n?await async function(t){const e=Wt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(It().error(`${r} ${i.status} while retrieving config file`),t.fallback)}({fallback:t.options,url:n,index:i}):t.options,a=Wt(o,i),{items:c}=this,h=c.findIndex((t=>t.id.description===e)),l=new is(this,e,a);if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,l)}else c.push(l);const d=((t,e)=>{let i=e??document.getElementById(t);return i||(i=document.createElement("div"),i.id=t,i.dataset[s]=x,document.body.append(i),i)})(e,t.element),u=(t=>{let e;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===z)e=t,e.dataset[s]||(e.dataset[s]=k);else{const i=t.getElementsByTagName(z);i.length?(e=i[0],e.dataset[s]=k):(e=document.createElement(z),e.dataset[s]=x,t.appendChild(e))}const i="100%";return e.style.width||(e.style.width=i),e.style.height||(e.style.height=i),e})(d);return l.canvas.loadCanvas(u),await l.start(),l}loadOptions(t,e){this.plugins.forEach((i=>i.loadOptions?.(t,e)))}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach((t=>t.loadOptions?.(e,...i)))}async refresh(t=!0){t&&await Promise.all(this.items.map((t=>t.refresh())))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}setOnClickHandler(t){const{items:e}=this;if(!e.length)throw new Error(`${r} can only set click handlers after calling tsParticles.load()`);e.forEach((e=>e.addClickHandler(t)))}}class as{constructor(t){this.type=Ai.particles,this.container=t}}var rs,cs,hs,ls,ds,us;(cs=rs||(rs={})).clockwise="clockwise",cs.counterClockwise="counter-clockwise",cs.random="random",(ls=hs||(hs={})).linear="linear",ls.radial="radial",ls.random="random",(us=ds||(ds={})).easeInBack="ease-in-back",us.easeInCirc="ease-in-circ",us.easeInCubic="ease-in-cubic",us.easeInLinear="ease-in-linear",us.easeInQuad="ease-in-quad",us.easeInQuart="ease-in-quart",us.easeInQuint="ease-in-quint",us.easeInExpo="ease-in-expo",us.easeInSine="ease-in-sine",us.easeOutBack="ease-out-back",us.easeOutCirc="ease-out-circ",us.easeOutCubic="ease-out-cubic",us.easeOutLinear="ease-out-linear",us.easeOutQuad="ease-out-quad",us.easeOutQuart="ease-out-quart",us.easeOutQuint="ease-out-quint",us.easeOutExpo="ease-out-expo",us.easeOutSine="ease-out-sine",us.easeInOutBack="ease-in-out-back",us.easeInOutCirc="ease-in-out-circ",us.easeInOutCubic="ease-in-out-cubic",us.easeInOutLinear="ease-in-out-linear",us.easeInOutQuad="ease-in-out-quad",us.easeInOutQuart="ease-in-out-quart",us.easeInOutQuint="ease-in-out-quint",us.easeInOutExpo="ease-in-out-expo",us.easeInOutSine="ease-in-out-sine";const ps=function(){const t=new os;return t.init(),t}();Tt()||(window.tsParticles=ps)},25158:function(t,e,i){i.d(e,{U:()=>G});var s=i(95031);const n=2*Math.PI;function o(t,e,i,n,o,a){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=e.value);const o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);n.clamp&&(t.velocity.x=(0,s.uZ5)(t.velocity.x,-1,1),t.velocity.y=(0,s.uZ5)(t.velocity.y,-1,1));t.lastPathTime-=t.pathDelay}(t,a);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;o&&i&&(t.velocity.x+=o*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*a.factor)/(60*i));const h=t.moveDecay;t.velocity.multTo(h);const l=t.velocity.mult(i);r?.enable&&n>0&&(!r.inverse&&l.y>=0&&l.y>=n||r.inverse&&l.y<=0&&l.y<=-n)&&(l.y=c*n,i&&(t.velocity.y=l.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;l.multTo(u);const{position:p}=t;p.addTo(l),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y)),p.y+=Math.cos(p.y*Math.sin(p.x)))}class a{init(t){const e=t.options.move.gravity;t.gravity={enable:e.enable,acceleration:(0,s.Gu7)(e.acceleration),inverse:e.inverse},function(t){const e=t.container,i=t.options.move.spin;if(!i.enable)return;const o=i.position??{x:50,y:50},a={x:.01*o.x*e.canvas.size.width,y:.01*o.y*e.canvas.size.height},r=t.getPosition(),c=(0,s.Spd)(r,a),h=(0,s.Gu7)(i.acceleration);t.retina.spinAcceleration=h*e.retina.pixelRatio,t.spin={center:a,direction:t.velocity.x>=0?s.RnL.clockwise:s.RnL.counterClockwise,angle:(0,s.sZz)()*n,radius:c,acceleration:t.retina.spinAcceleration}}(t)}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,e){const i=t.options,n=i.move;if(!n.enable)return;const a=t.container,r=a.retina.pixelRatio;t.retina.moveSpeed??=(0,s.Gu7)(n.speed)*r,t.retina.moveDrift??=(0,s.Gu7)(t.options.move.drift)*r;const c=function(t){return t.slow.inRange?t.slow.factor:1}(t),h=t.retina.moveSpeed*a.retina.reduceFactor,l=t.retina.moveDrift,d=(0,s.KIV)(i.size.value)*r,u=h*(n.size?t.getRadius()/d:1)*c*(e.factor||1)/2,p=t.retina.maxSpeed??a.retina.maxSpeed;n.spin.enable?function(t,e){const i=t.container;if(!t.spin)return;const n=t.spin.direction===s.RnL.clockwise,o={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*o.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*o.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const a=Math.max(i.canvas.size.width,i.canvas.size.height),r=.5*a;t.spin.radius>r?(t.spin.radius=r,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=.01*e*(1-t.spin.radius/a)}(t,u):o(t,n,u,p,l,e),function(t){const e=t.initialPosition,{dx:i,dy:n}=(0,s.oW6)(e,t.position),o=Math.abs(i),a=Math.abs(n),{maxDistance:r}=t.retina,c=r.horizontal,h=r.vertical;if(!c&&!h)return;if((c&&o>=c||h&&a>=h)&&!t.misplaced)t.misplaced=!!c&&o>c||!!h&&a>h,c&&(t.velocity.x=.5*t.velocity.y-t.velocity.x),h&&(t.velocity.y=.5*t.velocity.x-t.velocity.y);else if((!c||o<c)&&(!h||a<h)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,n=t.velocity;c&&(i.x<e.x&&n.x<0||i.x>e.x&&n.x>0)&&(n.x*=-(0,s.sZz)()),h&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-(0,s.sZz)())}}(t)}}const r=2*Math.PI,c=0,h=0;class l{constructor(){this.validTypes=["circle"]}draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange||(i.circleRange={min:0,max:r});const n=i.circleRange;e.arc(c,h,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=(0,s.Kn2)(n)?{min:(0,s.Idc)(n.min),max:(0,s.Idc)(n.max)}:{min:0,max:(0,s.Idc)(n)}}}class d{constructor(t,e){this._container=t,this._engine=e}init(t){const e=(0,s.lNs)(this._engine,t.options.color,t.id,t.options.reduceDuplicates);e&&(t.color=(0,s.bS$)(e,t.options.color.animation,this._container.retina.reduceFactor))}isEnabled(t){const{h:e,s:i,l:s}=t.options.color.animation,{color:n}=t;return!t.destroyed&&!t.spawning&&(void 0!==n?.h.value&&e.enable||void 0!==n?.s.value&&i.enable||void 0!==n?.l.value&&s.enable)}update(t,e){(0,s.PBz)(t.color,e)}}var u,p;(p=u||(u={}))[p.r=1]="r",p[p.g=2]="g",p[p.b=3]="b",p[p.a=4]="a";const f=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,v=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class g{constructor(){this.key="hex",this.stringPrefix="#"}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t)return;if(!t?.startsWith(this.stringPrefix))return;const e=t.replace(f,((t,e,i,s,n)=>e+e+i+i+s+s+(void 0!==n?n+n:""))),i=v.exec(e);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}}var y,m;(m=y||(y={}))[m.h=1]="h",m[m.s=2]="s",m[m.l=3]="l",m[m.a=5]="a";class w{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return(0,s.veL)(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if(void 0!==e.h&&void 0!==e.l)return(0,s.veL)({h:(0,s.Gu7)(e.h),l:(0,s.Gu7)(e.l),s:(0,s.Gu7)(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const e=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?(0,s.Y6v)({a:e.length>4?(0,s.BVM)(e[y.a]):1,h:parseInt(e[y.h],10),l:parseInt(e[y.l],10),s:parseInt(e[y.s],10)}):void 0}}class _{constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=(0,s.V0)(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=(0,s.Gu7)(i.speed)/s.tZy*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=(0,s.sZz)()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&(0,s.CrJ)(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}class b{constructor(t){this.container=t,this.modes=[s.Voc.bounce,s.Voc.split]}update(t,e,i,n){if(!this.modes.includes(n))return;const o=this.container;let a=!1;for(const s of o.plugins.values())if(void 0!==s.particleBounce&&(a=s.particleBounce(t,i,e)),a)break;if(a)return;const r=t.getPosition(),c=t.offset,h=t.getRadius(),l=(0,s.M_G)(r,h),d=o.canvas.size;!function(t){if(t.outMode!==s.Voc.bounce&&t.outMode!==s.Voc.split||t.direction!==s.DYc.left&&t.direction!==s.DYc.right)return;t.bounds.right<0&&t.direction===s.DYc.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===s.DYc.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===s.DYc.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===s.DYc.left&&t.bounds.left<=0&&e<0){const e=(0,s.Gu7)(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const n=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===s.DYc.right?t.particle.position.x=t.canvasSize.width-n:t.bounds.left<=0&&t.direction===s.DYc.left&&(t.particle.position.x=n),t.outMode===s.Voc.split&&t.particle.destroy()}({particle:t,outMode:n,direction:e,bounds:l,canvasSize:d,offset:c,size:h}),function(t){if(t.outMode!==s.Voc.bounce&&t.outMode!==s.Voc.split||t.direction!==s.DYc.bottom&&t.direction!==s.DYc.top)return;t.bounds.bottom<0&&t.direction===s.DYc.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===s.DYc.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===s.DYc.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===s.DYc.top&&t.bounds.top<=0&&e<0){const e=(0,s.Gu7)(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const n=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===s.DYc.bottom?t.particle.position.y=t.canvasSize.height-n:t.bounds.top<=0&&t.direction===s.DYc.top&&(t.particle.position.y=n),t.outMode===s.Voc.split&&t.particle.destroy()}({particle:t,outMode:n,direction:e,bounds:l,canvasSize:d,offset:c,size:h})}}i(22139);class x{constructor(t){this.container=t,this.modes=[s.Voc.destroy]}update(t,e,i,n){if(!this.modes.includes(n))return;const o=this.container;switch(t.outType){case s.Igb.normal:case s.Igb.outside:if((0,s.Ac)(t.position,o.canvas.size,s.OWs.origin,t.getRadius(),e))return;break;case s.Igb.inside:{const{dx:e,dy:i}=(0,s.oW6)(t.position,t.moveCenter),{x:n,y:o}=t.velocity;if(n<0&&e>t.moveCenter.radius||o<0&&i>t.moveCenter.radius||n>=0&&e<-t.moveCenter.radius||o>=0&&i<-t.moveCenter.radius)return;break}}o.particles.remove(t,t.group,!0)}}class k{constructor(t){this.container=t,this.modes=[s.Voc.none]}update(t,e,i,n){if(!this.modes.includes(n))return;if((t.options.move.distance.horizontal&&(e===s.DYc.left||e===s.DYc.right))??(t.options.move.distance.vertical&&(e===s.DYc.top||e===s.DYc.bottom)))return;const o=t.options.move.gravity,a=this.container,r=a.canvas.size,c=t.getRadius();if(o.enable){const i=t.position;(!o.inverse&&i.y>r.height+c&&e===s.DYc.bottom||o.inverse&&i.y<-c&&e===s.DYc.top)&&a.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=r.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=r.width+c||t.velocity.x<0&&t.position.x>=-c)return;(0,s.Ac)(t.position,a.canvas.size,s.OWs.origin,c,e)||a.particles.remove(t)}}}class z{constructor(t){this.container=t,this.modes=[s.Voc.out]}update(t,e,i,n){if(!this.modes.includes(n))return;const o=this.container;switch(t.outType){case s.Igb.inside:{const{x:e,y:i}=t.velocity,n=s.OWs.origin;n.length=t.moveCenter.radius,n.angle=t.velocity.angle+Math.PI,n.addTo(s.OWs.create(t.moveCenter));const{dx:a,dy:r}=(0,s.oW6)(t.position,n);if(e<=0&&a>=0||i<=0&&r>=0||e>=0&&a<=0||i>=0&&r<=0)return;t.position.x=Math.floor((0,s.vdf)({min:0,max:o.canvas.size.width})),t.position.y=Math.floor((0,s.vdf)({min:0,max:o.canvas.size.height}));const{dx:c,dy:h}=(0,s.oW6)(t.position,t.moveCenter);t.direction=Math.atan2(-h,-c),t.velocity.angle=t.direction;break}default:if((0,s.Ac)(t.position,o.canvas.size,s.OWs.origin,t.getRadius(),e))return;switch(t.outType){case s.Igb.outside:{t.position.x=Math.floor((0,s.vdf)({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor((0,s.vdf)({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=(0,s.oW6)(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction);break}case s.Igb.normal:{const i=t.options.move.warp,n=o.canvas.size,a={bottom:n.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:n.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},r=t.getRadius(),c=(0,s.M_G)(t.position,r);e===s.DYc.right&&c.left>n.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=(0,s.sZz)()*n.height,t.initialPosition.y=t.position.y)):e===s.DYc.left&&c.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=(0,s.sZz)()*n.height,t.initialPosition.y=t.position.y)),e===s.DYc.bottom&&c.top>n.height+t.offset.y?(i||(t.position.x=(0,s.sZz)()*n.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y):e===s.DYc.top&&c.bottom<-t.offset.y&&(i||(t.position.x=(0,s.sZz)()*n.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y);break}}}}}class M{constructor(t){this._addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))},this._updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)},this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,s.Voc.bounce,(t=>new b(t))),this._addUpdaterIfMissing(t,s.Voc.out,(t=>new z(t))),this._addUpdaterIfMissing(t,s.Voc.destroy,(t=>new x(t))),this._addUpdaterIfMissing(t,s.Voc.none,(t=>new k(t)))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;this._updateOutMode(t,e,i.bottom??i.default,s.DYc.bottom),this._updateOutMode(t,e,i.left??i.default,s.DYc.left),this._updateOutMode(t,e,i.right??i.default,s.DYc.right),this._updateOutMode(t,e,i.top??i.default,s.DYc.top)}}var P;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(P||(P={}));class O{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if(void 0!==e.r)return{r:(0,s.Gu7)(e.r),g:(0,s.Gu7)(e.g),b:(0,s.Gu7)(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const e=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i.exec(t);return e?{a:e.length>4?(0,s.BVM)(e[P.a]):1,b:parseInt(e[P.b],10),g:parseInt(e[P.g],10),r:parseInt(e[P.r],10)}:void 0}}class C{init(t){const e=t.container,i=t.options.size.animation;i.enable&&(t.size.velocity=(t.retina.sizeAnimationSpeed??e.retina.sizeAnimationSpeed)/s.tZy*e.retina.reduceFactor,i.sync||(t.size.velocity*=(0,s.sZz)()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.loops=0}update(t,e){this.isEnabled(t)&&(0,s.CrJ)(t,t.size,!0,t.options.size.animation.destroy,e)}}async function S(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new g,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new w,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addColorManager(new O,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addMover("base",(()=>Promise.resolve(new a)),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addShape(new l,e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("color",(e=>Promise.resolve(new d(e,t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("opacity",(t=>Promise.resolve(new _(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("outModes",(t=>Promise.resolve(new M(t))),e)}(t,!1),await async function(t,e=!0){t.checkVersion("3.8.1"),await t.addParticleUpdater("size",(()=>Promise.resolve(new C)),e)}(t,!1),await t.refresh(e)}i(92745),i(9359),i(52924);class D extends s.Cdc{constructor(t,e,i,s){super(t,e,i),this.canvasSize=s,this.canvasSize={...s}}contains(t){const{width:e,height:i}=this.canvasSize,{x:s,y:n}=t;return super.contains(t)||super.contains({x:s-e,y:n})||super.contains({x:s-e,y:n-i})||super.contains({x:s,y:n-i})}intersects(t){if(super.intersects(t))return!0;const e=t,i=t,n={x:t.position.x-this.canvasSize.width,y:t.position.y-this.canvasSize.height};if(void 0!==i.radius){const t=new s.Cdc(n.x,n.y,2*i.radius);return super.intersects(t)}if(void 0!==e.size){const t=new s.AeJ(n.x,n.y,2*e.size.width,2*e.size.height);return super.intersects(t)}return!1}}class I{constructor(){this.blur=5,this.color=new s.OzF,this.color.value="#000",this.enable=!1}load(t){(0,s.Ft)(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=s.OzF.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class T{constructor(){this.enable=!1,this.frequency=1}load(t){(0,s.Ft)(t)||(void 0!==t.color&&(this.color=s.OzF.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity))}}class R{constructor(){this.blink=!1,this.color=new s.OzF,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new I,this.triangles=new T,this.width=1,this.warp=!1}load(t){(0,s.Ft)(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=s.OzF.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}const L=0,E=0;function F(t,e,i,n,o){const{dx:a,dy:r,distance:c}=(0,s.oW6)(t,e);if(!o||c<=i)return c;const h={x:Math.abs(a),y:Math.abs(r)},l=Math.min(h.x,n.width-h.x),d=Math.min(h.y,n.height-h.y);return Math.sqrt(l**2+d**2)}class A extends s.$Sh{constructor(t,e){super(t),this._setColor=t=>{if(!t.options.links)return;const e=this._linkContainer,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);if(n)return;const o=i.color;n=(0,s.Dt5)(this._engine,o,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n)},this._linkContainer=t,this._engine=e}clear(){}init(){this._linkContainer.particles.linksColor=void 0,this._linkContainer.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[];const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<L||e.y<E||e.x>n.width||e.y>n.height)return;const o=t.options.links,a=o.opacity,r=t.retina.linksDistance??0,c=o.warp;let h;h=c?new D(e.x,e.y,r,n):new s.Cdc(e.x,e.y,r);const l=i.particles.quadTree.query(h);for(const i of l){const s=i.options.links;if(t===i||!s?.enable||o.id!==s.id||i.spawning||i.destroyed||!i.links||t.links.some((t=>t.destination===i))||i.links.some((e=>e.destination===t)))continue;const h=i.getPosition();if(h.x<L||h.y<E||h.x>n.width||h.y>n.height)continue;const l=F(e,h,r,n,c&&s.warp);if(l>r)continue;const d=(1-l/r)*a;this._setColor(t),t.links.push({destination:i,opacity:d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links||(t.links=new R);for(const i of e)t.links.load(i?.links)}reset(){}}i(56475),i(70104);function V(t,e){const i=((n=t.map((t=>t.id))).sort(((t,e)=>t-e)),n.join("_"));var n;let o=e.get(i);return void 0===o&&(o=(0,s.sZz)(),e.set(i,o)),o}class q{constructor(t,e){this._drawLinkLine=(t,e)=>{const i=t.options.links;if(!i?.enable)return;const n=this._container,o=n.actualOptions,a=e.destination,r=t.getPosition(),c=a.getPosition();let h=e.opacity;n.canvas.draw((e=>{let l;const d=t.options.twinkle?.lines;if(d?.enable){const t=d.frequency,e=(0,s.tXk)(this._engine,d.color);(0,s.sZz)()<t&&e&&(l=e,h=(0,s.Gu7)(d.opacity))}if(!l){const e=void 0!==i.id?n.particles.linksColors.get(i.id):n.particles.linksColor;l=(0,s.BEi)(t,a,e)}if(!l)return;const u=t.retina.linksWidth??0,p=t.retina.linksDistance??0,{backgroundMask:f}=o;!function(t){let e=!1;const{begin:i,end:n,engine:o,maxDistance:a,context:r,canvasSize:c,width:h,backgroundMask:l,colorLine:d,opacity:u,links:p}=t;if((0,s.Spd)(i,n)<=a)(0,s.pSR)(r,i,n),e=!0;else if(p.warp){let t,o;const h={x:n.x-c.width,y:n.y},l=(0,s.oW6)(i,h);if(l.distance<=a){const e=i.y-l.dy/l.dx*i.x;t={x:0,y:e},o={x:c.width,y:e}}else{const e={x:n.x,y:n.y-c.height},r=(0,s.oW6)(i,e);if(r.distance<=a){const e=-(i.y-r.dy/r.dx*i.x)/(r.dy/r.dx);t={x:e,y:0},o={x:e,y:c.height}}else{const e={x:n.x-c.width,y:n.y-c.height},r=(0,s.oW6)(i,e);if(r.distance<=a){const e=i.y-r.dy/r.dx*i.x;t={x:-e/(r.dy/r.dx),y:e},o={x:t.x+c.width,y:t.y+c.height}}}}t&&o&&((0,s.pSR)(r,i,t),(0,s.pSR)(r,n,o),e=!0)}if(!e)return;r.lineWidth=h,l.enable&&(r.globalCompositeOperation=l.composite),r.strokeStyle=(0,s.izR)(d,u);const{shadow:f}=p;if(f.enable){const t=(0,s.tXk)(o,f.color);t&&(r.shadowBlur=f.blur,r.shadowColor=(0,s.izR)(t))}r.stroke()}({context:e,width:u,begin:r,end:c,engine:this._engine,maxDistance:p,canvasSize:n.canvas.size,links:i,backgroundMask:f,colorLine:l,opacity:h})}))},this._drawLinkTriangle=(t,e,i)=>{const n=t.options.links;if(!n?.enable)return;const o=n.triangles;if(!o.enable)return;const a=this._container,r=a.actualOptions,c=e.destination,h=i.destination,l=o.opacity??.5*(e.opacity+i.opacity);l<=0||a.canvas.draw((e=>{const i=t.getPosition(),d=c.getPosition(),u=h.getPosition(),p=t.retina.linksDistance??0;if((0,s.Spd)(i,d)>p||(0,s.Spd)(u,d)>p||(0,s.Spd)(u,i)>p)return;let f=(0,s.tXk)(this._engine,o.color);if(!f){const e=void 0!==n.id?a.particles.linksColors.get(n.id):a.particles.linksColor;f=(0,s.BEi)(t,c,e)}f&&function(t){const{context:e,pos1:i,pos2:n,pos3:o,backgroundMask:a,colorTriangle:r,opacityTriangle:c}=t;!function(t,e,i,s){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.lineTo(s.x,s.y),t.closePath()}(e,i,n,o),a.enable&&(e.globalCompositeOperation=a.composite),e.fillStyle=(0,s.izR)(r,c),e.fill()}({context:e,pos1:i,pos2:d,pos3:u,backgroundMask:r.backgroundMask,colorTriangle:f,opacityTriangle:l})}))},this._drawTriangles=(t,e,i,s)=>{const n=i.destination;if(!t.links?.triangles.enable||!n.options.links?.triangles.enable)return;const o=n.links?.filter((t=>{const e=this._getLinkFrequency(n,t.destination);return n.options.links&&e<=n.options.links.frequency&&s.findIndex((e=>e.destination===t.destination))>=0}));if(o?.length)for(const s of o){const o=s.destination;this._getTriangleFrequency(e,n,o)>t.links.triangles.frequency||this._drawLinkTriangle(e,i,s)}},this._getLinkFrequency=(t,e)=>V([t,e],this._freqs.links),this._getTriangleFrequency=(t,e,i)=>V([t,e,i],this._freqs.triangles),this._container=t,this._engine=e,this._freqs={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length)return;const n=i.filter((t=>s.links&&(s.links.frequency>=1||this._getLinkFrequency(e,t.destination)<=s.links.frequency)));for(const t of n)this._drawTriangles(s,e,t,n),t.opacity>0&&(e.retina.linksWidth??0)>0&&this._drawLinkLine(e,t)}async init(){this._freqs.links=new Map,this._freqs.triangles=new Map,await Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;const e=this._container.retina.pixelRatio,{retina:i}=t,{distance:s,width:n}=t.options.links;i.linksDistance=s*e,i.linksWidth=n*e}particleDestroyed(t){t.links=[]}}class W{constructor(t){this.id="links",this._engine=t}getPlugin(t){return Promise.resolve(new q(t,this._engine))}loadOptions(){}needsPlugin(){return!0}}async function Y(t,e=!0){t.checkVersion("3.8.1"),await async function(t,e=!0){await t.addInteractor("particlesLinks",(async e=>Promise.resolve(new A(e,t))),e)}(t,e),await async function(t,e=!0){const i=new W(t);await t.addPlugin(i,e)}(t,e)}const B={background:{color:"#000000"},particles:{number:{value:100},links:{distance:150,enable:!0},move:{enable:!0},size:{value:1},shape:{type:"circle"}}};async function G(t,e=!0){await S(t,!1),await Y(t,!1),await t.addPreset("links",B,!1),await t.refresh(e)}}};
//# sourceMappingURL=92996.53c3e450d3e6bc1d.js.map