@tsparticles/slim 4.1.3 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/index.js +1 -1
- package/browser/index.lazy.js +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.lazy.js +1 -1
- package/esm/index.js +1 -1
- package/esm/index.lazy.js +1 -1
- package/package.json +30 -30
- package/report.html +1 -1
- package/tsparticles.slim.bundle.js +1304 -2190
- package/tsparticles.slim.bundle.min.js +1 -1
- package/tsparticles.slim.js +2 -2
- package/tsparticles.slim.min.js +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.slim=t.__tsParticlesInternals.bundles.slim||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75;var P;function M(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class k{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(c.x,c.y,c.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??c.y,i??c.z):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.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 k.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 k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends k{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return D.create(c.x,c.y)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??c.y):new D(t.x,t.y)}}function C(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function z(t){return Array.isArray(t)}function T(t){return null==t}const R=Math.PI/180;let E=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function L(){return V(E(),0,1-Number.EPSILON)}function B(t,e){return L()*(e-t)+t}function A(t){return _.nextFrame(t)}function F(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function H(t){const e=$(t);let i=W(t);return e===i&&(i=0),B(i,e)}function q(t){return S(t)?t:H(t)}function W(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function j(t,e){if(t===e||void 0===e&&S(t))return t;const i=W(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:j(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(N(t,e))}function X(t,e,i){return N(t,e)<=i*i}function Y(t){return t*R}function K(e,i,s){if(S(e))return Y(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return L()*u}}function Z(t){const e=D.origin;return e.length=1,e.angle=t,e}function J(t,e,i,s){return D.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??L()*a)*t.size.width/a,y:(t.position?.y??L()*a)*t.size.height/a}}function et(t){const{position:e,size:i}=t;return{x:e?.x??L()*i.width,y:e?.y??L()*i.height}}function it(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var st,nt,at,ot,rt,ct;t.AnimationMode=void 0,(st=t.AnimationMode||(t.AnimationMode={})).auto="auto",st.increase="increase",st.decrease="decrease",st.random="random",t.AnimationStatus=void 0,(nt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",nt.decreasing="decreasing",t.DestroyType=void 0,(at=t.DestroyType||(t.DestroyType={})).none="none",at.max="max",at.min="min",t.OutModeDirection=void 0,(ot=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ot.left="left",ot.right="right",ot.top="top",t.PixelMode=void 0,(rt=t.PixelMode||(t.PixelMode={})).precise="precise",rt.percent="percent",t.StartValueType=void 0,(ct=t.StartValueType||(t.StartValueType={})).max="max",ct.min="min",ct.random="random";function lt(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,a=e?.keyFn,o=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>o(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${o(t[i],e)}`).join(",")}}`},r=t=>a?a(t):(t=>o(t))(t);return(...e)=>{const a=r(e),o=Date.now(),c=i.get(a);if(void 0!==c){if(!(n&&o-c.ts>n))return i.delete(a),i.set(a,{value:c.value,ts:c.ts}),c.value;i.delete(a)}const l=t(...e);return i.set(a,{value:l,ts:o}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),l}}function dt(){return"undefined"!=typeof matchMedia}function ht(){return globalThis.document}function ut(t){if(dt())return matchMedia(t)}function pt(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}function gt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ft(t,e){return t===e||z(e)&&e.includes(t)}function mt(t){return Math.floor(L()*t.length)}function yt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:mt(t)]}function vt(t,e,i,s,n){return bt(wt(t,s??0),e,i,n)}function bt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function wt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function xt(t,...e){for(const i of e){if(T(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>xt(void 0,t)):xt(e[n],a)}}return t}function Pt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:D.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}}function Mt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=G(a,n);if(i*o+s*r<0)return;const c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=J(h,u,l,d),g=J(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function kt(t,e){return z(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Dt(t,e,i){return z(t)?yt(t,e,i):t}function Ct(t,e){if(z(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Ot(e,i){const s=e.value,n=e.animation,a={delayTime:q(n.delay)*r,enable:n.enable,value:q(e.value)*i,max:$(s)*i,min:W(s)*i,loops:0,maxLoops:q(n.count),time:0};if(n.enable){switch(a.decay=1-q(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=L()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=H(a),e&&(a.status=L()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function St(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}function It(t,e){return St(t,e)}function zt(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,c=i.max,l=i.decay??1;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=a.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(s?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,c),e.destroyed||(i.value=V(i.value,r,c))}}function Tt(t){const e=ht().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}const Rt=lt(function(t){const e=ht().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","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Et(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function _t(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}async function Lt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Bt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var At;t.EventType=void 0,(At=t.EventType||(t.EventType={})).configAdded="configAdded",At.containerInit="containerInit",At.particlesSetup="particlesSetup",At.containerStarted="containerStarted",At.containerStopped="containerStopped",At.containerDestroyed="containerDestroyed",At.containerPaused="containerPaused",At.containerPlay="containerPlay",At.containerBuilt="containerBuilt",At.particleAdded="particleAdded",At.particleDestroyed="particleDestroyed",At.particleRemoved="particleRemoved";class Ft{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Lt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Lt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return _t(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Vt=t=>(...e)=>{t(...e)},Ut={debug:Vt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Vt(console.info),log:Vt(console.log),trace:Vt(console.trace),verbose:Vt(console.log),warning:Vt(console.warn)};function Ht(){return Ut}const qt="100%";class Wt{pluginManager=new Ft(this);#d=[];#h=new Bt;#o=!1;get items(){return this.#d}get version(){return"4.1.3"}addEventListener(t,e){this.#h.addEventListener(t,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}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return go}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*L()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=Dt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Ht().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=Dt(r,a),{items:l}=this,d=l.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ht();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=qt,s.style.height||=qt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=qt,s.style.height||=qt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ht();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var $t,jt,Gt,Nt,Qt,Xt,Yt,Kt;!function(t){t.circle="circle",t.rectangle="rectangle"}($t||($t={}));class Zt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Jt extends Zt{radius;constructor(t,e,i){super(t,e,$t.circle),this.radius=i}contains(t){return X(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Jt||t.type===$t.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof te||t.type===$t.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(n-i,2)+Math.pow(a-o,2)<=s**2||n<=s+i&&a<=s+o||n<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class te extends Zt{size;constructor(t,e,i,s){super(t,e,$t.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 Jt)return t.intersects(this);if(!(t instanceof te))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,o=a.width,r=a.height;return n.x<s.x+e&&n.x+o>s.x&&n.y<s.y+i&&n.y+r>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}t.RotateDirection=void 0,(jt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",jt.counterClockwise="counter-clockwise",jt.random="random",t.LimitMode=void 0,(Gt=t.LimitMode||(t.LimitMode={})).delete="delete",Gt.wait="wait",t.OutMode=void 0,(Nt=t.OutMode||(t.OutMode={})).bounce="bounce",Nt.none="none",Nt.out="out",Nt.destroy="destroy",Nt.split="split",t.AlterType=void 0,(Qt=t.AlterType||(t.AlterType={})).darken="darken",Qt.enlighten="enlighten",t.GradientType=void 0,(Xt=t.GradientType||(t.GradientType={})).linear="linear",Xt.radial="radial",Xt.random="random",t.ParticleOutType=void 0,(Yt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Yt.inside="inside",Yt.outside="outside",t.EasingType=void 0,(Kt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Kt.easeInBounce="ease-in-bounce",Kt.easeInCirc="ease-in-circ",Kt.easeInCubic="ease-in-cubic",Kt.easeInElastic="ease-in-elastic",Kt.easeInExpo="ease-in-expo",Kt.easeInGaussian="ease-in-gaussian",Kt.easeInLinear="ease-in-linear",Kt.easeInQuad="ease-in-quad",Kt.easeInQuart="ease-in-quart",Kt.easeInQuint="ease-in-quint",Kt.easeInSigmoid="ease-in-sigmoid",Kt.easeInSine="ease-in-sine",Kt.easeInSmoothstep="ease-in-smoothstep",Kt.easeOutBack="ease-out-back",Kt.easeOutBounce="ease-out-bounce",Kt.easeOutCirc="ease-out-circ",Kt.easeOutCubic="ease-out-cubic",Kt.easeOutElastic="ease-out-elastic",Kt.easeOutExpo="ease-out-expo",Kt.easeOutGaussian="ease-out-gaussian",Kt.easeOutLinear="ease-out-linear",Kt.easeOutQuad="ease-out-quad",Kt.easeOutQuart="ease-out-quart",Kt.easeOutQuint="ease-out-quint",Kt.easeOutSigmoid="ease-out-sigmoid",Kt.easeOutSine="ease-out-sine",Kt.easeOutSmoothstep="ease-out-smoothstep",Kt.easeInOutBack="ease-in-out-back",Kt.easeInOutBounce="ease-in-out-bounce",Kt.easeInOutCirc="ease-in-out-circ",Kt.easeInOutCubic="ease-in-out-cubic",Kt.easeInOutElastic="ease-in-out-elastic",Kt.easeInOutExpo="ease-in-out-expo",Kt.easeInOutGaussian="ease-in-out-gaussian",Kt.easeInOutLinear="ease-in-out-linear",Kt.easeInOutQuad="ease-in-out-quad",Kt.easeInOutQuart="ease-in-out-quart",Kt.easeInOutQuint="ease-in-out-quint",Kt.easeInOutSigmoid="ease-in-out-sigmoid",Kt.easeInOutSine="ease-in-out-sine",Kt.easeInOutSmoothstep="ease-in-out-smoothstep";class ee{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){T(t)||(void 0!==t.count&&(this.count=j(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=j(t.speed)),void 0!==t.decay&&(this.decay=j(t.decay)),void 0!==t.delay&&(this.delay=j(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class ie extends ee{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class se extends ee{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),T(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=j(t.offset)))}}class ne{h=new se(0,y);l=new se(0,b);s=new se(0,v);load(t){T(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ae{value;constructor(){this.value=""}static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(O(e)||z(e)?i.load({value:e}):i.load(e)),i}load(t){T(t)||T(t.value)||(this.value=t.value)}}class oe extends ae{animation;constructor(){super(),this.animation=new ne}static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(O(e)||z(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class re{color;image;opacity;position;repeat;size;constructor(){this.color=new ae,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=ae.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 ce{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class le{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){T(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class de{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=xt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class he{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=j(t.opacity)))}}class ue{offset;value;constructor(){this.offset=0,this.value=90}load(t){T(t)||(void 0!==t.offset&&(this.offset=j(t.offset)),void 0!==t.value&&(this.value=j(t.value)))}}class pe{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){T(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ge{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=j(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=j(t.maxSpeed)))}}class fe{value;constructor(){this.value=0}load(t){T(t)||T(t.value)||(this.value=j(t.value))}}class me extends fe{animation=new ee;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ye extends me{animation;constructor(){super(),this.animation=new ie}load(t){super.load(t)}}class ve{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new fe,this.enable=!1,this.options={}}load(t){T(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=xt(this.options,t.options)))}}class be{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){T(t)||(void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default)}}class we{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=j(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=xt({},t.position)))}}class xe{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new ue,this.center=new pe,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ge,this.path=new ve,this.outModes=new be,this.random=!1,this.size=!1,this.speed=2,this.spin=new we,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(T(t))return;this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=j(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=j(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(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=j(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Pe{color;opacity;width;constructor(){this.width=0}load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.width&&(this.width=j(t.width)),void 0!==t.opacity&&(this.opacity=j(t.opacity)))}}class Me{color;fill;stroke;load(t){T(t)||(void 0!==t.color&&(this.color=oe.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new he,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new Pe,this.stroke.load(t.stroke)))}}class ke extends fe{constructor(){super(),this.value=1}}class De{horizontal;vertical;constructor(){this.horizontal=new ke,this.vertical=new ke}load(t){T(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Ce{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(T(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)}}class Oe{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Se{density;limit;value;constructor(){this.density=new Ce,this.limit=new Oe,this.value=0}load(t){T(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Ie{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=xt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ze extends fe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),T(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class Te{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new De,this.effect=new de,this.groups={},this.move=new xe,this.number=new Se,this.paint=new Me,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Ie,this.zIndex=new ze}load(t){if(T(t))return;if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=xt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(z(e)?this.paint=kt(e,t=>{const e=new Me;return e.load(t),e}):z(this.paint)?(this.paint=new Me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(z(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Re(t,...e){for(const i of e)t.load(i)}function Ee(t,e,...i){const s=new Te(t,e);return Re(s,...i),s}class _e{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new re,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new ce,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ee(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new le,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(T(t))return;void 0!==t.preset&&(this.preset=t.preset,kt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),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=j(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=j(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),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;C(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=xt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#f=t=>{this.load(this.#p.getPreset(t))}}function Le(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(c.x,c.y,e.width,e.height)}function Be(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,c.x,c.y,e.width,e.height),t.globalAlpha=n}function Ae(t,e){t.clearRect(c.x,c.y,e.width,e.height)}function Fe(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(c),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!s.fillEnabled,f=s.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:s,radius:o,drawRadius:1*o,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?l.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;Ue(y,m),We(v,m),He(v,m),qe(v,m),Ve(y,m),i.resetTransform()}function Ve(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function Ue(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function He(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:a}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),a&&i.stroke())}function qe(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function We(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function $e(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const je=new Map;function Ge(t,e){let i=je.get(t);if(!i){if(i=e(),je.size>=1e3){[...je.keys()].slice(0,500).forEach(t=>je.delete(t))}je.set(t,i)}return i}function Ne(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Qe(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Xe(t,n.value,i,s);if(z(n.value)){const e=yt(n.value,i,s);if(!e)return;return Qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Xe(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===d?ei():Ze(t,n.value);if(z(n.value)){const e=yt(n.value,i,s);if(!e)return;return Xe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ye(t,e,i,s=!0){const n=Qe(t,e,i,s);return n?Ke(n):void 0}function Ke(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*o,s:0};return n!==a&&(r.s=r.l<o?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function Ze(t,e){return Ne(t,e)}function Je(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/y,a=i/v,r=s/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},l=r<o?r*(1+a):r+a-r*a,d=2*r-l,h=1/3,u=Math.min(m,m*c(d,l,n+h)),p=Math.min(m,m*c(d,l,n)),g=Math.min(m,m*c(d,l,n-h));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function ti(t){const e=Je(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ei(t){const e=t??0,i=()=>Math.floor(B(e,256));return{b:i(),g:i(),r:i()}}function ii(t,e,i){const s=i??1;return Ge(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?si(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function si(t,e){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function ni(t,e,i){const s=i??1;return Ge(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return si(Je(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function ai(t,e,i,s){let n=t,a=e;return"r"in n||(n=Je(t)),"r"in a||(a=Je(e)),{b:U(n.b,a.b,i,s),g:U(n.g,a.g,i,s),r:U(n.r,a.r,i,s)}}function oi(t,e,i){if(i===d)return ei();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return ai(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Je(t)}}}function ri(t,e,i,s){const n=O(e)?e:e.value;return n===d?s?Qe(t,{value:n}):i?d:h:n===h?h:Qe(t,{value:n})}function ci(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function li(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(di(s.h,e.h,i),di(s.s,e.s,i),di(s.l,e.l,i)),s}function di(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*s,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=L(),e.value*=L()),e.initialValue=e.value,e.offset=j(i.offset)):e.velocity=0}function hi(e,i,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const n=e.offset?H(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,c,r)}function ui(t,e){if(!t)return;const{h:i,s:s,l:n}=t;hi(i,!1,e),hi(s,!0,e),hi(n,!0,e)}function pi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const gi=new Wt;class fi{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class mi{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return fo});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new fi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new fi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function yi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new mi)})}class vi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(c.x,c.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:Y(s.min),max:Y(s.max)}:{min:0,max:Y(s)}}}async function bi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new vi))})}var wi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(wi||(wi={}));const xi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Pi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Mi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(xi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Pi.exec(e);return i?{a:i[wi.a]?Number.parseInt(i[wi.a],16)/255:1,b:Number.parseInt(i[wi.b]??"0",16),g:Number.parseInt(i[wi.g]??"0",16),r:Number.parseInt(i[wi.r]??"0",16)}:void 0}}async function ki(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Mi)})}var Di;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Di||(Di={}));const Ci=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Oi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Je(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Je({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ci.exec(t);return e?ti({a:e.length>4?it(e[Di.a]):1,h:Number.parseInt(e[Di.h]??"0",10),l:Number.parseInt(e[Di.l]??"0",10),s:Number.parseInt(e[Di.s]??"0",10)}):void 0}}async function Si(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Oi)})}class Ii{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return yo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function zi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Lt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Ii(t.pluginManager))})}class Ti extends ie{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),T(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ri extends ye{animation;constructor(){super(),this.animation=new Ti,this.value=1}load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ei{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Ot(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){t.opacity??=new Ri;for(const i of e)t.opacity.load(i?.opacity)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&zt(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function _i(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ei(t)))})}class Li{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=wt(r,l),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l})}}class Bi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=G(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ai{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;vt(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const Fi=D.origin;class Vi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Fi.setTo(c),Fi.length=e.moveCenter.radius,Fi.angle=e.velocity.angle+Math.PI,Fi.addTo(e.moveCenter);const{dx:s,dy:n}=G(e.position,Fi);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(H({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=G(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=G(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=a.canvas.size,o={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),c=wt(e.position,r);i===t.OutModeDirection.right&&c.left>n.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,s||(e.position.y=L()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,s||(e.position.y=L()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&c.top>n.height+e.offset.y?(s||(e.position.x=L()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(s||(e.position.x=L()*n.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ui{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Li(t)),this.#v(e,t.OutMode.out,t=>new Vi(t)),this.#v(e,t.OutMode.destroy,t=>new Bi(t)),this.#v(e,t.OutMode.none,t=>new Ai(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#b(e,i,s.left??s.default,t.OutModeDirection.left),this.#b(e,i,s.right??s.default,t.OutModeDirection.right),this.#b(e,i,s.top??s.default,t.OutModeDirection.top)}#v=(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.#u))};#b=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Hi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ui(t)))})}class qi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=Dt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const s=Ye(this.#p,i);s&&(t.fillColor=li(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const s=Ye(this.#p,i)??t.getFillColor();s&&(t.strokeColor=li(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ui(t.fillColor,e),ui(t.strokeColor,e))}}async function Wi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new qi(t.pluginManager,e)))})}var $i;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}($i||($i={}));const ji=/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;class Gi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ji.exec(t);return e?{a:e.length>4?it(e[$i.a]):1,b:parseInt(e[$i.b]??"0",10),g:parseInt(e[$i.g]??"0",10),r:parseInt(e[$i.r]??"0",10)}:void 0}}async function Ni(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Gi)})}class Qi extends ie{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),T(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Xi extends ye{animation;constructor(){super(),this.animation=new Qi,this.value=3}load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Yi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,s.sync||(t.size.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){t.size??=new Xi;for(const i of e)t.size.load(i?.size)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Ot(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&zt(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Ki(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Yi(t)))})}async function Zi(t){t.checkVersion("4.1.3"),await t.pluginManager.register(async t=>{await Promise.all([yi(t),ki(t),Si(t),Ni(t),zi(t),bi(t),Wi(t),_i(t),Hi(t),Ki(t)])})}const Ji=new Map;async function ts(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{for(const[e,i]of Ji)t.pluginManager.addEasing(e,i)})}Ji.set(t.EasingType.easeInQuad,t=>t**2),Ji.set(t.EasingType.easeOutQuad,t=>1-(1-t)**2),Ji.set(t.EasingType.easeInOutQuad,t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const es=["emoji"];function is(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function ss(t,e){try{await ht().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const ns='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class as{#w=new Map;destroy(){for(const[t,e]of this.#w)e instanceof ImageBitmap&&e.close(),this.#w.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#w.get(e);i&&function(t,e){const{context:i,opacity:s}=t,n=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=s,i.drawImage(e,-r,-r,a,a),i.globalAlpha=n}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!es.some(t=>ft(t,e.type)))return;const i=[ss(ns)];kt(es.map(t=>e.options[t])[0],t=>{t.font&&i.push(ss(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const s=Dt(i.value,e.randomIndexData);if(!s)return;const n="string"==typeof s?{font:i.font??ns,padding:i.padding??0,value:s}:{font:ns,padding:0,...i,...s},a=n.font,o=n.value,r=`${o}_${a}`;if(this.#w.has(r))return void(e.emojiDataKey=r);const c=2*n.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#w.set(r,g),e.emojiDataKey=r}}async function os(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(es,()=>Promise.resolve(new as))})}class rs{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var cs,ls,ds;!function(t){t.circle="circle",t.rectangle="rectangle"}(cs||(cs={}));class hs{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=cs.circle}load(t){T(t)||(void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type))}}class us{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class ps{onClick;onDiv;onHover;constructor(){this.onClick=new rs,this.onDiv=new hs,this.onHover=new us}load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=kt(e,t=>{const e=new hs;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(ls||(ls={}));class gs{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class fs{detectsOn;events;modes;constructor(t,e){this.detectsOn=ls.window,this.events=new ps,this.modes=new gs(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class ms{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return wo});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new fs(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=xt({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(ds||(ds={}));class ys{type=ds.external;container;constructor(t){this.container=t}}class vs{type=ds.particles;container;constructor(t){this.container=t}}const bs="pointerdown",ws="pointerup",xs="pointerleave",Ps="pointermove",Ms="touchstart",ks="touchend",Ds="touchmove",Cs="touchcancel";function Os(t,e){return!!Ct(e,e=>e.enable&&ft(t,e.mode))}function Ss(t,e,i){kt(e,e=>{const s=e.mode;e.enable&&ft(t,s)&&function(t,e){const i=t.selectors;kt(i,i=>{e(i,t)})}(e,i)})}function Is(t,e){if(e&&t)return Ct(t,t=>function(t,e){const i=kt(e,e=>t.matches(e));return z(i)?i.some(t=>t):i}(e,t.selectors))}function zs(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}const Ts=D.origin;function Rs(t,e,i,s,n,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(n,a);for(const e of c){const{dx:n,dy:a,distance:c}=G(e.position,i),l=r.speed*r.factor,d=V(t.getEasing(r.easing)(1-c/s)*l,1,r.maxSpeed);Ts.x=c?n/c*d:l,Ts.y=c?a/c*d:l,o?.(e),e.position.subFrom(Ts)}}let Es=class{distance;duration;easing;factor;maxSpeed;restore;speed;constructor(){this.distance=200,this.duration=.4,this.easing=t.EasingType.easeOutQuad,this.factor=1,this.maxSpeed=50,this.speed=1,this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const _s="attract";let Ls=class extends ys{handleClickMode;#x;#P;#p;#M;constructor(t,e){super(e),this.#p=t,this.#P=0,this.#x=new Set,this.#M=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.attract;if(n&&t===_s){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},n.duration*r)}}}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#P=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===Ps,s=e.interactivity?.events;if(!s)return;const{enable:n,mode:a}=s.onHover,{enable:o,mode:r}=s.onClick;i&&n&&ft(_s,a)?function(t,e,i,s,n){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||Rs(t,e,a,o,new Jt(a.x,a.y,o),t=>s(t),n)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}):o&&ft(_s,r)&&function(t,e,i,s,n){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;Rs(t,e,a,o,new Jt(a.x,a.y,o),t=>s(t),n)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}),this.#D()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!(s.position&&n?.onHover.enable||s.clickPosition&&n?.onClick.enable))return!1;const a=n.onHover.mode,o=n.onClick.mode;return ft(_s,a)||ft(_s,o)}loadModeOptions(t,...e){t.attract??=new Es;for(const i of e)t.attract.load(i?.attract)}reset(){}#D(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#M.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#M){if(this.#x.has(n))continue;if(n.destroyed){this.#M.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;if(t.follow&&n.options.move.enable){const{x:t,y:e,z:i}=n.velocity,s=t*t+e*e+i*i;if(s>0){const n=(r*t+c*e+l*i)/s;r-=t*n,c-=e*n,l-=i*n}}n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#M.delete(n))}}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#M.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#M.set(t,s)),s.lastInteractionTime=i}};async function Bs(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Ls(t.pluginManager,e)))})}const As=Math.PI*o;function Fs(t,e,i,s,n){const a=t.particles.grid.query(s,n);for(const t of a)s instanceof Jt?Mt(Pt(t),{position:e,mass:i**2*As,velocity:D.origin,factor:D.origin}):s instanceof te&&Hs(t,wt(e,i))}function Vs(t,e,i,s){Ss(i,e,(e,i)=>{!function(t,e,i,s){const n=ht().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,a=t.retina.pixelRatio,r={x:(n.offsetLeft+n.offsetWidth*o)*a,y:(n.offsetTop+n.offsetHeight*o)*a},c=n.offsetWidth*o*a,l=10*a,d=i.type===cs.circle?new Jt(r.x,r.y,c+l):new te(n.offsetLeft*a-l,n.offsetTop*a-l,n.offsetWidth*a+2*l,n.offsetHeight*a+2*l);s(r,c,d)})}(t,e,i,(e,i,n)=>{Fs(t,e,i,n,s)})})}function Us(t){const e={bounced:!1},{pSide:i,pOtherSide:s,rectSide:n,rectOtherSide:a,velocity:r,factor:c}=t;return s.min<a.min||s.min>a.max||s.max<a.min||s.max>a.max||(i.max>=n.min&&i.max<=(n.max+n.min)*o&&r>0||i.min<=n.max&&i.min>(n.max+n.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function Hs(t,e){const i=wt(t.getPosition(),t.getRadius()),s=t.options.bounce,n=Us({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:q(s.horizontal.value)});n.bounced&&(void 0!==n.velocity&&(t.velocity.x=n.velocity),void 0!==n.position&&(t.position.x=n.position));const a=Us({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:q(s.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class qs{distance;constructor(){this.distance=200}load(t){T(t)||void 0!==t.distance&&(this.distance=t.distance)}}const Ws="bounce";class $s extends ys{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#P=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ps;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ft(Ws,a)?function(t,e,i){const s=10*t.retina.pixelRatio,n=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!n||Fs(t,n,a,new Jt(n.x,n.y,a+s),i)}(this.container,t,e=>this.isEnabled(t,e)):Vs(this.container,o,Ws,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ft(Ws,n.onHover.mode)||Os(Ws,a)}loadModeOptions(t,...e){t.bounce??=new qs;for(const i of e)t.bounce.load(i?.bounce)}reset(){}}async function js(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new $s(t)))})}class Gs{color;distance;duration;mix;opacity;size;constructor(){this.distance=200,this.duration=.4,this.mix=!1}load(t){if(!T(t)){if(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.mix&&(this.mix=t.mix),void 0!==t.opacity&&(this.opacity=t.opacity),void 0!==t.color){const e=z(this.color)?void 0:this.color;this.color=kt(t.color,t=>ae.create(e,t))}void 0!==t.size&&(this.size=t.size)}}}class Ns extends Gs{selectors;constructor(){super(),this.selectors=[]}load(t){super.load(t),T(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class Qs extends Gs{divs;load(t){super.load(t),T(t)||(this.divs=kt(t.divs,t=>{const e=new Ns;return e.load(t),e}))}}var Xs;function Ys(t,e,i,s){if(e>=i){return V(t+(e-i)*s,t,e)}if(e<i){return V(t-(i-e)*s,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(Xs||(Xs={}));const Ks="bubble";class Zs extends ys{handleClickMode;#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0,e.bubble??={},this.handleClickMode=t=>{t===Ks&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#P}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#P=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,s=i.interactivity?.events;if(!s)return;const n=s.onHover,a=s.onClick,o=n.enable,r=n.mode,c=a.enable,l=a.mode,d=s.onDiv;o&&ft(Ks,r)?this.#C(t):c&&ft(Ks,l)?this.#O(t):Ss(Ks,d,(i,s)=>{this.#S(t,e,i,s)})}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const{onClick:a,onDiv:o,onHover:r}=n,c=Os(Ks,o);return!!(c||r.enable&&s.position||a.enable&&s.clickPosition)&&(ft(Ks,r.mode)||ft(Ks,a.mode)||c)}loadModeOptions(t,...e){t.bubble??=new Qs;for(const i of e)t.bubble.load(i?.bubble)}reset(t,e){e.bubble.inRange=!1}#O=t=>{const e=this.container,i=e.actualOptions,s=t.mouse.clickPosition,n=i.interactivity?.modes.bubble;if(!n||!s)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(s,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;i.bubble.inRange=!c.durationEnd;const o=Q(i.getPosition(),s),l=(performance.now()-(t.mouse.clickTime??0))/r;l>n.duration&&(c.durationEnd=!0),l>2*n.duration&&(c.clicking=!1,c.durationEnd=!1);const d={bubbleObj:{optValue:e.retina.bubbleModeSize,value:i.bubble.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:Xs.size};this.#I(i,o,l,d);const h={bubbleObj:{optValue:n.opacity,value:i.bubble.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:Xs.opacity};this.#I(i,o,l,h),!c.durationEnd&&o<=a?this.#z(i,o):delete i.bubble.color}};#C=t=>{const e=this.container,i=t.mouse.position,s=e.retina.bubbleModeDistance;if(!s||s<0||!i)return;const n=e.particles.grid.queryCircle(i,s,e=>this.isEnabled(t,e));for(const e of n){e.bubble.inRange=!0;const n=Q(e.getPosition(),i),a=1-n/s;n<=s?a>=0&&t.status===Ps&&(this.#T(e,a),this.#R(e,a),this.#z(e,a)):this.reset(t,e),t.status===xs&&this.reset(t,e)}};#z=(t,e,i)=>{const s=this.container.actualOptions,n=i??s.interactivity?.modes.bubble;if(n){if(!t.bubble.finalColor){const e=n.color;if(!e)return;const i=Dt(e);t.bubble.finalColor=Ye(this.#p,i)}if(t.bubble.finalColor)if(n.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?Ke(ai(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}};#R=(t,e,i)=>{const s=this.container.actualOptions,n=i?.opacity??s.interactivity?.modes.bubble?.opacity;if(!n)return;const a=Ys(t.opacity?.value??1,n,t.opacity?.max??1,e);void 0!==a&&(t.bubble.opacity=a)};#T=(t,e,i)=>{const s=this.container,n=i?.size?i.size*s.retina.pixelRatio:s.retina.bubbleModeSize;if(void 0===n)return;const a=Ys(t.size.value,n,t.size.max,e);void 0!==a&&(t.bubble.radius=a)};#I=(t,e,i,s)=>{const n=this.container,a=s.bubbleObj.optValue,o=n.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=n.retina.bubbleModeDistance,d=s.particlesObj.optValue,h=s.bubbleObj.value,u=s.particlesObj.value??0,p=s.type;if(l&&!(l<0)&&a!==d)if(n.bubble??={},n.bubble.durationEnd)h&&(p===Xs.size&&delete t.bubble.radius,p===Xs.opacity&&delete t.bubble.opacity);else if(e<=l){if((h??u)!==a){const e=u-i*(u-a)/c;p===Xs.size&&(t.bubble.radius=e),p===Xs.opacity&&(t.bubble.opacity=e)}}else p===Xs.size&&delete t.bubble.radius,p===Xs.opacity&&delete t.bubble.opacity};#S=(t,e,i,s)=>{const n=this.container,a=ht().querySelectorAll(i),r=n.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=n.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=s.type===cs.circle?new Jt(l.x,l.y,d):new te(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=n.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;t.bubble.inRange=!0;const i=Is(r.divs,a);t.bubble.div&&t.bubble.div===a||(this.clear(t,e,!0),t.bubble.div=a),this.#T(t,1,i),this.#R(t,1,i),this.#z(t,1,i)}})}}async function Js(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new Zs(t.pluginManager,e)))})}class tn{opacity;constructor(){this.opacity=.5}load(t){T(t)||void 0!==t.opacity&&(this.opacity=t.opacity)}}class en{distance;links;radius;constructor(){this.distance=80,this.links=new tn,this.radius=60}load(t){T(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links),void 0!==t.radius&&(this.radius=t.radius))}}function sn(t,e,i,s){const n=t.actualOptions,a=n.interactivity?.modes.connect;if(a)return function(t,e,i,s,n){const a=Math.floor(s.getRadius()/i.getRadius()),o=i.getFillColor(),r=s.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=s.getPosition(),d=ai(o,r,i.getRadius(),s.getRadius()),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,ni(o,t.hdr,n)),h.addColorStop(V(a,0,1),ii(d,t.hdr,n)),h.addColorStop(1,ni(r,t.hdr,n)),h}(t,e,i,s,a.links.opacity)}function nn(t,e,i){t.canvas.render.draw(s=>{const n=sn(t,s,e,i);if(!n)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,s,n){is(t,s,n),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(s,e.retina.linksWidth??0,n,a,o)})}class an extends ys{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#P=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:s,connectModeRadius:n}=e.retina;if(!s||s<0||!n||n<0||!i)return;const a=Math.abs(n),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const n=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(s),r=Math.abs(n.x-i.x),c=Math.abs(n.y-i.y);r<o&&c<o&&nn(e,t,a)}})}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!n?.onHover.enable||!s.position)&&ft("connect",n.onHover.mode)}loadModeOptions(t,...e){t.connect??=new en;for(const i of e)t.connect.load(i?.connect)}reset(){}}async function on(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new an(t)))})}function rn(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function cn(t,e,i){Ss(i,e,(e,i)=>{!function(t,e,i){const s=ht().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,n=t.retina.pixelRatio,a={x:(s.offsetLeft+.5*s.offsetWidth)*n,y:(s.offsetTop+.5*s.offsetHeight)*n},o=.5*s.offsetWidth*n,r=10*n,c=i.type===cs.circle?new Jt(a.x,a.y,o+r):new te(s.offsetLeft*n-r,s.offsetTop*n-r,s.offsetWidth*n+2*r,s.offsetHeight*n+2*r);rn(t,c)})}(t,e,i)})}class ln{distance;constructor(){this.distance=200}load(t){T(t)||void 0!==t.distance&&(this.distance=t.distance)}}const dn="destroy";class hn extends ys{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#P=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,s=t.status===Ps;if(!i)return;const n=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;s&&n&&ft(dn,a)?function(t,e){const i=10*t.retina.pixelRatio,s=e.mouse.position,n=t.retina.destroyModeDistance;!n||n<0||!s||rn(t,new Jt(s.x,s.y,n+i))}(this.container,t):cn(this.container,o,dn)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv;return!!s.position&&n.onHover.enable&&ft(dn,n.onHover.mode)||Os(dn,a)}loadModeOptions(t,...e){t.destroy??=new ln;for(const i of e)t.destroy.load(i?.destroy)}reset(){}}async function un(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new hn(t)))})}class pn{blink;color;consent;opacity;constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(t){T(t)||(void 0!==t.blink&&(this.blink=t.blink),void 0!==t.color&&(this.color=ae.create(this.color,t.color)),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.opacity&&(this.opacity=t.opacity))}}class gn{distance;links;constructor(){this.distance=100,this.links=new pn}load(t){T(t)||(void 0!==t.distance&&(this.distance=t.distance),this.links.load(t.links))}}function fn(t,e,i,s,n){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,s,n,a,o=!1){is(t,i,s),t.strokeStyle=ii(n,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,n,i,s,t.hdr)})}class mn extends ys{#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#P=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==Ps)return;const s=t.mouse.position;if(!s)return;const n=e.retina.grabModeDistance;if(!n||n<0)return;const a=e.particles.grid.queryCircle(s,n,e=>this.isEnabled(t,e));for(const t of a){const a=Q(t.getPosition(),s);if(a>n)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/n;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=ri(this.#p,l,t.blink,t.consent)}const d=oi(t,void 0,e.particles.grabLineColor);d&&fn(e,t,d,c,s)}}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ft("grab",n.onHover.mode)}loadModeOptions(t,...e){t.grab??=new gn;for(const i of e)t.grab.load(i?.grab)}reset(){}}async function yn(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new mn(t.pluginManager,e)))})}class vn{force;smooth;constructor(){this.force=2,this.smooth=10}load(t){T(t)||(void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class bn extends ys{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#E(t,e)}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ft("parallax",n.onHover.mode)}loadModeOptions(t,...e){t.parallax??=new vn;for(const i of e)t.parallax.load(i?.parallax)}reset(){}#E(t,e){if(!this.isEnabled(t,e))return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.parallax;if(!n)return;const a=n.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=n.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function wn(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new bn(t)))})}const xn="pause";class Pn extends ys{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==xn)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=(e?.interactivity??i.interactivity)?.events;return!!s&&ft(xn,s.onClick.mode)}reset(){}}async function Mn(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new Pn(t)))})}class kn{default;groups;particles;quantity;constructor(){this.default=!0,this.groups=[],this.quantity=4}load(t){if(T(t))return;void 0!==t.default&&(this.default=t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0);const e=t.quantity;void 0!==e&&(this.quantity=j(e)),this.particles=kt(t.particles,t=>xt({},t))}}const Dn="push";class Cn extends ys{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==Dn)return;const i=this.container,s=i.actualOptions,n=s.interactivity?.modes.push;if(!n)return;const a=q(n.quantity);if(a<=0)return;const o=yt([void 0,...n.groups]),r=xt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,Dt(n.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ft(Dn,n.onClick.mode)}loadModeOptions(t,...e){t.push??=new kn;for(const i of e)t.push.load(i?.push)}reset(){}}async function On(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new Cn(t)))})}class Sn{quantity;constructor(){this.quantity=2}load(t){if(T(t))return;const e=t.quantity;void 0!==e&&(this.quantity=j(e))}}const In="remove";class zn extends ys{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==In)return;const s=q(i.interactivity.modes.remove.quantity);for(let t=0;t<s;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;return!!n&&s.clicking&&s.inside&&!!s.position&&ft(In,n.onClick.mode)}loadModeOptions(t,...e){t.remove??=new Sn;for(const i of e)t.remove.load(i?.remove)}reset(){}}async function Tn(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new zn(t)))})}class Rn{distance;duration;easing;factor;maxSpeed;restore;speed;constructor(){this.distance=200,this.duration=.4,this.factor=100,this.speed=1,this.maxSpeed=50,this.easing=t.EasingType.easeOutQuad,this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(void 0!==t.distance&&(this.distance=t.distance),void 0!==t.duration&&(this.duration=t.duration),void 0!==t.easing&&(this.easing=t.easing),void 0!==t.factor&&(this.factor=t.factor),void 0!==t.speed&&(this.speed=t.speed),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class En extends Rn{selectors;constructor(){super(),this.selectors=[]}load(t){super.load(t),T(t)||void 0!==t.selectors&&(this.selectors=t.selectors)}}class _n extends Rn{divs;load(t){super.load(t),T(t)||(this.divs=kt(t.divs,t=>{const e=new En;return e.load(t),e}))}}const Ln="repulse";class Bn extends ys{handleClickMode;#_;#x;#P;#L;#p;#M;constructor(t,e){super(e),this.#p=t,this.#P=0,this.#L=D.origin,this.#x=new Set,this.#_=D.origin,this.#M=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const s=this.container.actualOptions,n=s.interactivity?.modes.repulse;if(!n||t!==Ln)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},n.duration*r)}}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#P=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===Ps,s=e.interactivity?.events;if(!s)return;const n=s.onHover,a=n.enable,o=n.mode,r=s.onClick,c=r.enable,l=r.mode,d=s.onDiv;i&&a&&ft(Ln,o)?this.#B(t):c&&ft(Ln,l)?this.#A(t):Ss(Ln,d,(e,i)=>{this.#F(t,e,i)}),this.#D()}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity)?.events;if(!n)return!1;const a=n.onDiv,o=n.onHover,r=n.onClick,c=Os(Ln,a);if(!(c||o.enable&&s.position||r.enable&&s.clickPosition))return!1;const l=o.mode,d=r.mode;return ft(Ln,l)||ft(Ln,d)||c}loadModeOptions(t,...e){t.repulse??=new _n;for(const i of e)t.repulse.load(i?.repulse)}reset(){}#A=t=>{const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const s=e.repulse??{particles:[]};if(s.finish||(s.count??=0,s.count++,s.count===e.particles.count&&(s.finish=!0)),s.clicking){const n=e.retina.repulseModeDistance;if(!n||n<0)return;const a=Math.pow(n/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Jt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:n,distance:r}=G(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#k(t),s.particles.push(t),this.#_.x=e,this.#_.y=n,this.#_.length=l,t.velocity.setTo(this.#_))}}else if(!1===s.clicking){for(const t of s.particles)t.velocity.setTo(t.initialVelocity);s.particles=[]}};#B=t=>{const e=this.container,i=t.mouse.position,s=e.retina.repulseModeDistance;!s||s<0||!i||this.#V(t,i,s,new Jt(i.x,i.y,s))};#V=(t,e,i,s,n)=>{const a=this.container,o=a.particles.grid.query(s,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(n?.speed??l)*d;for(const t of o){const{dx:s,dy:n,distance:a}=G(t.position,e),o=V(u(1-a/i)*p,0,h);this.#L.x=a?s/a*o:p,this.#L.y=a?n/a*o:p,this.#k(t),t.position.addTo(this.#L)}};#D(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#M.size)return;const e=Date.now(),i=t.delay*r,s=Math.max(.001,Math.min(1,t.speed));for(const[n,a]of this.#M){if(this.#x.has(n))continue;if(n.destroyed){this.#M.delete(n);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&n.options.move.enable&&(o.x+=n.velocity.x,o.y+=n.velocity.y,o.z+=n.velocity.z);const r=o.x-n.position.x,c=o.y-n.position.y,l=o.z-n.position.z;n.position.x+=r*s,n.position.y+=c*s,n.position.z+=l*s,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(n.position.x=o.x,n.position.y=o.y,n.position.z=o.z,this.#M.delete(n))}}#F=(t,e,i)=>{const s=this.container,n=s.actualOptions.interactivity?.modes.repulse;if(!n)return;const a=ht().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=s.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===cs.circle?new Jt(c.x,c.y,l):new te(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Is(n.divs,a);this.#V(t,c,l,d,h)})};#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let s=this.#M.get(t);s||(s={target:t.position.copy(),lastInteractionTime:i},this.#M.set(t,s)),s.lastInteractionTime=i,e.follow&&t.options.move.enable&&(s.target.x+=t.velocity.x,s.target.y+=t.velocity.y,s.target.z+=t.velocity.z)}}async function An(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Bn(e,t)))})}class Fn{factor;radius;constructor(){this.factor=3,this.radius=200}load(t){T(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.radius&&(this.radius=t.radius))}}class Vn extends ys{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#P=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,s=t.mouse,n=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!n?.onHover.enable&&!!s.position&&ft("slow",n.onHover.mode)}loadModeOptions(t,...e){t.slow??=new Fn;for(const i of e)t.slow.load(i?.slow)}reset(t,e){e.slow.inRange=!1;const i=this.container,s=i.actualOptions,n=t.mouse.position,a=i.retina.slowModeRadius,o=s.interactivity?.modes.slow;if(!o||!a||a<0||!n)return;const r=Q(n,e.getPosition()),c=r/a,l=o.factor,{slow:d}=e;r>a||(d.inRange=!0,d.factor=c/l)}}async function Un(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Vn(t)))})}const Hn=["image","images"],qn=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Wn(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Ht().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function $n(t){if("svg"!==t.type)return void await Wn(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Ht().error("Image not found"),t.error=!0),t.loading=!1}function jn(t,e,i,s,n=!1){const a=function(t,e,i,s=!1){const{svgData:n}=t;if(!n)return"";const a=ni(e,s,i);if(n.includes("fill"))return n.replaceAll(qn,()=>a);const o=n.indexOf(">");return`${n.substring(0,o)} fill="${a}"${n.substring(o)}`}(t,i,s.opacity?.value??1,n),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),s=URL.createObjectURL(i),n=new Image;n.addEventListener("load",()=>{o.loaded=!0,o.element=n,e(o),URL.revokeObjectURL(s)});n.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(s);const i={...t,error:!1,loading:!0};await Wn(i),o.loaded=!0,o.element=i.element,e(o)})()}),n.src=s})}const Gn=[0,4,2,1],Nn=[8,8,4,2];class Qn{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let s=t;--s>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Xn,Yn;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Xn||(Xn={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(Yn||(Yn={}));function Kn(t,e){const i=[];for(let s=0;s<e;s++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function Zn(t,e,i){const s=e>>>3,n=7&e;return(t[s]+(t[s+1]<<8)+(t[s+2]<<16)&(1<<i)-1<<n)>>>n}async function Jn(t,e,i,s,n,a,o){switch(t.nextByte()){case Yn.EndOfFile:return!0;case Yn.Image:await async function(t,e,i,s,n,a){const o=e.frames[s(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),c=!(128&~r),l=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const d=1<<1+(7&r);c&&(o.localColorTable=Kn(t,d));const h=t=>{const{r:s,g:a,b:r}=(c?o.localColorTable:e.globalColorTable)[t];return t!==n(null)?{r:s,g:a,b:r,a:255}:{r:s,g:a,b:r,a:i?Math.trunc((s+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(l){for(let t=0,e=p+1,i=0,s=[[0]],n=0;n<4;n++)if(Gn[n]<o.height){let a=0,r=0,c=!1;for(;!c;){const l=t;if(t=Zn(g,i,e),i+=e+1,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{t>=s.length?s.push(s[l].concat(s[l][0])):l!==f&&s.push(s[l].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:c}=h(e);u.data.set([t,i,s,c],Gn[n]*o.width+Nn[n]*r+a%(4*o.width)),a+=4}s.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Gn[n]+Nn[n]*r>=o.height&&(c=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,s=-4;const n=[[0]];for(;;){const a=t;if(t=Zn(g,i,e),i+=e,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=n.length?n.push(n[a].concat(n[a][0])):a!==f&&n.push(n[a].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:a}=h(e);s+=4,u.data.set([t,i,n,a],s)}n.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,s,n,a);break;case Yn.Extension:!function(t,e,i,s){switch(t.nextByte()){case Yn.GraphicsControlExtension:{const n=e.frames[i(!1)];t.pos++;const a=t.nextByte();n.GCreserved=(224&a)>>>5,n.disposalMethod=(28&a)>>>2,n.userInputDelayFlag=!(2&~a);const o=!(1&~a);n.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&s(r),t.pos++;break}case Yn.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case Yn.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case Yn.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,s,n);break;default:throw new EvalError("undefined block found")}return!1}async function ta(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,s){s??=!1;const n=await fetch(t);if(!n.ok&&404===n.status)throw new EvalError("file not found");const a=await n.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new Qn(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const c=r.nextByte(),l=!(128&~c);o.colorRes=(112&c)>>>4,o.sortFlag=!(8&~c);const d=1<<1+(7&c),h=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),l&&(o.globalColorTable=Kn(r,d));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[h];u.data.set(l?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let m=-1,y=!0,v=-1;const b=t=>(t&&(y=!0),m),w=t=>(null!=t&&(v=t),v);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Xn.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),m++,v=-1,y=!1)}while(!await Jn(r,o,s,b,w,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${m.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await Wn(t)}class ea{#u;#n;constructor(t,e){this.#n=t,this.#u=e}draw(t){const{context:e,radius:i,particle:s,opacity:n}=t,a=s.image,r=a?.element;if(a){if(e.globalAlpha=n,a.gif&&a.gifData)!function(t,e){const{context:i,radius:s,particle:n,delta:a}=t,r=n.image;if(!r?.gifData||!r.gif)return;const l=new OffscreenCanvas(r.gifData.width,r.gifData.height),d=l.getContext("2d",e);if(!d)throw new Error("could not create offscreen canvas context");d.imageSmoothingQuality="low",d.imageSmoothingEnabled=!1,d.clearRect(c.x,c.y,l.width,l.height),n.gifLoopCount??=r.gifLoopCount??0;let h=n.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[h];if(n.gifTime??=0,p.bitmap){switch(i.scale(s/r.gifData.width,s/r.gifData.height),p.disposalMethod){case Xn.UndefinedA:case Xn.UndefinedB:case Xn.UndefinedC:case Xn.UndefinedD:case Xn.Replace:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height);break;case Xn.Combine:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y);break;case Xn.RestoreBackground:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height),r.gifData.globalColorTable.length?d.putImageData(r.gifData.backgroundImage,u.x,u.y):d.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case Xn.RestorePrevious:{const t=d.getImageData(c.x,c.y,l.width,l.height);d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height),d.putImageData(t,c.x,c.y)}}if(n.gifTime+=a.value,n.gifTime>p.delayTime){if(n.gifTime-=p.delayTime,++h>=r.gifData.frames.length){if(--n.gifLoopCount<=0)return;h=0,d.clearRect(c.x,c.y,l.width,l.height)}n.gifFrame=h}i.scale(r.gifData.width/s,r.gifData.height/s)}}(t,this.#u.canvas.render.settings);else if(r){const t=a.ratio,s={x:-i,y:-i},n=2*i;e.drawImage(r,s.x,s.y,n,n/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#n.loadImage)return;const i=[];for(const s of e.preload)i.push(this.#n.loadImage(t,s));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Hn.includes(t.shape))return;const i=t.shapeData;if(!i)return;const s=this.#n.getImages?.(e),n=s?.find(t=>t.name===i.name||t.source===i.src);n||this.#U(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#n.getImages?.(t),s=e.shapeData;if(!s)return;const n=e.getFillColor(),a=i?.find(t=>t.name===s.name||t.source===s.src);if(!a)return;const o=s.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&n?await jn(a,s,n,e,t.hdr):{color:n,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:s.width&&s.height?s.width/s.height:a.ratio??1,replaceColor:o,source:s.src},i.ratio||(i.ratio=1);const r={image:i,close:s.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#U=async(t,e)=>{if(!this.#n.loadImage)throw new Error("Image shape not initialized");await this.#n.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class ia{gif;height;name;replaceColor;src;width;constructor(){this.src="",this.gif=!1}load(t){T(t)||(void 0!==t.gif&&(this.gif=t.gif),void 0!==t.height&&(this.height=t.height),void 0!==t.name&&(this.name=t.name),void 0!==t.replaceColor&&(this.replaceColor=t.replaceColor),void 0!==t.src&&(this.src=t.src),void 0!==t.width&&(this.width=t.width))}}class sa{id="image-preloader";#n;constructor(t){this.#n=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return xo});return new e(this.#n,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const s=e.preload;for(const t of i.preload){const e=s.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new ia;e.load(t),s.push(e)}}}needsPlugin(){return!0}}async function na(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const s=t.getImages(e);if(!s.some(t=>t.name===i.name||t.source===i.src))try{const n={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;s.push(n),t.images.set(e,s),a=i.gif?t=>ta(t,{colorSpace:"srgb"}):i.replaceColor?$n:Wn,await a(n)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new sa(t)),t.pluginManager.addShape(Hn,e=>Promise.resolve(new ea(t,e)))})}class aa extends fe{sync;constructor(){super(),this.sync=!1}load(t){T(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class oa extends fe{sync;constructor(){super(),this.sync=!1}load(t){T(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class ra{count;delay;duration;constructor(){this.count=0,this.delay=new aa,this.duration=new oa}load(t){T(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ca{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:L(),n=i.duration.sync?1:L();t.life={delay:e.retina.reduceFactor?q(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(i.duration.value)*n/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){t.life??=new ra;for(const i of e)t.life.load(i?.life)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=j(0,i.width),o=j(0,i.width);t.position.x=H(a),t.position.y=H(o),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const c=t.options.life;c&&(s.delay=q(c.delay.value)*r,s.duration=q(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function la(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ca(t)))})}class da{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function ha(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new da))})}class ua{distance;enable;rotate;constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}load(t){if(!T(t)&&(void 0!==t.distance&&(this.distance=j(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 pa extends vs{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(T(t.attractDistance)){const i=q(t.options.attract.distance);i>this.#P&&(this.#P=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,s=t.getPosition(),n=e.particles.grid.queryCircle(s,i);for(const e of n){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:n,dy:a}=G(s,i),o=t.options.attract.rotate,r=n/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){t.attract??=new ua;for(const i of e)t.attract.load(i?.attract)}reset(){}}async function ga(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new pa(t)))})}var fa;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(fa||(fa={}));class ma{speed;constructor(){this.speed=2}load(t){T(t)||void 0!==t.speed&&(this.speed=t.speed)}}class ya{enable;retries;constructor(){this.enable=!0,this.retries=0}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class va{absorb;bounce;enable;maxSpeed;mode;overlap;constructor(){this.absorb=new ma,this.bounce=new De,this.enable=!1,this.maxSpeed=50,this.mode=fa.bounce,this.overlap=new ya}load(t){T(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.maxSpeed&&(this.maxSpeed=j(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}function ba(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=V(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const wa=t=>{t.options.collisions&&(t.collisionMaxSpeed??=q(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function xa(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;Mt(Pt(t),Pt(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+s*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}wa(t),wa(e)}function Pa(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case fa.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?ba(t,n,e,a,i,s):ba(e,a,t,n,i,s))}(t,e,i,s);break;case fa.bounce:xa(t,e);break;case fa.destroy:!function(t,e){t.unbreakable||e.unbreakable||xa(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class Ma extends vs{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=this.container,n=t.getPosition(),a=t.getRadius(),o=s.particles.grid.queryCircle(n,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(n.z)-Math.round(o.z))>a+r)continue;Q(n,o)>a+r||Pa(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){t.collisions??=new va;for(const i of e)t.collisions.load(i?.collisions)}reset(){}}class ka{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return Po});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Da(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{zs(t),t.pluginManager.addPlugin(new ka),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Ma(t)))})}class Ca extends Jt{#H;constructor(t,e,i,s){super(t,e,i),this.#H=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#H,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#H,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof Jt)n=new Jt(i.x,i.y,t.radius);else{const e=t;n=new te(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Oa{blur;color;enable;constructor(){this.blur=5,this.color=new ae,this.color.value="#000",this.enable=!1}load(t){T(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=ae.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Sa{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){T(t)||(void 0!==t.color&&(this.color=ae.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 Ia{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new ae,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Oa,this.triangles=new Sa,this.width=1,this.warp=!1}load(t){T(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=ae.create(this.color,t.color),void 0!==t.consent&&(this.consent=t.consent),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.frequency&&(this.frequency=t.frequency),void 0!==t.opacity&&(this.opacity=t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),void 0!==t.width&&(this.width=t.width),void 0!==t.warp&&(this.warp=t.warp))}}function za(t,e,i){const{dx:s,dy:n}=G(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Ta extends vs{#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0}get maxDistance(){return this.#P}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#P&&(this.#P=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<c.x||e.y<c.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,l=r?new Ca(e.x,e.y,o,s):new Jt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>s.width||d.y>s.height)continue;const h=G(e,d).distance,u=r&&l.warp?za(e,d,s):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#q(t),t.links.push({destination:i,opacity:g,color:this.#W(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links??=new Ia;for(const i of e)t.links.load(i?.links)}reset(){}#W(t,e){const i=this.container,s=t.options.links;if(!s)return;return oi(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#q(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=ri(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Ra{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return ko});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ea(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{const e=t.pluginManager;zs(t),e.addPlugin(new Ra(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Ta(e,t)))})}const _a=new Map;function La(t,e){const{context:i,radius:s}=t,n=function(t){const e=_a.get(t);if(e)return e;const i=u/t,s=!!(t%2),n=(-Math.PI+(s?0:i))*o,a=[];for(let e=0;e<t;e++){const t=n+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return _a.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<n.length;t++){const e=n[t];if(!e)continue;const a=e.x*s,o=e.y*s;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Ba{draw(t){const{particle:e,radius:i}=t;La(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class Aa extends Ba{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Fa extends Ba{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Va(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new Aa))})}async function Ua(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Fa))})}async function Ha(t){t.checkVersion("4.1.3"),await Promise.all([Va(t),Ua(t)])}class qa{decay;enable;speed;sync;constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=j(t.speed)),void 0!==t.decay&&(this.decay=j(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Wa extends fe{animation;direction;path;constructor(){super(),this.animation=new qa,this.direction=t.RotateDirection.clockwise,this.path=!1,this.value=0}load(t){T(t)||(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class $a{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Y(q(i.value)),min:0,max:u},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*L())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-q(n.decay),e.rotate.velocity=q(n.speed)/360*this.#u.retina.reduceFactor,n.sync||(e.rotate.velocity*=L())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){t.rotate??=new Wa;for(const i of e)t.rotate.load(i?.rotate)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(zt(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function ja(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new $a(t)))})}class Ga{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Na(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Ga))})}const Qa=0,Xa=0;class Ya{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.sides,a=i.starInset??2;e.moveTo(Qa,Xa-s);for(let t=0;t<n;t++)e.rotate(Math.PI/n),e.lineTo(Qa,Xa-s*a),e.rotate(Math.PI/n),e.lineTo(Qa,Xa-s)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=q(i?.inset??2)}}async function Ka(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new Ya))})}async function Za(t){t.checkVersion("4.1.3"),await t.pluginManager.register(async t=>{await Promise.all([Zi(t),(async t=>{await async function(t){t.checkVersion("4.1.3"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new ms(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,_t(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([wn(t),Bs(t),js(t),Js(t),on(t),un(t),yn(t),Mn(t),On(t),Tn(t),An(t),Un(t),ga(t),Da(t),Ea(t)])})(t),ts(t),os(t),na(t),ha(t),Ha(t),Na(t),Ka(t),la(t),Wi(t),ja(t)])})}const Ja=globalThis;Ja.loadSlim=Za,Ja.tsParticles=gi;function to(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class eo{#$;#j;#G;#N;#Q;#u;#X;#Y;#K;#Z;#J;#tt;#et;#it;#p;#st;#nt;#at={};#ot=[void 0,void 0];#rt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#j=i,this.#X=null,this.#nt=[],this.#st=[],this.#Q=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#Z=[],this.#J=[],this.#tt=[],this.#it=[],this.#et=[]}get settings(){return this.#Y}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{Ae(t,this.#j.size)})}clear(){let t=!1;for(const e of this.#$)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#nt=[],this.#st=[],this.#Q=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#Z=[],this.#J=[],this.#tt=[],this.#it=[],this.#et=[]}draw(t){const e=this.#X;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();let[a,o]=this.#ct(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#rt,g=this.#at,f=a?ni(a,r.hdr,d*h):void 0,m=o?ni(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(s=>{for(const i of this.#J)i.drawParticleSetup?.(s,t,e);this.#lt(s,t,i,h,g,p),Fe({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#dt(t);for(const i of this.#Z)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#K)$e(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#it)e.drawSettingsSetup?.(i,t);for(const e of this.#tt)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#N)e.clearDraw?.(i,t);for(const e of this.#et)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#Q=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#J=[],this.#Z=[],this.#tt=[],this.#it=[],this.#et=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#Q.push(t),t.canvasClear&&this.#$.push(t),t.canvasPaint&&this.#G.push(t),t.drawParticle&&this.#K.push(t),t.drawParticleSetup&&this.#J.push(t),t.drawParticleCleanup&&this.#Z.push(t),t.draw&&this.#tt.push(t),t.drawSettingsSetup&&this.#it.push(t),t.drawSettingsCleanup&&this.#et.push(t),t.clearDraw&&this.#N.push(t)}initUpdaters(){this.#nt=[],this.#st=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#st.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#nt.push(t)}paint(){let t=!1;for(const e of this.#G)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Le(e,this.#j.size,t)})}paintImage(t,e){this.draw(i=>{Be(i,this.#j.size,t,e)})}setContext(t){this.#X=t,this.#X&&(this.#X.globalCompositeOperation=i)}setContextSettings(t){this.#Y=t}stop(){this.draw(t=>{Ae(t,this.#j.size)})}#dt=t=>{for(const e of this.#st)e.afterDraw?.(t)};#lt=(t,e,i,s,n,a)=>{for(const o of this.#nt){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,s);a&&(n.fill=a),r&&(n.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)to(a,t,e)}o.beforeDraw?.(e)}};#ct=t=>{let e,i;for(const s of this.#Q)if(!e&&s.particleFillColor&&(e=Ye(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ye(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#ot[0]=e,this.#ot[1]=i,this.#ot}}const io=new WeakMap;function so(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class no{domElement;render;renderCanvas;size;zoom=1;#u;#ht;#ut;#pt;#p;#gt;#ft;#mt;#yt;constructor(t,e){this.#p=t,this.#u=e,this.render=new eo(t,e,this),this.#mt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#mt;this.size={height:s.height*i,width:s.width*i},this.#ht=!1,this.#ft=[],this.#gt="none"}get#vt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#ht){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#bt();this.render.destroy(),this.#ft=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#yt?this.#yt:{x:e*o/t,y:i*o/t}}init(){this.#wt(t=>{t.disconnect()}),this.#ut=gt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#xt()}),this.resize(),this.#Pt(),this.initBackground(),this.#wt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Qe(this.#p,e.color);s.backgroundColor=n?ii(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#ft=[];for(const t of this.#u.plugins)t.resize&&this.#ft.push(t)}loadCanvas(t){this.#ht&&this.domElement&&this.domElement.remove();const i=this.#u,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#ht=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=io.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return io.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#pt=Tt(n.style));const a=this.#mt,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#u.retina.pixelRatio,c=this.size;o.height=c.height=a.height*r,o.width=c.width=a.width*r;const l=ut("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:l?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#wt(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#wt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#mt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#gt=t,this.#xt())}setZoom(t,e){this.zoom=t,this.#yt=e}stop(){this.#wt(t=>{t.disconnect()}),this.#ut=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Mt(),e&&await t.refresh()}#Mt=()=>{for(const t of this.#ft)t.resize?.()};#Pt=()=>{const t=this.domElement,e=this.#u.actualOptions;if(t){this.#vt?this.#kt():this.#bt();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};#xt=()=>{const t=this.domElement;if(!t)return;this.#wt(t=>{t.disconnect()}),this.#Pt(),this.initBackground();const e=this.#gt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#wt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#bt=()=>{const t=this.domElement,e=this.#pt;t&&e&&so(t,e,!0)};#wt=t=>{this.#ut&&t(this.#ut)};#kt=()=>{const t=this.domElement;t&&so(t,Rt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class ao{#u;#Dt;#Ct;#Ot;constructor(t){this.#u=t,this.#Dt={visibilityChange:()=>{this.#St()},resize:()=>{this.#It()}}}addListeners(){this.#zt(!0)}removeListeners(){this.#zt(!1)}#St=()=>{const t=this.#u;t.actualOptions.pauseOnBlur&&(ht().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#It=()=>{this.#Ot&&(clearTimeout(this.#Ot),this.#Ot=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#Ot=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)};#zt=t=>{const e=this.#Dt;this.#Tt(t),Et(document,n,e.visibilityChange,t,!1)};#Tt=t=>{const e=this.#Dt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Et(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#Ct&&!t?(n&&this.#Ct.unobserve(n),this.#Ct.disconnect(),this.#Ct=void 0):!this.#Ct&&t&&n&&(this.#Ct=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#It()}),this.#Ct.observe(n))}}function oo(t){if(!ft(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}class ro{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#Rt={fillOpacity:1,opacity:1,strokeOpacity:1};#Et=k.origin;#_t={sin:0,cos:0};#Lt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Bt(this.bubble.color??ci(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#Rt.fillOpacity=i*s*e,this.#Rt.opacity=i*e,this.#Rt.strokeOpacity=i*n*e,this.#Rt}getPosition(){return this.#Et.x=this.position.x+this.offset.x,this.#Et.y=this.position.y+this.offset.y,this.#Et.z=this.position.z,this.#Et}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#_t.sin=Math.sin(t),this.#_t.cos=Math.cos(t),this.#_t}getStrokeColor(){return this.#Bt(this.bubble.color??ci(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Lt.a=e.cos*(t.a??l.a),this.#Lt.b=i?e.sin*(t.b??1):t.b??l.b,this.#Lt.c=i?-e.sin*(t.c??1):t.c??l.c,this.#Lt.d=e.cos*(t.d??l.d),this.#Lt}init(e,i,s,n){const a=this.#u;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!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:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.actualOptions,r=Ee(this.#p,a,o.particles),c=r.reduceDuplicates,l=r.effect.type,h=r.shape.type;this.effect=Dt(l,this.id,c),this.shape=Dt(h,this.id,c);const u=r.effect,p=r.shape;if(s){if(s.effect){const t=s.effect.type;if(t&&t!==this.effect){const e=Dt(t,this.id,c);e&&(this.effect=e)}u.load(s.effect)}if(s.shape){const t=s.shape.type;if(t&&t!==this.shape){const e=Dt(t,this.id,c);e&&(this.shape=e)}p.load(s.shape)}}if(this.effect===d){const t=[...this.#u.effectDrawers.keys()];this.effect=t[Math.floor(L()*t.length)]}if(this.shape===d){const t=[...this.#u.shapeDrawers.keys()];this.shape=t[Math.floor(L()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return xt({close:e.close},Dt(n,i,s))}(this.effect,u,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return xt({close:e.close},Dt(n,i,s))}(this.shape,p,this.id,c):void 0,r.load(s);const g=this.effectData,f=this.shapeData;g&&r.load(g.particles),f&&r.load(f.particles),this.effectClose=g?.close??r.effect.close,this.shapeClose=f?.close??r.shape.close,this.options=r,a.retina.initParticle(this);for(const t of a.particleUpdaters)t.preInit?.(this);let m,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#At(i),this.initialVelocity=this.#Ft(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(m=a.effectDrawers.get(this.effect)),m?.loadEffect&&m.loadEffect(this),this.shape&&(y=a.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);m?.particleInit?.(a,this),y?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#Vt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Vt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%u,i=e<0?e+u:e;return i>=Math.PI*o&&i<3*Math.PI*o}if(this.roll.horizontal){const e=(t+Math.PI*o)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ut=(t,e)=>{let i=0,s=t?k.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size,l=new AbortController,{signal:d}=l;for(;!d.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return k.create(i.x,i.y,e)}const t=et({size:c,position:s}),l=k.create(t.x,t.y,e);this.#Ht(l,r,o.left??o.default),this.#Ht(l,r,o.right??o.default),this.#qt(l,r,o.top??o.default),this.#qt(l,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,s=void 0}return s};#Ft=()=>{const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=Y(q(e.angle.value)),n=Y(q(e.angle.offset)),a={left:n-s*o,right:n+s*o};return e.straight||(i.angle+=H(j(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=L()),i};#Ht=(e,i,s)=>{oo({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})};#qt=(e,i,s)=>{oo({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})};#Wt=(e,i)=>{const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}};#$t=(t,e)=>({canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#Vt=t=>{const e=this.#Wt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#$t(t.direction,t.outMode),c=a?this.#jt(a(r),"shape"):void 0,l=o?this.#jt(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e};#Bt=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?pi(t,this.roll.alter.type,this.roll.alter.value):t:t;#At=e=>{const i=this.#u,s=Math.floor(q(this.options.zIndex.value)),n=this.#Ut(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...It(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=D.origin};#jt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class co{#Gt;#Nt=new Map;#Qt=[];#Xt;#Yt;#Kt=[];#Zt;constructor(t){this.#Gt=t,this.#Xt=0,this.#Zt=0}clear(){this.#Nt.clear();const t=this.#Yt;t&&(this.#Gt=t),this.#Yt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Jt(e,i);this.#Nt.has(s)||this.#Nt.set(s,[]),this.#Nt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#te(t);if(!s)return i;const n=Math.floor(s.minX/this.#Gt),a=Math.floor(s.maxX/this.#Gt),o=Math.floor(s.minY/this.#Gt),r=Math.floor(s.maxY/this.#Gt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Nt.get(a);if(o)for(const s of o)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#ee(t.x,t.y,e),a=this.query(n,i,s);return this.#ie(),a}queryRectangle(t,e,i,s=[]){const n=this.#se(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#ie(),a}setCellSize(t){this.#Yt=t}#ee(t,e,i){return(this.#Qt[this.#Xt++]??=new Jt(t,e,i)).reset(t,e,i)}#se(t,e,i,s){return(this.#Kt[this.#Zt++]??=new te(t,e,i,s)).reset(t,e,i,s)}#Jt(t,e){return`${Math.floor(t/this.#Gt)}_${Math.floor(e/this.#Gt)}`}#te(t){if(t instanceof Jt){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof te){const{x:e,y:i}=t.position,{width:s,height:n}=t.size;return{minX:e,maxX:e+s,minY:i,maxY:i+n}}return null}#ie(){this.#Xt=0,this.#Zt=0}}class lo{checkParticlePositionPlugins;grid;#ne;#u;#ae;#oe;#re;#ce;#le;#de;#p;#he;#ue;#pe;#ge;#fe;#me;constructor(t,e){this.#p=t,this.#u=e,this.#re=0,this.#ne=[],this.#he=[],this.#oe=0,this.#ae=new Map,this.#ce=new Map,this.#me=this.#ye(this.#u.zLayers),this.grid=new co(100),this.checkParticlePositionPlugins=[],this.#le=[],this.#de=[],this.#pe=[],this.#ue=[],this.#fe=[]}get count(){return this.#ne.length}addParticle(e,i,s,n){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===s?this.#oe:this.#ae.get(s)??this.#oe,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#he.pop()??new ro(this.#p,this.#u);a.init(this.#re,e,i,s);let o=!0;return n&&(o=n(a)),o?(this.#ne.push(a),this.#ve(a),this.#re++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#he.push(a)}catch(t){Ht().warning(`error adding particle: ${t}`)}}clear(){this.#ne=[],this.#ce.clear(),this.#be(this.#u.zLayers)}destroy(){this.#ne=[],this.#he.length=0,this.#ce.clear(),this.#me=[],this.checkParticlePositionPlugins=[],this.#le=[],this.#de=[],this.#pe=[],this.#ue=[],this.#fe=[]}drawParticles(t){for(let e=this.#me.length-1;e>=0;e--){const i=this.#me[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ne.filter(t)}find(t){return this.#ne.find(t)}get(t){return this.#ne[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#fe=[],this.#de=[],this.#pe=[],this.#le=[],this.#ue=[],this.#ce.clear(),this.#be(t.zLayers),this.grid=new co(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#fe.push(e),e.particleUpdate&&this.#de.push(e),e.postUpdate&&this.#pe.push(e),e.particleReset&&this.#le.push(e),e.postParticleUpdate&&this.#ue.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)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()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ne.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this.#we(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ee(this.#p,this.#u,s);this.#xe(n,i,t)}this.#xe(t.particles,i)}setResizeFactor(t){this.#ge=t}update(t){this.grid.clear();for(const e of this.#fe)e.update?.(t);const e=this.#Pe(t);for(const e of this.#pe)e.postUpdate?.(t);if(this.#Me(t,e),e.size)for(const t of e)this.remove(t);this.#ge=void 0}#ke=(...t)=>{this.#he.push(...t)};#xe=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#oe=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#ae.set(i,s?.number.limit.value??n.limit.value));const a=this.#De(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#oe=n.limit.value*a:this.#ae.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)};#ye=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#Ce=t=>{const e=this.#me.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#Oe=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#De=t=>{const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};#ve=t=>{const e=this.#Ce(t.position.z),i=this.#me[e];i&&(i.splice(this.#Oe(i,t.id),0,t),this.#ce.set(t.id,e))};#we=(e,i,s)=>{const n=this.#ne[e];return!!n&&(n.group===i&&(this.#ne.splice(e,1),this.#Se(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ke(n),!0))};#Se=t=>{const e=this.#ce.get(t.id)??this.#Ce(t.position.z),i=this.#me[e];if(!i)return void this.#ce.delete(t.id);const s=this.#Oe(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#ce.delete(t.id)):this.#ce.delete(t.id)};#be=t=>{const e=Math.max(Math.floor(t),1);if(this.#me.length===e)for(const t of this.#me)t.length=0;else this.#me=this.#ye(e)};#Ie=t=>{const e=this.#Ce(t.position.z),i=this.#ce.get(t.id);if(void 0===i)return void this.#ve(t);if(i===e)return;const s=this.#me[i];if(s){const e=this.#Oe(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#me[e];n?(n.splice(this.#Oe(n,t.id),0,t),this.#ce.set(t.id,e)):this.#ce.set(t.id,e)};#Pe=t=>{const e=new Set,i=this.#ge;for(const s of this.#ne){i&&!s.ignoresResizeRatio&&(s.position.x*=i.width,s.position.y*=i.height,s.initialPosition.x*=i.width,s.initialPosition.y*=i.height),s.ignoresResizeRatio=!1;for(const t of this.#le)t.particleReset?.(s);for(const e of this.#de){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#Me=(t,e)=>{for(const i of this.#ne)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#ue)e.postParticleUpdate?.(i,t);this.#Ie(i)}}}class ho{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=q(s.gravity.maxSpeed)*i,a.moveDrift=q(s.drift)*i,a.moveSpeed=q(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function uo(t){return!t.destroyed}function po(t,e,...i){const s=new _e(t,e);return Re(s,...i),s}var go=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ze;#Te;#Re={value:0,factor:0};#Ee;#_e;#Le;#Be;#Ae;#Fe;#Ve;#Ue;#He;#qe;#We;#p;#$e;#je;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#Ee=i,this.#He=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#$e=!1,this.#ze=0,this.#Le=0,this.#Ue=0,this.#Ae=!0,this.started=!1,this.destroyed=!1,this.#We=!0,this.#Ve=0,this.zLayers=100,this.pageHidden=!1,this.#je=o,this.#Fe=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ho(this),this.canvas=new no(this.#p,this),this.particles=new lo(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#qe=po(this.#p,this),this.actualOptions=po(this.#p,this),this.#Be=new ao(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#We&&!this.pageHidden&&uo(this)}get options(){return this.#qe}get sourceOptions(){return this.#je}addLifeTime(t){this.#Ue+=t}alive(){return!this.#Le||this.#Ue<=this.#Le}destroy(e=!0){if(uo(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#He(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Ee(t,{container:this,data:e})}draw(t){if(!uo(this))return;let e=t;this.#_e=A(t=>{e&&(this.#Ve=void 0,e=!1),this.#Ge(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Ht().error(`Export plugin with type ${t} not found`)}async init(){if(!uo(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#qe=po(this.#p,this,this.#Fe,this.sourceOptions),this.actualOptions=po(this.#p,this,this.#qe),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:a,smooth:o,zLayers:c}=this.actualOptions;this.hdr=a,this.zLayers=c,this.#Le=q(s)*r,this.#ze=q(i)*r,this.#Ue=0,this.fpsLimit=n>0?n:120,this.#$e=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(uo(this)&&(void 0!==this.#_e&&(F(this.#_e),this.#_e=void 0),!this.#We)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#We=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!uo(this))return;const i=this.#We||e;if(!this.#Ae||this.actualOptions.autoPlay){if(this.#We&&(this.#We=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#Ae=!1}async refresh(){if(uo(this))return this.stop(),this.start()}async reset(t){if(uo(this))return this.#Fe=t,this.#je=t,this.#qe=po(this.#p,this,this.#Fe,this.sourceOptions),this.actualOptions=po(this.#p,this,this.#qe),this.refresh()}async start(){uo(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#Be.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Te=setTimeout(()=>{i()},this.#ze)}))}stop(){if(uo(this)&&this.started){this.#Te&&(clearTimeout(this.#Te),this.#Te=void 0),this.#Ae=!0,this.started=!1,this.#Be.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#je=this.#qe,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ge=t=>{try{if(!this.#$e&&void 0!==this.#Ve&&t<this.#Ve+r/this.fpsLimit)return void this.draw(!1);if(this.#Ve??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#Re,t-this.#Ve,this.fpsLimit,this.#$e),this.addLifeTime(this.#Re.value),this.#Ve=t,this.#Re.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Re),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Ht().error("error in animation loop",t)}}}});var fo=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ne;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ne&&(t.globalCompositeOperation=this.#Ne)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ne=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function mo(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=c*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var yo=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-q(i.decay),e.pathDelay=q(n.delay.value)*r,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:q(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=Q(i.getPosition(),a),r=q(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:L()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(s.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/c)}(n,e,h,r):mo(e,s,h,u,l,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||n<c)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-L()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-L())}}(e)}preInit(){return this.#Qe()}redrawInit(){return this.#Qe()}update(){for(const t of this.pathGenerators.values())t.update()}async#Qe(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class vo{#Xe=!0;#Ye;#u;#Dt;#Ke;#Ze;constructor(t,e){this.#u=t,this.#Ye=[],this.#Ke=e,this.#Ze=new Map,this.#Dt={mouseDown:()=>{this.#Je()},mouseLeave:()=>{this.#ti()},mouseMove:t=>{this.#ei(t)},mouseUp:t=>{this.#ii(t)},touchStart:t=>{this.#si(t)},touchMove:t=>{this.#ei(t)},touchEnd:t=>{this.#ni(t)},touchCancel:t=>{this.#ni(t)},touchEndClick:t=>{this.#ai(t)},visibilityChange:()=>{this.#St()}}}addListeners(){this.#zt(!0)}init(){this.#Ye.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#Ye.push(t)}removeListeners(){this.#zt(!1)}#oi=t=>{const e=this.#u,i=this.#Ke,s=e.actualOptions;if(this.#Xe){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;kt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#ti()},500)};#St=()=>{this.#ti()};#ri=t=>{const e=this.#Dt,i=this.#u,s=this.#Ke,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(Et(a,Ps,e.mouseMove,t),Et(a,Ms,e.touchStart,t),Et(a,Ds,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(Et(a,ks,e.touchEndClick,t),Et(a,ws,e.mouseUp,t),Et(a,bs,e.mouseDown,t)):Et(a,ks,e.touchEnd,t):(Et(a,ks,e.touchEndClick,t),Et(a,ws,e.mouseUp,t),Et(a,bs,e.mouseDown,t),Et(a,ks,e.touchEnd,t)),Et(a,xs,e.mouseLeave,t),Et(a,Cs,e.touchCancel,t))};#zt=t=>{const e=this.#Dt,i=this.#u,s=this.#Ke,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===ls.window?s.interactivityData.element=ht():o===ls.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this.#ri(t),Et(document,n,e.visibilityChange,t,!1)};#Je=()=>{const{interactivityData:t}=this.#Ke,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position};#ii=t=>{const e=this.#u,i=this.#Ke,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;let a=!1;const o=n.position;if(o&&s.interactivity?.events.onClick.enable){for(const t of this.#Ye)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#oi(t),n.clicking=!1}};#ti=()=>{const{interactivityData:t}=this.#Ke,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=xs,e.inside=!1,e.clicking=!1};#ei=t=>{const e=this.#u,i=this.#Ke,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#Xe=!0;const e=t;if(n.element===ht()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===ls.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#Xe="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Ps};#ni=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ze.delete(t.identifier);this.#ti()};#ai=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ze.delete(t.identifier);this.#ii(t)};#si=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Ze.set(t.identifier,performance.now());this.#ei(t)}}class bo{interactivityData;#ci;#u;#Be;#li;#di;#hi;#ui;#p;constructor(t,e){this.#u=e,this.#p=t,this.#di=[],this.#li=[],this.#ui=[],this.#ci=new Map,this.#Be=new vo(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#hi=pt(t=>{this.#pi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#ci.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#ci.set(Ms,()=>{e.destroyed||(a=!0,o=!1)}),this.#ci.set(Ds,()=>{e.destroyed||(o=!0)}),this.#ci.set(ks,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#ci.set(Cs,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#ci)s.addEventListener(t,e)}addListeners(){this.#Be.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#ci)e.element?.removeEventListener(t,i);this.#ci.clear()}}externalInteract(t){for(const e of this.#li){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#li)i.handleClickMode?.(t,e)}init(){this.#Be.init();for(const t of this.#di){switch(t.type){case ds.external:this.#li.push(t);break;case ds.particles:this.#ui.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#di=t,this.#li=[],this.#ui=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#li)i.clear(t,e);for(const s of this.#ui)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#Be.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#li)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#ui)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#hi&&this.#hi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#hi&&this.#hi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#di)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#pi=t=>{const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var wo=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new bo(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new fs(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var xo=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#n;constructor(t,e){this.#n=t,this.#u=e}destroy(){this.#n.images?.delete(this.#u)}}});var Po=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#gi(t,e,i)}#gi=(t,e,i)=>{const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>Q(e,i.position)<t.getRadius()+i.getRadius())}}});function Mo(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=L(),e.set(i,n)),n}var ko=Object.freeze({__proto__:null,LinkInstance:class{#fi=new Map;#u;#mi;#p;constructor(t,e){this.#p=t,this.#u=e,this.#mi={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,r=e.getPosition(),l=e.options.twinkle?.links,d=n.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(n.frequency<1&&this.#yi(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#vi(s,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&L()<l.frequency?Qe(this.#p,l.color):void 0;if(l&&w&&(b=w,v=q(l.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=oi(e,u.destination,t)}if(!b)continue;const x=this.#bi(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=c.x,l=c.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(l=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#mi.links.clear(),this.#mi.triangles.clear(),this.#fi.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#vi(t,e,i,s,n,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#yi(c,h.destination)>c.options.links.frequency||!s.has(h.destination.id))continue;const d=h.destination;if(this.#wi(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=Qe(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#bi(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#bi(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#fi.get(e);return i||(i=ii(t,this.#u.hdr),this.#fi.set(e,i)),i}#yi(t,e){return Mo([t,e],this.#mi.links)}#wi(t,e,i){return Mo([t,e,i],this.#mi.triangles)}}});t.AnimatableColor=oe,t.AnimationOptions=ee,t.AnimationValueWithRandom=me,t.Background=re,t.BaseRange=Zt,t.Circle=Jt,t.ColorAnimation=se,t.Fill=he,t.FullScreen=ce,t.HslAnimation=ne,t.Move=xe,t.MoveAngle=ue,t.MoveCenter=pe,t.MoveGravity=ge,t.MovePath=ve,t.Options=_e,t.OptionsColor=ae,t.OutModes=be,t.Paint=Me,t.ParticlesBounce=De,t.ParticlesBounceFactor=ke,t.ParticlesDensity=Ce,t.ParticlesNumber=Se,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Te,t.RangedAnimationOptions=ie,t.RangedAnimationValueWithRandom=ye,t.Rectangle=te,t.ResizeEvent=le,t.Shape=Ie,t.Spin=we,t.Stroke=Pe,t.ValueWithRandom=fe,t.Vector=D,t.Vector3d=k,t.ZIndex=ze,t.alterHsl=pi,t.animate=A,t.areBoundsInside=bt,t.arrayRandomIndex=mt,t.calcExactPositionOrRandomFromSize=et,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return et({size:t.size,position:e})},t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})},t.calculateBounds=wt,t.cancelAnimation=F,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=X,t.circleBounce=Mt,t.circleBounceDataFromParticle=Pt,t.clamp=V,t.clear=Ae,t.cloneStyle=Tt,t.collisionVelocity=J,t.colorMix=ai,t.colorToHsl=function(t,e,i,s=!0){const n=Xe(t,e,i,s);return n?Ke(n):void 0},t.colorToRgb=Xe,t.countOffset=1,t.decayOffset=1,t.deepExtend=xt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Y,t.deleteCount=1,t.double=2,t.doublePI=u,t.drawAfterEffect=Ve,t.drawBeforeEffect=Ue,t.drawParticle=Fe,t.drawParticlePlugin=$e,t.drawShape=He,t.drawShapeAfterDraw=qe,t.drawShapeBeforeDraw=We,t.empty=0,t.executeOnSingleOrMultiple=kt,t.findItemFromSingleOrMultiple=Ct,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=N,t.getDistances=G,t.getFullScreenStyle=Rt,t.getHslAnimationFromHsl=li,t.getHslFromAnimation=ci,t.getItemMapFromInitializer=Lt,t.getItemsFromInitializer=_t,t.getLinkColor=oi,t.getLinkRandomColor=ri,t.getLogger=Ht,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=K,t.getPosition=It,t.getRandom=L,t.getRandomInRange=B,t.getRandomRgbColor=ei,t.getRangeMax=$,t.getRangeMin=W,t.getRangeValue=q,t.getSize=function(t,e){return St(t,e)},t.getStyleFromHsl=ni,t.getStyleFromRgb=ii,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=dt,t.hslToRgb=Je,t.hslaToRgba=ti,t.identity=1,t.initParticleNumericAnimationValue=Ot,t.inverseFactorNumerator=1,t.isArray=z,t.isBoolean=C,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ft,t.isNull=T,t.isNumber=S,t.isObject=I,t.isPointInside=vt,t.isString=O,t.itemFromArray=yt,t.itemFromSingleOrMultiple=Dt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Re,t.loadParticlesOptions=Ee,t.loadRandomFactor=1e4,t.loadSlim=Za,t.manageListener=Et,t.memoize=lt,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=c,t.paintBase=Le,t.paintImage=Be,t.parseAlpha=it,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=H,t.rangeColorToHsl=Ye,t.rangeColorToRgb=Qe,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=m,t.rgbToHsl=Ke,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ht,t.safeIntersectionObserver=pt,t.safeMatchMedia=ut,t.safeMutationObserver=gt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(Ut.debug=Vt(t.debug)),t.error&&(Ut.error=Vt(t.error)),t.info&&(Ut.info=Vt(t.info)),t.log&&(Ut.log=Vt(t.log)),t.trace&&(Ut.trace=Vt(t.trace)),t.verbose&&(Ut.verbose=Vt(t.verbose)),t.warning&&(Ut.warning=Vt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=j,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ne(t,e)?.a},t.stringToRgb=Ze,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=gi,t.updateAnimation=zt,t.updateColor=ui,t.updateColorValue=hi,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadMinIndex:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadMinIndex,loadOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadParticlesOptions,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRandomFactor,loadSlim:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadSlim,tsParticles:(globalThis.__tsParticlesInternals.bundles.slim||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.slim||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.slim=t.__tsParticlesInternals.bundles.slim||{}))}(this,function(t){"use strict";const e="generated",i="source-over",n="resize",s="visibilitychange",a=100,o=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",m=255,y=360,v=100,b=100,w=.25,x=.75;var P;function M(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class k{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(c.x,c.y,c.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??c.y,i??c.z):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return k.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 k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends k{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return D.create(c.x,c.y)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??c.y):new D(t.x,t.y)}}function C(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function S(t){return"number"==typeof t}function z(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function T(t){return null==t}const R=Math.PI/180;let E=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function L(){return V(E(),0,1-Number.EPSILON)}function A(t,e){return L()*(e-t)+t}function B(t){return _.nextFrame(t)}function F(t){_.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function H(t){const e=$(t);let i=W(t);return e===i&&(i=0),A(i,e)}function q(t){return S(t)?t:H(t)}function W(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function j(t,e){if(t===e||void 0===e&&S(t))return t;const i=W(t),n=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:j(i,n)}function G(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function N(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}function X(t,e){return Math.sqrt(N(t,e))}function Y(t,e,i){return N(t,e)<=i*i}function Q(t){return t*R}function K(e,i,n){if(S(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return L()*u}}function Z(t){const e=D.origin;return e.length=1,e.angle=t,e}function J(t,e,i,n){return D.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function tt(t){return{x:(t.position?.x??L()*a)*t.size.width/a,y:(t.position?.y??L()*a)*t.size.height/a}}function et(t){const{position:e,size:i}=t;return{x:e?.x??L()*i.width,y:e?.y??L()*i.height}}function it(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var nt,st;t.OutModeDirection=void 0,(nt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",nt.left="left",nt.right="right",nt.top="top",t.PixelMode=void 0,(st=t.PixelMode||(t.PixelMode={})).precise="precise",st.percent="percent";function at(){return globalThis.document}function ot(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function rt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ct(t,e){return t===e||I(e)&&e.includes(t)}function lt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(L()*t.length)]}function dt(t,e,i,n,s){return ht(ut(t,n??0),e,i,s)}function ht(e,i,n,s){let a=!0;return s&&s!==t.OutModeDirection.bottom||(a=e.top<i.height+n.x),!a||s&&s!==t.OutModeDirection.left||(a=e.right>n.x),!a||s&&s!==t.OutModeDirection.right||(a=e.left<i.width+n.y),!a||s&&s!==t.OutModeDirection.top||(a=e.bottom>n.y),a}function ut(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function pt(t,...e){for(const i of e){if(T(i))continue;if(!z(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):z(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),n=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return z(e)||Array.isArray(e)})){const s=i,a=t;for(const t of e)if(!n.has(t)&&t in s){const e=s[t];void 0!==e&&(a[t]=e)}continue}for(const s of e){if(n.has(s))continue;const e=t,a=i[s];e[s]=Array.isArray(a)?a.map(t=>pt(void 0,t)):pt(e[s],a)}}return t}function gt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:D.create(q(t.options.bounce.horizontal.value),q(t.options.bounce.vertical.value))}}function ft(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,a]=[t.position,e.position],{dx:o,dy:r}=G(a,s);if(i*o+n*r<0)return;const c=-Math.atan2(r,o),l=t.mass,d=e.mass,h=t.velocity.rotate(c),u=e.velocity.rotate(c),p=J(h,u,l,d),g=J(u,h,l,d),f=p.rotate(-c),m=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y}function mt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function yt(t,e,i){return I(t)?lt(t,e,i):t}function vt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function bt(t){const e=at().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||T(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const a=t.getPropertyPriority?.(n);a?e.setProperty(n,s,a):e.setProperty(n,s)}return e}let wt,xt;function Pt(t){if(wt!==t||!xt){wt=t;const e=at().createElement("div").style,i=10,n={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in n){const i=n[t];void 0!==i&&e.setProperty(t,i)}xt=e}return xt}function Mt(t,e,i,n,s){if(n){let n={passive:!0};C(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function kt(t,e,i,n=!1){let s=e.get(t);return s&&!n||(s=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,s)),s}async function Dt(t,e,i,n=!1){let s=e.get(t);if(!s||n){const n=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));s=new Map(n),e.set(t,s)}return s}class Ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var Ot;t.EventType=void 0,(Ot=t.EventType||(t.EventType={})).configAdded="configAdded",Ot.containerInit="containerInit",Ot.particlesSetup="particlesSetup",Ot.containerStarted="containerStarted",Ot.containerStopped="containerStopped",Ot.containerDestroyed="containerDestroyed",Ot.containerPaused="containerPaused",Ot.containerPlay="containerPlay",Ot.containerBuilt="containerBuilt",Ot.particleAdded="particleAdded",Ot.particleDestroyed="particleDestroyed",Ot.particleRemoved="particleRemoved";class St{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#n=new Map;#s;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return kt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const n=this.updaters.get(t);n&&n.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#s))}}const zt=t=>(...e)=>{t(...e)},It={debug:zt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:zt(console.info),log:zt(console.log),trace:zt(console.trace),verbose:zt(console.log),warning:zt(console.warn)};function Tt(){return It}const Rt="100%";class Et{pluginManager=new St(this);#d=[];#h=new Ct;#o=!1;get items(){return this.#d}get version(){return"4.2.0"}addEventListener(t,e){this.#h.addEventListener(t,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}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:n}=await Promise.resolve().then(function(){return ro}),s=t.id??i?.id??`tsparticles${Math.floor(1e4*L()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=yt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Tt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=yt(r,a),{items:l}=this,d=l.findIndex(t=>t.id.description===s),h=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(d,e,h)}else l.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=at();let n;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)n=t,n.dataset[e]??=g,n.dataset[e]===p&&(n.style.width||=Rt,n.style.height||=Rt,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(f).item(0);s?(n=s,n.dataset[e]=g):(n=i.createElement(f),n.dataset[e]=p,t.appendChild(n)),n.style.width||=Rt,n.style.height||=Rt,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none")}return n})(((t,i)=>{const n=at();let s=i??n.getElementById(t);return s||(s=n.createElement("canvas"),s.id=t,s.dataset[e]=p,n.body.append(s),s)})(s,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var _t,Lt,At,Bt,Ft,Vt,Ut,Ht,qt,Wt,$t;!function(t){t.circle="circle",t.rectangle="rectangle"}(_t||(_t={}));class jt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Gt extends jt{radius;constructor(t,e,i){super(t,e,_t.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Gt||t.type===_t.circle){return n+t.radius>Math.hypot(s,a)}if(t instanceof Nt||t.type===_t.rectangle){const e=t,{width:i,height:o}=e.size;return Math.pow(s-i,2)+Math.pow(a-o,2)<=n**2||s<=n+i&&a<=n+o||s<=i||a<=o}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Nt extends jt{size;constructor(t,e,i,n){super(t,e,_t.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof Gt)return t.intersects(this);if(!(t instanceof Nt))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,a=t.size,o=a.width,r=a.height;return s.x<n.x+e&&s.x+o>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}t.RotateDirection=void 0,(Lt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Lt.counterClockwise="counter-clockwise",Lt.random="random",t.AnimationMode=void 0,(At=t.AnimationMode||(t.AnimationMode={})).auto="auto",At.increase="increase",At.decrease="decrease",At.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Ft=t.OutMode||(t.OutMode={})).bounce="bounce",Ft.none="none",Ft.out="out",Ft.destroy="destroy",Ft.split="split",t.AlterType=void 0,(Vt=t.AlterType||(t.AlterType={})).darken="darken",Vt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(Ht=t.GradientType||(t.GradientType={})).linear="linear",Ht.radial="radial",Ht.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,($t=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",$t.decreasing="decreasing";class Xt{load(t){T(t)||this.doLoad(t)}}function Yt(t,...e){for(const i of e)t.load(i)}function Qt(t,e,i){void 0!==i&&(t[e]=i)}function Kt(t,e,i){void 0!==i&&(t[e]=j(i))}function Zt(t,e,i){void 0!==i&&t[e].load(i)}function Jt(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function te(t,e,i,...n){const s=t;s[e]??=new i;const a=s[e];for(const t of n)a.load(t?.[e])}class ee extends Xt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Kt(this,"count",t.count),Qt(this,"enable",t.enable),Kt(this,"speed",t.speed),Kt(this,"decay",t.decay),Kt(this,"delay",t.delay),Qt(this,"sync",t.sync)}}class ie extends ee{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Qt(this,"mode",t.mode),Qt(this,"startValue",t.startValue)}}class ne extends ee{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Qt(this,"max",t.max),Qt(this,"min",t.min),Kt(this,"offset",t.offset)}}class se extends Xt{h=new ne(0,y);l=new ne(0,b);s=new ne(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ae extends Xt{value="";static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){T(t.value)||(this.value=t.value)}}class oe extends ae{animation=new se;static create(t,e){const i=new oe;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class re extends Xt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ae,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"image",t.image),Qt(this,"position",t.position),Qt(this,"repeat",t.repeat),Qt(this,"size",t.size),Qt(this,"opacity",t.opacity)}}class ce extends Xt{enable=!0;zIndex=0;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"zIndex",t.zIndex)}}class le extends Xt{delay=.5;enable=!0;doLoad(t){Qt(this,"delay",t.delay),Qt(this,"enable",t.enable)}}class de extends Xt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class he extends Xt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Qt(this,"enable",t.enable),Kt(this,"opacity",t.opacity)}}class ue extends Xt{offset=0;value=90;doLoad(t){Kt(this,"offset",t.offset),Kt(this,"value",t.value)}}class pe extends Xt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Qt(this,"x",t.x),Qt(this,"y",t.y),Qt(this,"mode",t.mode),Qt(this,"radius",t.radius)}}class ge extends Xt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Kt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),Qt(this,"inverse",t.inverse),Kt(this,"maxSpeed",t.maxSpeed)}}class fe extends Xt{value=0;doLoad(t){T(t.value)||(this.value=j(t.value))}}class me extends fe{animation=new ee;doLoad(t){super.doLoad(t),Zt(this,"animation",t.animation)}}class ye extends me{animation=new ie}class ve extends Xt{clamp=!0;delay=new fe;enable=!1;generator;options={};doLoad(t){Qt(this,"clamp",t.clamp),this.delay.load(t.delay),Qt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=pt(this.options,t.options))}}class be extends Xt{bottom;default=t.OutMode.out;left;right;top;doLoad(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 we extends Xt{acceleration=0;enable=!1;position;doLoad(t){Kt(this,"acceleration",t.acceleration),Qt(this,"enable",t.enable),t.position&&(this.position=pt({},t.position))}}class xe extends Xt{angle=new ue;center=new pe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ge;outModes=new be;path=new ve;random=!1;size=!1;speed=2;spin=new we;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Kt(this,"decay",t.decay),Qt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Kt(this,"drift",t.drift),Qt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(z(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Qt(this,"random",t.random),Qt(this,"size",t.size),Kt(this,"speed",t.speed),this.spin.load(t.spin),Qt(this,"straight",t.straight),Qt(this,"vibrate",t.vibrate),Qt(this,"warp",t.warp)}}class Pe extends Xt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Kt(this,"width",t.width),Kt(this,"opacity",t.opacity)}}class Me extends Xt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=oe.create(this.color,t.color)),Jt(this,"fill",t.fill,()=>new he),Jt(this,"stroke",t.stroke,()=>new Pe)}}class ke extends fe{value=1}class De extends Xt{horizontal=new ke;vertical=new ke;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ce extends Xt{enable=!1;height=1080;width=1920;doLoad(t){Qt(this,"enable",t.enable),Qt(this,"width",t.width),Qt(this,"height",t.height)}}class Oe extends Xt{mode=t.LimitMode.delete;value=0;doLoad(t){Qt(this,"mode",t.mode),Qt(this,"value",t.value)}}class Se extends Xt{density=new Ce;limit=new Oe;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Qt(this,"value",t.value)}}class ze extends Xt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=pt(this.options[t]??{},i))}Qt(this,"close",t.close),Qt(this,"type",t.type)}}class Ie extends fe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Qt(this,"opacityRate",t.opacityRate),Qt(this,"sizeRate",t.sizeRate),Qt(this,"velocityRate",t.velocityRate)}}class Te extends Xt{bounce=new De;effect=new de;groups={};move=new xe;number=new Se;paint;palette;reduceDuplicates=!1;shape=new ze;zIndex=new Ie;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Me,this.paint.color=new oe,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=mt(e,t=>{const e=new Me;return e.load(t),e}):I(this.paint)?(this.paint=new Me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,n=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function Re(t,e,...i){const n=new Te(t,e);return Yt(n,...i),n}class Ee extends Xt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new re,this.fullScreen=new ce,this.particles=Re(this.#p,this.#u),this.resize=new le}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,mt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Qt(this,"autoPlay",t.autoPlay),Qt(this,"clear",t.clear),Qt(this,"key",t.key),Qt(this,"name",t.name),Kt(this,"delay",t.delay),Qt(this,"detectRetina",t.detectRetina),Kt(this,"duration",t.duration),Qt(this,"fpsLimit",t.fpsLimit),Qt(this,"hdr",t.hdr),Qt(this,"pauseOnBlur",t.pauseOnBlur),Qt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Qt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=pt(this.style,t.style),Qt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const _e=new Map;function Le(t,e){let i=_e.get(t);return i||(i=e(),_e.size>2e3&&_e.clear(),_e.set(t,i)),i}function Ae(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Be(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return Fe(t,s.value,i,n);if(I(s.value)){const e=lt(s.value,i,n);if(!e)return;return Be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function Fe(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return s.value===d?je():He(t,s.value);if(I(s.value)){const e=lt(s.value,i,n);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function Ve(t,e,i,n=!0){const s=Be(t,e,i,n);return s?Ue(s):void 0}function Ue(t){const e=t.r/m,i=t.g/m,n=t.b/m,s=Math.max(e,i,n),a=Math.min(e,i,n),r={h:0,l:(s+a)*o,s:0};return s!==a&&(r.s=r.l<o?(s-a)/(s+a):(s-a)/(2-s-a),r.h=e===s?(i-n)/(s-a):i===s?2+(n-e)/(s-a):4+(e-i)/(s-a)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=y),r.h>=y&&(r.h-=y),r}function He(t,e){return Ae(t,e)}function qe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function We(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),n=Math.max(0,Math.min(b,t.l)),s=e/y,a=i/v,r=n/b;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=r<o?r*(1+a):r+a-r*a,l=2*r-c,d=1/3,h=Math.min(m,m*qe(l,c,s+d)),u=Math.min(m,m*qe(l,c,s)),p=Math.min(m,m*qe(l,c,s-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function $e(t){const e=We(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function je(t){const e=t??0,i=()=>Math.floor(A(e,256));return{b:i(),g:i(),r:i()}}function Ge(t,e,i){const n=i??1;return Le(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const n=i/203;return`color(display-p3 ${(t.r/m*n).toString()} ${(t.g/m*n).toString()} ${(t.b/m*n).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ne(t,e,i){const n=i??1;return Le(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ge(We(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Xe(t,e,i,n){let s=t,a=e;return"r"in s||(s=We(t)),"r"in a||(a=We(e)),{b:U(s.b,a.b,i,n),g:U(s.g,a.g,i,n),r:U(s.r,a.r,i,n)}}function Ye(t,e,i){if(i===d)return je();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return Xe(i,n,t.getRadius(),e.getRadius());{const t=i??n;if(t)return We(t)}}}function Qe(t,e,i,n){const s=O(e)?e:e.value;return s===d?n?Be(t,{value:s}):i?d:h:s===h?h:Be(t,{value:s})}function Ke(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ze(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(Je(n.h,e.h,i),Je(n.s,e.s,i),Je(n.l,e.l,i)),n}function Je(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=q(i.speed)/a*n,e.decay=1-q(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=q(i.count),e.time=0,e.delayTime=q(i.delay)*r,i.sync||(e.velocity*=L(),e.value*=L()),e.initialValue=e.value,e.offset=j(i.offset)):e.velocity=0}function ti(e,i,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(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))return;const s=e.offset?H(e.offset):0,a=(e.velocity??0)*n.factor+3.6*s,o=e.decay??1,r=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==o&&(e.velocity*=o),e.value=V(e.value,c,r)}function ei(t,e){if(!t)return;const{h:i,s:n,l:s}=t;ti(i,!1,e),ti(n,!0,e),ti(s,!0,e)}function ii(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const ni=new Et;class si{enable=!1;mode="destination-out";load(t){T(t)||(Qt(this,"mode",t.mode),Qt(this,"enable",t.enable))}}class ai{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return co});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.blend;n?.load||(e.blend=n=new si),n.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new si,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function oi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ai)})}class ri{draw(t){!function(t){const{context:e,particle:i,radius:n}=t;i.circleRange??={min:0,max:u};const s=i.circleRange;e.arc(c.x,c.y,n,s.min,s.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,n=i?.angle??{max:360,min:0};e.circleRange=z(n)?{min:Q(n.min),max:Q(n.max)}:{min:0,max:Q(n)}}}async function ci(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new ri))})}var li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(li||(li={}));const di=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class ui{accepts(t){return t.startsWith("#")}handleColor(t){return this.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(di,(t,e,i,n,s)=>e+e+i+i+n+n+(void 0===s?"":s+s)),i=hi.exec(e);return i?{a:i[li.a]?Number.parseInt(i[li.a],16)/255:1,b:Number.parseInt(i[li.b]??"0",16),g:Number.parseInt(i[li.g]??"0",16),r:Number.parseInt(i[li.r]??"0",16)}:void 0}}async function pi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new ui)})}var gi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(gi||(gi={}));const fi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class mi{accepts(t){return t.startsWith("hsl")}handleColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return We({h:q(e.h),l:q(e.l),s:q(e.s)})}parseString(t){if(!this.accepts(t))return;const e=fi.exec(t);return e?$e({a:e.length>4?it(e[gi.a]):1,h:Number.parseInt(e[gi.h]??"0",10),l:Number.parseInt(e[gi.l]??"0",10),s:Number.parseInt(e[gi.s]??"0",10)}):void 0}}async function yi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new mi)})}class vi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ho});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function bi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new vi(t.pluginManager))})}function wi(e,i){const n=e.value,s=e.animation,a={delayTime:q(s.delay)*r,enable:s.enable,value:q(e.value)*i,max:$(n)*i,min:W(n)*i,loops:0,maxLoops:q(s.count),time:0};if(s.enable){switch(a.decay=1-q(s.decay),s.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=L()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=s.mode===t.AnimationMode.auto;switch(s.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=H(a),e&&(a.status=L()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function xi(e,i,n,s,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,c=i.max,l=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==l&&(i.velocity*=l),i.status){case t.AnimationStatus.increasing:i.value>=c&&(n?i.status=t.AnimationStatus.decreasing:i.value-=c,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(n?i.status=t.AnimationStatus.increasing:i.value+=c,i.loops??=0,i.loops++)}!function(e,i,n,s,a){switch(i){case t.DestroyType.max:n>=a&&e.destroy();break;case t.DestroyType.min:n<=s&&e.destroy()}}(e,s,i.value,r,c),e.destroyed||(i.value=V(i.value,r,c))}}class Pi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class Mi extends ye{animation=new Pi;value=1;load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ki{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=wi(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=q(i.speed)/a*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){te(t,"opacity",Mi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&xi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Di(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ki(t)))})}class Ci{modes;#u;#y;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#y=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;let o=!1;for(const t of this.#y)if(o=t.particleBounce?.(e,n,i)??!1,o)break;if(o)return;const r=e.getPosition(),c=e.offset,l=e.getRadius(),d=ut(r,l),h=a.canvas.size,u=!e.isInsideCanvasForOutMode(s,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=q(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,n=!0}if(!n)return;const s=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-s:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let n=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=q(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,n=!0}if(!n)return;const s=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-s:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=s),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:s,direction:i,bounds:d,canvasSize:h,offset:c,outOfCanvas:u,size:l})}}class Oi{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,n,s){if(this.modes.includes(s)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(s,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=G(e.position,e.moveCenter),{x:n,y:s}=e.velocity;if(n<0&&t>e.moveCenter.radius||s<0&&i>e.moveCenter.radius||n>=0&&t<-e.moveCenter.radius||s>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Si{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,n,s){if(!this.modes.includes(s))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const n=e.position;(!a.inverse&&n.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&n.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;dt(e.position,o.canvas.size,c,l,i)||e.destroy()}}}const zi=D.origin;class Ii{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,n,s){if(!this.modes.includes(s))return;const a=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;zi.setTo(c),zi.length=e.moveCenter.radius,zi.angle=e.velocity.angle+Math.PI,zi.addTo(e.moveCenter);const{dx:n,dy:s}=G(e.position,zi);if(t<=0&&n>=0||i<=0&&s>=0||t>=0&&n<=0||i>=0&&s<=0)return;e.position.x=Math.floor(H({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(H({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=G(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(s,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(H({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=G(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const n=e.options.move.warp,s=a.canvas.size,o={bottom:s.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:s.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),c=ut(e.position,r);i===t.OutModeDirection.right&&c.left>s.width+e.offset.x?(e.position.x=o.left,e.initialPosition.x=e.position.x,n||(e.position.y=L()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&c.right<-e.offset.x&&(e.position.x=o.right,e.initialPosition.x=e.position.x,n||(e.position.y=L()*s.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&c.top>s.height+e.offset.y?(n||(e.position.x=L()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&c.bottom<-e.offset.y&&(n||(e.position.x=L()*s.width,e.initialPosition.x=e.position.x),e.position.y=o.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ti{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ci(t)),this.#v(e,t.OutMode.out,t=>new Ii(t)),this.#v(e,t.OutMode.destroy,t=>new Oi(t)),this.#v(e,t.OutMode.none,t=>new Si(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const n=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,n.bottom??n.default,t.OutModeDirection.bottom),this.#b(e,i,n.left??n.default,t.OutModeDirection.left),this.#b(e,i,n.right??n.default,t.OutModeDirection.right),this.#b(e,i,n.top??n.default,t.OutModeDirection.top)}#v(t,e,i){const n=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)(n,e)&&this.updaters.set(e,i(this.#u))}#b(t,e,i,n){for(const s of this.updaters.values())s.update(t,n,e,i)}}async function Ri(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ti(t)))})}class Ei{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,n=yt(i.paint,t.id,i.reduceDuplicates),s=n?.color,a=s??void 0,o=n?.fill,r=n?.stroke;if(o){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=q(o.opacity),t.fillAnimation=i.animation;const n=Ve(this.#p,i);n&&(t.fillColor=Ze(n,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=oe.create(void 0===a?void 0:oe.create(void 0,a),r.color);t.strokeWidth=q(r.width)*e.retina.pixelRatio,t.strokeOpacity=q(r.opacity??1),t.strokeAnimation=i.animation;const n=Ve(this.#p,i)??t.getFillColor();n&&(t.strokeColor=Ze(n,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:n,strokeColor:s}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!n&&(void 0!==s?.h.value&&s.h.enable||void 0!==s?.s.value&&s.s.enable||void 0!==s?.l.value&&s.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(ei(t.fillColor,e),ei(t.strokeColor,e))}}async function _i(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Ei(t.pluginManager,e)))})}var Li;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Li||(Li={}));const Ai=/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;class Bi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:q(e.r),g:q(e.g),b:q(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ai.exec(t);return e?{a:e.length>4?it(e[Li.a]):1,b:parseInt(e[Li.b]??"0",10),g:parseInt(e[Li.g]??"0",10),r:parseInt(e[Li.r]??"0",10)}:void 0}}async function Fi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Bi)})}class Vi extends ie{destroy=t.DestroyType.none;load(t){super.load(t),T(t)||Qt(this,"destroy",t.destroy)}}class Ui extends ye{animation=new Vi;value=3;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Hi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,n.sync||(t.size.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){te(t,"size",Ui,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=wi(i,e),t.retina.sizeAnimationSpeed=q(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&xi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function qi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Hi(t)))})}async function Wi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([oi(t),pi(t),yi(t),Fi(t),bi(t),ci(t),_i(t),Di(t),Ri(t),qi(t)])})}const $i=new Map;async function ji(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{for(const[e,i]of $i)t.pluginManager.addEasing(e,i)})}$i.set("ease-in-quad",t=>t**2),$i.set("ease-out-quad",t=>1-(1-t)**2),$i.set("ease-in-out-quad",t=>t<.5?2*t**2:1-(-2*t+2)**2/2);const Gi=["emoji"];function Ni(t,e,i){t.beginPath(),t.moveTo(e.x,e.y),t.lineTo(i.x,i.y),t.closePath()}async function Xi(t,e){try{await at().fonts.load(`${e??"400"} 36px '${t??"Verdana"}'`)}catch{}}const Yi='"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif';class Qi{#w=new Map;destroy(){for(const[t,e]of this.#w)e instanceof ImageBitmap&&e.close(),this.#w.delete(t)}draw(t){const e=t.particle.emojiDataKey;if(!e)return;const i=this.#w.get(e);i&&function(t,e){const{context:i,opacity:n}=t,s=i.globalAlpha,a=e.width,r=a*o;i.globalAlpha=n,i.drawImage(e,-r,-r,a,a),i.globalAlpha=s}(t,i)}async init(t){const e=t.actualOptions.particles.shape;if(!Gi.some(t=>ct(t,e.type)))return;const i=[Xi(Yi)];mt(Gi.map(t=>e.options[t])[0],t=>{t.font&&i.push(Xi(t.font))}),await Promise.all(i)}particleDestroy(t){t.emojiDataKey=void 0}particleInit(t,e){const i=e.shapeData;if(!i.value)return;const n=yt(i.value,e.randomIndexData);if(!n)return;const s="string"==typeof n?{font:i.font??Yi,padding:i.padding??0,value:n}:{font:Yi,padding:0,...i,...n},a=s.font,o=s.value,r=`${o}_${a}`;if(this.#w.has(r))return void(e.emojiDataKey=r);const c=2*s.padding,l=$(e.size.value),d=l+c,h=2*d,u=new OffscreenCanvas(h,h),p=u.getContext("2d",t.canvas.render.settings);if(!p)return;p.font=`400 ${(2*l).toString()}px ${a}`,p.textBaseline="middle",p.textAlign="center",p.fillText(o,d,d);const g=u instanceof HTMLCanvasElement?u:u.transferToImageBitmap();this.#w.set(r,g),e.emojiDataKey=r}}async function Ki(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(Gi,()=>Promise.resolve(new Qi))})}class Zi{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}var Ji,tn,en;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ji||(Ji={}));class nn{enable=!1;mode=[];selectors=[];type=Ji.circle;load(t){T(t)||(Qt(this,"selectors",t.selectors),Qt(this,"enable",t.enable),Qt(this,"mode",t.mode),Qt(this,"type",t.type))}}class sn{enable=!1;mode=[];load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"mode",t.mode))}}class an{onClick=new Zi;onDiv=new nn;onHover=new sn;load(t){if(T(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=mt(e,t=>{const e=new nn;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(tn||(tn={}));class on{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(T(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class rn{detectsOn=tn.window;events=new an;modes;constructor(t,e){this.modes=new on(t,e)}load(t){if(T(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class cn{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return go});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let n=e.interactivity;n?.load||(e.interactivity=n=new rn(this.#p,t)),n.load(i?.interactivity);const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=pt({},i.interactivity));const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(en||(en={}));class ln{type=en.external;container;constructor(t){this.container=t}}class dn{type=en.particles;container;constructor(t){this.container=t}}const hn="pointerdown",un="pointerup",pn="pointerleave",gn="pointermove",fn="touchstart",mn="touchend",yn="touchmove",vn="touchcancel";function bn(t,e){if(I(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function wn(t,e){return!!bn(e,e=>e.enable&&ct(t,e.mode))}function xn(t,e,i){mt(e,e=>{const n=e.mode;e.enable&&ct(t,n)&&function(t,e){const i=t.selectors;mt(i,i=>{e(i,t)})}(e,i)})}function Pn(t,e){if(e&&t)return bn(t,t=>function(t,e){const i=mt(e,e=>t.matches(e));return I(i)?i.some(t=>t):i}(e,t.selectors))}function Mn(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}const kn=D.origin;function Dn(t,e,i,n,s,a,o){const r=e.actualOptions.interactivity?.modes.attract;if(!r)return;const c=e.particles.grid.query(s,a);for(const e of c){const{dx:s,dy:a,distance:c}=G(e.position,i),l=r.speed*r.factor,d=V(t.getEasing(r.easing)(1-c/n)*l,1,r.maxSpeed);kn.x=c?s/c*d:l,kn.y=c?a/c*d:l,o?.(e),e.position.subFrom(kn)}}let Cn=class{distance=200;duration=.4;easing="ease-out-quad";factor=1;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(Qt(this,"distance",t.distance),Qt(this,"duration",t.duration),void 0!==t.easing&&(this.easing=t.easing),Qt(this,"factor",t.factor),void 0!==t.maxSpeed&&(this.maxSpeed=t.maxSpeed),Qt(this,"speed",t.speed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}};const On="attract";let Sn=class extends ln{handleClickMode;#x;#P;#p;#M;constructor(t,e){super(e),this.#p=t,this.#P=0,this.#x=new Set,this.#M=new Map,e.attract??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.attract;if(s&&t===On){e.attract??={particles:[]},e.attract.clicking=!0,e.attract.count=0;for(const t of e.attract.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);e.attract.particles=[],e.attract.finish=!1,setTimeout(()=>{e.destroyed||(e.attract??={particles:[]},e.attract.clicking=!1)},s.duration*r)}}}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.attract;e&&(this.#P=e.distance,t.retina.attractModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===gn,n=e.interactivity?.events;if(!n)return;const{enable:s,mode:a}=n.onHover,{enable:o,mode:r}=n.onClick;i&&s&&ct(On,a)?function(t,e,i,n,s){const a=i.mouse.position,o=e.retina.attractModeDistance;!o||o<0||!a||Dn(t,e,a,o,new Gt(a.x,a.y,o),t=>n(t),s)}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}):o&&ct(On,r)&&function(t,e,i,n,s){e.attract??={particles:[]};const{attract:a}=e;if(a.finish||(a.count??=0,a.count++,a.count===e.particles.count&&(a.finish=!0)),a.clicking){const a=i.mouse.clickPosition,o=e.retina.attractModeDistance;if(!o||o<0||!a)return;Dn(t,e,a,o,new Gt(a.x,a.y,o),t=>n(t),s)}else!1===a.clicking&&(a.particles=[])}(this.#p,this.container,t,e=>this.isEnabled(t,e),t=>{this.#k(t)}),this.#D()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!(n.position&&s?.onHover.enable||n.clickPosition&&s?.onClick.enable))return!1;const a=s.onHover.mode,o=s.onClick.mode;return ct(On,a)||ct(On,o)}loadModeOptions(t,...e){te(t,"attract",Cn,...e)}reset(){}#D(){const t=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!t?.enable||!this.#M.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#M){if(this.#x.has(s))continue;if(s.destroyed){this.#M.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;let r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;if(t.follow&&s.options.move.enable){const{x:t,y:e,z:i}=s.velocity,n=t*t+e*e+i*i;if(n>0){const s=(r*t+c*e+l*i)/n;r-=t*s,c-=e*s,l-=i*s}}s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#M.delete(s))}}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.attract?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#M.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#M.set(t,n)),n.lastInteractionTime=i}};async function zn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalAttract",e=>Promise.resolve(new Sn(t.pluginManager,e)))})}const In=Math.PI*o;function Tn(t,e,i,n,s){const a=t.particles.grid.query(n,s);for(const t of a)n instanceof Gt?ft(gt(t),{position:e,mass:i**2*In,velocity:D.origin,factor:D.origin}):n instanceof Nt&&_n(t,ut(e,i))}function Rn(t,e,i,n){xn(i,e,(e,i)=>{!function(t,e,i,n){const s=at().querySelectorAll(e);s.length&&s.forEach(e=>{const s=e,a=t.retina.pixelRatio,r={x:(s.offsetLeft+s.offsetWidth*o)*a,y:(s.offsetTop+s.offsetHeight*o)*a},c=s.offsetWidth*o*a,l=10*a,d=i.type===Ji.circle?new Gt(r.x,r.y,c+l):new Nt(s.offsetLeft*a-l,s.offsetTop*a-l,s.offsetWidth*a+2*l,s.offsetHeight*a+2*l);n(r,c,d)})}(t,e,i,(e,i,s)=>{Tn(t,e,i,s,n)})})}function En(t){const e={bounced:!1},{pSide:i,pOtherSide:n,rectSide:s,rectOtherSide:a,velocity:r,factor:c}=t;return n.min<a.min||n.min>a.max||n.max<a.min||n.max>a.max||(i.max>=s.min&&i.max<=(s.max+s.min)*o&&r>0||i.min<=s.max&&i.min>(s.max+s.min)*o&&r<0)&&(e.velocity=r*-c,e.bounced=!0),e}function _n(t,e){const i=ut(t.getPosition(),t.getRadius()),n=t.options.bounce,s=En({pSide:{min:i.left,max:i.right},pOtherSide:{min:i.top,max:i.bottom},rectSide:{min:e.left,max:e.right},rectOtherSide:{min:e.top,max:e.bottom},velocity:t.velocity.x,factor:q(n.horizontal.value)});s.bounced&&(void 0!==s.velocity&&(t.velocity.x=s.velocity),void 0!==s.position&&(t.position.x=s.position));const a=En({pSide:{min:i.top,max:i.bottom},pOtherSide:{min:i.left,max:i.right},rectSide:{min:e.top,max:e.bottom},rectOtherSide:{min:e.left,max:e.right},velocity:t.velocity.y,factor:q(n.vertical.value)});a.bounced&&(void 0!==a.velocity&&(t.velocity.y=a.velocity),void 0!==a.position&&(t.position.y=a.position))}class Ln{distance=200;load(t){T(t)||Qt(this,"distance",t.distance)}}const An="bounce";class Bn extends ln{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bounce;e&&(this.#P=e.distance,t.retina.bounceModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===gn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&&ct(An,a)?function(t,e,i){const n=10*t.retina.pixelRatio,s=e.mouse.position,a=t.retina.bounceModeDistance;!a||a<0||!s||Tn(t,s,a,new Gt(s.x,s.y,a+n),i)}(this.container,t,e=>this.isEnabled(t,e)):Rn(this.container,o,An,e=>this.isEnabled(t,e))}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&&ct(An,s.onHover.mode)||wn(An,a)}loadModeOptions(t,...e){te(t,"bounce",Ln,...e)}reset(){}}async function Fn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalBounce",t=>Promise.resolve(new Bn(t)))})}class Vn{color;distance=200;duration=.4;mix=!1;opacity;size;load(t){if(!T(t)){if(Qt(this,"distance",t.distance),Qt(this,"duration",t.duration),Qt(this,"mix",t.mix),Kt(this,"opacity",t.opacity),void 0!==t.color){const e=I(this.color)?void 0:this.color;this.color=mt(t.color,t=>ae.create(e,t))}Qt(this,"size",t.size)}}}class Un extends Vn{selectors=[];load(t){super.load(t),T(t)||Qt(this,"selectors",t.selectors)}}class Hn extends Vn{divs;load(t){super.load(t),T(t)||(this.divs=mt(t.divs,t=>{const e=new Un;return e.load(t),e}))}}var qn;function Wn(t,e,i,n){if(e>=i){return V(t+(e-i)*n,t,e)}if(e<i){return V(t-(i-e)*n,e,t)}}!function(t){t.color="color",t.opacity="opacity",t.size="size"}(qn||(qn={}));const $n="bubble";class jn extends ln{handleClickMode;#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0,e.bubble??={},this.handleClickMode=t=>{t===$n&&(e.bubble??={},e.bubble.clicking=!0)}}get maxDistance(){return this.#P}clear(t,e,i){t.bubble.inRange&&!i||(delete t.bubble.div,delete t.bubble.opacity,delete t.bubble.radius,delete t.bubble.color)}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.bubble;e&&(this.#P=e.distance,t.retina.bubbleModeDistance=e.distance*t.retina.pixelRatio,void 0!==e.size&&(t.retina.bubbleModeSize=e.size*t.retina.pixelRatio))}interact(t,e){const i=this.container.actualOptions,n=i.interactivity?.events;if(!n)return;const s=n.onHover,a=n.onClick,o=s.enable,r=s.mode,c=a.enable,l=a.mode,d=n.onDiv;o&&ct($n,r)?this.#C(t):c&&ct($n,l)?this.#O(t):xn($n,d,(i,n)=>{this.#S(t,e,i,n)})}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const{onClick:a,onDiv:o,onHover:r}=s,c=wn($n,o);return!!(c||r.enable&&n.position||a.enable&&n.clickPosition)&&(ct($n,r.mode)||ct($n,a.mode)||c)}loadModeOptions(t,...e){te(t,"bubble",Hn,...e)}reset(t,e){e.bubble.inRange=!1}#O(t){const e=this.container,i=e.actualOptions,n=t.mouse.clickPosition,s=i.interactivity?.modes.bubble;if(!s||!n)return;e.bubble??={};const a=e.retina.bubbleModeDistance;if(!a||a<0)return;const o=e.particles.grid.queryCircle(n,a,e=>this.isEnabled(t,e)),{bubble:c}=e;for(const i of o){if(!c.clicking)continue;i.bubble.inRange=!c.durationEnd;const o=X(i.getPosition(),n),l=(performance.now()-(t.mouse.clickTime??0))/r;l>s.duration&&(c.durationEnd=!0),l>2*s.duration&&(c.clicking=!1,c.durationEnd=!1);const d={bubbleObj:{optValue:e.retina.bubbleModeSize,value:i.bubble.radius},particlesObj:{optValue:i.size.max,value:i.size.value},type:qn.size};this.#z(i,o,l,d);const h={bubbleObj:{optValue:s.opacity,value:i.bubble.opacity},particlesObj:{optValue:i.opacity?.max??1,value:i.opacity?.value??1},type:qn.opacity};this.#z(i,o,l,h),!c.durationEnd&&o<=a?this.#I(i,o):delete i.bubble.color}}#C(t){const e=this.container,i=t.mouse.position,n=e.retina.bubbleModeDistance;if(!n||n<0||!i)return;const s=e.particles.grid.queryCircle(i,n,e=>this.isEnabled(t,e));for(const e of s){e.bubble.inRange=!0;const s=X(e.getPosition(),i),a=1-s/n;s<=n?a>=0&&t.status===gn&&(this.#T(e,a),this.#R(e,a),this.#I(e,a)):this.reset(t,e),t.status===pn&&this.reset(t,e)}}#I(t,e,i){const n=this.container.actualOptions,s=i??n.interactivity?.modes.bubble;if(s){if(!t.bubble.finalColor){const e=s.color;if(!e)return;const i=yt(e);t.bubble.finalColor=Ve(this.#p,i)}if(t.bubble.finalColor)if(s.mix){t.bubble.color=void 0;const i=t.getFillColor();t.bubble.color=i?Ue(Xe(i,t.bubble.finalColor,1-e,e)):t.bubble.finalColor}else t.bubble.color=t.bubble.finalColor}}#R(t,e,i){const n=this.container.actualOptions,s=i?.opacity??n.interactivity?.modes.bubble?.opacity;if(!s)return;const a=Wn(t.opacity?.value??1,s,t.opacity?.max??1,e);void 0!==a&&(t.bubble.opacity=a)}#T(t,e,i){const n=this.container,s=i?.size?i.size*n.retina.pixelRatio:n.retina.bubbleModeSize;if(void 0===s)return;const a=Wn(t.size.value,s,t.size.max,e);void 0!==a&&(t.bubble.radius=a)}#z(t,e,i,n){const s=this.container,a=n.bubbleObj.optValue,o=s.actualOptions,r=o.interactivity?.modes.bubble;if(!r||void 0===a)return;const c=r.duration,l=s.retina.bubbleModeDistance,d=n.particlesObj.optValue,h=n.bubbleObj.value,u=n.particlesObj.value??0,p=n.type;if(l&&!(l<0)&&a!==d)if(s.bubble??={},s.bubble.durationEnd)h&&(p===qn.size&&delete t.bubble.radius,p===qn.opacity&&delete t.bubble.opacity);else if(e<=l){if((h??u)!==a){const e=u-i*(u-a)/c;p===qn.size&&(t.bubble.radius=e),p===qn.opacity&&(t.bubble.opacity=e)}}else p===qn.size&&delete t.bubble.radius,p===qn.opacity&&delete t.bubble.opacity}#S(t,e,i,n){const s=this.container,a=at().querySelectorAll(i),r=s.actualOptions.interactivity?.modes.bubble;r&&a.length&&a.forEach(i=>{const a=i,c=s.retina.pixelRatio,l={x:(a.offsetLeft+a.offsetWidth*o)*c,y:(a.offsetTop+a.offsetHeight*o)*c},d=a.offsetWidth*o*c,h=n.type===Ji.circle?new Gt(l.x,l.y,d):new Nt(a.offsetLeft*c,a.offsetTop*c,a.offsetWidth*c,a.offsetHeight*c),u=s.particles.grid.query(h,e=>this.isEnabled(t,e));for(const t of u){if(!h.contains(t.getPosition()))continue;t.bubble.inRange=!0;const i=Pn(r.divs,a);t.bubble.div&&t.bubble.div===a||(this.clear(t,e,!0),t.bubble.div=a),this.#T(t,1,i),this.#R(t,1,i),this.#I(t,1,i)}})}}async function Gn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalBubble",e=>Promise.resolve(new jn(t.pluginManager,e)))})}class Nn{opacity=.5;load(t){T(t)||Kt(this,"opacity",t.opacity)}}class Xn{distance=80;links=new Nn;radius=60;load(t){T(t)||(Qt(this,"distance",t.distance),this.links.load(t.links),Qt(this,"radius",t.radius))}}function Yn(t,e,i,n){const s=t.actualOptions,a=s.interactivity?.modes.connect;if(a)return function(t,e,i,n,s){const a=Math.floor(n.getRadius()/i.getRadius()),o=i.getFillColor(),r=n.getFillColor();if(!o||!r)return;const c=i.getPosition(),l=n.getPosition(),d=Xe(o,r,i.getRadius(),n.getRadius()),h=e.createLinearGradient(c.x,c.y,l.x,l.y);return h.addColorStop(0,Ne(o,t.hdr,s)),h.addColorStop(V(a,0,1),Ge(d,t.hdr,s)),h.addColorStop(1,Ne(r,t.hdr,s)),h}(t,e,i,n,a.links.opacity)}function Qn(t,e,i){t.canvas.render.draw(n=>{const s=Yn(t,n,e,i);if(!s)return;const a=e.getPosition(),o=i.getPosition();!function(t,e,i,n,s){Ni(t,n,s),t.lineWidth=e,t.strokeStyle=i,t.stroke()}(n,e.retina.linksWidth??0,s,a,o)})}class Kn extends ln{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.connect;e&&(this.#P=e.distance,t.retina.connectModeDistance=e.distance*t.retina.pixelRatio,t.retina.connectModeRadius=e.radius*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions;if(i.interactivity?.events.onHover.enable&&"pointermove"===t.status){const i=t.mouse.position,{connectModeDistance:n,connectModeRadius:s}=e.retina;if(!n||n<0||!s||s<0||!i)return;const a=Math.abs(s),o=e.particles.grid.queryCircle(i,a,e=>this.isEnabled(t,e));o.forEach((t,i)=>{const s=t.getPosition();for(const a of o.slice(i+1)){const i=a.getPosition(),o=Math.abs(n),r=Math.abs(s.x-i.x),c=Math.abs(s.y-i.y);r<o&&c<o&&Qn(e,t,a)}})}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!(!s?.onHover.enable||!n.position)&&ct("connect",s.onHover.mode)}loadModeOptions(t,...e){te(t,"connect",Xn,...e)}reset(){}}async function Zn(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalConnect",t=>Promise.resolve(new Kn(t)))})}function Jn(t,e){const i=t.particles.grid.query(e);for(const t of i)t.destroy()}function ts(t,e,i){xn(i,e,(e,i)=>{!function(t,e,i){const n=at().querySelectorAll(e);n.length&&n.forEach(e=>{const n=e,s=t.retina.pixelRatio,a={x:(n.offsetLeft+n.offsetWidth*o)*s,y:(n.offsetTop+n.offsetHeight*o)*s},r=n.offsetWidth*o*s,c=10*s,l=i.type===Ji.circle?new Gt(a.x,a.y,r+c):new Nt(n.offsetLeft*s-c,n.offsetTop*s-c,n.offsetWidth*s+2*c,n.offsetHeight*s+2*c);Jn(t,l)})}(t,e,i)})}class es{distance=200;load(t){T(t)||Qt(this,"distance",t.distance)}}const is="destroy";class ns extends ln{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.destroy;e&&(this.#P=e.distance,t.retina.destroyModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container.actualOptions,i=e.interactivity?.events,n=t.status===gn;if(!i)return;const s=i.onHover.enable,a=i.onHover.mode,o=i.onDiv;n&&s&&ct(is,a)?function(t,e){const i=10*t.retina.pixelRatio,n=e.mouse.position,s=t.retina.destroyModeDistance;!s||s<0||!n||Jn(t,new Gt(n.x,n.y,s+i))}(this.container,t):ts(this.container,o,is)}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv;return!!n.position&&s.onHover.enable&&ct(is,s.onHover.mode)||wn(is,a)}loadModeOptions(t,...e){te(t,"destroy",es,...e)}reset(){}}async function ss(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalDestroy",async t=>Promise.resolve(new ns(t)))})}class as{blink=!1;color;consent=!1;opacity=1;load(t){T(t)||(Qt(this,"blink",t.blink),void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"consent",t.consent),Kt(this,"opacity",t.opacity))}}class os{distance=100;links=new as;load(t){T(t)||(Qt(this,"distance",t.distance),this.links.load(t.links))}}function rs(t,e,i,n,s){t.canvas.render.draw(a=>{const o=e.getPosition();!function(t,e,i,n,s,a,o=!1){Ni(t,i,n),t.strokeStyle=Ge(s,o,a),t.lineWidth=e,t.stroke()}(a,e.retina.linksWidth??0,o,s,i,n,t.hdr)})}class cs extends ln{#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.grab;e&&(this.#P=e.distance,t.retina.grabModeDistance=e.distance*t.retina.pixelRatio)}interact(t){const e=this.container,i=e.actualOptions.interactivity;if(!i?.modes.grab||!i.events.onHover.enable||t.status!==gn)return;const n=t.mouse.position;if(!n)return;const s=e.retina.grabModeDistance;if(!s||s<0)return;const a=e.particles.grid.queryCircle(n,s,e=>this.isEnabled(t,e));for(const t of a){const a=X(t.getPosition(),n);if(a>s)continue;const o=i.modes.grab.links,r=o.opacity,c=r-a*r/s;if(c<=0)continue;const l=o.color??t.options.links?.color;if(!e.particles.grabLineColor&&l){const t=i.modes.grab.links;e.particles.grabLineColor=Qe(this.#p,l,t.blink,t.consent)}const d=Ye(t,void 0,e.particles.grabLineColor);d&&rs(e,t,d,c,n)}}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&ct("grab",s.onHover.mode)}loadModeOptions(t,...e){te(t,"grab",os,...e)}reset(){}}async function ls(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalGrab",e=>Promise.resolve(new cs(t.pluginManager,e)))})}class ds{force=2;smooth=10;load(t){T(t)||(Qt(this,"force",t.force),Qt(this,"smooth",t.smooth))}}class hs extends ln{maxDistance=0;constructor(t){super(t)}clear(){}init(){}interact(t){for(const e of this.container.particles.filter(e=>this.isEnabled(t,e)))this.#E(t,e)}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&ct("parallax",s.onHover.mode)}loadModeOptions(t,...e){te(t,"parallax",ds,...e)}reset(){}#E(t,e){if(!this.isEnabled(t,e))return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.parallax;if(!s)return;const a=s.force,r=t.mouse.position;if(!r)return;const c=i.canvas.size,l=c.width*o,d=c.height*o,h=s.smooth,u=e.getRadius()/a,p=(r.x-l)*u,g=(r.y-d)*u,{offset:f}=e;f.x+=(p-f.x)/h,f.y+=(g-f.y)/h}}async function us(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalParallax",t=>Promise.resolve(new hs(t)))})}const ps="pause";class gs extends ln{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{if(t!==ps)return;const e=this.container;e.animationStatus?e.pause():e.play()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=(e?.interactivity??i.interactivity)?.events;return!!n&&ct(ps,n.onClick.mode)}reset(){}}async function fs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalPause",t=>Promise.resolve(new gs(t)))})}class ms{default=!0;groups=[];particles;quantity=4;load(t){T(t)||(Qt(this,"default",t.default),void 0!==t.groups&&(this.groups=t.groups.map(t=>t)),this.groups.length||(this.default=!0),Kt(this,"quantity",t.quantity),this.particles=mt(t.particles,t=>pt({},t)))}}const ys="push";class vs extends ln{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=(t,e)=>{if(t!==ys)return;const i=this.container,n=i.actualOptions,s=n.interactivity?.modes.push;if(!s)return;const a=q(s.quantity);if(a<=0)return;const o=lt([void 0,...s.groups]),r=pt(void 0!==o?i.actualOptions.particles.groups[o]:void 0,yt(s.particles));i.particles.push(a,e.mouse.position,r,o)}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&ct(ys,s.onClick.mode)}loadModeOptions(t,...e){te(t,"push",ms,...e)}reset(){}}async function bs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalPush",t=>Promise.resolve(new vs(t)))})}class ws{quantity=2;load(t){T(t)||Kt(this,"quantity",t.quantity)}}const xs="remove";class Ps extends ln{handleClickMode;maxDistance=0;constructor(t){super(t),this.handleClickMode=t=>{const e=this.container,i=e.actualOptions;if(!i.interactivity?.modes.remove||t!==xs)return;const n=q(i.interactivity.modes.remove.quantity);for(let t=0;t<n;t++)e.particles.get(t)?.destroy()}}clear(){}init(){}interact(){}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;return!!s&&n.clicking&&n.inside&&!!n.position&&ct(xs,s.onClick.mode)}loadModeOptions(t,...e){te(t,"remove",ws,...e)}reset(){}}async function Ms(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalRemove",t=>Promise.resolve(new Ps(t)))})}class ks{distance=200;duration=.4;easing="ease-out-quad";factor=100;maxSpeed=50;restore;speed=1;constructor(){this.restore={enable:!1,delay:0,speed:.08,follow:!0}}load(t){T(t)||(Qt(this,"distance",t.distance),Qt(this,"duration",t.duration),Qt(this,"easing",t.easing),Qt(this,"factor",t.factor),Qt(this,"speed",t.speed),Qt(this,"maxSpeed",t.maxSpeed),void 0!==t.restore&&(this.restore.enable=t.restore.enable??this.restore.enable,this.restore.delay=t.restore.delay??this.restore.delay,this.restore.speed=t.restore.speed??this.restore.speed,this.restore.follow=t.restore.follow??this.restore.follow))}}class Ds extends ks{selectors=[];load(t){super.load(t),T(t)||Qt(this,"selectors",t.selectors)}}class Cs extends ks{divs;load(t){super.load(t),T(t)||(this.divs=mt(t.divs,t=>{const e=new Ds;return e.load(t),e}))}}const Os="repulse";class Ss extends ln{handleClickMode;#_;#x;#P;#L;#p;#M;constructor(t,e){super(e),this.#p=t,this.#P=0,this.#L=D.origin,this.#x=new Set,this.#_=D.origin,this.#M=new Map,e.repulse??={particles:[]},this.handleClickMode=(t,i)=>{const n=this.container.actualOptions,s=n.interactivity?.modes.repulse;if(!s||t!==Os)return;e.repulse??={particles:[]};const a=e.repulse;a.clicking=!0,a.count=0;for(const t of e.repulse.particles)this.isEnabled(i,t)&&t.velocity.setTo(t.initialVelocity);a.particles=[],a.finish=!1,setTimeout(()=>{e.destroyed||(a.clicking=!1)},s.duration*r)}}get maxDistance(){return this.#P}clear(){}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.repulse;e&&(this.#P=e.distance,t.retina.repulseModeDistance=e.distance*t.retina.pixelRatio)}interact(t){this.#x.clear();const e=this.container.actualOptions,i=t.status===gn,n=e.interactivity?.events;if(!n)return;const s=n.onHover,a=s.enable,o=s.mode,r=n.onClick,c=r.enable,l=r.mode,d=n.onDiv;i&&a&&ct(Os,o)?this.#A(t):c&&ct(Os,l)?this.#B(t):xn(Os,d,(e,i)=>{this.#F(t,e,i)}),this.#D()}isEnabled(t,e){const i=this.container.actualOptions,n=t.mouse,s=(e?.interactivity??i.interactivity)?.events;if(!s)return!1;const a=s.onDiv,o=s.onHover,r=s.onClick,c=wn(Os,a);if(!(c||o.enable&&n.position||r.enable&&n.clickPosition))return!1;const l=o.mode,d=r.mode;return ct(Os,l)||ct(Os,d)||c}loadModeOptions(t,...e){te(t,"repulse",Cs,...e)}reset(){}#B(t){const e=this.container,i=e.actualOptions.interactivity?.modes.repulse;if(!i)return;const n=e.repulse??{particles:[]};if(n.finish||(n.count??=0,n.count++,n.count===e.particles.count&&(n.finish=!0)),n.clicking){const s=e.retina.repulseModeDistance;if(!s||s<0)return;const a=Math.pow(s/6,3),o=t.mouse.clickPosition;if(void 0===o)return;const r=new Gt(o.x,o.y,a),c=e.particles.grid.query(r,e=>this.isEnabled(t,e));for(const t of c){const{dx:e,dy:s,distance:r}=G(o,t.position),c=r**2,l=-a*i.speed/c;c<=a&&(this.#k(t),n.particles.push(t),this.#_.x=e,this.#_.y=s,this.#_.length=l,t.velocity.setTo(this.#_))}}else if(!1===n.clicking){for(const t of n.particles)t.velocity.setTo(t.initialVelocity);n.particles=[]}}#A(t){const e=this.container,i=t.mouse.position,n=e.retina.repulseModeDistance;!n||n<0||!i||this.#V(t,i,n,new Gt(i.x,i.y,n))}#V(t,e,i,n,s){const a=this.container,o=a.particles.grid.query(n,e=>this.isEnabled(t,e)),r=a.actualOptions.interactivity?.modes.repulse;if(!r)return;const{easing:c,speed:l,factor:d,maxSpeed:h}=r,u=this.#p.getEasing(c),p=(s?.speed??l)*d;for(const t of o){const{dx:n,dy:s,distance:a}=G(t.position,e),o=V(u(1-a/i)*p,0,h);this.#L.x=a?n/a*o:p,this.#L.y=a?s/a*o:p,this.#k(t),t.position.addTo(this.#L)}}#D(){const t=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!t?.enable||!this.#M.size)return;const e=Date.now(),i=t.delay*r,n=Math.max(.001,Math.min(1,t.speed));for(const[s,a]of this.#M){if(this.#x.has(s))continue;if(s.destroyed){this.#M.delete(s);continue}const o=a.target;if(e-a.lastInteractionTime<i)continue;t.follow&&s.options.move.enable&&(o.x+=s.velocity.x,o.y+=s.velocity.y,o.z+=s.velocity.z);const r=o.x-s.position.x,c=o.y-s.position.y,l=o.z-s.position.z;s.position.x+=r*n,s.position.y+=c*n,s.position.z+=l*n,Math.abs(r)<=.5&&Math.abs(c)<=.5&&(s.position.x=o.x,s.position.y=o.y,s.position.z=o.z,this.#M.delete(s))}}#F(t,e,i){const n=this.container,s=n.actualOptions.interactivity?.modes.repulse;if(!s)return;const a=at().querySelectorAll(e);a.length&&a.forEach(e=>{const a=e,r=n.retina.pixelRatio,c={x:(a.offsetLeft+a.offsetWidth*o)*r,y:(a.offsetTop+a.offsetHeight*o)*r},l=a.offsetWidth*o*r,d=i.type===Ji.circle?new Gt(c.x,c.y,l):new Nt(a.offsetLeft*r,a.offsetTop*r,a.offsetWidth*r,a.offsetHeight*r),h=Pn(s.divs,a);this.#V(t,c,l,d,h)})}#k(t){this.#x.add(t);const e=this.container.actualOptions.interactivity?.modes.repulse?.restore;if(!e?.enable)return;const i=Date.now();let n=this.#M.get(t);n||(n={target:t.position.copy(),lastInteractionTime:i},this.#M.set(t,n)),n.lastInteractionTime=i,e.follow&&t.options.move.enable&&(n.target.x+=t.velocity.x,n.target.y+=t.velocity.y,n.target.z+=t.velocity.z)}}async function zs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t);const e=t.pluginManager;e.addInteractor?.("externalRepulse",t=>Promise.resolve(new Ss(e,t)))})}class Is{factor=3;radius=200;load(t){T(t)||(Qt(this,"factor",t.factor),Qt(this,"radius",t.radius))}}class Ts extends ln{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(t,e,i){t.slow.inRange&&!i||(t.slow.factor=1)}init(){const t=this.container,e=t.actualOptions.interactivity?.modes.slow;e&&(this.#P=e.radius,t.retina.slowModeRadius=e.radius*t.retina.pixelRatio)}interact(){}isEnabled(t,e){const i=this.container,n=t.mouse,s=(e?.interactivity??i.actualOptions.interactivity)?.events;return!!s?.onHover.enable&&!!n.position&&ct("slow",s.onHover.mode)}loadModeOptions(t,...e){te(t,"slow",Is,...e)}reset(t,e){e.slow.inRange=!1;const i=this.container,n=i.actualOptions,s=t.mouse.position,a=i.retina.slowModeRadius,o=n.interactivity?.modes.slow;if(!o||!a||a<0||!s)return;const r=X(s,e.getPosition()),c=r/a,l=o.factor,{slow:d}=e;r>a||(d.inRange=!0,d.factor=c/l)}}async function Rs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("externalSlow",t=>Promise.resolve(new Ts(t)))})}const Es=["image","images"],_s=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d.]+%?\))|currentcolor/gi;async function Ls(t){return new Promise(e=>{t.loading=!0;const i=new Image;t.element=i,i.addEventListener("load",()=>{t.loading=!1,e()}),i.addEventListener("error",()=>{t.element=void 0,t.error=!0,t.loading=!1,Tt().error(`Error loading image: ${t.source}`),e()}),i.src=t.source})}async function As(t){if("svg"!==t.type)return void await Ls(t);t.loading=!0;const e=await fetch(t.source);e.ok?t.svgData=await e.text():(Tt().error("Image not found"),t.error=!0),t.loading=!1}function Bs(t,e,i,n,s=!1){const a=function(t,e,i,n=!1){const{svgData:s}=t;if(!s)return"";const a=Ne(e,n,i);if(s.includes("fill"))return s.replaceAll(_s,()=>a);const o=s.indexOf(">");return`${s.substring(0,o)} fill="${a}"${s.substring(o)}`}(t,i,n.opacity?.value??1,s),o={color:i,gif:e.gif,data:{...t,svgData:a},loaded:!1,ratio:e.width/e.height,replaceColor:e.replaceColor,source:e.src};return new Promise(e=>{const i=new Blob([a],{type:"image/svg+xml"}),n=URL.createObjectURL(i),s=new Image;s.addEventListener("load",()=>{o.loaded=!0,o.element=s,e(o),URL.revokeObjectURL(n)});s.addEventListener("error",()=>{(async()=>{URL.revokeObjectURL(n);const i={...t,error:!1,loading:!0};await Ls(i),o.loaded=!0,o.element=i.element,e(o)})()}),s.src=n})}const Fs=[0,4,2,1],Vs=[8,8,4,2];class Us{data;pos;constructor(t){this.pos=0,this.data=new Uint8ClampedArray(t)}getString(t){const e=this.data.slice(this.pos,this.pos+t);return this.pos+=e.length,e.reduce((t,e)=>t+String.fromCharCode(e),"")}nextByte(){return this.data[this.pos++]}nextTwoBytes(){return this.pos+=2,this.data[this.pos-2]+(this.data[this.pos-1]<<8)}readSubBlocks(){let t,e="";do{t=this.data[this.pos++];for(let i=t;--i>=0;e+=String.fromCharCode(this.data[this.pos++]));}while(0!==t);return e}readSubBlocksBin(){let t=this.data[this.pos],e=0;for(let i=0;0!==t;i+=t+1,t=this.data[this.pos+i])e+=t;const i=new Uint8Array(e);t=this.data[this.pos++];for(let e=0;0!==t;t=this.data[this.pos++])for(let n=t;--n>=0;i[e++]=this.data[this.pos++]);return i}skipSubBlocks(){for(const t=1,e=0;this.data[this.pos]!==e;this.pos+=this.data[this.pos]+t);this.pos++}}var Hs,qs;!function(t){t[t.Replace=0]="Replace",t[t.Combine=1]="Combine",t[t.RestoreBackground=2]="RestoreBackground",t[t.RestorePrevious=3]="RestorePrevious",t[t.UndefinedA=4]="UndefinedA",t[t.UndefinedB=5]="UndefinedB",t[t.UndefinedC=6]="UndefinedC",t[t.UndefinedD=7]="UndefinedD"}(Hs||(Hs={})),function(t){t[t.Extension=33]="Extension",t[t.ApplicationExtension=255]="ApplicationExtension",t[t.GraphicsControlExtension=249]="GraphicsControlExtension",t[t.PlainTextExtension=1]="PlainTextExtension",t[t.CommentExtension=254]="CommentExtension",t[t.Image=44]="Image",t[t.EndOfFile=59]="EndOfFile"}(qs||(qs={}));function Ws(t,e){const i=[];for(let n=0;n<e;n++)i.push({r:t.data[t.pos],g:t.data[t.pos+1],b:t.data[t.pos+2]}),t.pos+=3;return i}function $s(t,e,i){const n=e>>>3,s=7&e;return(t[n]+(t[n+1]<<8)+(t[n+2]<<16)&(1<<i)-1<<s)>>>s}async function js(t,e,i,n,s,a,o){switch(t.nextByte()){case qs.EndOfFile:return!0;case qs.Image:await async function(t,e,i,n,s,a){const o=e.frames[n(!0)];o.left=t.nextTwoBytes(),o.top=t.nextTwoBytes(),o.width=t.nextTwoBytes(),o.height=t.nextTwoBytes();const r=t.nextByte(),c=!(128&~r),l=!(64&~r);o.sortFlag=!(32&~r),o.reserved=(24&r)>>>3;const d=1<<1+(7&r);c&&(o.localColorTable=Ws(t,d));const h=t=>{const{r:n,g:a,b:r}=(c?o.localColorTable:e.globalColorTable)[t];return t!==s(null)?{r:n,g:a,b:r,a:255}:{r:n,g:a,b:r,a:i?Math.trunc((n+a+r)/3):0}},u=(()=>{try{return new ImageData(o.width,o.height,a)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new EvalError("GIF frame size is to large");const p=t.nextByte(),g=t.readSubBlocksBin(),f=1<<p;if(l){for(let t=0,e=p+1,i=0,n=[[0]],s=0;s<4;s++)if(Fs[s]<o.height){let a=0,r=0,c=!1;for(;!c;){const l=t;if(t=$s(g,i,e),i+=e+1,t===f){e=p+1,n.length=f+2;for(let t=0;t<n.length;t++)n[t]=t<f?[t]:[]}else{t>=n.length?n.push(n[l].concat(n[l][0])):l!==f&&n.push(n[l].concat(n[t][0]));for(const e of n[t]){const{r:t,g:i,b:n,a:c}=h(e);u.data.set([t,i,n,c],Fs[s]*o.width+Vs[s]*r+a%(4*o.width)),a+=4}n.length===1<<e&&e<12&&e++}a===4*o.width*(r+1)&&(r++,Fs[s]+Vs[s]*r>=o.height&&(c=!0))}}o.image=u,o.bitmap=await createImageBitmap(u)}else{let t=0,e=p+1,i=0,n=-4;const s=[[0]];for(;;){const a=t;if(t=$s(g,i,e),i+=e,t===f){e=p+1,s.length=f+2;for(let t=0;t<s.length;t++)s[t]=t<f?[t]:[]}else{if(t===f+1)break;t>=s.length?s.push(s[a].concat(s[a][0])):a!==f&&s.push(s[a].concat(s[t][0]));for(const e of s[t]){const{r:t,g:i,b:s,a:a}=h(e);n+=4,u.data.set([t,i,s,a],n)}s.length>=1<<e&&e<12&&e++}}o.image=u,o.bitmap=await createImageBitmap(u)}}(t,e,i,n,s,a);break;case qs.Extension:!function(t,e,i,n){switch(t.nextByte()){case qs.GraphicsControlExtension:{const s=e.frames[i(!1)];t.pos++;const a=t.nextByte();s.GCreserved=(224&a)>>>5,s.disposalMethod=(28&a)>>>2,s.userInputDelayFlag=!(2&~a);const o=!(1&~a);s.delayTime=10*t.nextTwoBytes();const r=t.nextByte();o&&n(r),t.pos++;break}case qs.ApplicationExtension:{t.pos++;const i={identifier:t.getString(8),authenticationCode:t.getString(3),data:t.readSubBlocksBin()};e.applicationExtensions.push(i);break}case qs.CommentExtension:e.comments.push([i(!1),t.readSubBlocks()]);break;case qs.PlainTextExtension:if(0===e.globalColorTable.length)throw new EvalError("plain text extension without global color table");t.pos++,e.frames[i(!1)].plainTextData={left:t.nextTwoBytes(),top:t.nextTwoBytes(),width:t.nextTwoBytes(),height:t.nextTwoBytes(),charSize:{width:t.nextTwoBytes(),height:t.nextTwoBytes()},foregroundColor:t.nextByte(),backgroundColor:t.nextByte(),text:t.readSubBlocks()};break;default:t.skipSubBlocks()}}(t,e,n,s);break;default:throw new EvalError("undefined block found")}return!1}async function Gs(t,e){if("gif"===t.type){t.loading=!0;try{t.gifData=await async function(t,e,i,n){n??=!1;const s=await fetch(t);if(!s.ok&&404===s.status)throw new EvalError("file not found");const a=await s.arrayBuffer(),o={width:0,height:0,totalTime:0,colorRes:0,pixelAspectRatio:0,frames:[],sortFlag:!1,globalColorTable:[],backgroundImage:new ImageData(1,1,e),comments:[],applicationExtensions:[]},r=new Us(new Uint8ClampedArray(a));if("GIF89a"!==r.getString(6))throw new Error("not a supported GIF file");o.width=r.nextTwoBytes(),o.height=r.nextTwoBytes();const c=r.nextByte(),l=!(128&~c);o.colorRes=(112&c)>>>4,o.sortFlag=!(8&~c);const d=1<<1+(7&c),h=r.nextByte();o.pixelAspectRatio=r.nextByte(),0!==o.pixelAspectRatio&&(o.pixelAspectRatio=(o.pixelAspectRatio+15)/64),l&&(o.globalColorTable=Ws(r,d));const u=(()=>{try{return new ImageData(o.width,o.height,e)}catch(t){if(t instanceof DOMException&&"IndexSizeError"===t.name)return null;throw t}})();if(null==u)throw new Error("GIF frame size is to large");const{r:p,g:g,b:f}=o.globalColorTable[h];u.data.set(l?[p,g,f,255]:[0,0,0,0]);for(let t=4;t<u.data.length;t*=2)u.data.copyWithin(t,0,t);o.backgroundImage=u;let m=-1,y=!0,v=-1;const b=t=>(t&&(y=!0),m),w=t=>(null!=t&&(v=t),v);try{do{y&&(o.frames.push({left:0,top:0,width:0,height:0,disposalMethod:Hs.Replace,image:new ImageData(1,1,e),plainTextData:null,userInputDelayFlag:!1,delayTime:0,sortFlag:!1,localColorTable:[],reserved:0,GCreserved:0}),m++,v=-1,y=!1)}while(!await js(r,o,n,b,w,e));o.frames.length--;for(const t of o.frames){if(t.userInputDelayFlag&&0===t.delayTime){o.totalTime=1/0;break}o.totalTime+=t.delayTime}return o}catch(t){if(t instanceof EvalError)throw new Error(`error while parsing frame ${m.toString()} "${t.message}"`,{cause:t});throw t}}(t.source,e),t.gifLoopCount=function(t){for(const e of t.applicationExtensions)if(e.identifier+e.authenticationCode==="NETSCAPE2.0")return e.data[1]+(e.data[2]<<8);return Number.NaN}(t.gifData),t.gifLoopCount||(t.gifLoopCount=1/0)}catch{t.error=!0}t.loading=!1}else await Ls(t)}class Ns{#u;#s;constructor(t,e){this.#s=t,this.#u=e}draw(t){const{context:e,radius:i,particle:n,opacity:s}=t,a=n.image,r=a?.element;if(a){if(e.globalAlpha=s,a.gif&&a.gifData)!function(t,e){const{context:i,radius:n,particle:s,delta:a}=t,r=s.image;if(!r?.gifData||!r.gif)return;const l=new OffscreenCanvas(r.gifData.width,r.gifData.height),d=l.getContext("2d",e);if(!d)throw new Error("could not create offscreen canvas context");d.imageSmoothingQuality="low",d.imageSmoothingEnabled=!1,d.clearRect(c.x,c.y,l.width,l.height),s.gifLoopCount??=r.gifLoopCount??0;let h=s.gifFrame??0;const u={x:-r.gifData.width*o,y:-r.gifData.height*o},p=r.gifData.frames[h];if(s.gifTime??=0,p.bitmap){switch(i.scale(n/r.gifData.width,n/r.gifData.height),p.disposalMethod){case Hs.UndefinedA:case Hs.UndefinedB:case Hs.UndefinedC:case Hs.UndefinedD:case Hs.Replace:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height);break;case Hs.Combine:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y);break;case Hs.RestoreBackground:d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height),r.gifData.globalColorTable.length?d.putImageData(r.gifData.backgroundImage,u.x,u.y):d.putImageData(r.gifData.frames[0].image,u.x+p.left,u.y+p.top);break;case Hs.RestorePrevious:{const t=d.getImageData(c.x,c.y,l.width,l.height);d.drawImage(p.bitmap,p.left,p.top),i.drawImage(l,u.x,u.y),d.clearRect(c.x,c.y,l.width,l.height),d.putImageData(t,c.x,c.y)}}if(s.gifTime+=a.value,s.gifTime>p.delayTime){if(s.gifTime-=p.delayTime,++h>=r.gifData.frames.length){if(--s.gifLoopCount<=0)return;h=0,d.clearRect(c.x,c.y,l.width,l.height)}s.gifFrame=h}i.scale(r.gifData.width/n,r.gifData.height/n)}}(t,this.#u.canvas.render.settings);else if(r){const t=a.ratio,n={x:-i,y:-i},s=2*i;e.drawImage(r,n.x,n.y,s,s/t)}e.globalAlpha=1}}getSidesCount(){return 12}async init(t){const e=t.actualOptions;if(!e.preload||!this.#s.loadImage)return;const i=[];for(const n of e.preload)i.push(this.#s.loadImage(t,n));await Promise.all(i)}loadShape(t){const e=this.#u;if(!t.shape||!Es.includes(t.shape))return;const i=t.shapeData;if(!i)return;const n=this.#s.getImages?.(e),s=n?.find(t=>t.name===i.name||t.source===i.src);s||this.#U(e,i).then(()=>{this.loadShape(t)})}particleInit(t,e){if("image"!==e.shape&&"images"!==e.shape)return;const i=this.#s.getImages?.(t),n=e.shapeData;if(!n)return;const s=e.getFillColor(),a=i?.find(t=>t.name===n.name||t.source===n.src);if(!a)return;const o=n.replaceColor;a.loading?setTimeout(()=>{this.particleInit(t,e)}):(async()=>{let i;i=a.svgData&&s?await Bs(a,n,s,e,t.hdr):{color:s,data:a,element:a.element,gif:a.gif,gifData:a.gifData,gifLoopCount:a.gifLoopCount,loaded:!0,ratio:n.width&&n.height?n.width/n.height:a.ratio??1,replaceColor:o,source:n.src},i.ratio||(i.ratio=1);const r={image:i,close:n.close??e.shapeClose};e.image=r.image,e.shapeClose=r.close})()}#U=async(t,e)=>{if(!this.#s.loadImage)throw new Error("Image shape not initialized");await this.#s.loadImage(t,{gif:e.gif,name:e.name,replaceColor:e.replaceColor,src:e.src})}}class Xs{gif=!1;height;name;replaceColor;src="";width;load(t){T(t)||(Qt(this,"gif",t.gif),Qt(this,"height",t.height),Qt(this,"name",t.name),Qt(this,"replaceColor",t.replaceColor),Qt(this,"src",t.src),Qt(this,"width",t.width))}}class Ys{id="image-preloader";#s;constructor(t){this.#s=t}async getPlugin(t){const{ImagePreloaderInstance:e}=await Promise.resolve().then(function(){return fo});return new e(this.#s,t)}loadOptions(t,e,i){if(!i?.preload)return;e.preload??=[];const n=e.preload;for(const t of i.preload){const e=n.find(e=>e.name===t.name||e.src===t.src);if(e)e.load(t);else{const e=new Xs;e.load(t),n.push(e)}}}needsPlugin(){return!0}}async function Qs(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{!function(t){t.getImages??=e=>{t.images??=new Map;let i=t.images.get(e);return i||(i=[],t.images.set(e,i)),i},t.loadImage??=async(e,i)=>{if(!t.getImages)throw new Error("No images collection found");if(!i.name&&!i.src)throw new Error("No image source provided");t.images??=new Map;const n=t.getImages(e);if(!n.some(t=>t.name===i.name||t.source===i.src))try{const s={gif:i.gif,name:i.name??i.src,source:i.src,type:i.src.substring(i.src.length-3),error:!1,loading:!0,replaceColor:i.replaceColor,ratio:i.width&&i.height?i.width/i.height:void 0};let a;n.push(s),t.images.set(e,n),a=i.gif?t=>Gs(t,{colorSpace:"srgb"}):i.replaceColor?As:Ls,await a(s)}catch{throw new Error(`${i.name??i.src} not found`)}}}(t),t.pluginManager.addPlugin(new Ys(t)),t.pluginManager.addShape(Es,e=>Promise.resolve(new Ns(t,e)))})}class Ks extends fe{sync=!1;load(t){T(t)||(super.load(t),Qt(this,"sync",t.sync))}}class Zs extends fe{sync=!1;load(t){T(t)||(super.load(t),Qt(this,"sync",t.sync))}}class Js{count=0;delay=new Ks;duration=new Zs;load(t){T(t)||(Qt(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class ta{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const n=i.delay.sync?1:L(),s=i.duration.sync?1:L();t.life={delay:e.retina.reduceFactor?q(i.delay.value)*n/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?q(i.duration.value)*s/e.retina.reduceFactor*r:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){te(t,"life",Js,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const n=t.life;let s=!1;if(t.spawning){if(n.delayTime+=e.value,!(n.delayTime>=t.life.delay))return;s=!0,t.spawning=!1,n.delayTime=0,n.time=0}if(-1===n.duration)return;if(s?n.time=0:n.time+=e.value,n.time<n.duration)return;if(n.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const a=j(0,i.width),o=j(0,i.width);t.position.x=H(a),t.position.y=H(o),t.spawning=!0,n.delayTime=0,n.time=0,t.reset();const c=t.options.life;c&&(n.delay=q(c.delay.value)*r,n.duration=q(c.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function ea(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new ta(t)))})}class ia{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.shapeData;e.moveTo(-n,0),e.lineTo(n,0),e.lineCap=s?.cap??"butt"}(t)}getSidesCount(){return 1}}async function na(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new ia))})}class sa{distance=200;enable=!1;rotate;constructor(){this.rotate={x:3e3,y:3e3}}load(t){if(!T(t)&&(Kt(this,"distance",t.distance),Qt(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 aa extends dn{#P;constructor(t){super(t),this.#P=0}get maxDistance(){return this.#P}clear(){}init(){}interact(t){if(!t.options.attract?.enable)return;const e=this.container;if(T(t.attractDistance)){const i=q(t.options.attract.distance);i>this.#P&&(this.#P=i),t.attractDistance=i*e.retina.pixelRatio}const i=t.attractDistance,n=t.getPosition(),s=e.particles.grid.queryCircle(n,i);for(const e of s){if(t===e||!e.options.attract?.enable||e.destroyed||e.spawning)continue;const i=e.getPosition(),{dx:s,dy:a}=G(n,i),o=t.options.attract.rotate,r=s/(1e3*o.x),c=a/(1e3*o.y),l=e.size.value/t.size.value,d=1/l;t.velocity.x-=r*l,t.velocity.y-=c*l,e.velocity.x+=r*d,e.velocity.y+=c*d}}isEnabled(t){return t.options.attract?.enable??!1}loadParticlesOptions(t,...e){te(t,"attract",sa,...e)}reset(){}}async function oa(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addInteractor?.("particlesAttract",t=>Promise.resolve(new aa(t)))})}var ra;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(ra||(ra={}));class ca{speed=2;load(t){T(t)||Qt(this,"speed",t.speed)}}class la{enable=!0;retries=0;load(t){T(t)||(Qt(this,"enable",t.enable),Qt(this,"retries",t.retries))}}class da{absorb=new ca;bounce=new De;enable=!1;maxSpeed=50;mode=ra.bounce;overlap=new la;load(t){T(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),Qt(this,"enable",t.enable),Kt(this,"maxSpeed",t.maxSpeed),Qt(this,"mode",t.mode),this.overlap.load(t.overlap))}}function ha(t,e,i,n,s,a){if(!t.options.collisions||!i.options.collisions)return;const o=V(t.options.collisions.absorb.speed*s.factor,0,n);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const ua=t=>{t.options.collisions&&(t.collisionMaxSpeed??=q(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function pa(t,e){const i=t.getMass(),n=e.getMass(),s=t.velocity.length,a=e.velocity.length,o=i*s*s+n*a*a;ft(gt(t),gt(e));const r=t.velocity.length,c=e.velocity.length,l=i*r*r+n*c*c;if(l>1e-6*o){const i=Math.sqrt(o/l);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=c*i)}ua(t),ua(e)}function ga(t,e,i,n){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case ra.absorb:!function(t,e,i,n){const s=t.getRadius(),a=e.getRadius();!s&&a?t.destroy():s&&!a?e.destroy():s&&a&&(s>=a?ha(t,s,e,a,i,n):ha(e,a,t,s,i,n))}(t,e,i,n);break;case ra.bounce:pa(t,e);break;case ra.destroy:!function(t,e){t.unbreakable||e.unbreakable||pa(t,e);const i=t.getRadius(),n=e.getRadius();!i&&n?t.destroy():i&&!n?e.destroy():i&&n&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e)}}class fa extends dn{maxDistance;constructor(t){super(t),this.maxDistance=0}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const n=this.container,s=t.getPosition(),a=t.getRadius(),o=n.particles.grid.queryCircle(s,2*a);for(const e of o){if(t===e||t.id>=e.id||!t.options.collisions?.enable||!e.options.collisions?.enable||t.options.collisions.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const o=e.getPosition(),r=e.getRadius();if(Math.abs(Math.round(s.z)-Math.round(o.z))>a+r)continue;X(s,o)>a+r||ga(t,e,i,n.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){te(t,"collisions",da,...e)}reset(){}}class ma{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return mo});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function ya(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{Mn(t),t.pluginManager.addPlugin(new ma),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new fa(t)))})}class va extends Gt{#H;constructor(t,e,i,n){super(t,e,i),this.#H=n}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#H,{x:n,y:s}=t;return super.contains({x:n-e,y:s})||super.contains({x:n+e,y:s})||super.contains({x:n,y:s-i})||super.contains({x:n,y:s+i})||super.contains({x:n-e,y:s-i})||super.contains({x:n+e,y:s+i})||super.contains({x:n-e,y:s+i})||super.contains({x:n+e,y:s-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#H,n=t.position,s=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of s){const i={x:n.x+e.x,y:n.y+e.y};let s;if(t instanceof Gt)s=new Gt(i.x,i.y,t.radius);else{const e=t;s=new Nt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(s))return!0}return!1}}class ba{blur=5;color=new ae;enable=!1;constructor(){this.color.value="#000"}load(t){T(t)||(Qt(this,"blur",t.blur),this.color=ae.create(this.color,t.color),Qt(this,"enable",t.enable))}}class wa{color;enable=!1;frequency=1;opacity;load(t){T(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),Qt(this,"enable",t.enable),Qt(this,"frequency",t.frequency),Qt(this,"opacity",t.opacity))}}class xa{blink=!1;color=new ae;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new ba;triangles=new wa;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){T(t)||(Qt(this,"id",t.id),Qt(this,"blink",t.blink),this.color=ae.create(this.color,t.color),Qt(this,"consent",t.consent),Qt(this,"distance",t.distance),Qt(this,"enable",t.enable),Qt(this,"frequency",t.frequency),Qt(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),Qt(this,"width",t.width),Qt(this,"warp",t.warp))}}function Pa(t,e,i){const{dx:n,dy:s}=G(t,e),a={x:Math.abs(n),y:Math.abs(s)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class Ma extends dn{#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0}get maxDistance(){return this.#P}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#P&&(this.#P=t.linksDistance);const e=t.getPosition(),i=this.container,n=i.canvas.size;if(e.x<c.x||e.y<c.y||e.x>n.width||e.y>n.height)return;const s=t.options.links,a=s.opacity,o=t.retina.linksDistance??0,r=s.warp,l=r?new va(e.x,e.y,o,n):new Gt(e.x,e.y,o),d=i.particles.grid.query(l);for(const i of d){const l=i.options.links;if(t===i||!l?.enable||s.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const d=i.getPosition();if(d.x<c.x||d.y<c.y||d.x>n.width||d.y>n.height)continue;const h=G(e,d).distance,u=r&&l.warp?Pa(e,d,n):h,p=Math.min(h,u);if(p>o)continue;const g=(1-p/o)*a;this.#q(t),t.links.push({destination:i,opacity:g,color:this.#W(t,i),isWarped:u<h})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){te(t,"links",xa,...e)}reset(){}#W(t,e){const i=this.container,n=t.options.links;if(!n)return;return Ye(t,e,void 0!==n.id?i.particles.linksColors.get(n.id):i.particles.linksColor)}#q(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let n=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);n||(n=Qe(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=n:e.particles.linksColors.set(i.id,n))}}class ka{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return vo});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Da(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Mn(t),e.addPlugin(new ka(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Ma(e,t)))})}const Ca=new Map;function Oa(t,e){const{context:i,radius:n}=t,s=function(t){const e=Ca.get(t);if(e)return e;const i=u/t,n=!!(t%2),s=(-Math.PI+(n?0:i))*o,a=[];for(let e=0;e<t;e++){const t=s+e*i;a[e]={x:Math.cos(t),y:Math.sin(t)}}return Ca.set(t,a),a}(e.count.numerator/e.count.denominator);i.beginPath();for(let t=0;t<s.length;t++){const e=s[t];if(!e)continue;const a=e.x*n,o=e.y*n;t?i.lineTo(a,o):i.moveTo(a,o)}i.closePath()}class Sa{draw(t){const{particle:e,radius:i}=t;Oa(t,this.getSidesData(e,i))}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}}class za extends Sa{getSidesData(t,e){const{sides:i}=t;return{count:{denominator:1,numerator:i},length:2.66*e/(i/3)}}}class Ia extends Sa{getSidesCount(){return 3}getSidesData(t,e){return{count:{denominator:1,numerator:3},length:2.66*e/1}}}async function Ta(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["polygon"],()=>Promise.resolve(new za))})}async function Ra(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["triangle"],()=>Promise.resolve(new Ia))})}async function Ea(t){t.checkVersion("4.2.0"),await Promise.all([Ta(t),Ra(t)])}class _a{decay=0;enable=!1;speed=0;sync=!1;load(t){T(t)||(Qt(this,"enable",t.enable),Kt(this,"speed",t.speed),Kt(this,"decay",t.decay),Qt(this,"sync",t.sync))}}class La extends fe{animation=new _a;direction=t.RotateDirection.clockwise;path=!1;load(t){T(t)||(super.load(t),Qt(this,"direction",t.direction),this.animation.load(t.animation),Qt(this,"path",t.path))}}class Aa{#u;constructor(t){this.#u=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:Q(q(i.value)),min:0,max:u},e.pathRotation=i.path;let n=i.direction;if(n===t.RotateDirection.random){n=Math.floor(2*L())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(n){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const s=i.animation;s.enable&&(e.rotate.decay=1-q(s.decay),e.rotate.velocity=q(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(e.rotate.velocity*=L())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){te(t,"rotate",La,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(xi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function Ba(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Aa(t)))})}class Fa{draw(t){!function(t){const{context:e,radius:i}=t,n=i*Math.SQRT1_2,s=2*n;e.rect(-n,-n,s,s)}(t)}getSidesCount(){return 4}}async function Va(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Fa))})}const Ua=0,Ha=0;class qa{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=i.sides,a=i.starInset??2;e.moveTo(Ua,Ha-n);for(let t=0;t<s;t++)e.rotate(Math.PI/s),e.lineTo(Ua,Ha-n*a),e.rotate(Math.PI/s),e.lineTo(Ua,Ha-n)}(t)}getSidesCount(t){const e=t.shapeData;return Math.round(q(e?.sides??5))}particleInit(t,e){const i=e.shapeData;e.starInset=q(i?.inset??2)}}async function Wa(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["star"],()=>Promise.resolve(new qa))})}async function $a(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([Wi(t),(async t=>{await async function(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new cn(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,kt(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([us(t),zn(t),Fn(t),Gn(t),Zn(t),ss(t),ls(t),fs(t),bs(t),Ms(t),zs(t),Rs(t),oa(t),ya(t),Da(t)])})(t),ji(t),Ki(t),Qs(t),na(t),Ea(t),Va(t),Wa(t),ea(t),_i(t),Ba(t)])})}const ja=globalThis;ja.loadSlim=$a,ja.tsParticles=ni;function Ga(t,e,i){const n=e[i];void 0!==n&&(t[i]=(t[i]??1)*n)}class Na{#$;#j;#G;#N;#X;#u;#Y;#Q;#K;#Z;#J;#tt;#et;#it;#p;#nt;#st;#at={};#ot=[void 0,void 0];#rt={};constructor(t,e,i){this.#p=t,this.#u=e,this.#j=i,this.#Y=null,this.#st=[],this.#nt=[],this.#X=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#Z=[],this.#J=[],this.#tt=[],this.#it=[],this.#et=[]}get settings(){return this.#Q}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(c.x,c.y,this.#j.size.width,this.#j.size.height)})}clear(){let t=!1;for(const e of this.#$)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#st=[],this.#nt=[],this.#X=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#Z=[],this.#J=[],this.#tt=[],this.#it=[],this.#et=[]}draw(t){const e=this.#Y;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const n=t.getFillColor(),s=t.getStrokeColor();let[a,o]=this.#ct(t);if(a??=n,o??=s,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#rt,g=this.#at,f=a?Ne(a,r.hdr,d*h):void 0,m=o?Ne(o,r.hdr,u*h):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=m,this.draw(n=>{for(const i of this.#J)i.drawParticleSetup?.(n,t,e);this.#lt(n,t,i,h,g,p),this.#dt({container:r,context:n,particle:t,delta:e,colorStyles:g,radius:i*l**c.sizeRate,opacity:h,transform:p}),this.#ht(t);for(const i of this.#Z)i.drawParticleCleanup?.(n,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const n of this.#K)this.#ut(i,n,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#it)e.drawSettingsSetup?.(i,t);for(const e of this.#tt)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#N)e.clearDraw?.(i,t);for(const e of this.#et)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#X=[],this.#$=[],this.#G=[],this.#N=[],this.#K=[],this.#J=[],this.#Z=[],this.#tt=[],this.#it=[],this.#et=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#X.push(t),t.canvasClear&&this.#$.push(t),t.canvasPaint&&this.#G.push(t),t.drawParticle&&this.#K.push(t),t.drawParticleSetup&&this.#J.push(t),t.drawParticleCleanup&&this.#Z.push(t),t.draw&&this.#tt.push(t),t.drawSettingsSetup&&this.#it.push(t),t.drawSettingsCleanup&&this.#et.push(t),t.clearDraw&&this.#N.push(t)}initUpdaters(){this.#st=[],this.#nt=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#nt.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#st.push(t)}paint(){let t=!1;for(const e of this.#G)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(c.x,c.y,this.#j.size.width,this.#j.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const n=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,c.x,c.y,this.#j.size.width,this.#j.size.height),i.globalAlpha=n})}setContext(t){this.#Y=t,this.#Y&&(this.#Y.globalCompositeOperation=i)}setContextSettings(t){this.#Q=t}stop(){this.draw(t=>{t.clearRect(c.x,c.y,this.#j.size.width,this.#j.size.height)})}#ht(t){for(const e of this.#nt)e.afterDraw?.(t)}#lt(t,e,i,n,s,a){for(const o of this.#st){if(o.getColorStyles){const{fill:a,stroke:r}=o.getColorStyles(e,t,i,n);a&&(s.fill=a),r&&(s.stroke=r)}if(o.getTransformValues){const t=o.getTransformValues(e);for(const e in t)Ga(a,t,e)}o.beforeDraw?.(e)}}#pt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#gt(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#dt(t){const{container:e,context:i,particle:n,delta:s,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:d}=e,h=n.getPosition(),u=n.getTransformData(c),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.y),a.fill&&(i.fillStyle=a.fill);const g=!!n.fillEnabled,f=n.strokeWidth??0;i.lineWidth=f,a.stroke&&(i.strokeStyle=a.stroke);const m={context:i,particle:n,radius:o,drawRadius:1*o,opacity:r,delta:s,pixelRatio:e.retina.pixelRatio,fill:g,stroke:f>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=n.effect?l.get(n.effect):void 0,v=n.shape?d.get(n.shape):void 0;this.#gt(y,m),this.#ft(v,m),this.#mt(v,m),this.#yt(v,m),this.#pt(y,m),i.resetTransform()}#ut(t,e,i,n){e.drawParticle&&e.drawParticle(t,i,n)}#mt(t,e){if(!t)return;const{context:i,fill:n,particle:s,stroke:a}=e;s.shape&&(i.beginPath(),t.draw(e),s.shapeClose&&i.closePath(),n&&i.fill(),a&&i.stroke())}#yt(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#ft(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#ct(t){let e,i;for(const n of this.#X)if(!e&&n.particleFillColor&&(e=Ve(this.#p,n.particleFillColor(t))),!i&&n.particleStrokeColor&&(i=Ve(this.#p,n.particleStrokeColor(t))),e&&i)break;return this.#ot[0]=e,this.#ot[1]=i,this.#ot}}const Xa=new WeakMap;function Ya(t,e,i=!1){if(!e)return;const n=t.style,s=new Set;for(let t=0;t<n.length;t++){const e=n.item(t);e&&s.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&s.add(i)}for(const t of s){const s=e.getPropertyValue(t);s?n.setProperty(t,s,i?"important":""):n.removeProperty(t)}}class Qa{domElement;render;renderCanvas;size;zoom=1;#u;#vt;#bt;#wt;#p;#xt;#Pt;#Mt;#kt;constructor(t,e){this.#p=t,this.#u=e,this.render=new Na(t,e,this),this.#Mt={height:0,width:0};const i=e.retina.pixelRatio,n=this.#Mt;this.size={height:n.height*i,width:n.width*i},this.#vt=!1,this.#Pt=[],this.#xt="none"}get#Dt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#vt){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#Ct();this.render.destroy(),this.#Pt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#kt?this.#kt:{x:e*o/t,y:i*o/t}}init(){this.#Ot(t=>{t.disconnect()}),this.#bt=rt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#St()}),this.resize(),this.#zt(),this.initBackground(),this.#Ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#It(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const n=i.style,s=Be(this.#p,e.color);n.backgroundColor=s?Ge(s,t.actualOptions.hdr,e.opacity):"",n.backgroundImage=e.image||"",n.backgroundPosition=e.position||"",n.backgroundRepeat=e.repeat||"",n.backgroundSize=e.size||""}initPlugins(){this.#Pt=[];for(const t of this.#u.plugins)t.resize&&this.#Pt.push(t)}loadCanvas(t){this.#vt&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#vt=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Xa.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Xa.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#wt=bt(n.style));const s=this.#Mt,a=this.renderCanvas;n?(s.height=n.offsetHeight,s.width=n.offsetWidth):(s.height=a.height,s.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=s.height*o,a.width=r.width=s.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const n=e.canvas.#Mt,s={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:s.width*a,height:s.height*a};if(s.height===n.height&&s.width===n.width&&o.height===i.height&&o.width===i.width)return!1;const r={...n};n.height=s.height,n.width=s.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:n.width/r.width,height:n.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#xt=t,this.#St())}setZoom(t,e){this.zoom=t,this.#kt=e}stop(){this.#Ot(t=>{t.disconnect()}),this.#bt=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Tt(),e&&await t.refresh()}#Tt(){for(const t of this.#Pt)t.resize?.()}#It(){const t=this.#u.actualOptions.hdr&&ot("(color-gamut: p3)")?.matches&&ot("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#zt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Dt?this.#Rt():this.#Ct();for(const i in e.style){if(!i||!(i in e.style))continue;const n=e.style[i];n&&t.style.setProperty(i,n,"important")}}}#St(){const t=this.domElement;if(!t)return;this.#Ot(t=>{t.disconnect()}),this.#zt(),this.initBackground();const e=this.#xt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#Ct(){const t=this.domElement,e=this.#wt;t&&e&&Ya(t,e,!0)}#Ot(t){this.#bt&&t(this.#bt)}#Rt(){const t=this.domElement;t&&Ya(t,Pt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ka{#u;#Et;#_t;#Lt;constructor(t){this.#u=t,this.#Et={visibilityChange:()=>{this.#At()},resize:()=>{this.#Bt()}}}addListeners(){this.#Ft(!0)}removeListeners(){this.#Ft(!1)}#At(){const t=this.#u;t.actualOptions.pauseOnBlur&&(at().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Bt(){this.#Lt&&(clearTimeout(this.#Lt),this.#Lt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#Lt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)}#Ft(t){const e=this.#Et;this.#Vt(t),Mt(document,s,e.visibilityChange,t,!1)}#Vt(t){const e=this.#Et,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Mt(globalThis,n,e.resize,t);const s=i.canvas.domElement;this.#_t&&!t?(s&&this.#_t.unobserve(s),this.#_t.disconnect(),this.#_t=void 0):!this.#_t&&t&&s&&(this.#_t=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#Bt()}),this.#_t.observe(s))}}function Za(t){if(!ct(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function Ja(t,e){const i=t%e;return i<0?i+e:i}function to(t,e,i,n){const s=Re(i,e,e.actualOptions.particles),a=s.reduceDuplicates;t.effect=yt(s.effect.type,t.id,a),t.shape=yt(s.shape.type,t.id,a);const o=s.effect,r=s.shape;if(n){if(n.effect){const e=n.effect.type;if(e&&e!==t.effect){const i=yt(e,t.id,a);i&&(t.effect=i)}o.load(n.effect)}if(n.shape){const e=n.shape.type;if(e&&e!==t.shape){const i=yt(e,t.id,a);i&&(t.shape=i)}r.load(n.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(L()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(L()*i.length)]}t.effectData=t.effect?function(t,e,i,n){const s=e.options[t];return pt({close:e.close},yt(s,i,n))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,n){const s=e.options[t];return pt({close:e.close},yt(s,i,n))}(t.shape,r,t.id,a):void 0,s.load(n);const c=t.effectData,l=t.shapeData;return c&&s.load(c.particles),l&&s.load(l.particles),t.effectClose=c?.close??s.effect.close,t.shapeClose=l?.close??s.shape.close,s}class eo{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#Ut={fillOpacity:1,opacity:1,strokeOpacity:1};#Ht=k.origin;#qt={sin:0,cos:0};#Wt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0;n?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#$t(this.bubble.color??Ke(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*o}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??q(this.opacity?.value??1),n=this.fillOpacity??1,s=this.strokeOpacity??1;return this.#Ut.fillOpacity=i*n*e,this.#Ut.opacity=i*e,this.#Ut.strokeOpacity=i*s*e,this.#Ut}getPosition(){return this.#Ht.x=this.position.x+this.offset.x,this.#Ht.y=this.position.y+this.offset.y,this.#Ht.z=this.position.z,this.#Ht}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#qt.sin=Math.sin(t),this.#qt.cos=Math.cos(t),this.#qt}getStrokeColor(){return this.#$t(this.bubble.color??Ke(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Wt.a=e.cos*(t.a??l.a),this.#Wt.b=i?e.sin*(t.b??1):t.b??l.b,this.#Wt.c=i?-e.sin*(t.c??1):t.c??l.c,this.#Wt.d=e.cos*(t.d??l.d),this.#Wt}init(e,i,n,s){const a=this.#u;!function(e,i,n){e.id=i,e.group=n,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,s),this.options=to(this,a,this.#p,n),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#jt(i),this.initialVelocity=this.#Gt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,function(t,e){let i,n;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(n=e.shapeDrawers.get(t.shape)),n?.loadShape&&n.loadShape(t);const s=n?.getSidesCount;s&&(t.sides=s(t))}(this,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,n=e.effect?t.effectDrawers.get(e.effect):void 0;n?.particleInit?.(t,e),i?.particleInit?.(t,e)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Nt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Nt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Ja(t,u);return e>=Math.PI*o&&e<3*Math.PI*o}if(this.roll.horizontal){const e=Ja(t+Math.PI*o,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ja(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Xt(t,e){let i=0,n=t?k.create(t.x,t.y,e):void 0;const s=this.#u,a=s.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=s.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(n,this);if(i)return k.create(i.x,i.y,e)}const t=et({size:c,position:n}),l=k.create(t.x,t.y,e);this.#Yt(l,r,o.left??o.default),this.#Yt(l,r,o.right??o.default),this.#Qt(l,r,o.top??o.default),this.#Qt(l,r,o.bottom??o.default);let d=!0;for(const t of s.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,l,i)??!0,!d)break;if(d)return l;i+=1,n=void 0}}#Gt(){const e=this.options.move,i=Z(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const n=Q(q(e.angle.value)),s=Q(q(e.angle.offset)),a={left:s-n*o,right:s+n*o};return e.straight||(i.angle+=H(j(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=L()),i}#Yt(e,i,n){Za({outMode:n,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#Qt(e,i,n){Za({outMode:n,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#Kt(e,i){const n=this.getRadius(),s=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+n<s.height:a.y-n<s.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-n>0:a.x+n>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+n<s.width:a.x-n<s.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-n>0:a.y+n>0,reason:"default"}:{inside:a.x>=-n&&a.y>=-n&&a.y<=s.height+n&&a.x<=s.width+n,reason:"default"}}#Zt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Nt(t){const e=this.#Kt(t.direction,t.outMode),i=this.#u,n=this.shape?i.shapeDrawers.get(this.shape):void 0,s=this.effect?i.effectDrawers.get(this.effect):void 0,a=n?.isInsideCanvas,o=s?.isInsideCanvas;if(!a&&!o)return e;const r=this.#Zt(t.direction,t.outMode),c=a?this.#Jt(a(r),"shape"):void 0,l=o?this.#Jt(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e}#$t(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ii(t,this.roll.alter.type,this.roll.alter.value):t:t}#jt(e){const i=this.#u,n=Math.floor(q(this.options.zIndex.value)),s=this.#Xt(e,V(n,0,i.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...vt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=K(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=D.origin}#Jt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class io{#te;#ee=new Map;#ie=[];#ne;#se;#ae=[];#oe;constructor(t){this.#te=t,this.#ne=0,this.#oe=0}clear(){this.#ee.clear();const t=this.#se;t&&(this.#te=t),this.#se=void 0}insert(t){const{x:e,y:i}=t.getPosition(),n=this.#re(e,i);this.#ee.has(n)||this.#ee.set(n,[]),this.#ee.get(n)?.push(t)}query(t,e,i=[]){const n=this.#ce(t);if(!n)return i;const s=Math.floor(n.minX/this.#te),a=Math.floor(n.maxX/this.#te),o=Math.floor(n.minY/this.#te),r=Math.floor(n.maxY/this.#te);for(let n=s;n<=a;n++)for(let s=o;s<=r;s++){const a=`${n}_${s}`,o=this.#ee.get(a);if(o)for(const n of o)e&&!e(n)||t.contains(n.getPosition())&&i.push(n)}return i}queryCircle(t,e,i,n=[]){const s=this.#le(t.x,t.y,e),a=this.query(s,i,n);return this.#de(),a}queryRectangle(t,e,i,n=[]){const s=this.#he(t.x,t.y,e.width,e.height),a=this.query(s,i,n);return this.#de(),a}setCellSize(t){this.#se=t}#le(t,e,i){return(this.#ie[this.#ne++]??=new Gt(t,e,i)).reset(t,e,i)}#he(t,e,i,n){return(this.#ae[this.#oe++]??=new Nt(t,e,i,n)).reset(t,e,i,n)}#re(t,e){return`${Math.floor(t/this.#te)}_${Math.floor(e/this.#te)}`}#ce(t){if(t instanceof Gt){const e=t.radius,{x:i,y:n}=t.position;return{minX:i-e,maxX:i+e,minY:n-e,maxY:n+e}}if(t instanceof Nt){const{x:e,y:i}=t.position,{width:n,height:s}=t.size;return{minX:e,maxX:e+n,minY:i,maxY:i+s}}return null}#de(){this.#ne=0,this.#oe=0}}class no{checkParticlePositionPlugins;grid;#ue;#u;#pe;#ge;#fe;#me;#ye;#ve;#p;#be;#we;#xe;#Pe;#Me;#ke;constructor(t,e){this.#p=t,this.#u=e,this.#fe=0,this.#ue=[],this.#be=[],this.#ge=0,this.#pe=new Map,this.#me=new Map,this.#ke=this.#De(this.#u.zLayers),this.grid=new io(100),this.checkParticlePositionPlugins=[],this.#ye=[],this.#ve=[],this.#xe=[],this.#we=[],this.#Me=[]}get count(){return this.#ue.length}addParticle(e,i,n,s){const a=this.#u.actualOptions.particles.number.limit.mode,o=void 0===n?this.#ge:this.#pe.get(n)??this.#ge,r=this.count;if(o>0)switch(a){case t.LimitMode.delete:{const t=r+1-o;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=o)return}try{const a=this.#be.pop()??new eo(this.#p,this.#u);a.init(this.#fe,e,i,n);let o=!0;return s&&(o=s(a)),o?(this.#ue.push(a),this.#Ce(a),this.#fe++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this.#be.push(a)}catch(t){Tt().warning(`error adding particle: ${t}`)}}clear(){this.#ue=[],this.#me.clear(),this.#Oe(this.#u.zLayers)}destroy(){this.#ue=[],this.#be.length=0,this.#me.clear(),this.#ke=[],this.checkParticlePositionPlugins=[],this.#ye=[],this.#ve=[],this.#xe=[],this.#we=[],this.#Me=[]}drawParticles(t){for(let e=this.#ke.length-1;e>=0;e--){const i=this.#ke[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#ue.filter(t)}find(t){return this.#ue.find(t)}get(t){return this.#ue[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Me=[],this.#ve=[],this.#xe=[],this.#ye=[],this.#we=[],this.#me.clear(),this.#Oe(t.zLayers),this.grid=new io(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Me.push(e),e.particleUpdate&&this.#ve.push(e),e.postUpdate&&this.#xe.push(e),e.particleReset&&this.#ye.push(e),e.postParticleUpdate&&this.#we.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const n=i[e];if(n)for(let i=this.count,s=0;s<n.number.value&&i<t.number.value;i++,s++)this.addParticle(void 0,n,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,n){for(let s=0;s<t;s++)this.addParticle(e,i,n)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#ue.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,n){if(t<0||t>this.count)return;let s=0;for(let a=t;s<e&&a<this.count;a++)this.#Se(a,i,n)&&(a--,s++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const n=e[t];if(!n)continue;const s=Re(this.#p,this.#u,n);this.#ze(s,i,t)}this.#ze(t.particles,i)}setResizeFactor(t){this.#Pe=t}update(t){this.grid.clear();for(const e of this.#Me)e.update?.(t);const e=this.#Ie(t);for(const e of this.#xe)e.postUpdate?.(t);if(this.#Te(t,e),e.size)for(const t of e)this.remove(t);this.#Pe=void 0}#Re(...t){this.#be.push(...t)}#ze(t,e,i,n){const s=t.number;if(!s.density.enable)return void(void 0===i?this.#ge=s.limit.value:(n?.number.limit.value??s.limit.value)&&this.#pe.set(i,n?.number.limit.value??s.limit.value));const a=this.#Ee(s.density),o=s.value,r=s.limit.value>0?s.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ge=s.limit.value*a:this.#pe.set(i,s.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)}#De(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#_e(t){const e=this.#ke.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Ee(t){const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,n=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*n**2):1}#Ce(t){const e=this.#_e(t.position.z),i=this.#ke[e];i&&(i.push(t),this.#me.set(t.id,e))}#Se(e,i,n){const s=this.#ue[e];return!!s&&(s.group===i&&(this.#ue.splice(e,1),this.#Le(s),s.destroy(n),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:s}),this.#Re(s),!0))}#Le(t){const e=this.#me.get(t.id)??this.#_e(t.position.z),i=this.#ke[e];if(!i)return void this.#me.delete(t.id);const n=i.findIndex(e=>e.id===t.id);n>=0&&i.splice(n,1),this.#me.delete(t.id)}#Oe(t){const e=Math.max(Math.floor(t),1);if(this.#ke.length===e)for(const t of this.#ke)t.length=0;else this.#ke=this.#De(e)}#Ae(t){const e=this.#_e(t.position.z),i=this.#me.get(t.id);if(void 0===i)return void this.#Ce(t);if(i===e)return;const n=this.#ke[i];if(n){const e=n.findIndex(e=>e.id===t.id);e>=0&&n.splice(e,1)}const s=this.#ke[e];if(s){if(s.push(t),s.length>=2){const e=s[s.length-2];e&&t.id<e.id&&s.sort((t,e)=>t.id-e.id)}this.#me.set(t.id,e)}else this.#me.set(t.id,e)}#Ie(t){const e=new Set,i=this.#Pe;for(const n of this.#ue){i&&!n.ignoresResizeRatio&&(n.position.x*=i.width,n.position.y*=i.height,n.initialPosition.x*=i.width,n.initialPosition.y*=i.height),n.ignoresResizeRatio=!1;for(const t of this.#ye)t.particleReset?.(n);for(const e of this.#ve){if(n.destroyed)break;e.particleUpdate?.(n,t)}n.destroyed?e.add(n):this.grid.insert(n)}return e}#Te(t,e){for(const i of this.#ue)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#we)e.postParticleUpdate?.(i,t);this.#Ae(i)}}}class so{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,n=t.canvas,s=n.domElement;s&&(n.size.width=s.offsetWidth*i,n.size.height=s.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,n=e.move,s=n.distance,a=t.retina;a.maxSpeed=q(n.gravity.maxSpeed)*i,a.moveDrift=q(n.drift)*i,a.moveSpeed=q(n.speed)*i;const o=a.maxDistance;o.horizontal=void 0===s.horizontal?void 0:s.horizontal*i,o.vertical=void 0===s.vertical?void 0:s.vertical*i}}function ao(t){return!t.destroyed}function oo(t,e,...i){const n=new Ee(t,e);return Yt(n,...i),n}var ro=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#Be;#Fe;#Ve={value:0,factor:0};#Ue;#He;#qe;#We;#$e;#je;#Ge;#Ne;#Xe;#Ye;#Qe;#p;#Ke;#Ze;constructor(e){const{dispatchCallback:i,pluginManager:n,id:s,onDestroy:a,sourceOptions:o}=e;this.#p=n,this.#Ue=i,this.#Xe=a,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Ke=!1,this.#Be=0,this.#qe=0,this.#Ne=0,this.#$e=!0,this.started=!1,this.destroyed=!1,this.#Qe=!0,this.#Ge=0,this.zLayers=100,this.pageHidden=!1,this.#Ze=o,this.#je=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new so(this),this.canvas=new Qa(this.#p,this),this.particles=new no(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ye=oo(this.#p,this),this.actualOptions=oo(this.#p,this),this.#We=new Ka(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Qe&&!this.pageHidden&&ao(this)}get options(){return this.#Ye}get sourceOptions(){return this.#Ze}addLifeTime(t){this.#Ne+=t}alive(){return!this.#qe||this.#Ne<=this.#qe}destroy(e=!0){if(ao(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Xe(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Ue(t,{container:this,data:e})}draw(t){if(!ao(this))return;let e=t;this.#He=B(t=>{e&&(this.#Ge=void 0,e=!1),this.#Je(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const n=await i.export(t,e);if(n.supported)return n.blob}Tt().error(`Export plugin with type ${t} not found`)}async init(){if(!ao(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#Ye=oo(this.#p,this,this.#je,this.sourceOptions),this.actualOptions=oo(this.#p,this,this.#Ye),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:n,fpsLimit:s,hdr:a,smooth:o,zLayers:c}=this.actualOptions;this.hdr=a,this.zLayers=c,this.#qe=q(n)*r,this.#Be=q(i)*r,this.#Ne=0,this.fpsLimit=s>0?s:120,this.#Ke=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(ao(this)&&(void 0!==this.#He&&(F(this.#He),this.#He=void 0),!this.#Qe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Qe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!ao(this))return;const i=this.#Qe||e;if(!this.#$e||this.actualOptions.autoPlay){if(this.#Qe&&(this.#Qe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#$e=!1}async refresh(){if(ao(this))return this.stop(),this.start()}async reset(t){if(ao(this))return this.#je=t,this.#Ze=t,this.#Ye=oo(this.#p,this,this.#je,this.sourceOptions),this.actualOptions=oo(this.#p,this,this.#Ye),this.refresh()}async start(){ao(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#We.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Fe=setTimeout(()=>{i()},this.#Be)}))}stop(){if(ao(this)&&this.started){this.#Fe&&(clearTimeout(this.#Fe),this.#Fe=void 0),this.#$e=!0,this.started=!1,this.#We.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Ze=this.#Ye,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Je(t){try{if(!this.#Ke&&void 0!==this.#Ge&&t<this.#Ge+r/this.fpsLimit)return void this.draw(!1);if(this.#Ge??=t,function(t,e,i=60,n=!1){t.value=e,t.factor=n?60/i:60*e/r}(this.#Ve,t-this.#Ge,this.fpsLimit,this.#Ke),this.addLifeTime(this.#Ve.value),this.#Ge=t,this.#Ve.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ve),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Tt().error("error in animation loop",t)}}}});var co=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#ti;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#ti&&(t.globalCompositeOperation=this.#ti)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#ti=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function lo(t,e,i,n,s,a,o){!function(t,e){const i=t.options,n=i.move.path;if(!n.enable)return;const s=t.pathDelay??0;if(t.lastPathTime<=s)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);n.clamp&&(t.velocity.x=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=s}(t,o);const r=t.gravity,c=r?.enable&&r.inverse?-1:1;s&&i&&(t.velocity.x+=s*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const d=t.velocity.mult(i);r?.enable&&n>0&&(!r.inverse&&d.y>=0&&d.y>=n||r.inverse&&d.y<=0&&d.y<=-n)&&(d.y=c*n,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var ho=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,n=i.gravity,s=i.path;if(e.moveDecay=1-q(i.decay),e.pathDelay=q(s.delay.value)*r,s.generator){let t=this.pathGenerators.get(s.generator);t||(t=this.availablePathGenerators.get(s.generator),t&&(this.pathGenerators.set(s.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:n.enable,acceleration:q(n.acceleration),inverse:n.inverse},function(e,i){const n=i.options.move.spin;if(!n.enable)return;const s=n.position??{x:50,y:50},a={x:.01*s.x*e.canvas.size.width,y:.01*s.y*e.canvas.size.height},o=X(i.getPosition(),a),r=q(n.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:L()*u,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const n=e.options.move;if(!n.enable)return;const s=this.#u,a=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=s.retina.reduceFactor,c=e.retina.moveSpeed,l=e.retina.moveDrift,d=e.size.max,h=c*(n.size?e.getRadius()/d:1)*a*(i.factor||1)*o,u=e.retina.maxSpeed;n.spin.enable?function(e,i,n,s){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,r={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*s,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*s,i.spin.radius+=i.spin.acceleration*s;const c=Math.max(e.canvas.size.width,e.canvas.size.height),l=c*o;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*n*(1-i.spin.radius/c)}(s,e,h,r):lo(e,n,h,u,l,r,i),function(t){const e=t.initialPosition,{dx:i,dy:n}=G(e,t.position),s=Math.abs(i),a=Math.abs(n),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&s>=c||l&&a>=l)&&!t.misplaced)t.misplaced=!!c&&s>c||!!l&&a>l,c&&(t.velocity.x=t.velocity.y*o-t.velocity.x),l&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!c||s<c)&&(!l||a<l)&&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*=-L()),l&&(i.y<e.y&&n.y<0||i.y>e.y&&n.y>0)&&(n.y*=-L())}}(e)}preInit(){return this.#ei()}redrawInit(){return this.#ei()}update(){for(const t of this.pathGenerators.values())t.update()}async#ei(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class uo{#ii=!0;#ni;#u;#Et;#si;#ai;constructor(t,e){this.#u=t,this.#ni=[],this.#si=e,this.#ai=new Map,this.#Et={mouseDown:()=>{this.#oi()},mouseLeave:()=>{this.#ri()},mouseMove:t=>{this.#ci(t)},mouseUp:t=>{this.#li(t)},touchStart:t=>{this.#di(t)},touchMove:t=>{this.#ci(t)},touchEnd:t=>{this.#hi(t)},touchCancel:t=>{this.#hi(t)},touchEndClick:t=>{this.#ui(t)},visibilityChange:()=>{this.#At()}}}addListeners(){this.#Ft(!0)}init(){this.#ni.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#ni.push(t)}removeListeners(){this.#Ft(!1)}#pi(t){const e=this.#u,i=this.#si,n=e.actualOptions;if(this.#ii){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const s=n.interactivity?.events.onClick;if(!s?.mode)return;mt(s.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#ri()},500)}#At(){this.#ri()}#gi(t){const e=this.#Et,i=this.#u,n=this.#si,s=i.actualOptions,a=n.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||s.interactivity?.events.onHover.enable||s.interactivity?.events.onClick.enable)&&(Mt(a,gn,e.mouseMove,t),Mt(a,fn,e.touchStart,t),Mt(a,yn,e.touchMove,t),t?s.interactivity?.events.onClick.enable?(Mt(a,mn,e.touchEndClick,t),Mt(a,un,e.mouseUp,t),Mt(a,hn,e.mouseDown,t)):Mt(a,mn,e.touchEnd,t):(Mt(a,mn,e.touchEndClick,t),Mt(a,un,e.mouseUp,t),Mt(a,hn,e.mouseDown,t),Mt(a,mn,e.touchEnd,t)),Mt(a,pn,e.mouseLeave,t),Mt(a,vn,e.touchCancel,t))}#Ft(t){const e=this.#Et,i=this.#u,n=this.#si,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===tn.window?n.interactivityData.element=at():o===tn.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this.#gi(t),Mt(document,s,e.visibilityChange,t,!1)}#oi(){const{interactivityData:t}=this.#si,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#li(t){const e=this.#u,i=this.#si,n=e.actualOptions,{mouse:s}=i.interactivityData;s.inside=!0;let a=!1;const o=s.position;if(o&&n.interactivity?.events.onClick.enable){for(const t of this.#ni)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#pi(t),s.clicking=!1}}#ri(){const{interactivityData:t}=this.#si,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=pn,e.inside=!1,e.clicking=!1}#ci(t){const e=this.#u,i=this.#si,n=e.actualOptions,s=i.interactivityData,a=e.canvas.domElement;if(!s.element)return;let o;if(s.mouse.inside=!0,t.type.startsWith("pointer")){this.#ii=!0;const e=t;if(s.element===at()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(n.interactivity?.detectsOn===tn.parent){const t=e.target,i=e.currentTarget;if(a){const n=t.getBoundingClientRect(),s=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*n.left-(s.left+r.left),y:e.offsetY+2*n.top-(s.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#ii="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],n=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-n.left,y:i.clientY-n.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),s.mouse.position=o,s.status=gn}#hi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ai.delete(t.identifier);this.#ri()}#ui(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ai.delete(t.identifier);this.#li(t)}#di(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#ai.set(t.identifier,performance.now());this.#ci(t)}}class po{interactivityData;#fi;#u;#We;#mi;#yi;#vi;#bi;#p;constructor(t,e){this.#u=e,this.#p=t,this.#yi=[],this.#mi=[],this.#bi=[],this.#fi=new Map,this.#We=new uo(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#vi=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#wi(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const n=i.element;if(!n)return;const s=(i,n,s)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:n.x*a,y:n.y*a},r=e.particles.grid.queryCircle(o,s*a);t(i,r)};let a=!1,o=!1;this.#fi.set("click",t=>{if(e.destroyed)return;const i=t,n={x:i.offsetX,y:i.offsetY};s(t,n,1)}),this.#fi.set(fn,()=>{e.destroyed||(a=!0,o=!1)}),this.#fi.set(yn,()=>{e.destroyed||(o=!0)}),this.#fi.set(mn,t=>{if(!e.destroyed){if(a&&!o){const i=t,n=i.touches[i.touches.length-1];if(!n)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:n.clientX-(o?o.left:0),y:n.clientY-(o?o.top:0)};s(t,r,Math.max(n.radiusX,n.radiusY))}a=!1,o=!1}}),this.#fi.set(vn,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#fi)n.addEventListener(t,e)}addListeners(){this.#We.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#fi)e.element?.removeEventListener(t,i);this.#fi.clear()}}externalInteract(t){for(const e of this.#mi){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#mi)i.handleClickMode?.(t,e)}init(){this.#We.init();for(const t of this.#yi){switch(t.type){case en.external:this.#mi.push(t);break;case en.particles:this.#bi.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#yi=t,this.#mi=[],this.#bi=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#mi)i.clear(t,e);for(const n of this.#bi)n.isEnabled(t,i)&&n.interact(t,i,e)}removeListeners(){this.#We.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#mi)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#bi)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#vi&&this.#vi.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#vi&&this.#vi.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#yi)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#wi(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var go=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new po(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new rn(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});var fo=Object.freeze({__proto__:null,ImagePreloaderInstance:class{#u;#s;constructor(t,e){this.#s=t,this.#u=e}destroy(){this.#s.images?.delete(this.#u)}}});var mo=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#xi(t,e,i)}#xi(t,e,i){const n=t.options.collisions;if(!n?.enable)return!1;const s=n.overlap;if(s.enable)return!1;const a=s.retries;if(a>=0&&i>a)throw new Error("Particle is overlapping and can't be placed");return!!this.#u.particles.find(i=>X(e,i.position)<t.getRadius()+i.getRadius())}}});function yo(t,e){const i=(n=t.map(t=>t.id),[...n].sort((t,e)=>t-e).join("_"));var n;let s=e.get(i);return void 0===s&&(s=L(),e.set(i,s)),s}var vo=Object.freeze({__proto__:null,LinkInstance:class{#Pi=new Map;#u;#Mi;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Mi={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:n}=e;if(!i?.length||!n.links)return;const s=n.links,a=e.retina.linksWidth??0,r=e.getPosition(),l=e.options.twinkle?.links,d=s.triangles.enable,h=d?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,m=!1;const y=()=>{m&&(t.stroke(),m=!1)};for(const u of i){if(s.frequency<1&&this.#ki(e,u.destination)>s.frequency)continue;const i=u.destination.getPosition();if(d&&!u.isWarped&&h&&(y(),this.#Di(n,e,u,h,r,i,t)),u.opacity<=0||a<=0)continue;if(!s.enable)continue;let v=u.opacity,b=u.color;const w=l?.enable&&L()<l.frequency?Be(this.#p,l.color):void 0;if(l&&w&&(b=w,v=q(l.opacity)),!b){const t=void 0!==s.id?this.#u.particles.linksColors.get(s.id):this.#u.particles.linksColor;b=Ye(e,u.destination,t)}if(!b)continue;const x=this.#Ci(b);if(x===p&&a===g&&v===f||(y(),t.strokeStyle=x,t.lineWidth=a,t.globalAlpha=v,p=x,g=a,f=v,t.beginPath(),m=!0),u.isWarped){const e=this.#u.canvas.size,n=i.x-r.x,s=i.y-r.y;let a=c.x,l=c.y;Math.abs(n)>e.width*o&&(a=n>0?-e.width:e.width),Math.abs(s)>e.height*o&&(l=s>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+l),t.moveTo(r.x-a,r.y-l),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}y(),t.globalAlpha=u}init(){return this.#Mi.links.clear(),this.#Mi.triangles.clear(),this.#Pi.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Di(t,e,i,n,s,a,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const d=c.links;if(d?.length)for(const h of d){if(h.isWarped||this.#ki(c,h.destination)>c.options.links.frequency||!n.has(h.destination.id))continue;const d=h.destination;if(this.#Oi(e,c,d)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+h.opacity)*o,p=Be(this.#p,l.color)??i.color;if(!p||u<=0)continue;const g=d.getPosition();r.save(),r.fillStyle=this.#Ci(p),r.globalAlpha=u,r.beginPath(),r.moveTo(s.x,s.y),r.lineTo(a.x,a.y),r.lineTo(g.x,g.y),r.closePath(),r.fill(),r.restore()}}#Ci(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#Pi.get(e);return i||(i=Ge(t,this.#u.hdr),this.#Pi.set(e,i)),i}#ki(t,e){return yo([t,e],this.#Mi.links)}#Oi(t,e,i){return yo([t,e,i],this.#Mi.triangles)}}});t.AnimatableColor=oe,t.AnimationOptions=ee,t.AnimationValueWithRandom=me,t.Background=re,t.BaseRange=jt,t.Circle=Gt,t.ColorAnimation=ne,t.Fill=he,t.FullScreen=ce,t.HslAnimation=se,t.Move=xe,t.MoveAngle=ue,t.MoveCenter=pe,t.MoveGravity=ge,t.MovePath=ve,t.OptionLoader=Xt,t.Options=Ee,t.OptionsColor=ae,t.OutModes=be,t.Paint=Me,t.ParticlesBounce=De,t.ParticlesBounceFactor=ke,t.ParticlesDensity=Ce,t.ParticlesNumber=Se,t.ParticlesNumberLimit=Oe,t.ParticlesOptions=Te,t.RangedAnimationOptions=ie,t.RangedAnimationValueWithRandom=ye,t.Rectangle=Nt,t.ResizeEvent=le,t.Shape=ze,t.Spin=we,t.Stroke=Pe,t.ValueWithRandom=fe,t.Vector=D,t.Vector3d=k,t.ZIndex=Ie,t.alterHsl=ii,t.animate=B,t.areBoundsInside=ht,t.calcExactPositionOrRandomFromSize=et,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/a,y:t.position.y*t.size.height/a}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?q(t.position.x):void 0,y:void 0!==t.position?.y?q(t.position.y):void 0};return tt({size:t.size,position:e})},t.calculateBounds=ut,t.cancelAnimation=F,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=Y,t.circleBounce=ft,t.circleBounceDataFromParticle=gt,t.clamp=V,t.cloneStyle=bt,t.collisionVelocity=J,t.colorMix=Xe,t.colorToRgb=Fe,t.countOffset=1,t.decayOffset=1,t.deepExtend=pt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=l,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=Q,t.deleteCount=1,t.double=2,t.doublePI=u,t.empty=0,t.executeOnSingleOrMultiple=mt,t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=X,t.getDistanceSq=N,t.getDistances=G,t.getFullScreenStyle=Pt,t.getHslAnimationFromHsl=Ze,t.getHslFromAnimation=Ke,t.getItemMapFromInitializer=Dt,t.getItemsFromInitializer=kt,t.getLinkColor=Ye,t.getLinkRandomColor=Qe,t.getLogger=Tt,t.getParticleBaseVelocity=Z,t.getParticleDirectionAngle=K,t.getPosition=vt,t.getRandom=L,t.getRandomFn=function(){return E},t.getRandomInRange=A,t.getRandomRgbColor=je,t.getRangeMax=$,t.getRangeMin=W,t.getRangeValue=q,t.getStyleFromHsl=Ne,t.getStyleFromRgb=Ge,t.hMax=y,t.hMin=0,t.hPhase=60,t.half=o,t.hslToRgb=We,t.hslaToRgba=$e,t.identity=1,t.inverseFactorNumerator=1,t.isArray=I,t.isBoolean=C,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ct,t.isNull=T,t.isNumber=S,t.isObject=z,t.isPointInside=dt,t.isString=O,t.itemFromArray=lt,t.itemFromSingleOrMultiple=yt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){void 0!==i&&(t[e]=pt(t[e]??{},i))},t.loadLazyProperty=Jt,t.loadMinIndex=0,t.loadNestedProperty=Zt,t.loadOptionProperty=te,t.loadOptions=Yt,t.loadParticlesOptions=Re,t.loadProperty=Qt,t.loadRandomFactor=1e4,t.loadRangeProperty=Kt,t.loadSlim=$a,t.manageListener=Mt,t.maxNits=400,t.midColorValue=h,t.millisecondsToSeconds=r,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=c,t.parseAlpha=it,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=d,t.randomInRangeValue=H,t.rangeColorToHsl=Ve,t.rangeColorToRgb=Be,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=n,t.rgbMax=m,t.rgbToHsl=Ue,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=at,t.safeMatchMedia=ot,t.safeMutationObserver=rt,t.setAnimationFunctions=function(t,e){_.nextFrame=t,_.cancel=e},t.setLogger=function(t){t.debug&&(It.debug=zt(t.debug)),t.error&&(It.error=zt(t.error)),t.info&&(It.info=zt(t.info)),t.log&&(It.log=zt(t.log)),t.trace&&(It.trace=zt(t.trace)),t.verbose&&(It.verbose=zt(t.verbose)),t.warning&&(It.warning=zt(t.warning))},t.setRandom=function(t=Math.random){E=t},t.setRangeValue=j,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Ae(t,e)?.a},t.stringToRgb=He,t.threeQuarter=x,t.triple=3,t.tryCountIncrement=1,t.tsParticles=ni,t.updateColor=ei,t.updateColorValue=ti,t.visibilityChangeEvent=s,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadRangeProperty,loadSlim:(globalThis.__tsParticlesInternals.bundles.slim||{}).loadSlim,tsParticles:(globalThis.__tsParticlesInternals.bundles.slim||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.slim||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|