UNPKG

tsparticles

Version:

Full-featured tsParticles bundle — create stunning particle, confetti and fireworks animations with all official plugins and presets included. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inf

1 lines 195 kB
!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.full=t.__tsParticlesInternals.bundles.full||{}))}(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},d="random",h="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,v=100,b=100,w=.25,x=.75,M=400;var P;function k(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 C{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 C.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return C.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new C(t,e??l.y,i??l.z):new C(t.x,t.y,k(t))}add(t){return C.create(this.x+t.x,this.y+t.y,this.z+k(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=k(t)}copy(){return C.clone(this)}div(t){return C.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return C.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 C.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=k(t)}sub(t){return C.create(this.x-t.x,this.y-t.y,this.z-k(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=k(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class O extends C{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return O.create(l.x,l.y)}static clone(t){return O.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new O(t,e??l.y):new O(t.x,t.y)}}function D(t){return"boolean"==typeof t}function z(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function T(t){return Array.isArray(t)}function E(t){return null==t}const R=Math.PI/180;let L=Math.random;const _={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function A(){return H(L(),0,1-Number.EPSILON)}function F(t,e){return A()*(e-t)+t}function V(t){return _.nextFrame(t)}function B(t){_.cancel(t)}function H(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 U(t){const e=$(t);let i=j(t);return e===i&&(i=0),F(i,e)}function W(t){return S(t)?t:U(t)}function j(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(t))return t;const i=j(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function N(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function X(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Y(t,e){return Math.sqrt(X(t,e))}function K(t,e,i){return X(t,e)<=i*i}function Q(t){return t*R}function Z(e,i,s){if(S(e))return Q(e);switch(e){case t.MoveDirection.top:return-Math.PI*o;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*o;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(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 A()*u}}function J(t){const e=O.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,s){return O.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function et(t){return{x:(t.position?.x??A()*a)*t.size.width/a,y:(t.position?.y??A()*a)*t.size.height/a}}function it(t){const e={x:void 0!==t.position?.x?W(t.position.x):void 0,y:void 0!==t.position?.y?W(t.position.y):void 0};return et({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}function nt(t){return t?t.endsWith("%")?parseFloat(t)/a:parseFloat(t):1}var at,ot;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(ot=t.PixelMode||(t.PixelMode={})).precise="precise",ot.percent="percent";function rt(){return globalThis.document}function lt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function ct(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function dt(t,e){return t===e||T(e)&&e.includes(t)}function ht(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function ut(t,e,i,s,n){return pt(gt(t,s??0),e,i,n)}function pt(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 gt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ft(t,...e){for(const i of e){if(E(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>ft(void 0,t)):ft(e[s],n)}}return t}function yt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:O.create(W(t.options.bounce.horizontal.value),W(t.options.bounce.vertical.value))}}function mt(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=N(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=tt(h,u,c,d),g=tt(u,h,c,d),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 vt(t,e){return T(t)?t.map((t,i)=>e(t,i)):e(t,0)}function bt(t,e,i){return T(t)?ht(t,e,i):t}function wt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/a*i.width,y:e.y/a*i.height}:{width:e.width/a*i.width,height:e.height/a*i.height}}(e,i)}function xt(t){const e=rt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||E(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}let Mt,Pt;function kt(t){if(Mt!==t||!Pt){Mt=t;const e=rt().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}Pt=e}return Pt}function Ct(t,e,i,s,n){if(s){let s={passive:!0};D(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 Ot(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 Dt(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 zt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var St;t.EventType=void 0,(St=t.EventType||(t.EventType={})).configAdded="configAdded",St.containerInit="containerInit",St.particlesSetup="particlesSetup",St.containerStarted="containerStarted",St.containerStopped="containerStopped",St.containerDestroyed="containerDestroyed",St.containerPaused="containerPaused",St.containerPlay="containerPlay",St.containerBuilt="containerBuilt",St.particleAdded="particleAdded",St.particleDestroyed="particleDestroyed",St.particleRemoved="particleRemoved";class It{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ot(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Tt=t=>(...e)=>{t(...e)},Et={debug:Tt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Tt(console.info),log:Tt(console.log),trace:Tt(console.trace),verbose:Tt(console.log),warning:Tt(console.warn)};function Rt(){return Et}const Lt="100%";class _t{pluginManager=new It(this);#d=[];#h=new zt;#o=!1;get items(){return this.#d}get version(){return"4.3.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#h.dispatchEvent(t,e)}async init(){this.#o||(await this.pluginManager.init(),this.#o=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return Lr}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=bt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Rt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=bt(r,a),{items:c}=this,d=c.findIndex(t=>t.id.description===n),h=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=rt();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)s=t,s.dataset[e]??=g,s.dataset[e]===p&&(s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(f).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(f),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Lt,s.style.height||=Lt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=rt();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return h.canvas.loadCanvas(u),await h.start(),h}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}var At,Ft,Vt,Bt,Ht,qt,Ut,Wt,jt,$t,Gt,Nt;!function(t){t.circle="circle",t.rectangle="rectangle"}(At||(At={}));class Xt{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 Yt extends Xt{radius;constructor(t,e,i){super(t,e,At.circle),this.radius=i}contains(t){return K(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 Yt||t.type===At.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Kt||t.type===At.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 Xt{size;constructor(t,e,i,s){super(t,e,At.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 Yt)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,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(Vt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Vt.increase="increase",Vt.decrease="decrease",Vt.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Ht=t.OutMode||(t.OutMode={})).bounce="bounce",Ht.none="none",Ht.out="out",Ht.destroy="destroy",Ht.split="split",t.AlterType=void 0,(qt=t.AlterType||(t.AlterType={})).darken="darken",qt.enlighten="enlighten",t.DestroyType=void 0,(Ut=t.DestroyType||(t.DestroyType={})).none="none",Ut.max="max",Ut.min="min",t.GradientType=void 0,(Wt=t.GradientType||(t.GradientType={})).linear="linear",Wt.radial="radial",Wt.random="random",t.ParticleOutType=void 0,(jt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",jt.inside="inside",jt.outside="outside",t.StartValueType=void 0,($t=t.StartValueType||(t.StartValueType={})).max="max",$t.min="min",$t.random="random",t.AnimationStatus=void 0,(Gt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Gt.decreasing="decreasing",t.DrawLayer=void 0,(Nt=t.DrawLayer||(t.DrawLayer={}))[Nt.BackgroundElement=0]="BackgroundElement",Nt[Nt.BackgroundDraw=1]="BackgroundDraw",Nt[Nt.BackgroundMask=2]="BackgroundMask",Nt[Nt.CanvasSetup=3]="CanvasSetup",Nt[Nt.PluginContent=4]="PluginContent",Nt[Nt.Particles=5]="Particles",Nt[Nt.CanvasCleanup=6]="CanvasCleanup",Nt[Nt.Foreground=7]="Foreground";class Qt{load(t){E(t)||this.doLoad(t)}}function Zt(t,...e){for(const i of e)t.load(i)}function Jt(t,e,i){void 0!==i&&(t[e]=i)}function te(t,e,i){void 0!==i&&(t[e]=G(i))}function ee(t,e,i){void 0!==i&&t[e].load(i)}function ie(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function se(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class ne extends Qt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){te(this,"count",t.count),Jt(this,"enable",t.enable),te(this,"speed",t.speed),te(this,"decay",t.decay),te(this,"delay",t.delay),Jt(this,"sync",t.sync)}}class ae extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Jt(this,"mode",t.mode),Jt(this,"startValue",t.startValue)}}class oe extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Jt(this,"max",t.max),Jt(this,"min",t.min),te(this,"offset",t.offset)}}class re extends Qt{h=new oe(0,m);l=new oe(0,b);s=new oe(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class le extends Qt{value="";static create(t,e){const i=new le;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){E(t.value)||(this.value=t.value)}}class ce extends le{animation=new re;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(z(e)||T(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class de extends Qt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new le,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"element",t.element),Jt(this,"draw",t.draw),Jt(this,"image",t.image),Jt(this,"position",t.position),Jt(this,"repeat",t.repeat),Jt(this,"size",t.size),Jt(this,"opacity",t.opacity)}}class he extends Qt{enable=!0;zIndex=0;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"zIndex",t.zIndex)}}class ue extends Qt{delay=.5;enable=!0;doLoad(t){Jt(this,"delay",t.delay),Jt(this,"enable",t.enable)}}class pe extends Qt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ft(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class ge extends Qt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"enable",t.enable),te(this,"opacity",t.opacity)}}class fe extends Qt{offset=0;value=90;doLoad(t){te(this,"offset",t.offset),te(this,"value",t.value)}}class ye extends Qt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Jt(this,"x",t.x),Jt(this,"y",t.y),Jt(this,"mode",t.mode),Jt(this,"radius",t.radius)}}class me extends Qt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),Jt(this,"inverse",t.inverse),te(this,"maxSpeed",t.maxSpeed)}}class ve extends Qt{value=0;doLoad(t){E(t.value)||(this.value=G(t.value))}}class be extends ve{animation=new ne;doLoad(t){super.doLoad(t),ee(this,"animation",t.animation)}}class we extends be{animation=new ae}class xe extends Qt{clamp=!0;delay=new ve;enable=!1;generator;options={};doLoad(t){Jt(this,"clamp",t.clamp),this.delay.load(t.delay),Jt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=ft(this.options,t.options))}}class Me extends Qt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class Pe extends Qt{acceleration=0;enable=!1;position;doLoad(t){te(this,"acceleration",t.acceleration),Jt(this,"enable",t.enable),t.position&&(this.position=ft({},t.position))}}class ke extends Qt{angle=new fe;center=new ye;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new me;outModes=new Me;path=new xe;random=!1;size=!1;speed=2;spin=new Pe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),te(this,"decay",t.decay),Jt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),te(this,"drift",t.drift),Jt(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),Jt(this,"random",t.random),Jt(this,"size",t.size),te(this,"speed",t.speed),this.spin.load(t.spin),Jt(this,"straight",t.straight),Jt(this,"vibrate",t.vibrate),Jt(this,"warp",t.warp)}}class Ce extends Qt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),te(this,"width",t.width),te(this,"opacity",t.opacity)}}class Oe extends Qt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ie(this,"fill",t.fill,()=>new ge),ie(this,"stroke",t.stroke,()=>new Ce)}}class De extends ve{value=1}class ze extends Qt{horizontal=new De;vertical=new De;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Se extends Qt{enable=!1;height=1080;width=1920;doLoad(t){Jt(this,"enable",t.enable),Jt(this,"width",t.width),Jt(this,"height",t.height)}}class Ie extends Qt{mode=t.LimitMode.delete;value=0;doLoad(t){Jt(this,"mode",t.mode),Jt(this,"value",t.value)}}class Te extends Qt{density=new Se;limit=new Ie;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Jt(this,"value",t.value)}}class Ee extends Qt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ft(this.options[t]??{},i))}Jt(this,"close",t.close),Jt(this,"type",t.type)}}class Re extends ve{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Jt(this,"opacityRate",t.opacityRate),Jt(this,"sizeRate",t.sizeRate),Jt(this,"velocityRate",t.velocityRate)}}class Le extends Qt{bounce=new ze;effect=new pe;groups={};move=new ke;number=new Te;paint;palette;reduceDuplicates=!1;shape=new Ee;zIndex=new Re;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Oe,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new ge,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=ft(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(T(e)?this.paint=vt(e,t=>{const e=new Oe;return e.load(t),e}):T(this.paint)?(this.paint=new Oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(T(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 _e(t,e,...i){const s=new Le(t,e);return Zt(s,...i),s}class Ae extends Qt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new de,this.fullScreen=new he,this.particles=_e(this.#p,this.#u),this.resize=new ue}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,vt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Jt(this,"autoPlay",t.autoPlay),Jt(this,"clear",t.clear),Jt(this,"key",t.key),Jt(this,"name",t.name),te(this,"delay",t.delay),Jt(this,"detectRetina",t.detectRetina),te(this,"duration",t.duration),Jt(this,"fpsLimit",t.fpsLimit),Jt(this,"hdr",t.hdr),Jt(this,"pauseOnBlur",t.pauseOnBlur),Jt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Jt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;D(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=ft(this.style,t.style),Jt(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Fe=new Map;function Ve(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function He(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return qe(t,n.value,i,s);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function qe(t,e,i,s=!0){if(!e)return;const n=z(e)?{value:e}:e;if(z(n.value))return n.value===d?Ye():je(t,n.value);if(T(n.value)){const e=ht(n.value,i,s);if(!e)return;return qe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ue(t,e,i,s=!0){const n=He(t,e,i,s);return n?We(n):void 0}function We(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*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function je(t,e){return Be(t,e)}function $e(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ge(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,a=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3,h=Math.min(y,y*$e(c,l,n+d)),u=Math.min(y,y*$e(c,l,n)),p=Math.min(y,y*$e(c,l,n-d));return{r:Math.round(h),g:Math.round(u),b:Math.round(p)}}function Ne(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,a=i/v,r=s/b;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const l=r<o?r*(1+a):r+a-r*a,c=2*r-l,d=1/3;return{r:Math.min(y,y*$e(c,l,n+d)),g:Math.min(y,y*$e(c,l,n)),b:Math.min(y,y*$e(c,l,n-d))}}function Xe(t){const e=Ge(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ye(t,e){const i=t??0;if(e)return{r:F(i,y),g:F(i,y),b:F(i,y)};const s=()=>Math.floor(F(i,256));return{b:s(),g:s(),r:s()}}function Ke(t,e,i){const s=e?4:2,n=i??1;return Ve(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Qe(t,e,i){const s=e?4:2,n=i??1;return Ve(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ke(Ne(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Ze(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ge(t)),"r"in a||(a=Ge(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 Je(t,e,i){if(i===d)return Ye();if(i!==h)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return Ze(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ge(t)}}}function ti(t,e,i,s){const n=z(e)?e:e.value;return n===d?s?He(t,{value:n}):i?d:h:n===h?h:He(t,{value:n})}function ei(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ii(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(si(s.h,e.h,i),si(s.s,e.s,i),si(s.l,e.l,i)),s}function si(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=W(i.speed)/a*s,e.decay=1-W(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=W(i.count),e.time=0,e.delayTime=W(i.delay)*r,i.sync||(e.velocity*=A(),e.value*=A()),e.initialValue=e.value,e.offset=G(i.offset)):e.velocity=0}function ni(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?U(e.offset):0,o=((e.velocity??0)*s.factor+3.6*a)*(n?.5075:1),r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=H(e.value,c,l)}function ai(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;ni(s,!1,e,i),ni(n,!0,e,i),ni(a,!0,e,i)}function oi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const ri=new _t;class li{enable=!1;mode=[];load(t){E(t)||(Jt(this,"enable",t.enable),Jt(this,"mode",t.mode))}}var ci,di,hi;!function(t){t.circle="circle",t.rectangle="rectangle"}(ci||(ci={}));class ui{enable=!1;mode=[];selectors=[];type=ci.circle;load(t){E(t)||(Jt(this,"selectors",t.selectors),Jt(this,"enable",t.enable),Jt(this,"mode",t.mode),Jt(this,"type",t.type))}}class pi{enable=!1;mode=[];load(t){E(t)||(Jt(this,"enable",t.enable),Jt(this,"mode",t.mode))}}class gi{onClick=new li;onDiv=new ui;onHover=new pi;load(t){if(E(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=vt(e,t=>{const e=new ui;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(di||(di={}));class fi{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(E(t))return;if(!this.#u)return;const e=this.#p.interactors?.get(this.#u);if(e)for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class yi{detectsOn=di.window;events=new gi;modes;constructor(t,e){this.modes=new fi(t,e)}load(t){if(E(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class mi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Fr});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new yi(this.#p,t)),s.load(i?.interactivity);const n=this.#p.interactors?.get(t);if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=ft({},i.interactivity));const s=this.#p.interactors?.get(t);if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(hi||(hi={}));class vi{type=hi.external;container;constructor(t){this.container=t}}class bi{type=hi.particles;container;constructor(t){this.container=t}}const wi="pointerdown",xi="pointerup",Mi="pointerleave",Pi="pointermove",ki="touchstart",Ci="touchend",Oi="touchmove",Di="touchcancel";function zi(t,e){if(T(t))return t.find((t,i)=>e(t,i));return e(t,0)?t:void 0}function Si(t,e){return!!zi(e,e=>e.enable&&dt(t,e.mode))}function Ii(t,e,i){vt(e,e=>{const s=e.mode;e.enable&&dt(t,s)&&function(t,e){const i=t.selectors;vt(i,i=>{e(i,t)})}(e,i)})}function Ti(t,e){if(e&&t)return zi(t,t=>function(t,e){const i=vt(e,e=>t.matches(e));return T(i)?i.some(t=>t):i}(e,t.selectors))}function Ei(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}class Ri{count;delay;duration;wait=!1;load(t){E(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class Li{mass=0;radius=0;load(t){E(t)||(Jt(this,"mass",t.mass),Jt(this,"radius",t.radius))}}class _i extends ve{density=5;limit=new Li;value=50;load(t){E(t)||(super.load(t),Jt(this,"density",t.density),S(t.limit)?this.limit.radius=t.limit:this.limit.load(t.limit))}}class Ai{color;destroy;draggable;life;name;opacity;orbits;position;size;constructor(){this.color=new le,this.color.value="#000000",this.draggable=!1,this.opacity=1,this.destroy=!0,this.orbits=!1,this.life=new Ri,this.size=new _i}load(t){E(t)||(void 0!==t.color&&(this.color=le.create(this.color,t.color)),Jt(this,"draggable",t.draggable),void 0!==t.life&&this.life.load(t.life),this.name=t.name,Jt(this,"opacity",t.opacity),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.size&&this.size.load(t.size),Jt(this,"destroy",t.destroy),Jt(this,"orbits",t.orbits))}}const Fi="absorbers";class Vi extends vi{handleClickMode;maxDistance;#y=!1;#m;#v;constructor(t,e){super(t),this.maxDistance=0,this.#v=e,this.#v.initContainer(t),this.handleClickMode=(t,i)=>{const s=this.container,n=s.actualOptions.interactivity.modes.absorbers;if(!n||t!==Fi)return;const{clickPosition:a}=i.mouse;if(a){if(e.getArray(this.container).some(t=>Y(t.position,a)<t.size))return}const o=ht(n)??new Ai;this.#v.addAbsorber(s,o,a)}}clear(){}init(){}interact(t,e){for(const i of this.container.particles.filter(e=>this.isEnabled(t,e)))for(const s of this.#v.getArray(this.container)){if(s.options.draggable){const e=t.mouse;if(e.clicking&&e.downPosition){Y(s.position,e.downPosition)<=s.size&&(this.#y=!0,this.#m=s)}else this.#y=!1,this.#m=void 0;this.#y&&this.#m==s&&e.position&&(s.position.x=e.position.x,s.position.y=e.position.y)}if(s.attract(i,e),i.destroyed)break}}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&dt(Fi,n.onClick.mode)}loadModeOptions(t,...e){t.absorbers??=[];for(const i of e)if(i)if(T(i.absorbers))for(const e of i.absorbers){const i=new Ai;i.load(e),t.absorbers.push(i)}else{const e=new Ai;e.load(i.absorbers),t.absorbers.push(e)}}reset(){}}const Bi=new WeakMap;function Hi(t){const e=t.pluginManager;let i=Bi.get(e);return i||(i=Promise.resolve().then(function(){return Vr}).then(({AbsorbersInstancesManager:t})=>new t(e)).catch(t=>{throw Bi.delete(e),t}),Bi.set(e,i)),i}class qi{id="absorbers";#v;constructor(t){this.#v=t}async getPlugin(t){const{AbsorbersPluginInstance:e}=await Promise.resolve().then(function(){return Br});return new e(t,this.#v)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.absorbers&&(e.absorbers=vt(i.absorbers,t=>{const e=new Ai;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.absorbers;return T(e)?!!e.length:!!e}}async function Ui(t){await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Hi(t);e.addPlugin(new qi(i))})}(t),await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=t.pluginManager,i=await Hi(t);Ei(t),e.addInteractor?.("externalAbsorbers",t=>Promise.resolve(new Vi(t,i)))})}(t)}class Wi{bottom;left;right;top;load(t){E(t)||(te(this,"bottom",t.bottom),te(this,"left",t.left),te(this,"right",t.right),te(this,"top",t.top))}}var ji;!function(t){t.explode="explode",t.none="none",t.split="split"}(ji||(ji={}));class $i{maxSizeFactor=3;speed=2;load(t){E(t)||(Jt(this,"maxSizeFactor",t.maxSizeFactor),Jt(this,"speed",t.speed))}}class Gi extends ve{value=3}class Ni extends ve{value={min:4,max:9}}class Xi{count=1;factor=new Gi;fillColor;fillColorOffset;particles;rate=new Ni;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){E(t)||(void 0!==t.fillColor&&(this.fillColor=le.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=le.create(this.strokeColor,t.strokeColor)),Jt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=vt(t.particles,t=>ft({},t)),Jt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}let Yi=class{bounds=new Wi;explode=new $i;mode=ji.none;split=new Xi;load(t){E(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}};function Ki(t,e,i,s){return t&&s?function(t,e){const i=W(e.h??0),s=W(e.s??0),n=W(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return ce.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?ce.create(void 0,e):i?ce.create(void 0,i):s?function(t){return ce.create(void 0,{value:{hsl:t}})}(s):void 0}function Qi(e,i,s,n){const a=s.options.destroy;if(!a)return;const o=a.split,r=_e(e,i,s.options),l=bt(o.fillColor),c=bt(o.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/W(o.factor.value),p=r.size;p&&(S(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const g=bt(r.paint),f=g?.fill,y=g?.stroke,m=Ki(o.fillColorOffset,l,f?.color,d),v=Ki(o.strokeColorOffset,c,y?.color,h);m&&f&&(f.color=m),v&&y&&(y.color=v);const b=o.sizeOffset?G(-s.size.value,s.size.value):0,w={x:s.position.x+U(b),y:s.position.y+U(b)};return i.particles.addParticle(w,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(G(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Zi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:r,top:l}=s,{destroyBounds:c}=t,d=e.canvas.size;n&&(c.bottom=W(n)*d.height/a),o&&(c.left=W(o)*d.width/a),r&&(c.right=W(r)*d.width/a),l&&(c.top=W(l)*d.height/a)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){se(t,"destroy",Yi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case ji.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=W(n.rate.value),o=bt(n.particles);for(let s=0;s<a;s++)Qi(t,e,i,o)}(this.#p,this.#u,t);break;case ji.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Ji(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Zi(t.pluginManager,e)))})}class ts{count;delay;duration;wait=!1;load(t){E(t)||(Jt(this,"count",t.count),te(this,"delay",t.delay),te(this,"duration",t.duration),Jt(this,"wait",t.wait))}}class es{delay=.1;quantity=1;load(t){E(t)||(te(this,"quantity",t.quantity),te(this,"delay",t.delay))}}class is{color=!1;opacity=!1;load(t){E(t)||(Jt(this,"color",t.color),Jt(this,"opacity",t.opacity))}}class ss{options={};replace=new is;type="square";load(t){E(t)||(void 0!==t.options&&(this.options=ft({},t.options??{})),this.replace.load(t.replace),Jt(this,"type",t.type))}}class ns{height=0;mode=t.PixelMode.percent;width=0;load(t){E(t)||(Jt(this,"mode",t.mode),Jt(this,"height",t.height),Jt(this,"width",t.width))}}class as{fill;stroke;load(t){E(t)||(t.fill&&(this.fill??=new ge,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Ce,this.stroke.load(t.stroke)))}}class os{autoPlay=!0;direction;domId;fill=!0;life=new ts;name;particles;position;rate=new es;shape=new ss;size;spawn=new as;spawnFillColor;spawnStrokeColor;startCount=0;load(t){E(t)||(Jt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new ns,this.size.load(t.size)),Jt(this,"direction",t.direction),Jt(this,"domId",t.domId),Jt(this,"fill",t.fill),this.life.load(t.life),Jt(this,"name",t.name),this.particles=vt(t.particles,t=>ft({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ce,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ce,this.spawnStrokeColor.load(t.spawnStrokeColor)),Jt(this,"startCount",t.startCount))}}const rs={count:1,enable:!0},ls="emitters";class cs extends vi{handleClickMode;maxDistance;#v;constructor(t,e){super(e),this.#v=t,this.maxDistance=0,this.handleClickMode=(t,e)=>{const i=this.container.actualOptions.interactivity.modes.emitters;if(!i||t!==ls)return;let s;if(T(i.value)){const t=0,e=i.value.length;if(e>t&&i.random.enable){s=[];const t=new Set;for(let n=0;n<i.random.count;n++){const a=Math.floor(A()*i.value.length);if(t.has(a)&&t.size<e){n--;continue}t.add(a);const o=ht(i.value,a);o&&s.push(o)}}else s=i.value}else s=i.value;const n=s,a=e.mouse.clickPosition;vt(n,async t=>{await this.#v.addEmitter(this.container,t,a)})}}clear(){}init(){}interact(t,e){for(const t of this.#v.getArray(this.container))t.update(e)}isEnabled(t,e){const i=this.container.actualOptions,s=t.mouse,n=(e?.interactivity??i.interactivity).events;return!(!s.clickPosition||!n.onClick.enable)&&dt(ls,n.onClick.mode)}loadModeOptions(t,...e){t.emitters={random:rs,value:[]};for(const i of e)if(i?.emitters)if(T(i.emitters))for(const e of i.emitters){const i=new os;i.load(e),t.emitters.value.push(i)}else if("value"in i.emitters){const e=i.emitters;if(t.emitters.random.enable=e.random?.enable??t.emitters.random.enable,t.emitters.random.count=e.random?.count??t.emitters.random.count,T(e.value))for(const i of e.value){const e=new os;e.load(i),t.emitters.value.push(e)}else{const i=new os;i.load(e.value),t.emitters.value.push(i)}}else{const e=new os;e.load(i.emitters),t.emitters.value.push(e)}}removeEmitter(t){const e=this.#v.getArray(this.container).indexOf(t);e>=0&&this.#v.getArray(this.container).splice(e,1)}reset(){}}async function ds(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return qr}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}const hs=new WeakMap;function us(t){const e=t.pluginManager;let i=hs.get(e);return i||(i=Promise.resolve().then(function(){return Ur}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw hs.delete(e),t}),hs.set(e,i)),i}class ps{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var gs;!function(t){t.emitter="emitter"}(gs||(gs={}));class fs{id="emitters";#v;constructor(t){this.#v=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Wr});return new e(this.#v,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=vt(i.emitters,t=>{const e=new os;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return T(e)&&!!e.length||void 0!==e}}function ys(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}async function ms(t){await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=await us(t);await ds(t),t.pluginManager.addPlugin(new fs(e))})}(t),await async function(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{const e=await us(t);Ei(t),await ds(t),t.pluginManager.addInteractor?.("externalEmitters",t=>Promise.resolve(new cs(e,t)))})}(t)}class vs extends ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.size,e=this.fill,i=this.position,[s,n]=[t.width*o,t.height*o],a=((t,e)=>{const i=A()*w,s=Math.atan(e/t*Math.tan(u*i)),n=A();return n<w?s:n<.5?Math.PI-s:n<.75?Math.PI+s:-s})(s,n),r=(h=a,(c=s)*(d=n)/Math.sqrt((d*Math.cos(h))**2+(c*Math.sin(h))**2)),l=e?r*Math.sqrt(A()):r;var c,d,h;return{position:{x:i.x+l*Math.cos(a),y:i.y+l*Math.sin(a)}}}}class bs{generate(t,e,i,s,n){return new vs(e,i,s,n)}}async function ws(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{ys(t),t.pluginManager.addEmitterShapeGenerator?.("circle",new bs)})}var xs;function Ms(t,e){return t+e*(A()-o)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(xs||(xs={}));class Ps extends ps{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Ms(e.x,i.width),y:Ms(e.y,i.height)}};{const t=i.width*o,s=i.height*o,n=function(t){return Math.floor(A()*t)}(4),a=2*(A()-o);switch(n){case xs.TopLeft:return{position:{x:e.x+a*t,y:e.y-s}};case xs.TopRight:return{position:{x:e.x-t,y:e.y+a*s}};case xs.BottomRight:return{position:{x:e.x+a*t,y:e.y+s}};case xs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+a*s}}}}}}class ks{generate(t,e,i,s,n){return new Ps(e,i,s,n)}}async function Cs(t){t.checkVersion("4.3.0"),await t.pluginManager.regis