@tsparticles/particles 4.0.0-beta.12

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.
Files changed (51) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +112 -0
  3. package/browser/IParticlesOptions.js +1 -0
  4. package/browser/ParticlesInstance.js +15 -0
  5. package/browser/browser.js +5 -0
  6. package/browser/bundle.js +6 -0
  7. package/browser/index.js +1 -0
  8. package/browser/index.lazy.js +1 -0
  9. package/browser/package.json +1 -0
  10. package/browser/particles.js +53 -0
  11. package/browser/particles.lazy.js +54 -0
  12. package/browser/types.js +1 -0
  13. package/browser/utils.js +55 -0
  14. package/cjs/IParticlesOptions.js +1 -0
  15. package/cjs/ParticlesInstance.js +15 -0
  16. package/cjs/browser.js +5 -0
  17. package/cjs/bundle.js +6 -0
  18. package/cjs/index.js +1 -0
  19. package/cjs/index.lazy.js +1 -0
  20. package/cjs/package.json +1 -0
  21. package/cjs/particles.js +53 -0
  22. package/cjs/particles.lazy.js +54 -0
  23. package/cjs/types.js +1 -0
  24. package/cjs/utils.js +55 -0
  25. package/esm/IParticlesOptions.js +1 -0
  26. package/esm/ParticlesInstance.js +15 -0
  27. package/esm/browser.js +5 -0
  28. package/esm/bundle.js +6 -0
  29. package/esm/index.js +1 -0
  30. package/esm/index.lazy.js +1 -0
  31. package/esm/package.json +1 -0
  32. package/esm/particles.js +53 -0
  33. package/esm/particles.lazy.js +54 -0
  34. package/esm/types.js +1 -0
  35. package/esm/utils.js +55 -0
  36. package/package.json +53 -0
  37. package/report.html +4950 -0
  38. package/tsparticles.particles.bundle.js +7819 -0
  39. package/tsparticles.particles.bundle.min.js +1 -0
  40. package/tsparticles.particles.js +145 -0
  41. package/tsparticles.particles.min.js +1 -0
  42. package/types/IParticlesOptions.d.ts +13 -0
  43. package/types/ParticlesInstance.d.ts +8 -0
  44. package/types/browser.d.ts +1 -0
  45. package/types/bundle.d.ts +3 -0
  46. package/types/index.d.ts +4 -0
  47. package/types/index.lazy.d.ts +4 -0
  48. package/types/particles.d.ts +17 -0
  49. package/types/particles.lazy.d.ts +17 -0
  50. package/types/types.d.ts +6 -0
  51. package/types/utils.d.ts +4 -0
@@ -0,0 +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.particles=t.__tsParticlesInternals.bundles.particles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",a=100,o=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,_=360,v=100,m=100,b=.25,w=.75;var P;function x(t){return"z"in t?t.z:l.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 M{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return M.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this._updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this._updateFromAngle(this.angle,t)}static clone(t){return M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??l.y,i??l.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.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 M.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 M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return z.create(l.x,l.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??l.y):new z(t.x,t.y)}}function S(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function k(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function C(t){return Array.isArray(t)}function D(t){return null==t}const T=Math.PI/180;let R=Math.random;const A={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function L(){return U(R(),0,1-Number.EPSILON)}function E(t,e){return L()*(e-t)+t}function F(t){return A.nextFrame(t)}function V(t){A.cancel(t)}function U(t,e,i){return Math.min(Math.max(t,e),i)}function q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function B(t){const e=W(t);let i=$(t);return e===i&&(i=0),E(i,e)}function H(t){return k(t)?t:B(t)}function $(t){return k(t)?t:t.min}function W(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=$(t),s=W(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function j(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 Z(t,e){return Math.sqrt(N(t,e))}function Q(t,e,i){return N(t,e)<=i*i}function X(t){return t*T}function Y(e,i,s){if(k(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*w;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*w;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 J(t){const e=z.origin;return e.length=1,e.angle=t,e}function K(t,e,i,s){return z.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,lt;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,(lt=t.StartValueType||(t.StartValueType={})).max="max",lt.min="min",lt.random="random";function ct(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(),l=i.get(a);if(void 0!==l){if(!(n&&o-l.ts>n))return i.delete(a),i.set(a,{value:l.value,ts:l.ts}),l.value;i.delete(a)}const c=t(...e);return i.set(a,{value:c,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)}})(),c}}function ht(){return"undefined"!=typeof matchMedia}function dt(){return globalThis.document}function ut(t){if(ht())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||C(e)&&e.includes(t)}function yt(t){return Math.floor(L()*t.length)}function _t(t,e,i=!0){return t[void 0!==e&&i?e%t.length:yt(t)]}function vt(t,e,i,s,n){return mt(bt(t,s??0),e,i,n)}function mt(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 bt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function wt(t,...e){for(const i of e){if(D(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=>wt(void 0,t)):wt(e[n],a)}}return t}function Pt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:z.create(H(t.options.bounce.horizontal.value),H(t.options.bounce.vertical.value))}}function xt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=j(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=K(d,u,c,h),g=K(u,d,c,h),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function Mt(t,e){return C(t)?t.map((t,i)=>e(t,i)):e(t,0)}function zt(t,e,i){return C(t)?_t(t,e,i):t}function St(e,i){const s=e.value,n=e.animation,a={delayTime:H(n.delay)*r,enable:n.enable,value:H(e.value)*i,max:W(s)*i,min:$(s)*i,loops:0,maxLoops:H(n.count),time:0};if(n.enable){switch(a.decay=1-H(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=B(a),e&&(a.status=L()>=o?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Ot(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 kt(t,e){return Ot(t,e)}function It(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,l=i.max,c=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!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,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,l),e.destroyed||(i.value=U(i.value,r,l))}}function Ct(t){const e=dt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(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 Dt=ct(function(t){const e=dt().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Tt(t,e,i,s,n){if(s){let s={passive:!0};S(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 Rt(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 At(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 Lt{_listeners;constructor(){this._listeners=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this._listeners.get(t);i||(i=[],this._listeners.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this._listeners.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,e){const i=this._listeners.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this._listeners.delete(t):i.splice(n,1))}}var Et;t.EventType=void 0,(Et=t.EventType||(t.EventType={})).configAdded="configAdded",Et.containerInit="containerInit",Et.particlesSetup="particlesSetup",Et.containerStarted="containerStarted",Et.containerStopped="containerStopped",Et.containerDestroyed="containerDestroyed",Et.containerPaused="containerPaused",Et.containerPlay="containerPlay",Et.containerBuilt="containerBuilt",Et.particleAdded="particleAdded",Et.particleDestroyed="particleDestroyed",Et.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;_allLoadersSet=new Set;_configs=new Map;_engine;_executedSet=new Set;_initialized=!1;_isRunningLoaders=!1;_loadPromises=new Set;constructor(t){this._engine=t}get configs(){const t={};for(const[e,i]of this._configs)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this._configs.set(i,e),this._engine.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 At(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 At(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Rt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._initialized&&!this._isRunningLoaders){this._isRunningLoaders=!0,this._executedSet=new Set,this._allLoadersSet=new Set(this._loadPromises);try{for(const t of this._allLoadersSet)await this._runLoader(t,this._executedSet,this._allLoadersSet)}finally{this._loadPromises.clear(),this._isRunningLoaders=!1,this._initialized=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this._initialized)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this._isRunningLoaders?await this._runLoader(e,this._executedSet,this._allLoadersSet):this._loadPromises.add(e)}async _runLoader(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this._engine))}}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 qt(){return Ut}const Bt="100%";class Ht{pluginManager=new Ft(this);_domArray=[];_eventDispatcher=new Lt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.0-beta.12"}addEventListener(t,e){this._eventDispatcher.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._eventDispatcher.dispatchEvent(t,e)}async init(){this._initialized||(await this.pluginManager.init(),this._initialized=!0)}item(t){const{items:e}=this,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){await this.init();const{Container:i}=await Promise.resolve().then(function(){return Ks}),s=t.id??t.element?.id??`tsparticles${Math.floor(1e4*L()).toString()}`,{index:n,url:a}=t,o=a?await async function(t){const e=zt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(qt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:n}):t.options,r=zt(o,n),{items:l}=this,c=l.findIndex(t=>t.id.description===s),h=new i({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:r});if(c>=0){const t=this.item(c),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(c,e,h)}else l.push(h);const d=((t,i)=>{const s=dt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(s,t.element),u=(t=>{const i=dt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g;else{const n=t.getElementsByTagName(f)[0];n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s))}return s.style.width||=Bt,s.style.height||=Bt,s})(d);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._eventDispatcher.removeEventListener(t,e)}}var $t,Wt,Gt,jt,Nt,Zt,Qt,Xt;!function(t){t.circle="circle",t.rectangle="rectangle"}($t||($t={}));class Yt{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 Yt{radius;constructor(t,e,i){super(t,e,$t.circle),this.radius=i}contains(t){return Q(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 Kt||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 Kt extends Yt{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 Kt))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,(Wt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Wt.counterClockwise="counter-clockwise",Wt.random="random",t.LimitMode=void 0,(Gt=t.LimitMode||(t.LimitMode={})).delete="delete",Gt.wait="wait",t.OutMode=void 0,(jt=t.OutMode||(t.OutMode={})).bounce="bounce",jt.none="none",jt.out="out",jt.destroy="destroy",jt.split="split",t.AlterType=void 0,(Nt=t.AlterType||(t.AlterType={})).darken="darken",Nt.enlighten="enlighten",t.GradientType=void 0,(Zt=t.GradientType||(t.GradientType={})).linear="linear",Zt.radial="radial",Zt.random="random",t.ParticleOutType=void 0,(Qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Qt.inside="inside",Qt.outside="outside",t.EasingType=void 0,(Xt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Xt.easeInBounce="ease-in-bounce",Xt.easeInCirc="ease-in-circ",Xt.easeInCubic="ease-in-cubic",Xt.easeInElastic="ease-in-elastic",Xt.easeInExpo="ease-in-expo",Xt.easeInGaussian="ease-in-gaussian",Xt.easeInLinear="ease-in-linear",Xt.easeInQuad="ease-in-quad",Xt.easeInQuart="ease-in-quart",Xt.easeInQuint="ease-in-quint",Xt.easeInSigmoid="ease-in-sigmoid",Xt.easeInSine="ease-in-sine",Xt.easeInSmoothstep="ease-in-smoothstep",Xt.easeOutBack="ease-out-back",Xt.easeOutBounce="ease-out-bounce",Xt.easeOutCirc="ease-out-circ",Xt.easeOutCubic="ease-out-cubic",Xt.easeOutElastic="ease-out-elastic",Xt.easeOutExpo="ease-out-expo",Xt.easeOutGaussian="ease-out-gaussian",Xt.easeOutLinear="ease-out-linear",Xt.easeOutQuad="ease-out-quad",Xt.easeOutQuart="ease-out-quart",Xt.easeOutQuint="ease-out-quint",Xt.easeOutSigmoid="ease-out-sigmoid",Xt.easeOutSine="ease-out-sine",Xt.easeOutSmoothstep="ease-out-smoothstep",Xt.easeInOutBack="ease-in-out-back",Xt.easeInOutBounce="ease-in-out-bounce",Xt.easeInOutCirc="ease-in-out-circ",Xt.easeInOutCubic="ease-in-out-cubic",Xt.easeInOutElastic="ease-in-out-elastic",Xt.easeInOutExpo="ease-in-out-expo",Xt.easeInOutGaussian="ease-in-out-gaussian",Xt.easeInOutLinear="ease-in-out-linear",Xt.easeInOutQuad="ease-in-out-quad",Xt.easeInOutQuart="ease-in-out-quart",Xt.easeInOutQuint="ease-in-out-quint",Xt.easeInOutSigmoid="ease-in-out-sigmoid",Xt.easeInOutSine="ease-in-out-sine",Xt.easeInOutSmoothstep="ease-in-out-smoothstep";class te{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){D(t)||(void 0!==t.count&&(this.count=G(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=G(t.speed)),void 0!==t.decay&&(this.decay=G(t.decay)),void 0!==t.delay&&(this.delay=G(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class ee extends te{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ie extends te{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),D(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=G(t.offset)))}}class se{h=new ie(0,_);l=new ie(0,m);s=new ie(0,v);load(t){D(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class ne{value;constructor(){this.value=""}static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(O(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){D(t)||D(t.value)||(this.value=t.value)}}class ae extends ne{animation;constructor(){super(),this.animation=new se}static create(t,e){const i=new ae;return i.load(t),void 0!==e&&(O(e)||C(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class oe{color;image;opacity;position;repeat;size;constructor(){this.color=new ne,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){D(t)||(void 0!==t.color&&(this.color=ne.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 re{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){D(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){D(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ce{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=wt(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){D(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class de{offset;value;constructor(){this.offset=0,this.value=90}load(t){D(t)||(void 0!==t.offset&&(this.offset=G(t.offset)),void 0!==t.value&&(this.value=G(t.value)))}}class ue{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){D(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 pe{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=G(t.maxSpeed)))}}class ge{value;constructor(){this.value=0}load(t){D(t)||D(t.value)||(this.value=G(t.value))}}class fe extends ge{animation=new te;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ye extends fe{animation;constructor(){super(),this.animation=new ee}load(t){super.load(t)}}class _e{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new ge,this.enable=!1,this.options={}}load(t){D(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=wt(this.options,t.options)))}}class ve{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){D(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 me{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){D(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=wt({},t.position)))}}class be{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new de,this.center=new ue,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new pe,this.path=new _e,this.outModes=new ve,this.random=!1,this.size=!1,this.speed=2,this.spin=new me,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(D(t))return;this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=G(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=G(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=G(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 we extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Pe extends ye{animation;constructor(){super(),this.animation=new we,this.value=1}load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class xe{color;opacity;width;constructor(){this.width=0}load(t){D(t)||(void 0!==t.color&&(this.color=ae.create(this.color,t.color)),void 0!==t.width&&(this.width=G(t.width)),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class Me{color;fill;stroke;load(t){D(t)||(void 0!==t.color&&(this.color=ae.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 xe,this.stroke.load(t.stroke)))}}class ze extends ge{constructor(){super(),this.value=1}}class Se{horizontal;vertical;constructor(){this.horizontal=new ze,this.vertical=new ze}load(t){D(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Oe{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(D(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 ke{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){D(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Ie{density;limit;value;constructor(){this.density=new Oe,this.limit=new ke,this.value=0}load(t){D(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Ce{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(D(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=wt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class De extends ee{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),D(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Te extends ye{animation;constructor(){super(),this.animation=new De,this.value=3}load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Re extends ge{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),D(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 Ae{bounce;effect;groups;move;number;opacity;paint;palette;reduceDuplicates;shape;size;zIndex;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.bounce=new Se,this.effect=new ce,this.groups={},this.move=new be,this.number=new Ie,this.opacity=new Pe,this.paint=new Me,this.paint.color=new ae,this.paint.color.value="#fff",this.paint.fill=new he,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Ce,this.size=new Te,this.zIndex=new Re}load(t){if(D(t))return;if(t.palette&&(this.palette=t.palette,this._importPalette(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]=wt(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),this.opacity.load(t.opacity);const e=t.paint;if(e&&(C(e)?this.paint=Mt(e,t=>{const e=new Me;return e.load(t),e}):C(this.paint)?(this.paint=new Me,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.size.load(t.size),this.zIndex.load(t.zIndex),this._container){for(const e of this._pluginManager.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this._container,this,t);const e=this._pluginManager.updaters.get(this._container);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}_importPalette=t=>{const e=this._pluginManager.getPalette(t);if(!e)return;const i=e.colors,s=(C(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 Le(t,...e){for(const i of e)t.load(i)}function Ee(t,e,...i){const s=new Ae(t,e);return Le(s,...i),s}class Fe{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this.autoPlay=!0,this.background=new oe,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new re,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Ee(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new le,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(D(t))return;void 0!==t.preset&&(this.preset=t.preset,Mt(this.preset,t=>{this._importPreset(t)})),void 0!==t.palette&&(this.palette=t.palette,this._importPalette(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=G(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=G(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;S(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=wt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this._pluginManager.plugins.forEach(e=>{e.loadOptions(this._container,this,t)})}_importPalette=t=>{const e=this._pluginManager.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};_importPreset=t=>{this.load(this._pluginManager.getPreset(t))}}function Ve(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ue(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function qe(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Be(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.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 y={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:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const _=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;$e(_,y),je(v,y),We(v,y),Ge(v,y),He(_,y),i.resetTransform()}function He(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function $e(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function We(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 Ge(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function je(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ne(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const Ze=new Map;function Qe(t,e){let i=Ze.get(t);if(!i){if(i=e(),Ze.size>=1e3){[...Ze.keys()].slice(0,500).forEach(t=>Ze.delete(t))}Ze.set(t,i)}return i}function Xe(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ye(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return Je(t,n.value,i,s);if(C(n.value)){const e=_t(n.value,i,s);if(!e)return;return Ye(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Je(t,e,i,s=!0){if(!e)return;const n=O(e)?{value:e}:e;if(O(n.value))return n.value===h?ni():ei(t,n.value);if(C(n.value)){const e=_t(n.value,i,s);if(!e)return;return Je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ke(t,e,i,s=!0){const n=Ye(t,e,i,s);return n?ti(n):void 0}function ti(t){const e=t.r/y,i=t.g/y,s=t.b/y,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*=m,r.s*=v,r.h*=60,r.h<0&&(r.h+=_),r.h>=_&&(r.h-=_),r}function ei(t,e){return Xe(t,e)}function ii(t){const e=(t.h%_+_)%_,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(m,t.l)),n=e/_,a=i/v,r=s/m;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=(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},c=r<o?r*(1+a):r+a-r*a,h=2*r-c,d=1/3,u=Math.min(y,y*l(h,c,n+d)),p=Math.min(y,y*l(h,c,n)),g=Math.min(y,y*l(h,c,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function si(t){const e=ii(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function ni(t){const e=t??0,i=()=>Math.floor(E(e,256));return{b:i(),g:i(),r:i()}}function ai(t,e,i){const s=i??1;return Qe(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?oi(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function oi(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function ri(t,e,i){const s=i??1;return Qe(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return oi(ii(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function li(t,e,i,s){let n=t,a=e;return"r"in n||(n=ii(t)),"r"in a||(a=ii(e)),{b:q(n.b,a.b,i,s),g:q(n.g,a.g,i,s),r:q(n.r,a.r,i,s)}}function ci(t,e,i){if(i===h)return ni();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return li(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ii(t)}}}function hi(t,e,i,s){const n=O(e)?e:e.value;return n===h?s?Ye(t,{value:n}):i?h:d:n===d?d:Ye(t,{value:n})}function di(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ui(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:_},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:m}};return e&&(pi(s.h,e.h,i),pi(s.s,e.s,i),pi(s.l,e.l,i)),s}function pi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=H(i.speed)/a*s,e.decay=1-H(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=H(i.count),e.time=0,e.delayTime=H(i.delay)*r,i.sync||(e.velocity*=L(),e.value*=L()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function gi(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?B(e.offset):0,a=(e.velocity??0)*s.factor+3.6*n,o=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(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=U(e.value,l,r)}function fi(t,e){if(!t)return;const{h:i,s:s,l:n}=t;gi(i,!1,e),gi(s,!0,e),gi(n,!0,e)}function yi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const _i=new Ht,vi=new Map;async function mi(t,e,i,s){const n=vi.get(e);if(n instanceof Promise)return n;if(n)return n;const a=(async()=>{const n={particles:{number:{value:(o=i).count??80},color:{value:o.color??"#fff"},links:{enable:o.links??!1,color:o.linksColor??"#fff",distance:o.linksLength??100},collisions:{enable:o.collisions??!1},move:{enable:!0,speed:o.speed??3},opacity:{value:o.opacity??1},shape:{type:o.shape??"circle"},size:{value:o.radius??3}}},a=await t.load({id:e,element:s,options:n});var o;if(!a)return void vi.delete(e);const{ParticlesInstance:r}=await Promise.resolve().then(function(){return tn}),l=new r(a);return vi.set(e,l),l})();return vi.set(e,a),a}class bi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.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:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function wi(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new bi))})}var Pi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Pi||(Pi={}));const xi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Mi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class zi{accepts(t){return t.startsWith("#")}handleColor(t){return this._parseString(t.value)}handleRangeColor(t){return this._parseString(t.value)}parseString(t){return this._parseString(t)}_parseString(t){if("string"!=typeof t||!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=Mi.exec(e);return i?{a:i[Pi.a]?Number.parseInt(i[Pi.a],16)/255:1,b:Number.parseInt(i[Pi.b]??"0",16),g:Number.parseInt(i[Pi.g]??"0",16),r:Number.parseInt(i[Pi.r]??"0",16)}:void 0}}async function Si(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new zi)})}var Oi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Oi||(Oi={}));const ki=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ii{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 ii(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ii({h:H(e.h),l:H(e.l),s:H(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ki.exec(t);return e?si({a:e.length>4?it(e[Oi.a]):1,h:Number.parseInt(e[Oi.h]??"0",10),l:Number.parseInt(e[Oi.l]??"0",10),s:Number.parseInt(e[Oi.s]??"0",10)}):void 0}}async function Ci(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ii)})}class Di{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return sn});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Ti(t){t.checkVersion("4.0.0-beta.12"),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,At(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Di(t.pluginManager))})}class Ri{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=St(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=H(i.speed)/a*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&It(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Ai(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ri(t)))})}class Li{container;modes;_particleBouncePlugins;constructor(e){this.container=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this._particleBouncePlugins=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;let o=!1;for(const t of this._particleBouncePlugins)if(o=t.particleBounce?.(e,s,i)??!1,o)break;if(o)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=bt(r,c),d=a.canvas.size;!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.direction===t.OutModeDirection.right&&e.bounds.right>=e.canvasSize.width&&i>0||e.direction===t.OutModeDirection.left&&e.bounds.left<=0&&i<0){const t=H(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.bounds.right>=e.canvasSize.width&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.bounds.left<=0&&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:h,canvasSize:d,offset:l,size:c}),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.direction===t.OutModeDirection.bottom&&e.bounds.bottom>=e.canvasSize.height&&i>0||e.direction===t.OutModeDirection.top&&e.bounds.top<=0&&i<0){const t=H(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.bounds.bottom>=e.canvasSize.height&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.bounds.top<=0&&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:h,canvasSize:d,offset:l,size:c})}}class Ei{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(vt(e.position,a.canvas.size,l,e.getRadius(),i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=j(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 Fi{container;modes;constructor(e){this.container=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.container,r=o.canvas.size,c=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;vt(e.position,o.canvas.size,l,c,i)||e.destroy()}}}const Vi=z.origin;class Ui{container;modes;constructor(e){this.container=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.container;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Vi.setTo(l),Vi.length=e.moveCenter.radius,Vi.angle=e.velocity.angle+Math.PI,Vi.addTo(e.moveCenter);const{dx:s,dy:n}=j(e.position,Vi);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(B({min:0,max:a.canvas.size.width})),e.position.y=Math.floor(B({min:0,max:a.canvas.size.height}));const{dx:o,dy:r}=j(e.position,e.moveCenter);e.direction=Math.atan2(-r,-o),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(vt(e.position,a.canvas.size,l,e.getRadius(),i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(B({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(B({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=j(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(),l=bt(e.position,r);i===t.OutModeDirection.right&&l.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&&l.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&&l.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&&l.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 qi{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(e){this._addUpdaterIfMissing(e,t.OutMode.bounce,t=>new Li(t)),this._addUpdaterIfMissing(e,t.OutMode.out,t=>new Ui(t)),this._addUpdaterIfMissing(e,t.OutMode.destroy,t=>new Ei(t)),this._addUpdaterIfMissing(e,t.OutMode.none,t=>new Fi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this._updateOutMode(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this._updateOutMode(e,i,s.left??s.default,t.OutModeDirection.left),this._updateOutMode(e,i,s.right??s.default,t.OutModeDirection.right),this._updateOutMode(e,i,s.top??s.default,t.OutModeDirection.top)}_addUpdaterIfMissing=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.container))};_updateOutMode=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Bi(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new qi(t)))})}class Hi{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=zt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=ae.create(void 0===a?void 0:ae.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=H(o.opacity),t.fillAnimation=i.animation;const s=Ke(this._pluginManager,i);s&&(t.fillColor=ui(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=ae.create(void 0===a?void 0:ae.create(void 0,a),r.color);t.strokeWidth=H(r.width)*e.retina.pixelRatio,t.strokeOpacity=H(r.opacity??1),t.strokeAnimation=i.animation;const s=Ke(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=ui(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)&&(fi(t.fillColor,e),fi(t.strokeColor,e))}}async function $i(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Hi(t.pluginManager,e)))})}var Wi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Wi||(Wi={}));const Gi=/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 ji{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:H(e.r),g:H(e.g),b:H(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Gi.exec(t);return e?{a:e.length>4?it(e[Wi.a]):1,b:parseInt(e[Wi.b]??"0",10),g:parseInt(e[Wi.g]??"0",10),r:parseInt(e[Wi.r]??"0",10)}:void 0}}async function Ni(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ji)})}class Zi{_container;constructor(t){this._container=t}init(t){const e=this._container,i=t.options.size.animation;i.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/a*e.retina.reduceFactor,i.sync||(t.size.velocity*=L()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&It(t,t.size,!0,t.options.size.animation.destroy,e)}}async function Qi(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Zi(t)))})}async function Xi(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(async t=>{await Promise.all([Si(t),Ci(t),Ni(t),Ti(t),wi(t),$i(t),Ai(t),Bi(t),Qi(t)])})}class Yi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var Ji,Ki,ts;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ji||(Ji={}));class es{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=Ji.circle}load(t){D(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 is{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class ss{onClick;onDiv;onHover;constructor(){this.onClick=new Yi,this.onDiv=new es,this.onHover=new is}load(t){if(D(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=Mt(e,t=>{const e=new es;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Ki||(Ki={}));class ns{_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}load(t){if(D(t))return;if(!this._container)return;const e=this._pluginManager.interactors?.get(this._container);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class as{detectsOn;events;modes;constructor(t,e){this.detectsOn=Ki.window,this.events=new ss,this.modes=new ns(t,e)}load(t){if(D(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class os{id="interactivity";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return on});return new e(this._pluginManager,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new as(this._pluginManager,t)),s.load(i?.interactivity);const n=this._pluginManager.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=wt({},i.interactivity));const s=this._pluginManager.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"}(ts||(ts={}));class rs{type=ts.particles;container;constructor(t){this.container=t}}const ls="pointerdown",cs="pointerup",hs="pointerleave",ds="pointermove",us="touchstart",ps="touchend",gs="touchmove",fs="touchcancel";function ys(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}var _s;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy"}(_s||(_s={}));class vs{speed;constructor(){this.speed=2}load(t){D(t)||void 0!==t.speed&&(this.speed=t.speed)}}class ms{enable;retries;constructor(){this.enable=!0,this.retries=0}load(t){D(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class bs{absorb;bounce;enable;maxSpeed;mode;overlap;constructor(){this.absorb=new vs,this.bounce=new Se,this.enable=!1,this.maxSpeed=50,this.mode=_s.bounce,this.overlap=new ms}load(t){D(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=G(t.maxSpeed)),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}function ws(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=U(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 Ps=t=>{t.options.collisions&&(t.collisionMaxSpeed??=H(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function xs(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;xt(Pt(t),Pt(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}Ps(t),Ps(e)}function Ms(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case _s.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?ws(t,n,e,a,i,s):ws(e,a,t,n,i,s))}(t,e,i,s);break;case _s.bounce:xs(t,e);break;case _s.destroy:!function(t,e){t.unbreakable||e.unbreakable||xs(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 zs extends rs{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;Z(n,o)>a+r||Ms(t,e,i,s.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){t.collisions??=new bs;for(const i of e)t.collisions.load(i?.collisions)}reset(){}}class Ss{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return rn});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Os(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{ys(t),t.pluginManager.addPlugin(new Ss),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new zs(t)))})}class ks extends Jt{canvasSize;constructor(t,e,i,s){super(t,e,i),this.canvasSize=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.canvasSize,{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.canvasSize,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 Kt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Is{blur;color;enable;constructor(){this.blur=5,this.color=new ne,this.color.value="#000",this.enable=!1}load(t){D(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=ne.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Cs{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){D(t)||(void 0!==t.color&&(this.color=ne.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 Ds{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new ne,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new Is,this.triangles=new Cs,this.width=1,this.warp=!1}load(t){D(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=ne.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 Ts(t,e,i){const{dx:s,dy:n}=j(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 Rs extends rs{_maxDistance;_pluginManager;constructor(t,e){super(e),this._pluginManager=t,this._maxDistance=0}get maxDistance(){return this._maxDistance}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._maxDistance&&(this._maxDistance=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<l.x||e.y<l.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,c=r?new ks(e.x,e.y,o,s):new Jt(e.x,e.y,o),h=i.particles.grid.query(c);for(const i of h){const c=i.options.links;if(t===i||!c?.enable||n.id!==c.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<l.x||h.y<l.y||h.x>s.width||h.y>s.height)continue;const d=j(e,h).distance,u=r&&c.warp?Ts(e,h,s):d,p=Math.min(d,u);if(p>o)continue;const g=(1-p/o)*a;this._setColor(t),t.links.push({destination:i,opacity:g,color:this._getLinkColor(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links??=new Ds;for(const i of e)t.links.load(i?.links)}reset(){}_getLinkColor(t,e){const i=this.container,s=t.options.links;if(!s)return;return ci(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}_setColor(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=hi(this._pluginManager,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class As{id="links";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return cn});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function Ls(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{const e=t.pluginManager;ys(t),e.addPlugin(new As(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Rs(e,t)))})}let Es=null;async function Fs(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(async t=>{await Promise.all([Xi(t),(async t=>{await async function(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new os(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,Rt(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([Os(t),Ls(t)])})(t)])})}async function Vs(t){return Es||(Es=Fs(t),Es)}async function Us(t,e){let i,s;return await Vs(_i),O(t)?(i=t,s=e??{}):(i="particles",s=t??{}),mi(_i,i,s)}Us.create=async(t,e)=>{await Vs(_i);const i=t.id||"particles";return mi(_i,i,e??{},t)},Us.init=async()=>{await Vs(_i)},Us.version="4.0.0-beta.12",globalThis.particles=Us;const qs=globalThis;qs.__tsParticlesInternals=qs.__tsParticlesInternals??{},qs.particles=Us;function Bs(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Hs{_canvasClearPlugins;_canvasManager;_canvasPaintPlugins;_clearDrawPlugins;_colorPlugins;_container;_context;_contextSettings;_drawParticlePlugins;_drawParticlesCleanupPlugins;_drawParticlesSetupPlugins;_drawPlugins;_drawSettingsCleanupPlugins;_drawSettingsSetupPlugins;_pluginManager;_postDrawUpdaters;_preDrawUpdaters;_reusableColorStyles={};_reusablePluginColors=[void 0,void 0];_reusableTransform={};constructor(t,e,i){this._pluginManager=t,this._container=e,this._canvasManager=i,this._context=null,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}get settings(){return this._contextSettings}canvasClear(){this._container.actualOptions.clear&&this.draw(t=>{qe(t,this._canvasManager.size)})}clear(){let t=!1;for(const e of this._canvasClearPlugins)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesCleanupPlugins=[],this._drawParticlesSetupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[]}draw(t){const e=this._context;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[a,o]=this._getPluginParticleColors(t);if(a??=s,o??=n,!a&&!o)return;const r=this._container,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,g=this._reusableColorStyles,f=a?ri(a,r.hdr,h*d):void 0,y=o?ri(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,g,p),Be({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:d,transform:p}),this._applyPostDrawUpdaters(t);for(const i of this._drawParticlesCleanupPlugins)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this._drawParticlePlugins)Ne(i,s,t,e)})}drawParticles(t){const{particles:e}=this._container;this.clear(),e.update(t),this.draw(i=>{for(const e of this._drawSettingsSetupPlugins)e.drawSettingsSetup?.(i,t);for(const e of this._drawPlugins)e.draw?.(i,t);e.drawParticles(t);for(const e of this._clearDrawPlugins)e.clearDraw?.(i,t);for(const e of this._drawSettingsCleanupPlugins)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this._colorPlugins=[],this._canvasClearPlugins=[],this._canvasPaintPlugins=[],this._clearDrawPlugins=[],this._drawParticlePlugins=[],this._drawParticlesSetupPlugins=[],this._drawParticlesCleanupPlugins=[],this._drawPlugins=[],this._drawSettingsSetupPlugins=[],this._drawSettingsCleanupPlugins=[];for(const t of this._container.plugins)(t.particleFillColor??t.particleStrokeColor)&&this._colorPlugins.push(t),t.canvasClear&&this._canvasClearPlugins.push(t),t.canvasPaint&&this._canvasPaintPlugins.push(t),t.drawParticle&&this._drawParticlePlugins.push(t),t.drawParticleSetup&&this._drawParticlesSetupPlugins.push(t),t.drawParticleCleanup&&this._drawParticlesCleanupPlugins.push(t),t.draw&&this._drawPlugins.push(t),t.drawSettingsSetup&&this._drawSettingsSetupPlugins.push(t),t.drawSettingsCleanup&&this._drawSettingsCleanupPlugins.push(t),t.clearDraw&&this._clearDrawPlugins.push(t)}initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this._container.particleUpdaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this._preDrawUpdaters.push(t)}paint(){let t=!1;for(const e of this._canvasPaintPlugins)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Ve(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{Ue(i,this._canvasManager.size,t,e)})}setContext(t){this._context=t,this._context&&(this._context.globalCompositeOperation=i)}setContextSettings(t){this._contextSettings=t}stop(){this.draw(t=>{qe(t,this._canvasManager.size)})}_applyPostDrawUpdaters=t=>{for(const e of this._postDrawUpdaters)e.afterDraw?.(t)};_applyPreDrawUpdaters=(t,e,i,s,n,a)=>{for(const o of this._preDrawUpdaters){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)Bs(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Ke(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ke(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}function $s(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 Ws{element;render;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new Hs(t,e,this),this._standardSize={height:0,width:0};const i=e.retina.pixelRatio,s=this._standardSize;this.size={height:s.height*i,width:s.width*i},this._generated=!1,this._resizePlugins=[],this._pointerEvents="none"}get _fullScreen(){return this._container.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this._generated){const t=this.element;t?.remove(),this.element=void 0}else this._resetOriginalStyle();this.render.destroy(),this._resizePlugins=[]}getZoomCenter(){const t=this._container.retina.pixelRatio,{width:e,height:i}=this.size;return this._zoomCenter?this._zoomCenter:{x:e*o/t,y:i*o/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=gt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.element;if(!i)return;const s=i.style,n=Ye(this._pluginManager,e.color);s.backgroundColor=n?ai(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this._resizePlugins=[];for(const t of this._container.plugins)t.resize&&this._resizePlugins.push(t)}loadCanvas(t){this._generated&&this.element&&this.element.remove();const i=this._container;this._generated=e in t.dataset?"true"===t.dataset[e]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=Ct(this.element.style);const s=this._standardSize;s.height=t.offsetHeight,s.width=t.offsetWidth;const n=this._container.retina.pixelRatio,a=this.size;t.height=a.height=s.height*n,t.width=a.width=s.width*n;const o=ut("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:o?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(this.element.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{this.element&&this.element instanceof Node&&t.observe(this.element,{attributes:!0})})}resize(){if(!this.element)return!1;const t=this._container,e=t.canvas._standardSize,i={width:this.element.offsetWidth,height:this.element.offsetHeight},s=t.retina.pixelRatio,n={width:i.width*s,height:i.height*s};if(i.height===e.height&&i.width===e.width&&n.height===this.element.height&&n.width===this.element.width)return!1;const a={...e};e.height=i.height,e.width=i.width;const o=this.size;return this.element.width=o.width=n.width,this.element.height=o.height=n.height,this._container.started&&t.particles.setResizeFactor({width:e.width/a.width,height:e.height/a.height}),!0}setPointerEvents(t){this.element&&(this._pointerEvents=t,this._repairStyle())}setZoom(t,e){this.zoom=t,this._zoomCenter=e}stop(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=void 0,this.render.stop()}async windowResize(){if(!this.element||!this.resize())return;const t=this._container,e=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),e&&await t.refresh()}_applyResizePlugins=()=>{for(const t of this._resizePlugins)t.resize?.()};_initStyle=()=>{const t=this.element,e=this._container.actualOptions;if(t){this._fullScreen?this._setFullScreenStyle():this._resetOriginalStyle();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}};_repairStyle=()=>{const t=this.element;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.setAttribute("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.element,e=this._originalStyle;t&&e&&$s(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.element;t&&$s(t,Dt(this._container.actualOptions.fullScreen.zIndex),!0)}}class Gs{container;_handlers;_resizeObserver;_resizeTimeout;constructor(t){this.container=t,this._handlers={visibilityChange:()=>{this._handleVisibilityChange()},resize:()=>{this._handleWindowResize()}}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_handleVisibilityChange=()=>{const t=this.container;t.actualOptions.pauseOnBlur&&(dt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};_handleWindowResize=()=>{this._resizeTimeout&&(clearTimeout(this._resizeTimeout),delete this._resizeTimeout);const t=async()=>{const t=this.container.canvas;await t.windowResize()};this._resizeTimeout=setTimeout(()=>{t()},this.container.actualOptions.resize.delay*r)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),Tt(document,n,e.visibilityChange,t,!1)};_manageResize=t=>{const e=this._handlers,i=this.container;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Tt(globalThis,s,e.resize,t);const n=i.canvas.element;this._resizeObserver&&!t?(n&&this._resizeObserver.unobserve(n),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&n&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this._handleWindowResize()}),this._resizeObserver.observe(n))}}function js(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 Ns{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;_cachedOpacityData={fillOpacity:1,opacity:1,strokeOpacity:1};_cachedPosition=M.origin;_cachedRotateData={sin:0,cos:0};_cachedTransform={a:1,b:0,c:0,d:1};_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this._container,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._container.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this._container.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this._getRollColor(this.bubble.color??di(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??H(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this._cachedOpacityData.fillOpacity=i*s*e,this._cachedOpacityData.opacity=i*e,this._cachedOpacityData.strokeOpacity=i*n*e,this._cachedOpacityData}getPosition(){return this._cachedPosition.x=this.position.x+this.offset.x,this._cachedPosition.y=this.position.y+this.offset.y,this._cachedPosition.z=this.position.z,this._cachedPosition}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this._cachedRotateData.sin=Math.sin(t),this._cachedRotateData.cos=Math.cos(t),this._cachedRotateData}getStrokeColor(){return this._getRollColor(this.bubble.color??di(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c.a),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??c.b,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??c.c,this._cachedTransform.d=e.cos*(t.d??c.d),this._cachedTransform}init(e,i,s,n){const a=this._container;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.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const o=a.retina.pixelRatio,r=a.actualOptions,l=Ee(this._pluginManager,a,r.particles),c=l.reduceDuplicates,d=l.effect.type,u=l.shape.type;this.effect=zt(d,this.id,c),this.shape=zt(u,this.id,c);const p=l.effect,g=l.shape;if(s){if(s.effect?.type){const t=zt(s.effect.type,this.id,c);t&&(this.effect=t,p.load(s.effect))}if(s.shape?.type){const t=zt(s.shape.type,this.id,c);t&&(this.shape=t,g.load(s.shape))}}if(this.effect===h){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(L()*t.length)]}if(this.shape===h){const t=[...this._container.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 wt({close:e.close},zt(n,i,s))}(this.effect,p,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return wt({close:e.close},zt(n,i,s))}(this.shape,g,this.id,c):void 0,l.load(s);const f=this.effectData;f&&l.load(f.particles);const y=this.shapeData;y&&l.load(y.particles),this.effectClose=f?.close??l.effect.close,this.shapeClose=y?.close??l.shape.close,this.options=l,a.retina.initParticle(this),this.size=St(this.options.size,o),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy();let _,v;a.particles.setLastZIndex(this.position.z),this.zIndexFactor=this.position.z/a.zLayers,this.sides=24,this.effect&&(_=a.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(v=a.shapeDrawers.get(this.shape)),v?.loadShape&&v.loadShape(this);const m=v?.getSidesCount;m&&(this.sides=m(this)),this.spawning=!1;for(const t of a.particleUpdaters)t.init(this);_?.particleInit?.(a,this),v?.particleInit?.(a,this);for(const t of a.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(){const t=this.getRadius(),e=this._container.canvas.size,i=this.position;return i.x>=-t&&i.y>=-t&&i.y<=e.height+t&&i.x<=e.width+t}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._container.particleUpdaters)t.reset?.(this)}_calcPosition=(t,e)=>{let i=0,s=t?M.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return M.create(i.x,i.y,e)}const t=et({size:l,position:s}),c=M.create(t.x,t.y,e);this._fixHorizontal(c,r,o.left??o.default),this._fixHorizontal(c,r,o.right??o.default),this._fixVertical(c,r,o.top??o.default),this._fixVertical(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};_calculateVelocity=()=>{const e=J(this.direction).copy(),i=this.options.move;if(i.direction===t.MoveDirection.inside||i.direction===t.MoveDirection.outside)return e;const s=X(H(i.angle.value)),n=X(H(i.angle.offset)),a={left:n-s*o,right:n+s*o};return i.straight||(e.angle+=B(G(a.left,a.right))),i.random&&"number"==typeof i.speed&&(e.length*=L()),e};_fixHorizontal=(e,i,s)=>{js({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this._container.canvas.size.width,setCb:t=>e.x+=t,radius:i})};_fixVertical=(e,i,s)=>{js({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this._container.canvas.size.height,setCb:t=>e.y+=t,radius:i})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?yi(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=e=>{const i=this._container,s=H(this.options.zIndex.value),n=this._calcPosition(e,U(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={...kt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Y(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=z.origin}}class Zs{_cellSize;_cells=new Map;_circlePool=[];_circlePoolIdx;_pendingCellSize;_rectanglePool=[];_rectanglePoolIdx;constructor(t){this._cellSize=t,this._circlePoolIdx=0,this._rectanglePoolIdx=0}clear(){this._cells.clear();const t=this._pendingCellSize;t&&(this._cellSize=t),this._pendingCellSize=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this._cellKeyFromCoords(e,i);this._cells.has(s)||this._cells.set(s,[]),this._cells.get(s)?.push(t)}query(t,e,i=[]){const s=this._getRangeBounds(t);if(!s)return i;const n=Math.floor(s.minX/this._cellSize),a=Math.floor(s.maxX/this._cellSize),o=Math.floor(s.minY/this._cellSize),r=Math.floor(s.maxY/this._cellSize);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this._cells.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._acquireCircle(t.x,t.y,e),a=this.query(n,i,s);return this._releaseShapes(),a}queryRectangle(t,e,i,s=[]){const n=this._acquireRectangle(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this._releaseShapes(),a}setCellSize(t){this._pendingCellSize=t}_acquireCircle(t,e,i){return(this._circlePool[this._circlePoolIdx++]??=new Jt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Kt(t,e,i,s)).reset(t,e,i,s)}_cellKeyFromCoords(t,e){return`${Math.floor(t/this._cellSize)}_${Math.floor(e/this._cellSize)}`}_getRangeBounds(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 Kt){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}_releaseShapes(){this._circlePoolIdx=0,this._rectanglePoolIdx=0}}class Qs{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_maxZIndex;_minZIndex;_needsSort;_nextId;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zArray;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._zArray=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._needsSort=!1,this._minZIndex=0,this._maxZIndex=0,this.grid=new Zs(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(e,i,s,n){const a=this._container.actualOptions.particles.number.limit.mode,o=void 0===s?this._limit:this._groupLimits.get(s)??this._limit,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._pool.pop()??new Ns(this._pluginManager,this._container);a.init(this._nextId,e,i,s);let o=!0;return n&&(o=n(a)),o?(this._array.push(a),this._zArray.push(a),this._nextId++,this._container.dispatchEvent(t.EventType.particleAdded,{particle:a}),a):void this._pool.push(a)}catch(t){qt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._zArray=[]}destroy(){this._array=[],this._pool.length=0,this._zArray=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(const e of this._zArray)e.draw(t)}filter(t){return this._array.filter(t)}find(t){return this._array.find(t)}get(t){return this._array[t]}async init(){const t=this._container,e=t.actualOptions;this._minZIndex=0,this._maxZIndex=0,this._needsSort=!1,this.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this.grid=new Zs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this._updatePlugins.push(e),e.particleUpdate&&this._particleUpdatePlugins.push(e),e.postUpdate&&this._postUpdatePlugins.push(e),e.particleReset&&this._particleResetPlugins.push(e),e.postParticleUpdate&&this._postParticleUpdatePlugins.push(e);await this._container.initDrawersAndUpdaters();for(const e of this._container.effectDrawers.values())await(e.init?.(t));for(const e of this._container.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._container.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this._array.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let a=t;n<e&&a<this.count;a++)this._removeParticle(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this._container.actualOptions,e=t.particles.groups;let i=0;for(const t of this._container.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Ee(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setLastZIndex(t){this._needsSort||=t>=this._maxZIndex||t>this._minZIndex&&t<this._maxZIndex}setResizeFactor(t){this._resizeFactor=t}update(t){const e=new Set;this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const i=this._resizeFactor;for(const s of this._array){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._particleResetPlugins)t.particleReset?.(s);for(const e of this._particleUpdatePlugins){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}for(const e of this._postUpdatePlugins)e.postUpdate?.(t);for(const i of this._array)if(i.destroyed)e.add(i);else{for(const e of this._container.particleUpdaters)e.update(i,t);if(i.destroyed||i.spawning)i.destroyed&&e.add(i);else for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t)}if(e.size)for(const t of e)this.remove(t);if(delete this._resizeFactor,this._needsSort){const t=this._zArray;t.sort((t,e)=>e.position.z-t.position.z||t.id-e.id);const e=t[0],i=t[t.length-1];if(!e||!i)return;this._maxZIndex=e.position.z,this._minZIndex=i.position.z,this._needsSort=!1}}_addToPool=(...t)=>{this._pool.push(...t)};_applyDensity=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this._limit=n.limit.value:(s?.number.limit.value??n.limit.value)&&this._groupLimits.set(i,s?.number.limit.value??n.limit.value));const a=this._initDensityFactor(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this._limit=n.limit.value*a:this._groupLimits.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};_initDensityFactor=t=>{const e=this._container;if(!e.canvas.element||!t.enable)return 1;const i=e.canvas.element,s=e.retina.pixelRatio;return i.width*i.height/(t.height*t.width*s**2)};_removeParticle=(e,i,s)=>{const n=this._array[e];if(!n)return!1;if(n.group!==i)return!1;const a=this._zArray.indexOf(n);return this._array.splice(e,1),this._zArray.splice(a,1),n.destroy(s),this._container.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this._addToPool(n),!0}}class Xs{container;pixelRatio;reduceFactor;constructor(t){this.container=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.container,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas;if(s.element){const t=s.element;s.size.width=t.offsetWidth*i,s.size.height=t.offsetHeight*i}}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=H(s.gravity.maxSpeed)*i,a.moveDrift=H(s.drift)*i,a.moveSpeed=H(s.speed)*i,a.sizeAnimationSpeed=H(e.size.animation.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 Ys(t){return!t.destroyed}function Js(t,e,...i){const s=new Fe(t,e);return Le(s,...i),s}var Ks=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;_delay;_delayTimeout;_delta={value:0,factor:0};_dispatchCallback;_drawAnimationFrame;_duration;_eventListeners;_firstStart;_initialSourceOptions;_lastFrameTime;_lifeTime;_onDestroy;_options;_paused;_pluginManager;_smooth;_sourceOptions;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this._pluginManager=s,this._dispatchCallback=i,this._onDestroy=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this._smooth=!1,this._delay=0,this._duration=0,this._lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this._lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=o,this._initialSourceOptions=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Xs(this),this.canvas=new Ws(this._pluginManager,this),this.particles=new Qs(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=Js(this._pluginManager,this),this.actualOptions=Js(this._pluginManager,this),this._eventListeners=new Gs(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&Ys(this)}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addLifeTime(t){this._lifeTime+=t}alive(){return!this._duration||this._lifeTime<=this._duration}destroy(e=!0){if(Ys(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._pluginManager.clearPlugins(this),this.destroyed=!0,this._onDestroy(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!Ys(this))return;let e=t;this._drawAnimationFrame=F(t=>{e&&(this._lastFrameTime=void 0,e=!1),this._nextFrame(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}qt().error(`Export plugin with type ${t} not found`)}async init(){if(!Ys(this))return;const e=new Map;for(const t of this._pluginManager.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this._options=Js(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=Js(this._pluginManager,this,this._options),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:l}=this.actualOptions;this.hdr=a,this.zLayers=l,this._duration=H(s)*r,this._delay=H(i)*r,this._lifeTime=0,this.fpsLimit=n>0?n:120,this._smooth=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._pluginManager;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(Ys(this)&&(void 0!==this._drawAnimationFrame&&(V(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Ys(this))return;const i=this._paused||e;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this._firstStart=!1}async refresh(){if(Ys(this))return this.stop(),this.start()}async reset(t){if(Ys(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=Js(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=Js(this._pluginManager,this,this._options),this.refresh()}async start(){Ys(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this._delayTimeout=setTimeout(()=>{i()},this._delay)}))}stop(){if(Ys(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this._sourceOptions=this._options,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}_nextFrame=t=>{try{if(!this._smooth&&void 0!==this._lastFrameTime&&t<this._lastFrameTime+r/this.fpsLimit)return void this.draw(!1);if(this._lastFrameTime??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this._delta),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){qt().error("error in animation loop",t)}}}});var tn=Object.freeze({__proto__:null,ParticlesInstance:class{_container;constructor(t){this._container=t}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}});function en(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=U(t.velocity.x,-1,1),t.velocity.y=U(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),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 sn=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=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-H(i.decay),e.pathDelay=H(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:H(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=Z(i.getPosition(),a),r=H(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._container,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options,n=s.move;if(!n.enable)return;const a=this._container,r=a.retina.pixelRatio,l=function(t){return t.slow.inRange?t.slow.factor:1}(e),c=a.retina.reduceFactor,h=e.retina.moveSpeed,d=e.retina.moveDrift,u=W(s.size.value)*r,p=h*(n.size?e.getRadius()/u:1)*l*(i.factor||1)*o,g=e.retina.maxSpeed;n.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 l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*o;i.spin.radius>c?(i.spin.radius=c,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/l)}(a,e,p,c):en(e,n,p,g,d,c,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(e,t.position),n=Math.abs(i),a=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&a>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&a>c,l&&(t.velocity.x=t.velocity.y*o-t.velocity.x),c&&(t.velocity.y=t.velocity.x*o-t.velocity.y);else if((!l||n<l)&&(!c||a<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-L()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-L())}}(e)}preInit(){return this._init()}redrawInit(){return this._init()}update(){for(const t of this.pathGenerators.values())t.update()}async _init(){const t=await(this._pluginManager.getPathGenerators?.(this._container,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class nn{_canPush=!0;_clickPositionPlugins;_container;_handlers;_interactionManager;_touches;constructor(t,e){this._container=t,this._clickPositionPlugins=[],this._interactionManager=e,this._touches=new Map,this._handlers={mouseDown:()=>{this._mouseDown()},mouseLeave:()=>{this._mouseTouchFinish()},mouseMove:t=>{this._mouseTouchMove(t)},mouseUp:t=>{this._mouseTouchClick(t)},touchStart:t=>{this._touchStart(t)},touchMove:t=>{this._mouseTouchMove(t)},touchEnd:t=>{this._touchEnd(t)},touchCancel:t=>{this._touchEnd(t)},touchEndClick:t=>{this._touchEndClick(t)},visibilityChange:()=>{this._handleVisibilityChange()}}}addListeners(){this._manageListeners(!0)}init(){this._clickPositionPlugins.length=0;for(const t of this._container.plugins.filter(t=>!!t.clickPositionValid))this._clickPositionPlugins.push(t)}removeListeners(){this._manageListeners(!1)}_doMouseTouchClick=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions;if(this._canPush){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;Mt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this._mouseTouchFinish()},500)};_handleVisibilityChange=()=>{this._mouseTouchFinish()};_manageInteractivityListeners=t=>{const e=this._handlers,i=this._container,s=this._interactionManager,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.element?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(Tt(a,ds,e.mouseMove,t),Tt(a,us,e.touchStart,t),Tt(a,gs,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(Tt(a,ps,e.touchEndClick,t),Tt(a,cs,e.mouseUp,t),Tt(a,ls,e.mouseDown,t)):Tt(a,ps,e.touchEnd,t):(Tt(a,ps,e.touchEndClick,t),Tt(a,cs,e.mouseUp,t),Tt(a,ls,e.mouseDown,t),Tt(a,ps,e.touchEnd,t)),Tt(a,hs,e.mouseLeave,t),Tt(a,fs,e.touchCancel,t))};_manageListeners=t=>{const e=this._handlers,i=this._container,s=this._interactionManager,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.element;o===Ki.window?s.interactivityData.element=dt():o===Ki.parent&&r?s.interactivityData.element=r.parentElement??r.parentNode:s.interactivityData.element=r,this._manageInteractivityListeners(t),Tt(document,n,e.visibilityChange,t,!1)};_mouseDown=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position};_mouseTouchClick=t=>{const e=this._container,i=this._interactionManager,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._clickPositionPlugins)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this._doMouseTouchClick(t),n.clicking=!1}};_mouseTouchFinish=()=>{const{interactivityData:t}=this._interactionManager,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=hs,e.inside=!1,e.clicking=!1};_mouseTouchMove=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,n=i.interactivityData,a=e.canvas.element;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(n.element===dt()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Ki.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._canPush="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=ds};_touchEnd=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchFinish()};_touchEndClick=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.delete(t.identifier);this._mouseTouchClick(t)};_touchStart=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this._touches.set(t.identifier,performance.now());this._mouseTouchMove(t)}}class an{container;interactivityData;_clickHandlers;_eventListeners;_externalInteractors;_interactors;_intersectionObserver;_particleInteractors;_pluginManager;constructor(t,e){this.container=e,this._pluginManager=t,this._interactors=[],this._externalInteractors=[],this._particleInteractors=[],this._clickHandlers=new Map,this._eventListeners=new nn(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this._intersectionObserver=pt(t=>{this._intersectionManager(t)})}addClickHandler(t){const{container:e,interactivityData:i}=this;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._clickHandlers.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this._clickHandlers.set(us,()=>{e.destroyed||(a=!0,o=!1)}),this._clickHandlers.set(gs,()=>{e.destroyed||(o=!0)}),this._clickHandlers.set(ps,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.element,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._clickHandlers.set(fs,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this._clickHandlers)s.addEventListener(t,e)}addListeners(){this._eventListeners.addListeners()}clearClickHandlers(){const{container:t,interactivityData:e}=this;if(!t.destroyed){for(const[t,i]of this._clickHandlers)e.element?.removeEventListener(t,i);this._clickHandlers.clear()}}externalInteract(t){for(const e of this._externalInteractors){const{interactivityData:i}=this;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.container.destroyed)return;const{interactivityData:e}=this;for(const i of this._externalInteractors)i.handleClickMode?.(t,e)}init(){this._eventListeners.init();for(const t of this._interactors){switch(t.type){case ts.external:this._externalInteractors.push(t);break;case ts.particles:this._particleInteractors.push(t)}t.init()}}async initInteractors(){const t=await(this._pluginManager.getInteractors?.(this.container,!0));t&&(this._interactors=t,this._externalInteractors=[],this._particleInteractors=[])}particlesInteract(t,e){const{interactivityData:i}=this;for(const i of this._externalInteractors)i.clear(t,e);for(const s of this._particleInteractors)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this._eventListeners.removeListeners()}reset(t){const{interactivityData:e}=this;for(const i of this._externalInteractors)i.isEnabled(e)&&i.reset(e,t);for(const i of this._particleInteractors)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(t.element)}stopObserving(){const{interactivityData:t}=this;t.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this._interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.container;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}_intersectionManager=t=>{const{container:e}=this;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var on=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t,this.interactionManager=new an(t,e),this._container.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this._pluginManager.interactors?.delete(this._container)}particleCreated(t){const e=t,i=new as(this._pluginManager,this._container);i.load(this._container.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 rn=Object.freeze({__proto__:null,OverlapPluginInstance:class{_container;constructor(t){this._container=t}checkParticlePosition(t,e,i){return!this._hasOverlaps(t,e,i)}_hasOverlaps=(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._container.particles.find(i=>Z(e,i.position)<t.getRadius()+i.getRadius())}}});function ln(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 cn=Object.freeze({__proto__:null,LinkInstance:class{_colorCache=new Map;_container;_freqs;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e,this._freqs={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(),c=e.options.twinkle?.links,h=n.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",g=-1,f=-1,y=!1;const _=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this._getLinkFrequency(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(_(),this._drawTriangles(s,e,u,d,r,i,t)),u.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=u.opacity,m=u.color;const b=c?.enable&&L()<c.frequency?Ye(this._pluginManager,c.color):void 0;if(c&&b&&(m=b,v=H(c.opacity)),!m){const t=void 0!==n.id?this._container.particles.linksColors.get(n.id):this._container.particles.linksColor;m=ci(e,u.destination,t)}if(!m)continue;const w=this._getCachedStyle(m);if(w===p&&a===g&&v===f||(_(),t.strokeStyle=w,t.lineWidth=a,t.globalAlpha=v,p=w,g=a,f=v,t.beginPath(),y=!0),u.isWarped){const e=this._container.canvas.size,s=i.x-r.x,n=i.y-r.y;let a=l.x,c=l.y;Math.abs(s)>e.width*o&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*o&&(c=n>0?-e.height:e.height),t.moveTo(r.x,r.y),t.lineTo(i.x+a,i.y+c),t.moveTo(r.x-a,r.y-c),t.lineTo(i.x,i.y)}else t.moveTo(r.x,r.y),t.lineTo(i.x,i.y)}_(),t.globalAlpha=u}init(){return this._freqs.links.clear(),this._freqs.triangles.clear(),this._colorCache.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._container.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}_drawTriangles(t,e,i,s,n,a,r){const l=i.destination,c=t.links?.triangles;if(!c?.enable||!l.options.links?.triangles.enable)return;const h=l.links;if(h?.length)for(const d of h){if(d.isWarped||this._getLinkFrequency(l,d.destination)>l.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this._getTriangleFrequency(e,l,h)>(t.links?.triangles.frequency??0))continue;const u=c.opacity??(i.opacity+d.opacity)*o,p=Ye(this._pluginManager,c.color)??i.color;if(!p||u<=0)continue;const g=h.getPosition();r.save(),r.fillStyle=this._getCachedStyle(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()}}_getCachedStyle(t){const e=`${t.r},${t.g},${t.b}`;let i=this._colorCache.get(e);return i||(i=ai(t,this._container.hdr),this._colorCache.set(e,i)),i}_getLinkFrequency(t,e){return ln([t,e],this._freqs.links)}_getTriangleFrequency(t,e,i){return ln([t,e,i],this._freqs.triangles)}}});t.AnimatableColor=ae,t.AnimationOptions=te,t.AnimationValueWithRandom=fe,t.Background=oe,t.BaseRange=Yt,t.Circle=Jt,t.ColorAnimation=ie,t.Fill=he,t.FullScreen=re,t.HslAnimation=se,t.Move=be,t.MoveAngle=de,t.MoveCenter=ue,t.MoveGravity=pe,t.MovePath=_e,t.Opacity=Pe,t.OpacityAnimation=we,t.Options=Fe,t.OptionsColor=ne,t.OutModes=ve,t.Paint=Me,t.ParticlesBounce=Se,t.ParticlesBounceFactor=ze,t.ParticlesDensity=Oe,t.ParticlesNumber=Ie,t.ParticlesNumberLimit=ke,t.ParticlesOptions=Ae,t.RangedAnimationOptions=ee,t.RangedAnimationValueWithRandom=ye,t.Rectangle=Kt,t.ResizeEvent=le,t.Shape=Ce,t.Size=Te,t.SizeAnimation=De,t.Spin=me,t.Stroke=xe,t.ValueWithRandom=ge,t.Vector=z,t.Vector3d=M,t.ZIndex=Re,t.alterHsl=yi,t.animate=F,t.areBoundsInside=mt,t.arrayRandomIndex=yt,t.calcExactPositionOrRandomFromSize=et,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?H(t.position.x):void 0,y:void 0!==t.position?.y?H(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?H(t.position.x):void 0,y:void 0!==t.position?.y?H(t.position.y):void 0};return tt({size:t.size,position:e})},t.calculateBounds=bt,t.cancelAnimation=V,t.canvasFirstIndex=0,t.canvasTag=f,t.checkDistance=Q,t.circleBounce=xt,t.circleBounceDataFromParticle=Pt,t.clamp=U,t.clear=qe,t.cloneStyle=Ct,t.collisionVelocity=K,t.colorMix=li,t.colorToHsl=function(t,e,i,s=!0){const n=Je(t,e,i,s);return n?ti(n):void 0},t.colorToRgb=Je,t.countOffset=1,t.decayOffset=1,t.deepExtend=wt,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=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=u,t.drawAfterEffect=He,t.drawBeforeEffect=$e,t.drawParticle=Be,t.drawParticlePlugin=Ne,t.drawShape=We,t.drawShapeAfterDraw=Ge,t.drawShapeBeforeDraw=je,t.empty=0,t.executeOnSingleOrMultiple=Mt,t.findItemFromSingleOrMultiple=function(t,e){return C(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=g,t.generatedTrue=p,t.getDistance=Z,t.getDistanceSq=N,t.getDistances=j,t.getFullScreenStyle=Dt,t.getHslAnimationFromHsl=ui,t.getHslFromAnimation=di,t.getItemMapFromInitializer=At,t.getItemsFromInitializer=Rt,t.getLinkColor=ci,t.getLinkRandomColor=hi,t.getLogger=qt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Y,t.getPosition=kt,t.getRandom=L,t.getRandomInRange=E,t.getRandomRgbColor=ni,t.getRangeMax=W,t.getRangeMin=$,t.getRangeValue=H,t.getSize=function(t,e){return Ot(t,e)},t.getStyleFromHsl=ri,t.getStyleFromRgb=ai,t.hMax=_,t.hMin=0,t.hPhase=60,t.half=o,t.hasMatchMedia=ht,t.hslToRgb=ii,t.hslaToRgba=si,t.identity=1,t.initParticleNumericAnimationValue=St,t.inverseFactorNumerator=1,t.isArray=C,t.isBoolean=S,t.isFunction=function(t){return"function"==typeof t},t.isInArray=ft,t.isNull=D,t.isNumber=k,t.isObject=I,t.isPointInside=vt,t.isString=O,t.itemFromArray=_t,t.itemFromSingleOrMultiple=zt,t.lFactor=1,t.lMax=m,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=Le,t.loadParticlesOptions=Ee,t.loadRandomFactor=1e4,t.manageListener=Tt,t.memoize=ct,t.midColorValue=d,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=q,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Ve,t.paintImage=Ue,t.parseAlpha=it,t.particles=Us,t.percentDenominator=a,t.phaseNumerator=1,t.quarter=b,t.randomColorValue=h,t.randomInRangeValue=B,t.rangeColorToHsl=Ke,t.rangeColorToRgb=Ye,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=ti,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=dt,t.safeIntersectionObserver=pt,t.safeMatchMedia=ut,t.safeMutationObserver=gt,t.setAnimationFunctions=function(t,e){A.nextFrame=t,A.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){R=t},t.setRangeValue=G,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return Xe(t,e)?.a},t.stringToRgb=ei,t.threeQuarter=w,t.triple=3,t.tryCountIncrement=1,t.tsParticles=_i,t.updateAnimation=It,t.updateColor=fi,t.updateColorValue=gi,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadMinIndex:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadMinIndex,loadOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadParticlesOptions,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRandomFactor,tsParticles:(globalThis.__tsParticlesInternals.bundles.particles||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -0,0 +1,145 @@
1
+ (function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
2
+ /* tsParticles v4.0.0-beta.12 */
3
+ (function (global, factory) {
4
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/engine'), require('@tsparticles/basic'), require('@tsparticles/plugin-interactivity'), require('@tsparticles/interaction-particles-collisions'), require('@tsparticles/interaction-particles-links')) :
5
+ typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/engine', '@tsparticles/basic', '@tsparticles/plugin-interactivity', '@tsparticles/interaction-particles-collisions', '@tsparticles/interaction-particles-links'], factory) :
6
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.__tsParticlesInternals = global.__tsParticlesInternals || {}, global.__tsParticlesInternals.bundles = global.__tsParticlesInternals.bundles || {}, global.__tsParticlesInternals.bundles.particles = global.__tsParticlesInternals.bundles.particles || {}), global.__tsParticlesInternals.engine, global.__tsParticlesInternals.bundles.basic, global.__tsParticlesInternals.plugins.interactivity, global.__tsParticlesInternals.interactions.particlesCollisions, global.__tsParticlesInternals.interactions.particlesLinks));
7
+ })(this, (function (exports, engine, basic, pluginInteractivity, interactionParticlesCollisions, interactionParticlesLinks) { 'use strict';
8
+
9
+ const instances = new Map(), defaultCount = 80, defaultLinksWidth = 100, defaultSpeed = 3, defaultOpacity = 1, defaultRadius = 3;
10
+ function getDefaultOptions(options) {
11
+ return {
12
+ particles: {
13
+ number: {
14
+ value: options.count ?? defaultCount,
15
+ },
16
+ color: {
17
+ value: options.color ?? "#fff",
18
+ },
19
+ links: {
20
+ enable: options.links ?? false,
21
+ color: options.linksColor ?? "#fff",
22
+ distance: options.linksLength ?? defaultLinksWidth,
23
+ },
24
+ collisions: {
25
+ enable: options.collisions ?? false,
26
+ },
27
+ move: {
28
+ enable: true,
29
+ speed: options.speed ?? defaultSpeed,
30
+ },
31
+ opacity: {
32
+ value: options.opacity ?? defaultOpacity,
33
+ },
34
+ shape: {
35
+ type: options.shape ?? "circle",
36
+ },
37
+ size: {
38
+ value: options.radius ?? defaultRadius,
39
+ },
40
+ },
41
+ };
42
+ }
43
+ async function getParticlesInstance(engine, id, sourceOptions, canvas) {
44
+ const existing = instances.get(id);
45
+ if (existing instanceof Promise) {
46
+ return existing;
47
+ }
48
+ if (existing) {
49
+ return existing;
50
+ }
51
+ const create = async () => {
52
+ const particlesOptions = getDefaultOptions(sourceOptions), container = await engine.load({ id, element: canvas, options: particlesOptions });
53
+ if (!container) {
54
+ instances.delete(id);
55
+ return;
56
+ }
57
+ const { ParticlesInstance } = await Promise.resolve().then(function () { return ParticlesInstance$1; }), instance = new ParticlesInstance(container);
58
+ instances.set(id, instance);
59
+ return instance;
60
+ }, createPromise = create();
61
+ instances.set(id, createPromise);
62
+ return createPromise;
63
+ }
64
+
65
+ let initPromise = null;
66
+ async function doInitPlugins(engine) {
67
+ engine.checkVersion("4.0.0-beta.12");
68
+ await engine.pluginManager.register(async (e) => {
69
+ const loadParticlesInteractivity = async (e) => {
70
+ await pluginInteractivity.loadInteractivityPlugin(e);
71
+ await Promise.all([
72
+ interactionParticlesCollisions.loadParticlesCollisionsInteraction(e),
73
+ interactionParticlesLinks.loadParticlesLinksInteraction(e),
74
+ ]);
75
+ };
76
+ await Promise.all([
77
+ basic.loadBasic(e),
78
+ loadParticlesInteractivity(e),
79
+ ]);
80
+ });
81
+ }
82
+ async function initPlugins(engine) {
83
+ if (initPromise) {
84
+ return initPromise;
85
+ }
86
+ initPromise = doInitPlugins(engine);
87
+ return initPromise;
88
+ }
89
+ async function particles(idOrOptions, sourceOptions) {
90
+ await initPlugins(engine.tsParticles);
91
+ let id, options;
92
+ if (engine.isString(idOrOptions)) {
93
+ id = idOrOptions;
94
+ options = sourceOptions ?? {};
95
+ }
96
+ else {
97
+ id = "particles";
98
+ options = idOrOptions ?? {};
99
+ }
100
+ return getParticlesInstance(engine.tsParticles, id, options);
101
+ }
102
+ particles.create = async (canvas, options) => {
103
+ await initPlugins(engine.tsParticles);
104
+ const id = canvas.id || "particles";
105
+ return getParticlesInstance(engine.tsParticles, id, options ?? {}, canvas);
106
+ };
107
+ particles.init = async () => {
108
+ await initPlugins(engine.tsParticles);
109
+ };
110
+ particles.version = "4.0.0-beta.12";
111
+ globalThis.particles = particles;
112
+
113
+ const globalObject = globalThis;
114
+ globalObject.__tsParticlesInternals = globalObject.__tsParticlesInternals ?? {};
115
+ globalObject.particles = particles;
116
+
117
+ class ParticlesInstance {
118
+ _container;
119
+ constructor(container) {
120
+ this._container = container;
121
+ }
122
+ pause() {
123
+ this._container.pause();
124
+ }
125
+ play() {
126
+ this._container.play();
127
+ }
128
+ stop() {
129
+ this._container.stop();
130
+ }
131
+ }
132
+
133
+ var ParticlesInstance$1 = /*#__PURE__*/Object.freeze({
134
+ __proto__: null,
135
+ ParticlesInstance: ParticlesInstance
136
+ });
137
+
138
+ exports.particles = particles;
139
+
140
+ }));
141
+ globalThis.__tsParticlesInternals = globalThis.__tsParticlesInternals || {};
142
+ if (!globalThis.__tsParticlesInternals.engine || !globalThis.__tsParticlesInternals.engine.tsParticles) {
143
+ globalThis.__tsParticlesInternals.engine = globalThis.__tsParticlesInternals.bundles.particles || {};
144
+ }
145
+ delete (globalThis.window || globalThis).tsparticlesInternalExports;
@@ -0,0 +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 s="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,s){return s in t||(t[s]={}),t[s]}})}:function(t){return t};t.__tsParticlesInternals.bundles=s(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=s(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=s(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=s(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=s(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=s(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=s(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=s(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=s(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=s(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=s(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=s(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=s(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/plugin-interactivity"),require("@tsparticles/interaction-particles-collisions"),require("@tsparticles/interaction-particles-links")):"function"==typeof define&&define.amd?define(["exports","@tsparticles/engine","@tsparticles/basic","@tsparticles/plugin-interactivity","@tsparticles/interaction-particles-collisions","@tsparticles/interaction-particles-links"],s):s(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{}),t.__tsParticlesInternals.engine,t.__tsParticlesInternals.bundles.basic,t.__tsParticlesInternals.plugins.interactivity,t.__tsParticlesInternals.interactions.particlesCollisions,t.__tsParticlesInternals.interactions.particlesLinks)}(this,function(t,s,e,n,a,l){"use strict";const r=new Map;async function i(t,s,e,n){const a=r.get(s);if(a instanceof Promise)return a;if(a)return a;const l=(async()=>{const a={particles:{number:{value:(i=e).count??80},color:{value:i.color??"#fff"},links:{enable:i.links??!1,color:i.linksColor??"#fff",distance:i.linksLength??100},collisions:{enable:i.collisions??!1},move:{enable:!0,speed:i.speed??3},opacity:{value:i.opacity??1},shape:{type:i.shape??"circle"},size:{value:i.radius??3}}},l=await t.load({id:s,element:n,options:a});var i;if(!l)return void r.delete(s);const{ParticlesInstance:c}=await Promise.resolve().then(function(){return P}),_=new c(l);return r.set(s,_),_})();return r.set(s,l),l}let c=null;async function _(t){return c||(c=async function(t){t.checkVersion("4.0.0-beta.12"),await t.pluginManager.register(async t=>{await Promise.all([e.loadBasic(t),(async t=>{await n.loadInteractivityPlugin(t),await Promise.all([a.loadParticlesCollisionsInteraction(t),l.loadParticlesLinksInteraction(t)])})(t)])})}(t),c)}async function o(t,e){let n,a;return await _(s.tsParticles),s.isString(t)?(n=t,a=e??{}):(n="particles",a=t??{}),i(s.tsParticles,n,a)}o.create=async(t,e)=>{await _(s.tsParticles);const n=t.id||"particles";return i(s.tsParticles,n,e??{},t)},o.init=async()=>{await _(s.tsParticles)},o.version="4.0.0-beta.12",globalThis.particles=o;const p=globalThis;p.__tsParticlesInternals=p.__tsParticlesInternals??{},p.particles=o;var P=Object.freeze({__proto__:null,ParticlesInstance:class{_container;constructor(t){this._container=t}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}});t.particles=o}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
@@ -0,0 +1,13 @@
1
+ import type { RangeValue, SingleOrMultiple } from "@tsparticles/engine";
2
+ export interface IParticlesOptions {
3
+ collisions?: boolean;
4
+ color?: string;
5
+ count?: number;
6
+ links?: boolean;
7
+ linksColor?: string;
8
+ linksLength?: number;
9
+ opacity?: number;
10
+ radius?: RangeValue;
11
+ shape?: SingleOrMultiple<string>;
12
+ speed?: RangeValue;
13
+ }
@@ -0,0 +1,8 @@
1
+ import type { Container } from "@tsparticles/engine";
2
+ export declare class ParticlesInstance {
3
+ private readonly _container;
4
+ constructor(container: Container);
5
+ pause(): void;
6
+ play(): void;
7
+ stop(): void;
8
+ }
@@ -0,0 +1 @@
1
+ export * from "./index.js";
@@ -0,0 +1,3 @@
1
+ export { particles } from "./index.js";
2
+ export type { ParticlesOptions } from "./index.js";
3
+ export * from "@tsparticles/engine";
@@ -0,0 +1,4 @@
1
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
2
+ import type { RecursivePartial } from "@tsparticles/engine";
3
+ export type ParticlesOptions = RecursivePartial<IParticlesOptions>;
4
+ export * from "./particles.js";
@@ -0,0 +1,4 @@
1
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
2
+ import type { RecursivePartial } from "@tsparticles/engine/lazy";
3
+ export type ParticlesOptions = RecursivePartial<IParticlesOptions>;
4
+ export * from "./particles.lazy.js";
@@ -0,0 +1,17 @@
1
+ import { type RecursivePartial } from "@tsparticles/engine";
2
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
3
+ import type { ParticlesFunc } from "./types.js";
4
+ import type { ParticlesInstance } from "./ParticlesInstance.js";
5
+ declare global {
6
+ var particles: ParticlesFunc & {
7
+ create: (canvas: HTMLCanvasElement, options: RecursivePartial<IParticlesOptions>) => Promise<ParticlesInstance | undefined>;
8
+ init: () => Promise<void>;
9
+ version: string;
10
+ };
11
+ }
12
+ export declare function particles(idOrOptions?: string | RecursivePartial<IParticlesOptions>, sourceOptions?: RecursivePartial<IParticlesOptions>): Promise<ParticlesInstance | undefined>;
13
+ export declare namespace particles {
14
+ var create: (canvas: HTMLCanvasElement, options?: RecursivePartial<IParticlesOptions>) => Promise<ParticlesInstance | undefined>;
15
+ var init: () => Promise<void>;
16
+ var version: string;
17
+ }
@@ -0,0 +1,17 @@
1
+ import { type RecursivePartial } from "@tsparticles/engine/lazy";
2
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
3
+ import type { ParticlesFunc } from "./types.js";
4
+ import type { ParticlesInstance } from "./ParticlesInstance.js";
5
+ declare global {
6
+ var particles: ParticlesFunc & {
7
+ create: (canvas: HTMLCanvasElement, options: RecursivePartial<IParticlesOptions>) => Promise<ParticlesInstance | undefined>;
8
+ init: () => Promise<void>;
9
+ version: string;
10
+ };
11
+ }
12
+ export declare function particles(idOrOptions?: string | RecursivePartial<IParticlesOptions>, sourceOptions?: RecursivePartial<IParticlesOptions>): Promise<ParticlesInstance | undefined>;
13
+ export declare namespace particles {
14
+ var create: (canvas: HTMLCanvasElement, options?: RecursivePartial<IParticlesOptions>) => Promise<ParticlesInstance | undefined>;
15
+ var init: () => Promise<void>;
16
+ var version: string;
17
+ }
@@ -0,0 +1,6 @@
1
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
2
+ import type { ParticlesInstance } from "./ParticlesInstance.js";
3
+ import type { RecursivePartial } from "@tsparticles/engine";
4
+ export type ParticlesFunc = ((idOrOptions?: string | RecursivePartial<IParticlesOptions>, sourceOptions?: RecursivePartial<IParticlesOptions>) => Promise<ParticlesInstance | undefined>) & {
5
+ version: string;
6
+ };
@@ -0,0 +1,4 @@
1
+ import type { Engine, RecursivePartial } from "@tsparticles/engine";
2
+ import type { IParticlesOptions } from "./IParticlesOptions.js";
3
+ import type { ParticlesInstance } from "./ParticlesInstance.js";
4
+ export declare function getParticlesInstance(engine: Engine, id: string, sourceOptions: RecursivePartial<IParticlesOptions>, canvas?: HTMLCanvasElement): Promise<ParticlesInstance | undefined>;