@tsparticles/preset-triangles 4.0.5 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.triangles=t.__tsParticlesInternals.presets.triangles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="visibilitychange",n=100,a=.5,o=1e3,r={x:0,y:0,z:0},c=1,l=0,h=0,d=1,u="random",p="mid",g=2*Math.PI,f="true",_="false",y="canvas",v=255,m=360,w=100,b=100,P=.25;var x;function M(t){return"z"in t?t.z:r.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(x||(x={}));class k{x;y;z;constructor(t=r.x,e=r.y,i=r.z){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(r.x,r.y,r.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 k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??r.y,i??r.z):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return k.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),r.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}_updateFromAngle(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends k{constructor(t=r.x,e=r.y){super(t,e,r.z)}static get origin(){return z.create(r.x,r.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??r.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function S(t){return"number"==typeof t}function O(t){return"object"==typeof t&&null!==t}function D(t){return Array.isArray(t)}function R(t){return null==t}const T=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),B=t=>{cancelAnimationFrame(t)};function F(){return U(E(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+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 V(t){const e=W(t);let i=$(t);return e===i&&(i=0),A(i,e)}function H(t){return S(t)?t:V(t)}function $(t){return S(t)?t:t.min}function W(t){return S(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&S(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 X(t){return t*T}function Y(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function Q(t){return t?t.endsWith("%")?parseFloat(t)/n:parseFloat(t):1}var J,K,Z,tt,et,it;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(J||(J={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(K||(K={})),function(t){t.none="none",t.max="max",t.min="min"}(Z||(Z={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(tt||(tt={})),function(t){t.precise="precise",t.percent="percent"}(et||(et={})),function(t){t.max="max",t.min="min",t.random="random"}(it||(it={}));function st(){return globalThis.document}function nt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function at(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(F()*t.length)}(t)]}function ot(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==tt.bottom||(n=t.top<e.height+i.x);!n||s&&s!==tt.left||(n=t.right>i.x);!n||s&&s!==tt.right||(n=t.left<e.width+i.y);!n||s&&s!==tt.top||(n=t.bottom>i.y);return n}(rt(t,s??0),e,i,n)}function rt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ct(t,...e){for(const i of e){if(R(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(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 O(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=>ct(void 0,t)):ct(e[n],a)}}return t}function lt(t,e){return D(t)?t.map((t,i)=>e(t,i)):e(t,0)}function ht(t,e,i){return D(t)?at(t,e,i):t}function dt(t,e){const i=t.value,s=t.animation,n={delayTime:H(s.delay)*o,enable:s.enable,value:H(t.value)*e,max:W(i)*e,min:$(i)*e,loops:0,maxLoops:H(s.count),time:0};if(s.enable){switch(n.decay=1-H(s.decay),s.mode){case J.increase:n.status=K.increasing;break;case J.decrease:n.status=K.decreasing;break;case J.random:n.status=F()>=a?K.increasing:K.decreasing}const t=s.mode===J.auto;switch(s.startValue){case it.min:n.value=n.min,t&&(n.status=K.increasing);break;case it.max:n.value=n.max,t&&(n.status=K.decreasing);break;case it.random:default:n.value=V(n),t&&(n.status=F()>=a?K.increasing:K.decreasing)}}return n.initialValue=n.value,n}function ut(t,e){return function(t,e){if(t.mode!==et.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/n*e.width,y:t.y/n*e.height}:{width:t.width/n*e.width,height:t.height/n*e.height}}(t,e)}function pt(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case K.increasing:e.value+=a;break;case K.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case K.increasing:e.value>=r&&(e.status=K.decreasing,e.loops??=0,e.loops++);break;case K.decreasing:e.value<=o&&(e.status=K.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Z.max:i>=n&&t.destroy();break;case Z.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=U(e.value,o,r))}}const gt=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=st().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function ft(t,e,i,s,n){if(s){let s={passive:!0};C(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function _t(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function yt(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 vt{_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 mt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(mt||(mt={}));class wt{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(t){const e=t.key??t.name??"default";this._configs.set(e,t),this._engine.dispatchEvent(mt.configAdded,{data:{name:e,config:t}})}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 yt(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 yt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return _t(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this._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 bt=t=>(...e)=>{t(...e)},Pt={debug:bt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:bt(console.info),log:bt(console.log),trace:bt(console.trace),verbose:bt(console.log),warning:bt(console.warn)};function xt(){return Pt}const Mt="100%";class kt{pluginManager=new wt(this);_domArray=[];_eventDispatcher=new vt;_initialized=!1;get items(){return this._domArray}get version(){return"4.0.5"}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){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return ls}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=ht(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(xt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=ht(r,a),{items:l}=this,h=l.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(h,e,d)}else l.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=st();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===y)s=t,s.dataset[e]??=_,s.dataset[e]===f&&(s.style.width||=Mt,s.style.height||=Mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(y).item(0);n?(s=n,s.dataset[e]=_):(s=i.createElement(y),s.dataset[e]=f,t.appendChild(s)),s.style.width||=Mt,s.style.height||=Mt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=st();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=f,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this._eventDispatcher.removeEventListener(t,e)}}var zt,Ct,It,St,Ot,Dt,Rt,Tt;!function(t){t.circle="circle",t.rectangle="rectangle"}(zt||(zt={}));class Et{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 Lt extends Et{radius;constructor(t,e,i){super(t,e,zt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,N(e,i)<=s*s;var e,i,s}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 Lt||t.type===zt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Bt||t.type===zt.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 Bt extends Et{size;constructor(t,e,i,s){super(t,e,zt.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 Lt)return t.intersects(this);if(!(t instanceof Bt))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}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Ct||(Ct={})),function(t){t.delete="delete",t.wait="wait"}(It||(It={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(St||(St={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Ot||(Ot={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Dt||(Dt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Rt||(Rt={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Tt||(Tt={}));class Ft{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){R(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 At extends Ft{mode;startValue;constructor(){super(),this.mode=J.auto,this.startValue=it.random}load(t){super.load(t),R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ut extends Ft{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),R(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 qt{h=new Ut(0,m);l=new Ut(0,b);s=new Ut(0,w);load(t){R(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Vt{value;constructor(){this.value=""}static create(t,e){const i=new Vt;return i.load(t),void 0!==e&&(I(e)||D(e)?i.load({value:e}):i.load(e)),i}load(t){R(t)||R(t.value)||(this.value=t.value)}}class Ht extends Vt{animation;constructor(){super(),this.animation=new qt}static create(t,e){const i=new Ht;return i.load(t),void 0!==e&&(I(e)||D(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t{color;image;opacity;position;repeat;size;constructor(){this.color=new Vt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Vt.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 Wt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Gt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){R(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class jt{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ct(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Nt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class Xt{offset;value;constructor(){this.offset=0,this.value=90}load(t){R(t)||(void 0!==t.offset&&(this.offset=G(t.offset)),void 0!==t.value&&(this.value=G(t.value)))}}class Yt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=et.percent,this.radius=0}load(t){R(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 Qt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){R(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 Jt{value;constructor(){this.value=0}load(t){R(t)||R(t.value)||(this.value=G(t.value))}}class Kt extends Jt{animation=new Ft;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Zt extends Kt{animation;constructor(){super(),this.animation=new At}load(t){super.load(t)}}class te{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Jt,this.enable=!1,this.options={}}load(t){R(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=ct(this.options,t.options)))}}class ee{bottom;default;left;right;top;constructor(){this.default=St.out}load(t){R(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 ie{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=ct({},t.position)))}}class se{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Xt,this.center=new Yt,this.decay=0,this.distance={},this.direction=x.none,this.drift=0,this.enable=!1,this.gravity=new Qt,this.path=new te,this.outModes=new ee,this.random=!1,this.size=!1,this.speed=2,this.spin=new ie,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(R(t))return;this.angle.load(S(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=S(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&&(O(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 ne extends At{destroy;constructor(){super(),this.destroy=Z.none,this.speed=2}load(t){super.load(t),R(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class ae extends Zt{animation;constructor(){super(),this.animation=new ne,this.value=1}load(t){if(R(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class oe{color;opacity;width;constructor(){this.width=0}load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.width&&(this.width=G(t.width)),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class re{color;fill;stroke;load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Nt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new oe,this.stroke.load(t.stroke)))}}class ce extends Jt{constructor(){super(),this.value=1}}class le{horizontal;vertical;constructor(){this.horizontal=new ce,this.vertical=new ce}load(t){R(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class he{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(R(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 de{mode;value;constructor(){this.mode=It.delete,this.value=0}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class ue{density;limit;value;constructor(){this.density=new he,this.limit=new de,this.value=0}load(t){R(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class pe{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ct(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ge extends At{destroy;constructor(){super(),this.destroy=Z.none,this.speed=5}load(t){super.load(t),R(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class fe extends Zt{animation;constructor(){super(),this.animation=new ge,this.value=3}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class _e extends Jt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),R(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 ye{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 le,this.effect=new jt,this.groups={},this.move=new se,this.number=new ue,this.opacity=new ae,this.paint=new re,this.paint.color=new Ht,this.paint.color.value="#fff",this.paint.fill=new Nt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new pe,this.size=new fe,this.zIndex=new _e}load(t){if(R(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]=ct(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&&(D(e)?this.paint=lt(e,t=>{const e=new re;return e.load(t),e}):D(this.paint)?(this.paint=new re,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=(D(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 ve(t,...e){for(const i of e)t.load(i)}function me(t,e,...i){const s=new ye(t,e);return ve(s,...i),s}class we{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 $t,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Wt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=me(this._pluginManager,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Gt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(R(t))return;void 0!==t.preset&&(this.preset=t.preset,lt(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;C(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=ct(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 be(t,e){t.clearRect(r.x,r.y,e.width,e.height)}function Pe(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const xe=new Map;function Me(t,e){let i=xe.get(t);if(!i){if(i=e(),xe.size>=1e3){[...xe.keys()].slice(0,500).forEach(t=>xe.delete(t))}xe.set(t,i)}return i}function ke(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return ze(t,n.value,i,s);if(D(n.value)){const e=at(n.value,i,s);if(!e)return;return ke(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ze(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return n.value===u?Se():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(D(n.value)){const e=at(n.value,i,s);if(!e)return;return ze(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ce(t,e,i,s=!0){const n=ke(t,e,i,s);return n?function(t){const e=t.r/v,i=t.g/v,s=t.b/v,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o));r.l*=b,r.s*=w,r.h*=60,r.h<0&&(r.h+=m);r.h>=m&&(r.h-=m);return r}(n):void 0}function Ie(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(w,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/w,r=s/b;if(0===i){const t=Math.round(r*v);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},l=r<a?r*(1+o):r+o-r*o,h=2*r-l,d=1/3,u=Math.min(v,v*c(h,l,n+d)),p=Math.min(v,v*c(h,l,n)),g=Math.min(v,v*c(h,l,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(g)}}function Se(t){const e=()=>Math.floor(A(0,256));return{b:e(),g:e(),r:e()}}function Oe(t,e,i){const s=i??1;return Me(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?De(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function De(t,e){return`color(display-p3 ${(t.r/v).toString()} ${(t.g/v).toString()} ${(t.b/v).toString()} / ${(e??1).toString()})`}function Re(t,e,i){const s=i??1;return Me(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return De(Ie(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Te(t,e,i){if(i===u)return Se();if(i!==p)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return function(t,e,i,s){let n=t,a=e;return"r"in n||(n=Ie(t)),"r"in a||(a=Ie(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)}}(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ie(t)}}}function Ee(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Le(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:w},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(Be(s.h,e.h,i),Be(s.s,e.s,i),Be(s.l,e.l,i)),s}function Be(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=H(e.speed)/n*i,t.decay=1-H(e.decay),t.status=K.increasing,t.loops=0,t.maxLoops=H(e.count),t.time=0,t.delayTime=H(e.delay)*o,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function Fe(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?V(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==K.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=K.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=K.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=U(t.value,r,o)}function Ae(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Fe(i,!1,e),Fe(s,!0,e),Fe(n,!0,e)}const Ue=new kt;class qe{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class Ve{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new qe),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new qe,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function He(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ve)})}class $e{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:g};const n=i.circleRange;e.arc(r.x,r.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=O(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function We(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new $e))})}var Ge;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ge||(Ge={}));const je=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ne=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Xe{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(je,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ne.exec(e);return i?{a:i[Ge.a]?Number.parseInt(i[Ge.a],16)/255:1,b:Number.parseInt(i[Ge.b]??"0",16),g:Number.parseInt(i[Ge.g]??"0",16),r:Number.parseInt(i[Ge.r]??"0",16)}:void 0}}async function Ye(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Xe)})}var Qe;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Qe||(Qe={}));const Je=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ke{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 Ie(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ie({h:H(e.h),l:H(e.l),s:H(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Je.exec(t);return e?function(t){const e=Ie(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?Q(e[Qe.a]):1,h:Number.parseInt(e[Qe.h]??"0",10),l:Number.parseInt(e[Qe.l]??"0",10),s:Number.parseInt(e[Qe.s]??"0",10)}):void 0}}async function Ze(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ke)})}class ti{id="move";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function ei(t){t.checkVersion("4.0.5"),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,yt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new ti(t.pluginManager))})}class ii{container;constructor(t){this.container=t}init(t){const e=t.options.opacity;t.opacity=dt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=H(i.speed)/n*this.container.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}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&&pt(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function si(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ii(t)))})}class ni{container;modes;_particleBouncePlugins;constructor(t){this.container=t,this.modes=[St.bounce,St.split],this._particleBouncePlugins=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;let a=!1;for(const s of this._particleBouncePlugins)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,c=t.getRadius(),l=rt(o,c),h=n.canvas.size;!function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==tt.left&&t.direction!==tt.right)return;t.bounds.right<0&&t.direction===tt.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===tt.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.direction===tt.right&&t.bounds.right>=t.canvasSize.width&&e>0||t.direction===tt.left&&t.bounds.left<=0&&e<0){const e=H(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width&&t.direction===tt.right?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&t.direction===tt.left&&(t.particle.position.x=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c}),function(t){if(t.outMode!==St.bounce&&t.outMode!==St.split||t.direction!==tt.bottom&&t.direction!==tt.top)return;t.bounds.bottom<0&&t.direction===tt.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===tt.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.direction===tt.bottom&&t.bounds.bottom>=t.canvasSize.height&&e>0||t.direction===tt.top&&t.bounds.top<=0&&e<0){const e=H(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height&&t.direction===tt.bottom?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&t.direction===tt.top&&(t.particle.position.y=s),t.outMode===St.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,size:c})}}class ai{container;modes;constructor(t){this.container=t,this.modes=[St.destroy]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Rt.normal:case Rt.outside:if(ot(t.position,n.canvas.size,r,t.getRadius(),e))return;break;case Rt.inside:{const{dx:e,dy:i}=j(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}class oi{container;modes;constructor(t){this.container=t,this.modes=[St.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===tt.left||e===tt.right))??(t.options.move.distance.vertical&&(e===tt.top||e===tt.bottom)))return;const n=t.options.move.gravity,a=this.container,o=a.canvas.size,c=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>o.height+c&&e===tt.bottom||n.inverse&&i.y<-c&&e===tt.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=o.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=o.width+c||t.velocity.x<0&&t.position.x>=-c)return;ot(t.position,a.canvas.size,r,c,e)||t.destroy()}}}const ri=z.origin;class ci{container;modes;constructor(t){this.container=t,this.modes=[St.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.container;switch(t.outType){case Rt.inside:{const{x:e,y:i}=t.velocity;ri.setTo(r),ri.length=t.moveCenter.radius,ri.angle=t.velocity.angle+Math.PI,ri.addTo(t.moveCenter);const{dx:s,dy:a}=j(t.position,ri);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(V({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(V({min:0,max:n.canvas.size.height}));const{dx:o,dy:c}=j(t.position,t.moveCenter);t.direction=Math.atan2(-c,-o),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(ot(t.position,n.canvas.size,r,t.getRadius(),e))return;switch(t.outType){case Rt.outside:{t.position.x=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=j(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Rt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=rt(t.position,o);e===tt.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===tt.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===tt.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===tt.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class li{updaters;container;constructor(t){this.container=t,this.updaters=new Map}init(t){this._addUpdaterIfMissing(t,St.bounce,t=>new ni(t)),this._addUpdaterIfMissing(t,St.out,t=>new ci(t)),this._addUpdaterIfMissing(t,St.destroy,t=>new ai(t)),this._addUpdaterIfMissing(t,St.none,t=>new oi(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this._updateOutMode(t,e,i.bottom??i.default,tt.bottom),this._updateOutMode(t,e,i.left??i.default,tt.left),this._updateOutMode(t,e,i.right??i.default,tt.right),this._updateOutMode(t,e,i.top??i.default,tt.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 hi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new li(t)))})}class di{_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t}init(t){const e=this._container,i=t.options,s=ht(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=H(o.opacity),t.fillAnimation=i.animation;const s=Ce(this._pluginManager,i);s&&(t.fillColor=Le(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=Ht.create(void 0===a?void 0:Ht.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=Ce(this._pluginManager,i)??t.getFillColor();s&&(t.strokeColor=Le(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)&&(Ae(t.fillColor,e),Ae(t.strokeColor,e))}}async function ui(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new di(t.pluginManager,e)))})}var pi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(pi||(pi={}));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 fi{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?Q(e[pi.a]):1,b:parseInt(e[pi.b]??"0",10),g:parseInt(e[pi.g]??"0",10),r:parseInt(e[pi.r]??"0",10)}:void 0}}async function _i(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new fi)})}class yi{_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/n*e.retina.reduceFactor,i.sync||(t.size.velocity*=F()))}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)&&pt(t,t.size,0,t.options.size.animation.destroy,e)}}async function vi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new yi(t)))})}async function mi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(async t=>{await Promise.all([He(t),Ye(t),Ze(t),_i(t),ei(t),We(t),ui(t),si(t),hi(t),vi(t)])})}class wi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var bi,Pi,xi;!function(t){t.circle="circle",t.rectangle="rectangle"}(bi||(bi={}));class Mi{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=bi.circle}load(t){R(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 ki{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class zi{onClick;onDiv;onHover;constructor(){this.onClick=new wi,this.onDiv=new Mi,this.onHover=new ki}load(t){if(R(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=lt(e,t=>{const e=new Mi;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(Pi||(Pi={}));class Ci{_container;_pluginManager;constructor(t,e){this._pluginManager=t,this._container=e}load(t){if(R(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 Ii{detectsOn;events;modes;constructor(t,e){this.detectsOn=Pi.window,this.events=new zi,this.modes=new Ci(t,e)}load(t){if(R(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Si{id="interactivity";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return _s});return new e(this._pluginManager,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Ii(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=ct({},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"}(xi||(xi={}));class Oi{type=xi.particles;container;constructor(t){this.container=t}}const Di="pointerdown",Ri="pointerup",Ti="pointerleave",Ei="pointermove",Li="touchstart",Bi="touchend",Fi="touchmove",Ai="touchcancel";class Ui extends Lt{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 Lt)n=new Lt(i.x,i.y,t.radius);else{const e=t;n=new Bt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class qi{blur;color;enable;constructor(){this.blur=5,this.color=new Vt,this.color.value="#000",this.enable=!1}load(t){R(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=Vt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Vi{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){R(t)||(void 0!==t.color&&(this.color=Vt.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 Hi{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new Vt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new qi,this.triangles=new Vi,this.width=1,this.warp=!1}load(t){R(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=Vt.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 $i(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 Wi extends Oi{_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<r.x||e.y<r.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,c=n.warp,l=c?new Ui(e.x,e.y,o,s):new Lt(e.x,e.y,o),h=i.particles.grid.query(l);for(const i of h){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<r.x||h.y<r.y||h.x>s.width||h.y>s.height)continue;const d=j(e,h).distance,u=c&&l.warp?$i(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 Hi;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 Te(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=function(t,e,i,s){const n=I(e)?e:e.value;return n===u?s?ke(t,{value:n}):i?u:p:n===p?p:ke(t,{value:n})}(this._pluginManager,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Gi{id="links";_pluginManager;constructor(t){this._pluginManager=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return vs});return new e(this._pluginManager,t)}loadOptions(){}needsPlugin(){return!0}}async function ji(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{const e=t.pluginManager;!function(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}(t),e.addPlugin(new Gi(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Wi(e,t)))})}const Ni={background:{color:"#000000"},particles:{number:{value:100},links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},paint:{fill:{color:{value:"#ffffff"}}},size:{value:1},shape:{type:"circle"}}};async function Xi(t){await t.pluginManager.register(async t=>{await Promise.all([mi(t),(async t=>{await async function(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Si(i)),i.initializers.interactors??=new Map,i.interactors??=new Map,i.addInteractor=(t,e)=>{i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e)},i.getInteractors=async(t,e=!1)=>(i.interactors??=new Map,i.initializers.interactors??=new Map,_t(t,i.interactors,i.initializers.interactors,e)),i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error("Click handlers can only be set after calling tsParticles.load()");i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await ji(t)})(t)]),t.pluginManager.addPreset("triangles",Ni)})}const Yi=globalThis;Yi.__tsParticlesInternals=Yi.__tsParticlesInternals??{},Yi.loadTrianglesPreset=Xi;function Qi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ji{_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=>{be(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,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this._reusableTransform,g=this._reusableColorStyles,f=a?Re(a,r.hdr,h*d):void 0,_=o?Re(o,r.hdr,u*d):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=_,this.draw(s=>{for(const i of this._drawParticlesSetupPlugins)i.drawParticleSetup?.(s,t,e);this._applyPreDrawUpdaters(s,t,i,d,g,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),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 _={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?.(_);const y=s.effect?l.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(y,_),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(v,_),function(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())}(v,_),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(v,_),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(y,_),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*l**c.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)Pe(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=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(r.x,r.y,e.width,e.height)}(e,this._canvasManager.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,r.x,r.y,e.width,e.height),t.globalAlpha=n}(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=>{be(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)Qi(a,t,e)}o.beforeDraw?.(e)}};_getPluginParticleColors=t=>{let e,i;for(const s of this._colorPlugins)if(!e&&s.particleFillColor&&(e=Ce(this._pluginManager,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ce(this._pluginManager,s.particleStrokeColor(t))),e&&i)break;return this._reusablePluginColors[0]=e,this._reusablePluginColors[1]=i,this._reusablePluginColors}}const Ki=new WeakMap;function Zi(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 ts{domElement;render;renderCanvas;size;zoom=1;_container;_generated;_mutationObserver;_originalStyle;_pluginManager;_pointerEvents;_resizePlugins;_standardSize;_zoomCenter;constructor(t,e){this._pluginManager=t,this._container=e,this.render=new Ji(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.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=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*a/t,y:i*a/t}}init(){this._safeMutationObserver(t=>{t.disconnect()}),this._mutationObserver=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this._repairStyle()}),this.resize(),this._initStyle(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const{_container:t}=this,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=ke(this._pluginManager,e.color);s.backgroundColor=n?Oe(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.domElement&&this.domElement.remove();const i=this._container,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this._generated=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Ki.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Ki.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this._originalStyle=function(t){const e=st().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||R(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}(n.style));const a=this._standardSize,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this._container.retina.pixelRatio,c=this.size;o.height=c.height=a.height*r,o.width=c.width=a.width*r;const l=nt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:l?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this._safeMutationObserver(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this._safeMutationObserver(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this._container,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas._standardSize,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this._container.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(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.domElement||!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.domElement,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.domElement;if(!t)return;this._safeMutationObserver(t=>{t.disconnect()}),this._initStyle(),this.initBackground();const e=this._pointerEvents;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this._safeMutationObserver(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};_resetOriginalStyle=()=>{const t=this.domElement,e=this._originalStyle;t&&e&&Zi(t,e,!0)};_safeMutationObserver=t=>{this._mutationObserver&&t(this._mutationObserver)};_setFullScreenStyle=()=>{const t=this.domElement;t&&Zi(t,gt(this._container.actualOptions.fullScreen.zIndex),!0)}}class es{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&&(st().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*o)};_manageListeners=t=>{const e=this._handlers;this._manageResize(t),ft(document,s,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 ft(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this._resizeObserver&&!t?(s&&this._resizeObserver.unobserve(s),this._resizeObserver.disconnect(),delete this._resizeObserver):!this._resizeObserver&&t&&s&&(this._resizeObserver=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this._handleWindowResize()}),this._resizeObserver.observe(s))}}function is(t){if(e=t.outMode,i=t.checkModes,!(e===i||D(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}class ss{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=k.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(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this._container,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this._container.dispatchEvent(mt.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??Ee(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}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??Ee(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this._cachedTransform.a=e.cos*(t.a??c),this._cachedTransform.b=i?e.sin*(t.b??1):t.b??l,this._cachedTransform.c=i?-e.sin*(t.c??1):t.c??h,this._cachedTransform.d=e.cos*(t.d??d),this._cachedTransform}init(t,e,i,s){const n=this._container;this.id=t,this.group=s,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=Rt.normal,this.ignoresResizeRatio=!0;const a=n.retina.pixelRatio,o=n.actualOptions,r=me(this._pluginManager,n,o.particles),c=r.reduceDuplicates,l=r.effect.type,h=r.shape.type;this.effect=ht(l,this.id,c),this.shape=ht(h,this.id,c);const d=r.effect,p=r.shape;if(i){if(i.effect?.type){const t=ht(i.effect.type,this.id,c);t&&(this.effect=t,d.load(i.effect))}if(i.shape?.type){const t=ht(i.shape.type,this.id,c);t&&(this.shape=t,p.load(i.shape))}}if(this.effect===u){const t=[...this._container.effectDrawers.keys()];this.effect=t[Math.floor(F()*t.length)]}if(this.shape===u){const t=[...this._container.shapeDrawers.keys()];this.shape=t[Math.floor(F()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return ct({close:e.close},ht(n,i,s))}(this.effect,d,this.id,c):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return ct({close:e.close},ht(n,i,s))}(this.shape,p,this.id,c):void 0,r.load(i);const g=this.effectData;g&&r.load(g.particles);const f=this.shapeData;let _,y;f&&r.load(f.particles),this.effectClose=g?.close??r.effect.close,this.shapeClose=f?.close??r.shape.close,this.options=r,n.retina.initParticle(this),this.size=dt(this.options.size,a),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(e),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(_=n.effectDrawers.get(this.effect)),_?.loadEffect&&_.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);_?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.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%g,i=e<0?e+g:e;return i>=Math.PI*a&&i<3*Math.PI*a}if(this.roll.horizontal){const e=(t+Math.PI*a)%(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?k.create(t.x,t.y,e):void 0;const n=this._container,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size,l=new AbortController,{signal:h}=l;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return k.create(i.x,i.y,e)}const t=Y({size:c,position:s}),l=k.create(t.x,t.y,e);this._fixHorizontal(l,r,o.left??o.default),this._fixHorizontal(l,r,o.right??o.default),this._fixVertical(l,r,o.top??o.default),this._fixVertical(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}return s};_calculateVelocity=()=>{const t=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy(),e=this.options.move;if(e.direction===x.inside||e.direction===x.outside)return t;const i=X(H(e.angle.value)),s=X(H(e.angle.offset)),n={left:s-i*a,right:s+i*a};return e.straight||(t.angle+=V(G(n.left,n.right))),e.random&&"number"==typeof e.speed&&(t.length*=F()),t};_fixHorizontal=(t,e,i)=>{is({outMode:i,checkModes:[St.bounce],coord:t.x,maxCoord:this._container.canvas.size.width,setCb:e=>t.x+=e,radius:e})};_fixVertical=(t,e,i)=>{is({outMode:i,checkModes:[St.bounce],coord:t.y,maxCoord:this._container.canvas.size.height,setCb:e=>t.y+=e,radius:e})};_getRollColor=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Ot.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t;_initPosition=t=>{const e=this._container,i=Math.floor(H(this.options.zIndex.value)),s=this._calcPosition(t,U(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...ut(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return X(t);switch(t){case x.top:return-Math.PI*a;case x.topRight:return-Math.PI*P;case x.right:return 0;case x.bottomRight:return Math.PI*P;case x.bottom:return Math.PI*a;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*g}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=Rt.inside;break;case x.outside:this.outType=Rt.outside}this.offset=z.origin}}class ns{_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 Lt(t,e,i)).reset(t,e,i)}_acquireRectangle(t,e,i,s){return(this._rectanglePool[this._rectanglePoolIdx++]??=new Bt(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 Lt){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 Bt){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 as{checkParticlePositionPlugins;grid;_array;_container;_groupLimits;_limit;_nextId;_particleBuckets;_particleResetPlugins;_particleUpdatePlugins;_pluginManager;_pool;_postParticleUpdatePlugins;_postUpdatePlugins;_resizeFactor;_updatePlugins;_zBuckets;constructor(t,e){this._pluginManager=t,this._container=e,this._nextId=0,this._array=[],this._pool=[],this._limit=0,this._groupLimits=new Map,this._particleBuckets=new Map,this._zBuckets=this._createBuckets(this._container.zLayers),this.grid=new ns(100),this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}get count(){return this._array.length}addParticle(t,e,i,s){const n=this._container.actualOptions.particles.number.limit.mode,a=void 0===i?this._limit:this._groupLimits.get(i)??this._limit,o=this.count;if(a>0)switch(n){case It.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case It.wait:if(o>=a)return}try{const n=this._pool.pop()??new ss(this._pluginManager,this._container);n.init(this._nextId,t,e,i);let a=!0;return s&&(a=s(n)),a?(this._array.push(n),this._insertParticleIntoBucket(n),this._nextId++,this._container.dispatchEvent(mt.particleAdded,{particle:n}),n):void this._pool.push(n)}catch(t){xt().warning(`error adding particle: ${t}`)}}clear(){this._array=[],this._particleBuckets.clear(),this._resetBuckets(this._container.zLayers)}destroy(){this._array=[],this._pool.length=0,this._particleBuckets.clear(),this._zBuckets=[],this.checkParticlePositionPlugins=[],this._particleResetPlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._postParticleUpdatePlugins=[],this._updatePlugins=[]}drawParticles(t){for(let e=this._zBuckets.length-1;e>=0;e--){const i=this._zBuckets[e];if(i)for(const e of i)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.checkParticlePositionPlugins=[],this._updatePlugins=[],this._particleUpdatePlugins=[],this._postUpdatePlugins=[],this._particleResetPlugins=[],this._postParticleUpdatePlugins=[],this._particleBuckets.clear(),this._resetBuckets(t.zLayers),this.grid=new ns(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=me(this._pluginManager,this._container,s);this._applyDensity(n,i,t)}this._applyDensity(t.particles,i)}setResizeFactor(t){this._resizeFactor=t}update(t){this.grid.clear();for(const e of this._updatePlugins)e.update?.(t);const e=this._updateParticlesPhase1(t);for(const e of this._postUpdatePlugins)e.postUpdate?.(t);if(this._updateParticlesPhase2(t,e),e.size)for(const t of e)this.remove(t);delete this._resizeFactor}_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,c=Math.min(o,r)*a+e,l=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),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)};_createBuckets=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};_getBucketIndex=t=>{const e=this._zBuckets.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};_getParticleInsertIndex=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};_initDensityFactor=t=>{const e=this._container;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};_insertParticleIntoBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._zBuckets[e];i&&(i.splice(this._getParticleInsertIndex(i,t.id),0,t),this._particleBuckets.set(t.id,e))};_removeParticle=(t,e,i)=>{const s=this._array[t];return!!s&&(s.group===e&&(this._array.splice(t,1),this._removeParticleFromBucket(s),s.destroy(i),this._container.dispatchEvent(mt.particleRemoved,{particle:s}),this._addToPool(s),!0))};_removeParticleFromBucket=t=>{const e=this._particleBuckets.get(t.id)??this._getBucketIndex(t.position.z),i=this._zBuckets[e];if(!i)return void this._particleBuckets.delete(t.id);const s=this._getParticleInsertIndex(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this._particleBuckets.delete(t.id)):this._particleBuckets.delete(t.id)};_resetBuckets=t=>{const e=Math.max(Math.floor(t),1);if(this._zBuckets.length===e)for(const t of this._zBuckets)t.length=0;else this._zBuckets=this._createBuckets(e)};_updateParticleBucket=t=>{const e=this._getBucketIndex(t.position.z),i=this._particleBuckets.get(t.id);if(void 0===i)return void this._insertParticleIntoBucket(t);if(i===e)return;const s=this._zBuckets[i];if(s){const e=this._getParticleInsertIndex(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this._zBuckets[e];n?(n.splice(this._getParticleInsertIndex(n,t.id),0,t),this._particleBuckets.set(t.id,e)):this._particleBuckets.set(t.id,e)};_updateParticlesPhase1=t=>{const e=new Set,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)}return e};_updateParticlesPhase2=(t,e)=>{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.spawning)for(const e of this._postParticleUpdatePlugins)e.postParticleUpdate?.(i,t);this._updateParticleBucket(i)}}}class os{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,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=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 rs(t){return!t.destroyed}function cs(t,e,...i){const s=new we(t,e);return ve(s,...i),s}var ls=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(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this._pluginManager=i,this._dispatchCallback=e,this._onDestroy=n,this.id=Symbol(s),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=a,this._initialSourceOptions=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new os(this),this.canvas=new ts(this._pluginManager,this),this.particles=new as(this._pluginManager,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this._options=cs(this._pluginManager,this),this.actualOptions=cs(this._pluginManager,this),this._eventListeners=new es(this),this.dispatchEvent(mt.containerBuilt)}get animationStatus(){return!this._paused&&!this.pageHidden&&rs(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(t=!0){if(rs(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(t),this.dispatchEvent(mt.containerDestroyed)}}dispatchEvent(t,e){this._dispatchCallback(t,{container:this,data:e})}draw(t){if(!rs(this))return;let e=t;this._drawAnimationFrame=L(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}xt().error(`Export plugin with type ${t} not found`)}async init(){if(!rs(this))return;const t=new Map;for(const e of this._pluginManager.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this._options=cs(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=cs(this._pluginManager,this,this._options),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.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:e,duration:i,fpsLimit:s,hdr:n,smooth:a,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this._duration=H(i)*o,this._delay=H(e)*o,this._lifeTime=0,this.fpsLimit=s>0?s:120,this._smooth=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(mt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(mt.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(){var t;if(rs(this)&&(void 0!==this._drawAnimationFrame&&(t=this._drawAnimationFrame,B(t),delete this._drawAnimationFrame),!this._paused)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this._paused=!0),this.dispatchEvent(mt.containerPaused)}}play(t){if(!rs(this))return;const e=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(mt.containerPlay),this.draw(e??!1)}else this._firstStart=!1}async refresh(){if(rs(this))return this.stop(),this.start()}async reset(t){if(rs(this))return this._initialSourceOptions=t,this._sourceOptions=t,this._options=cs(this._pluginManager,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=cs(this._pluginManager,this,this._options),this.refresh()}async start(){rs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this._eventListeners.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(mt.containerStarted),this.play(),t()};this._delayTimeout=setTimeout(()=>{e()},this._delay)}))}stop(){if(rs(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(mt.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+o/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/o}(this._delta,t-this._lastFrameTime,this.fpsLimit,this._smooth),this.addLifeTime(this._delta.value),this._lastFrameTime=t,this._delta.value>o)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){xt().error("error in animation loop",t)}}}});var hs=Object.freeze({__proto__:null,BlendPluginInstance:class{_container;_defaultCompositeValue;constructor(t){this._container=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this._defaultCompositeValue&&(t.globalCompositeOperation=this._defaultCompositeValue)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this._container.actualOptions.blend;this._defaultCompositeValue=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ds(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,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const 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=c*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)}function us(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(N(c,l))),r=H(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Ct.clockwise:Ct.counterClockwise,angle:F()*g,radius:o,acceleration:e.retina.spinAcceleration}}var ps=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(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-H(e.decay),t.pathDelay=H(s.delay.value)*o,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:H(i.acceleration),inverse:i.inverse},us(this._container,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options,s=i.move;if(!s.enable)return;const n=this._container,o=n.retina.pixelRatio,r=function(t){return t.slow.inRange?t.slow.factor:1}(t),c=n.retina.reduceFactor,l=t.retina.moveSpeed,h=t.retina.moveDrift,d=W(i.size.value)*o,u=l*(s.size?t.getRadius()/d:1)*r*(e.factor||1)*a,p=t.retina.maxSpeed;s.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===Ct.clockwise,o={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),c=r*a;e.spin.radius>c?(e.spin.radius=c,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(n,t,u,c):ds(t,s,u,p,h,c,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&o>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&o>l,c&&(t.velocity.x=t.velocity.y*a-t.velocity.x),l&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!c||n<c)&&(!l||o<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}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 gs{_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;lt(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.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(ft(a,Ei,e.mouseMove,t),ft(a,Li,e.touchStart,t),ft(a,Fi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(ft(a,Bi,e.touchEndClick,t),ft(a,Ri,e.mouseUp,t),ft(a,Di,e.mouseDown,t)):ft(a,Bi,e.touchEnd,t):(ft(a,Bi,e.touchEndClick,t),ft(a,Ri,e.mouseUp,t),ft(a,Di,e.mouseDown,t),ft(a,Bi,e.touchEnd,t)),ft(a,Ti,e.mouseLeave,t),ft(a,Ai,e.touchCancel,t))};_manageListeners=t=>{const e=this._handlers,i=this._container,n=this._interactionManager,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===Pi.window?n.interactivityData.element=st():o===Pi.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this._manageInteractivityListeners(t),ft(document,s,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=Ti,e.inside=!1,e.clicking=!1};_mouseTouchMove=t=>{const e=this._container,i=this._interactionManager,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this._canPush=!0;const e=t;if(n.element===st()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===Pi.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=Ei};_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 fs{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 gs(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this._intersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(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(Li,()=>{e.destroyed||(a=!0,o=!1)}),this._clickHandlers.set(Fi,()=>{e.destroyed||(o=!0)}),this._clickHandlers.set(Bi,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this._clickHandlers.set(Ai,()=>{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 xi.external:this._externalInteractors.push(t);break;case xi.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 _s=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;_container;_pluginManager;constructor(t,e){this._container=e,this._pluginManager=t,this.interactionManager=new fs(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 Ii(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()}}});function ys(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=F(),e.set(i,n)),n}var vs=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,o=e.retina.linksWidth??0,c=e.getPosition(),l=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,_=!1;const y=()=>{_&&(t.stroke(),_=!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&&(y(),this._drawTriangles(s,e,u,d,c,i,t)),u.opacity<=0||o<=0)continue;if(!n.enable)continue;let v=u.opacity,m=u.color;const w=l?.enable&&F()<l.frequency?ke(this._pluginManager,l.color):void 0;if(l&&w&&(m=w,v=H(l.opacity)),!m){const t=void 0!==n.id?this._container.particles.linksColors.get(n.id):this._container.particles.linksColor;m=Te(e,u.destination,t)}if(!m)continue;const b=this._getCachedStyle(m);if(b===p&&o===g&&v===f||(y(),t.strokeStyle=b,t.lineWidth=o,t.globalAlpha=v,p=b,g=o,f=v,t.beginPath(),_=!0),u.isWarped){const e=this._container.canvas.size,s=i.x-c.x,n=i.y-c.y;let o=r.x,l=r.y;Math.abs(s)>e.width*a&&(o=s>0?-e.width:e.width),Math.abs(n)>e.height*a&&(l=n>0?-e.height:e.height),t.moveTo(c.x,c.y),t.lineTo(i.x+o,i.y+l),t.moveTo(c.x-o,c.y-l),t.lineTo(i.x,i.y)}else t.moveTo(c.x,c.y),t.lineTo(i.x,i.y)}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,o,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const h=c.links;if(h?.length)for(const d of h){if(d.isWarped||this._getLinkFrequency(c,d.destination)>c.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this._getTriangleFrequency(e,c,h)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+d.opacity)*a,p=ke(this._pluginManager,l.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(o.x,o.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=Oe(t,this._container.hdr),this._colorCache.set(e,i)),i}_getLinkFrequency(t,e){return ys([t,e],this._freqs.links)}_getTriangleFrequency(t,e,i){return ys([t,e,i],this._freqs.triangles)}}});t.loadTrianglesPreset=Xi,t.tsParticles=Ue}),Object.assign(globalThis.window||globalThis,{loadTrianglesPreset:(globalThis.__tsParticlesInternals.presets.triangles||{}).loadTrianglesPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.triangles=t.__tsParticlesInternals.presets.triangles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="visibilitychange",n=100,a=.5,o=1e3,r={x:0,y:0,z:0},c=1,l=0,h=0,d=1,u="random",p="mid",f=2*Math.PI,g="true",y="false",v="canvas",m=255,w=360,b=100,P=100,x=.25;var M;function k(t){return"z"in t?t.z:r.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(M||(M={}));class z{x;y;z;constructor(t=r.x,e=r.y,i=r.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(r.x,r.y,r.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 z.create(t.x,t.y,k(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??r.y,i??r.z):new z(t.x,t.y,k(t))}add(t){return z.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 z.clone(this)}div(t){return z.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 z.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 z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),r.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=k(t)}sub(t){return z.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 C extends z{constructor(t=r.x,e=r.y){super(t,e,r.z)}static get origin(){return C.create(r.x,r.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??r.y):new C(t.x,t.y)}}function I(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function O(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function _(t){return Array.isArray(t)}function R(t){return null==t}const T=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),B=t=>{cancelAnimationFrame(t)};function F(){return U(E(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+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 V(t){const e=W(t);let i=$(t);return e===i&&(i=0),A(i,e)}function H(t){return O(t)?t:V(t)}function $(t){return O(t)?t:t.min}function W(t){return O(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&O(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 X(t){return t*T}function Y(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function Q(t){return t?t.endsWith("%")?parseFloat(t)/n:parseFloat(t):1}var J,K,Z,tt,et,it;!function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(J||(J={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(K||(K={})),function(t){t.none="none",t.max="max",t.min="min"}(Z||(Z={})),function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(tt||(tt={})),function(t){t.precise="precise",t.percent="percent"}(et||(et={})),function(t){t.max="max",t.min="min",t.random="random"}(it||(it={}));function st(){return globalThis.document}function nt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function at(t,e,i=!0){return t[void 0!==e&&i?e%t.length:function(t){return Math.floor(F()*t.length)}(t)]}function ot(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==tt.bottom||(n=t.top<e.height+i.x);!n||s&&s!==tt.left||(n=t.right>i.x);!n||s&&s!==tt.right||(n=t.left<e.width+i.y);!n||s&&s!==tt.top||(n=t.bottom>i.y);return n}(rt(t,s??0),e,i,n)}function rt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ct(t,...e){for(const i of e){if(R(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(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 D(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=>ct(void 0,t)):ct(e[n],a)}}return t}function lt(t,e){return _(t)?t.map((t,i)=>e(t,i)):e(t,0)}function ht(t,e,i){return _(t)?at(t,e,i):t}function dt(t,e){const i=t.value,s=t.animation,n={delayTime:H(s.delay)*o,enable:s.enable,value:H(t.value)*e,max:W(i)*e,min:$(i)*e,loops:0,maxLoops:H(s.count),time:0};if(s.enable){switch(n.decay=1-H(s.decay),s.mode){case J.increase:n.status=K.increasing;break;case J.decrease:n.status=K.decreasing;break;case J.random:n.status=F()>=a?K.increasing:K.decreasing}const t=s.mode===J.auto;switch(s.startValue){case it.min:n.value=n.min,t&&(n.status=K.increasing);break;case it.max:n.value=n.max,t&&(n.status=K.decreasing);break;case it.random:default:n.value=V(n),t&&(n.status=F()>=a?K.increasing:K.decreasing)}}return n.initialValue=n.value,n}function ut(t,e){return function(t,e){if(t.mode!==et.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/n*e.width,y:t.y/n*e.height}:{width:t.width/n*e.width,height:t.height/n*e.height}}(t,e)}function pt(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,c=e.decay??1;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),!((e.delayTime??0)>0&&e.time<(e.delayTime??0))){switch(e.status){case K.increasing:e.value+=a;break;case K.decreasing:e.value-=a}switch(e.velocity&&1!==c&&(e.velocity*=c),e.status){case K.increasing:e.value>=r&&(e.status=K.decreasing,e.loops??=0,e.loops++);break;case K.decreasing:e.value<=o&&(e.status=K.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Z.max:i>=n&&t.destroy();break;case Z.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=U(e.value,o,r))}}const ft=function(t){const e=new Map,i=(t,e=new WeakSet)=>{if(null===t)return"null";const s=typeof t;if("undefined"===s)return"undefined";if("number"===s||"boolean"===s||"string"===s)return JSON.stringify(t);if("function"===s)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===s)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>i(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(s=>`${JSON.stringify(s)}:${i(t[s],e)}`).join(",")}}`},s=t=>(t=>i(t))(t);return(...i)=>{const n=s(i),a=Date.now(),o=e.get(n);if(void 0!==o)return e.delete(n),e.set(n,{value:o.value,ts:o.ts}),o.value;const r=t(...i);return e.set(n,{value:r,ts:a}),r}}(function(t){const e=st().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function gt(t,e,i,s,n){if(s){let s={passive:!0};I(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 yt(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 vt(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 mt{#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 wt;!function(t){t.configAdded="configAdded",t.containerInit="containerInit",t.particlesSetup="particlesSetup",t.containerStarted="containerStarted",t.containerStopped="containerStopped",t.containerDestroyed="containerDestroyed",t.containerPaused="containerPaused",t.containerPlay="containerPlay",t.containerBuilt="containerBuilt",t.particleAdded="particleAdded",t.particleDestroyed="particleDestroyed",t.particleRemoved="particleRemoved"}(wt||(wt={}));class bt{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#c=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(wt.configAdded,{data:{name:e,config:t}})}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 vt(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 vt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return yt(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#a,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#a,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Pt=t=>(...e)=>{t(...e)},xt={debug:Pt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Pt(console.info),log:Pt(console.log),trace:Pt(console.trace),verbose:Pt(console.log),warning:Pt(console.warn)};function Mt(){return xt}const kt="100%";class zt{pluginManager=new bt(this);#h=[];#d=new mt;#o=!1;get items(){return this.#h}get version(){return"4.1.0"}addEventListener(t,e){this.#d.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.#d.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 ls}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=ht(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Mt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,c=ht(r,a),{items:l}=this,h=l.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(h,e,d)}else l.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=st();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===v)s=t,s.dataset[e]??=y,s.dataset[e]===g&&(s.style.width||=kt,s.style.height||=kt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(v).item(0);n?(s=n,s.dataset[e]=y):(s=i.createElement(v),s.dataset[e]=g,t.appendChild(s)),s.style.width||=kt,s.style.height||=kt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=st();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=g,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Ct,It,St,Ot,Dt,_t,Rt,Tt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Ct||(Ct={}));class Et{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 Lt extends Et{radius;constructor(t,e,i){super(t,e,Ct.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,N(e,i)<=s*s;var e,i,s}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 Lt||t.type===Ct.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Bt||t.type===Ct.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 Bt extends Et{size;constructor(t,e,i,s){super(t,e,Ct.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 Lt)return t.intersects(this);if(!(t instanceof Bt))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}}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(It||(It={})),function(t){t.delete="delete",t.wait="wait"}(St||(St={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Ot||(Ot={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Dt||(Dt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(_t||(_t={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Rt||(Rt={})),function(t){t.easeInBack="ease-in-back",t.easeInBounce="ease-in-bounce",t.easeInCirc="ease-in-circ",t.easeInCubic="ease-in-cubic",t.easeInElastic="ease-in-elastic",t.easeInExpo="ease-in-expo",t.easeInGaussian="ease-in-gaussian",t.easeInLinear="ease-in-linear",t.easeInQuad="ease-in-quad",t.easeInQuart="ease-in-quart",t.easeInQuint="ease-in-quint",t.easeInSigmoid="ease-in-sigmoid",t.easeInSine="ease-in-sine",t.easeInSmoothstep="ease-in-smoothstep",t.easeOutBack="ease-out-back",t.easeOutBounce="ease-out-bounce",t.easeOutCirc="ease-out-circ",t.easeOutCubic="ease-out-cubic",t.easeOutElastic="ease-out-elastic",t.easeOutExpo="ease-out-expo",t.easeOutGaussian="ease-out-gaussian",t.easeOutLinear="ease-out-linear",t.easeOutQuad="ease-out-quad",t.easeOutQuart="ease-out-quart",t.easeOutQuint="ease-out-quint",t.easeOutSigmoid="ease-out-sigmoid",t.easeOutSine="ease-out-sine",t.easeOutSmoothstep="ease-out-smoothstep",t.easeInOutBack="ease-in-out-back",t.easeInOutBounce="ease-in-out-bounce",t.easeInOutCirc="ease-in-out-circ",t.easeInOutCubic="ease-in-out-cubic",t.easeInOutElastic="ease-in-out-elastic",t.easeInOutExpo="ease-in-out-expo",t.easeInOutGaussian="ease-in-out-gaussian",t.easeInOutLinear="ease-in-out-linear",t.easeInOutQuad="ease-in-out-quad",t.easeInOutQuart="ease-in-out-quart",t.easeInOutQuint="ease-in-out-quint",t.easeInOutSigmoid="ease-in-out-sigmoid",t.easeInOutSine="ease-in-out-sine",t.easeInOutSmoothstep="ease-in-out-smoothstep"}(Tt||(Tt={}));class Ft{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){R(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 At extends Ft{mode;startValue;constructor(){super(),this.mode=J.auto,this.startValue=it.random}load(t){super.load(t),R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ut extends Ft{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),R(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 qt{h=new Ut(0,w);l=new Ut(0,P);s=new Ut(0,b);load(t){R(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class Vt{value;constructor(){this.value=""}static create(t,e){const i=new Vt;return i.load(t),void 0!==e&&(S(e)||_(e)?i.load({value:e}):i.load(e)),i}load(t){R(t)||R(t.value)||(this.value=t.value)}}class Ht extends Vt{animation;constructor(){super(),this.animation=new qt}static create(t,e){const i=new Ht;return i.load(t),void 0!==e&&(S(e)||_(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class $t{color;image;opacity;position;repeat;size;constructor(){this.color=new Vt,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Vt.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 Wt{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class Gt{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){R(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class jt{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ct(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Nt{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class Xt{offset;value;constructor(){this.offset=0,this.value=90}load(t){R(t)||(void 0!==t.offset&&(this.offset=G(t.offset)),void 0!==t.value&&(this.value=G(t.value)))}}class Yt{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=et.percent,this.radius=0}load(t){R(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 Qt{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){R(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 Jt{value;constructor(){this.value=0}load(t){R(t)||R(t.value)||(this.value=G(t.value))}}class Kt extends Jt{animation=new Ft;load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Zt extends Kt{animation;constructor(){super(),this.animation=new At}load(t){super.load(t)}}class te{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new Jt,this.enable=!1,this.options={}}load(t){R(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=ct(this.options,t.options)))}}class ee{bottom;default;left;right;top;constructor(){this.default=Ot.out}load(t){R(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 ie{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){R(t)||(void 0!==t.acceleration&&(this.acceleration=G(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=ct({},t.position)))}}class se{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new Xt,this.center=new Yt,this.decay=0,this.distance={},this.direction=M.none,this.drift=0,this.enable=!1,this.gravity=new Qt,this.path=new te,this.outModes=new ee,this.random=!1,this.size=!1,this.speed=2,this.spin=new ie,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(R(t))return;this.angle.load(O(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=O(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&&(D(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 ne{color;opacity;width;constructor(){this.width=0}load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.width&&(this.width=G(t.width)),void 0!==t.opacity&&(this.opacity=G(t.opacity)))}}class ae{color;fill;stroke;load(t){R(t)||(void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new Nt,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new ne,this.stroke.load(t.stroke)))}}class oe extends Jt{constructor(){super(),this.value=1}}class re{horizontal;vertical;constructor(){this.horizontal=new oe,this.vertical=new oe}load(t){R(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ce{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(R(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 le{mode;value;constructor(){this.mode=St.delete,this.value=0}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class he{density;limit;value;constructor(){this.density=new ce,this.limit=new le,this.value=0}load(t){R(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class de{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(R(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=ct(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ue extends Jt{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),R(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 pe{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new re,this.effect=new jt,this.groups={},this.move=new se,this.number=new he,this.paint=new ae,this.paint.color=new Ht,this.paint.color.value="#fff",this.paint.fill=new Nt,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new de,this.zIndex=new ue}load(t){if(R(t))return;if(t.palette&&(this.palette=t.palette,this.#f(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]=ct(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&&(_(e)?this.paint=lt(e,t=>{const e=new ae;return e.load(t),e}):_(this.paint)?(this.paint=new ae,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)}}#f=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(_(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 fe(t,...e){for(const i of e)t.load(i)}function ge(t,e,...i){const s=new pe(t,e);return fe(s,...i),s}class ye{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new $t,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new Wt,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=ge(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new Gt,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(R(t))return;void 0!==t.preset&&(this.preset=t.preset,lt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(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;I(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=ct(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function ve(t,e){t.clearRect(r.x,r.y,e.width,e.height)}function me(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const we=new Map;function be(t,e){let i=we.get(t);if(!i){if(i=e(),we.size>=1e3){[...we.keys()].slice(0,500).forEach(t=>we.delete(t))}we.set(t,i)}return i}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return xe(t,n.value,i,s);if(_(n.value)){const e=at(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function xe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===u?ze():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(_(n.value)){const e=at(n.value,i,s);if(!e)return;return xe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Me(t,e,i,s=!0){const n=Pe(t,e,i,s);return n?function(t){const e=t.r/m,i=t.g/m,s=t.b/m,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o));r.l*=P,r.s*=b,r.h*=60,r.h<0&&(r.h+=w);r.h>=w&&(r.h-=w);return r}(n):void 0}function ke(t){const e=(t.h%w+w)%w,i=Math.max(0,Math.min(b,t.s)),s=Math.max(0,Math.min(P,t.l)),n=e/w,o=i/b,r=s/P;if(0===i){const t=Math.round(r*m);return{r:t,g:t,b:t}}const c=(t,e,i)=>{if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t},l=r<a?r*(1+o):r+o-r*o,h=2*r-l,d=1/3,u=Math.min(m,m*c(h,l,n+d)),p=Math.min(m,m*c(h,l,n)),f=Math.min(m,m*c(h,l,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function ze(t){const e=()=>Math.floor(A(0,256));return{b:e(),g:e(),r:e()}}function Ce(t,e,i){const s=i??1;return be(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Ie(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ie(t,e){return`color(display-p3 ${(t.r/m).toString()} ${(t.g/m).toString()} ${(t.b/m).toString()} / ${(e??1).toString()})`}function Se(t,e,i){const s=i??1;return be(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return Ie(ke(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function Oe(t,e,i){if(i===u)return ze();if(i!==p)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return function(t,e,i,s){let n=t,a=e;return"r"in n||(n=ke(t)),"r"in a||(a=ke(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)}}(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return ke(t)}}}function De(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function _e(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:w},s:{enable:!1,value:t.s,min:0,max:b},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Re(s.h,e.h,i),Re(s.s,e.s,i),Re(s.l,e.l,i)),s}function Re(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=H(e.speed)/n*i,t.decay=1-H(e.decay),t.status=K.increasing,t.loops=0,t.maxLoops=H(e.count),t.time=0,t.delayTime=H(e.delay)*o,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function Te(t,e,i){if(!t.enable||(t.maxLoops??0)>0&&(t.loops??0)>(t.maxLoops??0))return;if(t.time??=0,(t.delayTime??0)>0&&t.time<(t.delayTime??0)&&(t.time+=i.value),(t.delayTime??0)>0&&t.time<(t.delayTime??0))return;const s=t.offset?V(t.offset):0,n=(t.velocity??0)*i.factor+3.6*s,a=t.decay??1,o=t.max,r=t.min;e&&t.status!==K.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=K.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=K.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=U(t.value,r,o)}function Ee(t,e){if(!t)return;const{h:i,s:s,l:n}=t;Te(i,!1,e),Te(s,!0,e),Te(n,!0,e)}const Le=new zt;class Be{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){R(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class Fe{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Be),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Be,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ae(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Fe)})}class Ue{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:f};const n=i.circleRange;e.arc(r.x,r.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=D(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function qe(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Ue))})}var Ve;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ve||(Ve={}));const He=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class We{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(He,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=$e.exec(e);return i?{a:i[Ve.a]?Number.parseInt(i[Ve.a],16)/255:1,b:Number.parseInt(i[Ve.b]??"0",16),g:Number.parseInt(i[Ve.g]??"0",16),r:Number.parseInt(i[Ve.r]??"0",16)}:void 0}}async function Ge(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new We)})}var je;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(je||(je={}));const Ne=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Xe{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 ke(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ke({h:H(e.h),l:H(e.l),s:H(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ne.exec(t);return e?function(t){const e=ke(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?Q(e[je.a]):1,h:Number.parseInt(e[je.h]??"0",10),l:Number.parseInt(e[je.l]??"0",10),s:Number.parseInt(e[je.s]??"0",10)}):void 0}}async function Ye(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Xe)})}class Qe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Je(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,vt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Qe(t.pluginManager))})}class Ke extends At{destroy;constructor(){super(),this.destroy=Z.none,this.speed=2}load(t){super.load(t),R(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ze extends Zt{animation;constructor(){super(),this.animation=new Ke,this.value=1}load(t){if(R(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ti{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=dt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=H(i.speed)/n*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){t.opacity??=new Ze;for(const i of e)t.opacity.load(i?.opacity)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&pt(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function ei(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ti(t)))})}class ii{modes;#u;#v;constructor(t){this.#u=t,this.modes=[Ot.bounce,Ot.split],this.#v=t.plugins.filter(t=>void 0!==t.particleBounce)}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;let a=!1;for(const s of this.#v)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,c=t.getRadius(),l=rt(o,c),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Ot.bounce&&t.outMode!==Ot.split||t.direction!==tt.left&&t.direction!==tt.right)return;t.bounds.right<0&&t.direction===tt.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===tt.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===tt.right&&e>0||t.direction===tt.left&&e<0)){const e=H(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===tt.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===tt.left&&(t.particle.position.x=s),t.outMode===Ot.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,outOfCanvas:d,size:c}),function(t){if(t.outMode!==Ot.bounce&&t.outMode!==Ot.split||t.direction!==tt.bottom&&t.direction!==tt.top)return;t.bounds.bottom<0&&t.direction===tt.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===tt.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===tt.bottom&&e>0||t.direction===tt.top&&e<0)){const e=H(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===tt.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===tt.top&&(t.particle.position.y=s),t.outMode===Ot.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:l,canvasSize:h,offset:r,outOfCanvas:d,size:c})}}class si{modes;constructor(t){this.modes=[Ot.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case Rt.normal:case Rt.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case Rt.inside:{const{dx:e,dy:i}=j(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class ni{modes;#u;constructor(t){this.#u=t,this.modes=[Ot.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===tt.left||e===tt.right))??(t.options.move.distance.vertical&&(e===tt.top||e===tt.bottom)))return;const n=t.options.move.gravity,a=this.#u,o=a.canvas.size,c=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>o.height+c&&e===tt.bottom||n.inverse&&i.y<-c&&e===tt.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=o.height+c||t.velocity.y<0&&t.position.y>=-c||t.velocity.x>0&&t.position.x<=o.width+c||t.velocity.x<0&&t.position.x>=-c)return;ot(t.position,a.canvas.size,r,c,e)||t.destroy()}}}const ai=C.origin;class oi{modes;#u;constructor(t){this.#u=t,this.modes=[Ot.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case Rt.inside:{const{x:e,y:i}=t.velocity;ai.setTo(r),ai.length=t.moveCenter.radius,ai.angle=t.velocity.angle+Math.PI,ai.addTo(t.moveCenter);const{dx:s,dy:a}=j(t.position,ai);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(V({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(V({min:0,max:n.canvas.size.height}));const{dx:o,dy:c}=j(t.position,t.moveCenter);t.direction=Math.atan2(-c,-o),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case Rt.outside:{t.position.x=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(V({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=j(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Rt.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=rt(t.position,o);e===tt.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===tt.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===tt.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===tt.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#m(t,Ot.bounce,t=>new ii(t)),this.#m(t,Ot.out,t=>new oi(t)),this.#m(t,Ot.destroy,t=>new si(t)),this.#m(t,Ot.none,t=>new ni(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,tt.bottom),this.#w(t,e,i.left??i.default,tt.left),this.#w(t,e,i.right??i.default,tt.right),this.#w(t,e,i.top??i.default,tt.top)}#m=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))};#w=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ci(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ri(t)))})}class li{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=ht(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=H(o.opacity),t.fillAnimation=i.animation;const s=Me(this.#p,i);s&&(t.fillColor=_e(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=Ht.create(void 0===a?void 0:Ht.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=Me(this.#p,i)??t.getFillColor();s&&(t.strokeColor=_e(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)&&(Ee(t.fillColor,e),Ee(t.strokeColor,e))}}async function hi(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new li(t.pluginManager,e)))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(di||(di={}));const ui=/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 pi{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=ui.exec(t);return e?{a:e.length>4?Q(e[di.a]):1,b:parseInt(e[di.b]??"0",10),g:parseInt(e[di.g]??"0",10),r:parseInt(e[di.r]??"0",10)}:void 0}}async function fi(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new pi)})}class gi extends At{destroy;constructor(){super(),this.destroy=Z.none,this.speed=5}load(t){super.load(t),R(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class yi extends Zt{animation;constructor(){super(),this.animation=new gi,this.value=3}load(t){if(super.load(t),R(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class vi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/n*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){t.size??=new yi;for(const i of e)t.size.load(i?.size)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=dt(i,e),t.retina.sizeAnimationSpeed=H(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&pt(t,t.size,0,t.options.size.animation.destroy,e)}}async function mi(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new vi(t)))})}async function wi(t){t.checkVersion("4.1.0"),await t.pluginManager.register(async t=>{await Promise.all([Ae(t),Ge(t),Ye(t),fi(t),Je(t),qe(t),hi(t),ei(t),ci(t),mi(t)])})}class bi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}var Pi,xi,Mi;!function(t){t.circle="circle",t.rectangle="rectangle"}(Pi||(Pi={}));class ki{enable;mode;selectors;type;constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type=Pi.circle}load(t){R(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 zi{enable;mode;constructor(){this.enable=!1,this.mode=[]}load(t){R(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class Ci{onClick;onDiv;onHover;constructor(){this.onClick=new bi,this.onDiv=new ki,this.onHover=new zi}load(t){if(R(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=lt(e,t=>{const e=new ki;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(xi||(xi={}));class Ii{#u;#p;constructor(t,e){this.#p=t,this.#u=e}load(t){if(R(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 Si{detectsOn;events;modes;constructor(t,e){this.detectsOn=xi.window,this.events=new Ci,this.modes=new Ii(t,e)}load(t){if(R(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Oi{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return ys});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new Si(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=ct({},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"}(Mi||(Mi={}));class Di{type=Mi.particles;container;constructor(t){this.container=t}}const _i="pointerdown",Ri="pointerup",Ti="pointerleave",Ei="pointermove",Li="touchstart",Bi="touchend",Fi="touchmove",Ai="touchcancel";class Ui extends Lt{#b;constructor(t,e,i,s){super(t,e,i),this.#b=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#b,{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.#b,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 Lt)n=new Lt(i.x,i.y,t.radius);else{const e=t;n=new Bt(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class qi{blur;color;enable;constructor(){this.blur=5,this.color=new Vt,this.color.value="#000",this.enable=!1}load(t){R(t)||(void 0!==t.blur&&(this.blur=t.blur),this.color=Vt.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable))}}class Vi{color;enable;frequency;opacity;constructor(){this.enable=!1,this.frequency=1}load(t){R(t)||(void 0!==t.color&&(this.color=Vt.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 Hi{blink;color;consent;distance;enable;frequency;id;opacity;shadow;triangles;warp;width;constructor(){this.blink=!1,this.color=new Vt,this.color.value="#fff",this.consent=!1,this.distance=100,this.enable=!1,this.frequency=1,this.opacity=1,this.shadow=new qi,this.triangles=new Vi,this.width=1,this.warp=!1}load(t){R(t)||(void 0!==t.id&&(this.id=t.id),void 0!==t.blink&&(this.blink=t.blink),this.color=Vt.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 $i(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 Wi extends Di{#P;#p;constructor(t,e){super(e),this.#p=t,this.#P=0}get maxDistance(){return this.#P}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#P&&(this.#P=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<r.x||e.y<r.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,c=n.warp,l=c?new Ui(e.x,e.y,o,s):new Lt(e.x,e.y,o),h=i.particles.grid.query(l);for(const i of h){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const h=i.getPosition();if(h.x<r.x||h.y<r.y||h.x>s.width||h.y>s.height)continue;const d=j(e,h).distance,u=c&&l.warp?$i(e,h,s):d,p=Math.min(d,u);if(p>o)continue;const f=(1-p/o)*a;this.#x(t),t.links.push({destination:i,opacity:f,color:this.#M(t,i),isWarped:u<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){t.links??=new Hi;for(const i of e)t.links.load(i?.links)}reset(){}#M(t,e){const i=this.container,s=t.options.links;if(!s)return;return Oe(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor)}#x(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=function(t,e,i,s){const n=S(e)?e:e.value;return n===u?s?Pe(t,{value:n}):i?u:p:n===p?p:Pe(t,{value:n})}(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class Gi{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return ms});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function ji(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;!function(t){if(!t.pluginManager.addInteractor)throw new Error("tsParticles Interactivity Plugin is not loaded")}(t),e.addPlugin(new Gi(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new Wi(e,t)))})}const Ni={background:{color:"#000000"},particles:{number:{value:100},links:{distance:125,enable:!0,triangles:{enable:!0,opacity:.1}},move:{enable:!0,speed:5},paint:{fill:{color:{value:"#ffffff"}}},size:{value:1},shape:{type:"circle"}}};async function Xi(t){await t.pluginManager.register(async t=>{await Promise.all([wi(t),(async t=>{await async function(t){t.checkVersion("4.1.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Oi(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,yt(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 ji(t)})(t)]),t.pluginManager.addPreset("triangles",Ni)})}const Yi=globalThis;Yi.__tsParticlesInternals=Yi.__tsParticlesInternals??{},Yi.loadTrianglesPreset=Xi;function Qi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ji{#k;#z;#C;#I;#S;#u;#O;#D;#_;#R;#T;#E;#L;#B;#p;#F;#A;#U={};#q=[void 0,void 0];#V={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#O=null,this.#A=[],this.#F=[],this.#S=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#R=[],this.#T=[],this.#E=[],this.#B=[],this.#L=[]}get settings(){return this.#D}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{ve(t,this.#z.size)})}clear(){let t=!1;for(const e of this.#k)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#A=[],this.#F=[],this.#S=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#R=[],this.#T=[],this.#E=[],this.#B=[],this.#L=[]}draw(t){const e=this.#O;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.#H(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,c=t.options.zIndex,l=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#V,f=this.#U,g=a?Se(a,r.hdr,h*d):void 0,y=o?Se(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#T)i.drawParticleSetup?.(s,t,e);this.#$(s,t,i,d,f,p),function(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:c}=t,{effectDrawers:l,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(c),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 f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,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:f,stroke:g>0,transformData:u,position:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const v=s.effect?l.get(s.effect):void 0,m=s.shape?h.get(s.shape):void 0;!function(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}(v,y),function(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}(m,y),function(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())}(m,y),function(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}(m,y),function(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}(v,y),i.resetTransform()}({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*l**c.sizeRate,opacity:d,transform:p}),this.#W(t);for(const i of this.#R)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#_)me(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#B)e.drawSettingsSetup?.(i,t);for(const e of this.#E)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#I)e.clearDraw?.(i,t);for(const e of this.#L)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#S=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#T=[],this.#R=[],this.#E=[],this.#B=[],this.#L=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#S.push(t),t.canvasClear&&this.#k.push(t),t.canvasPaint&&this.#C.push(t),t.drawParticle&&this.#_.push(t),t.drawParticleSetup&&this.#T.push(t),t.drawParticleCleanup&&this.#R.push(t),t.draw&&this.#E.push(t),t.drawSettingsSetup&&this.#B.push(t),t.drawSettingsCleanup&&this.#L.push(t),t.clearDraw&&this.#I.push(t)}initUpdaters(){this.#A=[],this.#F=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#F.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#A.push(t)}paint(){let t=!1;for(const e of this.#C)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{!function(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(r.x,r.y,e.width,e.height)}(e,this.#z.size,t)})}paintImage(t,e){this.draw(i=>{!function(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,r.x,r.y,e.width,e.height),t.globalAlpha=n}(i,this.#z.size,t,e)})}setContext(t){this.#O=t,this.#O&&(this.#O.globalCompositeOperation=i)}setContextSettings(t){this.#D=t}stop(){this.draw(t=>{ve(t,this.#z.size)})}#W=t=>{for(const e of this.#F)e.afterDraw?.(t)};#$=(t,e,i,s,n,a)=>{for(const o of this.#A){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)Qi(a,t,e)}o.beforeDraw?.(e)}};#H=t=>{let e,i;for(const s of this.#S)if(!e&&s.particleFillColor&&(e=Me(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Me(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#q[0]=e,this.#q[1]=i,this.#q}}const Ki=new WeakMap;function Zi(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 ts{domElement;render;renderCanvas;size;zoom=1;#u;#G;#j;#N;#p;#X;#Y;#Q;#J;constructor(t,e){this.#p=t,this.#u=e,this.render=new Ji(t,e,this),this.#Q={height:0,width:0};const i=e.retina.pixelRatio,s=this.#Q;this.size={height:s.height*i,width:s.width*i},this.#G=!1,this.#Y=[],this.#X="none"}get#K(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#G){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#Z();this.render.destroy(),this.#Y=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#J?this.#J:{x:e*a/t,y:i*a/t}}init(){this.#tt(t=>{t.disconnect()}),this.#j=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#et()}),this.resize(),this.#it(),this.initBackground(),this.#tt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Pe(this.#p,e.color);s.backgroundColor=n?Ce(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#Y=[];for(const t of this.#u.plugins)t.resize&&this.#Y.push(t)}loadCanvas(t){this.#G&&this.domElement&&this.domElement.remove();const i=this.#u,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#G=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Ki.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Ki.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#N=function(t){const e=st().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||R(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}(n.style));const a=this.#Q,o=this.renderCanvas;n?(a.height=n.offsetHeight,a.width=n.offsetWidth):(a.height=o.height,a.width=o.width);const r=this.#u.retina.pixelRatio,c=this.size;o.height=c.height=a.height*r,o.width=c.width=a.width*r;const l=nt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:l?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(o.getContext("2d",this.render.settings)),this.#tt(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#tt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#Q,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,o={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&o.height===i.height&&o.width===i.width)return!1;const r={...s};s.height=n.height,s.width=n.width;const c=this.size;return i.width=c.width=o.width,i.height=c.height=o.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#X=t,this.#et())}setZoom(t,e){this.zoom=t,this.#J=e}stop(){this.#tt(t=>{t.disconnect()}),this.#j=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#st(),e&&await t.refresh()}#st=()=>{for(const t of this.#Y)t.resize?.()};#it=()=>{const t=this.domElement,e=this.#u.actualOptions;if(t){this.#K?this.#nt():this.#Z();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")}}};#et=()=>{const t=this.domElement;if(!t)return;this.#tt(t=>{t.disconnect()}),this.#it(),this.initBackground();const e=this.#X;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#tt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#Z=()=>{const t=this.domElement,e=this.#N;t&&e&&Zi(t,e,!0)};#tt=t=>{this.#j&&t(this.#j)};#nt=()=>{const t=this.domElement;t&&Zi(t,ft(this.#u.actualOptions.fullScreen.zIndex),!0)}}class es{#u;#at;#ot;#rt;constructor(t){this.#u=t,this.#at={visibilityChange:()=>{this.#ct()},resize:()=>{this.#lt()}}}addListeners(){this.#ht(!0)}removeListeners(){this.#ht(!1)}#ct=()=>{const t=this.#u;t.actualOptions.pauseOnBlur&&(st().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#lt=()=>{this.#rt&&(clearTimeout(this.#rt),this.#rt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#rt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*o)};#ht=t=>{const e=this.#at;this.#dt(t),gt(document,s,e.visibilityChange,t,!1)};#dt=t=>{const e=this.#at,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void gt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#ot&&!t?(s&&this.#ot.unobserve(s),this.#ot.disconnect(),this.#ot=void 0):!this.#ot&&t&&s&&(this.#ot=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#lt()}),this.#ot.observe(s))}}function is(t){if(e=t.outMode,i=t.checkModes,!(e===i||_(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}class ss{backColor;bubble;destroyed;direction;effect;effectClose;effectData;fillColor;fillEnabled;fillOpacity;group;id;ignoresResizeRatio;initialPosition;initialVelocity;isRotating;justWarped;lastPathTime;misplaced;moveCenter;offset;opacity;options;outType;pathRotation;position;randomIndexData;retina;roll;rotation;shape;shapeClose;shapeData;sides;size;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#ut={fillOpacity:1,opacity:1,strokeOpacity:1};#pt=z.origin;#ft={sin:0,cos:0};#gt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const e=this.#u,i=this.shape?e.shapeDrawers.get(this.shape):void 0;i?.particleDestroy?.(this);for(const i of e.particleDestroyedPlugins)i.particleDestroyed?.(this,t);for(const i of e.particleUpdaters)i.particleDestroyed?.(this,t);this.#u.dispatchEvent(wt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#yt(this.bubble.color??De(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}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.#ut.fillOpacity=i*s*e,this.#ut.opacity=i*e,this.#ut.strokeOpacity=i*n*e,this.#ut}getPosition(){return this.#pt.x=this.position.x+this.offset.x,this.#pt.y=this.position.y+this.offset.y,this.#pt.z=this.position.z,this.#pt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ft.sin=Math.sin(t),this.#ft.cos=Math.cos(t),this.#ft}getStrokeColor(){return this.#yt(this.bubble.color??De(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#gt.a=e.cos*(t.a??c),this.#gt.b=i?e.sin*(t.b??1):t.b??l,this.#gt.c=i?-e.sin*(t.c??1):t.c??h,this.#gt.d=e.cos*(t.d??d),this.#gt}init(t,e,i,s){const n=this.#u;this.id=t,this.group=s,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=Rt.normal,this.ignoresResizeRatio=!0;const a=n.actualOptions,o=ge(this.#p,n,a.particles),r=o.reduceDuplicates,c=o.effect.type,l=o.shape.type;this.effect=ht(c,this.id,r),this.shape=ht(l,this.id,r);const h=o.effect,d=o.shape;if(i){if(i.effect?.type&&i.effect.type!==this.effect){const t=ht(i.effect.type,this.id,r);t&&(this.effect=t,h.load(i.effect))}if(i.shape?.type&&i.shape.type!==this.shape){const t=ht(i.shape.type,this.id,r);t&&(this.shape=t,d.load(i.shape))}}if(this.effect===u){const t=[...this.#u.effectDrawers.keys()];this.effect=t[Math.floor(F()*t.length)]}if(this.shape===u){const t=[...this.#u.shapeDrawers.keys()];this.shape=t[Math.floor(F()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return ct({close:e.close},ht(n,i,s))}(this.effect,h,this.id,r):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return ct({close:e.close},ht(n,i,s))}(this.shape,d,this.id,r):void 0,o.load(i);const p=this.effectData,f=this.shapeData;p&&o.load(p.particles),f&&o.load(f.particles),this.effectClose=p?.close??o.effect.close,this.shapeClose=f?.close??o.shape.close,this.options=o,n.retina.initParticle(this);for(const t of n.particleUpdaters)t.preInit?.(this);let g,y;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#vt(e),this.initialVelocity=this.#mt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,this.effect&&(g=n.effectDrawers.get(this.effect)),g?.loadEffect&&g.loadEffect(this),this.shape&&(y=n.shapeDrawers.get(this.shape)),y?.loadShape&&y.loadShape(this);const v=y?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of n.particleUpdaters)t.init(this);g?.particleInit?.(n,this),y?.particleInit?.(n,this);for(const t of n.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#wt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#wt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%f,i=e<0?e+f:e;return i>=Math.PI*a&&i<3*Math.PI*a}if(this.roll.horizontal){const e=(t+Math.PI*a)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#bt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),c=n.canvas.size,l=new AbortController,{signal:h}=l;for(;!h.aborted;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=Y({size:c,position:s}),l=z.create(t.x,t.y,e);this.#Pt(l,r,o.left??o.default),this.#Pt(l,r,o.right??o.default),this.#xt(l,r,o.top??o.default),this.#xt(l,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,l,i)??!0,!h)break;if(h)return l;i+=1,s=void 0}return s};#mt=()=>{const t=this.options.move,e=function(t){const e=C.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===M.inside||t.direction===M.outside)return e;const i=X(H(t.angle.value)),s=X(H(t.angle.offset)),n={left:s-i*a,right:s+i*a};return t.straight||(e.angle+=V(G(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e};#Pt=(t,e,i)=>{is({outMode:i,checkModes:[Ot.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})};#xt=(t,e,i)=>{is({outMode:i,checkModes:[Ot.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})};#Mt=(t,e)=>{const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Ot.bounce;return t===tt.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===tt.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===tt.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===tt.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}};#kt=(t,e)=>({canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#wt=t=>{const e=this.#Mt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,o=n?.isInsideCanvas;if(!a&&!o)return e;const r=this.#kt(t.direction,t.outMode),c=a?this.#zt(a(r),"shape"):void 0,l=o?this.#zt(o(r),"effect"):void 0;if(c&&l){const t=Math.max(c.margin??0,l.margin??0);return{inside:c.inside&&l.inside,margin:t>0?t:void 0,reason:"combined"}}return c??l??e};#yt=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===Dt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t;#vt=t=>{const e=this.#u,i=Math.floor(H(this.options.zIndex.value)),s=this.#bt(t,U(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...ut(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(O(t))return X(t);switch(t){case M.top:return-Math.PI*a;case M.topRight:return-Math.PI*x;case M.right:return 0;case M.bottomRight:return Math.PI*x;case M.bottom:return Math.PI*a;case M.bottomLeft:return.75*Math.PI;case M.left:return Math.PI;case M.topLeft:return.75*-Math.PI;case M.inside:return Math.atan2(i.y-e.y,i.x-e.x);case M.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*f}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case M.inside:this.outType=Rt.inside;break;case M.outside:this.outType=Rt.outside}this.offset=C.origin};#zt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class ns{#Ct;#It=new Map;#St=[];#Ot;#Dt;#_t=[];#Rt;constructor(t){this.#Ct=t,this.#Ot=0,this.#Rt=0}clear(){this.#It.clear();const t=this.#Dt;t&&(this.#Ct=t),this.#Dt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Tt(e,i);this.#It.has(s)||this.#It.set(s,[]),this.#It.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Et(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ct),a=Math.floor(s.maxX/this.#Ct),o=Math.floor(s.minY/this.#Ct),r=Math.floor(s.maxY/this.#Ct);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#It.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.#Lt(t.x,t.y,e),a=this.query(n,i,s);return this.#Bt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ft(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Bt(),a}setCellSize(t){this.#Dt=t}#Lt(t,e,i){return(this.#St[this.#Ot++]??=new Lt(t,e,i)).reset(t,e,i)}#Ft(t,e,i,s){return(this.#_t[this.#Rt++]??=new Bt(t,e,i,s)).reset(t,e,i,s)}#Tt(t,e){return`${Math.floor(t/this.#Ct)}_${Math.floor(e/this.#Ct)}`}#Et(t){if(t instanceof Lt){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 Bt){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}#Bt(){this.#Ot=0,this.#Rt=0}}class as{checkParticlePositionPlugins;grid;#At;#u;#Ut;#qt;#Vt;#Ht;#$t;#Wt;#p;#Gt;#jt;#Nt;#Xt;#Yt;#Qt;constructor(t,e){this.#p=t,this.#u=e,this.#Vt=0,this.#At=[],this.#Gt=[],this.#qt=0,this.#Ut=new Map,this.#Ht=new Map,this.#Qt=this.#Jt(this.#u.zLayers),this.grid=new ns(100),this.checkParticlePositionPlugins=[],this.#$t=[],this.#Wt=[],this.#Nt=[],this.#jt=[],this.#Yt=[]}get count(){return this.#At.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#Ut.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case St.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case St.wait:if(o>=a)return}try{const n=this.#Gt.pop()??new ss(this.#p,this.#u);n.init(this.#Vt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#At.push(n),this.#Kt(n),this.#Vt++,this.#u.dispatchEvent(wt.particleAdded,{particle:n}),n):void this.#Gt.push(n)}catch(t){Mt().warning(`error adding particle: ${t}`)}}clear(){this.#At=[],this.#Ht.clear(),this.#Zt(this.#u.zLayers)}destroy(){this.#At=[],this.#Gt.length=0,this.#Ht.clear(),this.#Qt=[],this.checkParticlePositionPlugins=[],this.#$t=[],this.#Wt=[],this.#Nt=[],this.#jt=[],this.#Yt=[]}drawParticles(t){for(let e=this.#Qt.length-1;e>=0;e--){const i=this.#Qt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#At.filter(t)}find(t){return this.#At.find(t)}get(t){return this.#At[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#Yt=[],this.#Wt=[],this.#Nt=[],this.#$t=[],this.#jt=[],this.#Ht.clear(),this.#Zt(t.zLayers),this.grid=new ns(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Yt.push(e),e.particleUpdate&&this.#Wt.push(e),e.postUpdate&&this.#Nt.push(e),e.particleReset&&this.#$t.push(e),e.postParticleUpdate&&this.#jt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#At.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.#te(a,i,s)&&(a--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=ge(this.#p,this.#u,s);this.#ee(n,i,t)}this.#ee(t.particles,i)}setResizeFactor(t){this.#Xt=t}update(t){this.grid.clear();for(const e of this.#Yt)e.update?.(t);const e=this.#ie(t);for(const e of this.#Nt)e.postUpdate?.(t);if(this.#se(t,e),e.size)for(const t of e)this.remove(t);this.#Xt=void 0}#ne=(...t)=>{this.#Gt.push(...t)};#ee=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#qt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Ut.set(i,s?.number.limit.value??n.limit.value));const a=this.#ae(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,c=Math.min(o,r)*a+e,l=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#Ut.set(i,n.limit.value*a),l<c?this.push(Math.abs(c-l),void 0,t,i):l>c&&this.removeQuantity(l-c,i)};#Jt=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#oe=t=>{const e=this.#Qt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#re=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),a=t[n];a?a.id<e?i=n+1:s=n:s=n}return i};#ae=t=>{const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};#Kt=t=>{const e=this.#oe(t.position.z),i=this.#Qt[e];i&&(i.splice(this.#re(i,t.id),0,t),this.#Ht.set(t.id,e))};#te=(t,e,i)=>{const s=this.#At[t];return!!s&&(s.group===e&&(this.#At.splice(t,1),this.#ce(s),s.destroy(i),this.#u.dispatchEvent(wt.particleRemoved,{particle:s}),this.#ne(s),!0))};#ce=t=>{const e=this.#Ht.get(t.id)??this.#oe(t.position.z),i=this.#Qt[e];if(!i)return void this.#Ht.delete(t.id);const s=this.#re(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#Ht.delete(t.id)):this.#Ht.delete(t.id)};#Zt=t=>{const e=Math.max(Math.floor(t),1);if(this.#Qt.length===e)for(const t of this.#Qt)t.length=0;else this.#Qt=this.#Jt(e)};#le=t=>{const e=this.#oe(t.position.z),i=this.#Ht.get(t.id);if(void 0===i)return void this.#Kt(t);if(i===e)return;const s=this.#Qt[i];if(s){const e=this.#re(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#Qt[e];n?(n.splice(this.#re(n,t.id),0,t),this.#Ht.set(t.id,e)):this.#Ht.set(t.id,e)};#ie=t=>{const e=new Set,i=this.#Xt;for(const s of this.#At){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.#$t)t.particleReset?.(s);for(const e of this.#Wt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#se=(t,e)=>{for(const i of this.#At)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#jt)e.postParticleUpdate?.(i,t);this.#le(i)}}}class os{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=H(s.gravity.maxSpeed)*i,a.moveDrift=H(s.drift)*i,a.moveSpeed=H(s.speed)*i;const o=a.maxDistance;o.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,o.vertical=void 0===n.vertical?void 0:n.vertical*i}}function rs(t){return!t.destroyed}function cs(t,e,...i){const s=new ye(t,e);return fe(s,...i),s}var ls=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#he;#de;#ue={value:0,factor:0};#pe;#fe;#ge;#ye;#ve;#me;#we;#be;#Pe;#xe;#Me;#p;#ke;#ze;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#pe=e,this.#Pe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#ke=!1,this.#he=0,this.#ge=0,this.#be=0,this.#ve=!0,this.started=!1,this.destroyed=!1,this.#Me=!0,this.#we=0,this.zLayers=100,this.pageHidden=!1,this.#ze=a,this.#me=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new os(this),this.canvas=new ts(this.#p,this),this.particles=new as(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#xe=cs(this.#p,this),this.actualOptions=cs(this.#p,this),this.#ye=new es(this),this.dispatchEvent(wt.containerBuilt)}get animationStatus(){return!this.#Me&&!this.pageHidden&&rs(this)}get options(){return this.#xe}get sourceOptions(){return this.#ze}addLifeTime(t){this.#be+=t}alive(){return!this.#ge||this.#be<=this.#ge}destroy(t=!0){if(rs(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Pe(t),this.dispatchEvent(wt.containerDestroyed)}}dispatchEvent(t,e){this.#pe(t,{container:this,data:e})}draw(t){if(!rs(this))return;let e=t;this.#fe=L(t=>{e&&(this.#we=void 0,e=!1),this.#Ce(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}Mt().error(`Export plugin with type ${t} not found`)}async init(){if(!rs(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#xe=cs(this.#p,this,this.#me,this.sourceOptions),this.actualOptions=cs(this.#p,this,this.#xe),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[e,i]of t)e.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:e,duration:i,fpsLimit:s,hdr:n,smooth:a,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#ge=H(i)*o,this.#he=H(e)*o,this.#be=0,this.fpsLimit=s>0?s:120,this.#ke=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(wt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(wt.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(rs(this)&&(void 0!==this.#fe&&(t=this.#fe,B(t),this.#fe=void 0),!this.#Me)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Me=!0),this.dispatchEvent(wt.containerPaused)}}play(t){if(!rs(this))return;const e=this.#Me||t;if(!this.#ve||this.actualOptions.autoPlay){if(this.#Me&&(this.#Me=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(wt.containerPlay),this.draw(e??!1)}else this.#ve=!1}async refresh(){if(rs(this))return this.stop(),this.start()}async reset(t){if(rs(this))return this.#me=t,this.#ze=t,this.#xe=cs(this.#p,this,this.#me,this.sourceOptions),this.actualOptions=cs(this.#p,this,this.#xe),this.refresh()}async start(){rs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#ye.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(wt.containerStarted),this.play(),t()};this.#de=setTimeout(()=>{e()},this.#he)}))}stop(){if(rs(this)&&this.started){this.#de&&(clearTimeout(this.#de),this.#de=void 0),this.#ve=!0,this.started=!1,this.#ye.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#ze=this.#xe,this.dispatchEvent(wt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Ce=t=>{try{if(!this.#ke&&void 0!==this.#we&&t<this.#we+o/this.fpsLimit)return void this.draw(!1);if(this.#we??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/o}(this.#ue,t-this.#we,this.fpsLimit,this.#ke),this.addLifeTime(this.#ue.value),this.#we=t,this.#ue.value>o)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ue),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Mt().error("error in animation loop",t)}}}});var hs=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Ie;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Ie&&(t.globalCompositeOperation=this.#Ie)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ie=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ds(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,c=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=c*(r.acceleration*o.factor)/(60*i));const l=t.moveDecay;t.velocity.multTo(l??1);const 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=c*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)}function us(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(c=a,l=n,Math.sqrt(N(c,l))),r=H(i.acceleration);var c,l;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?It.clockwise:It.counterClockwise,angle:F()*f,radius:o,acceleration:e.retina.spinAcceleration}}var ps=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-H(e.decay),t.pathDelay=H(s.delay.value)*o,s.generator){let e=this.pathGenerators.get(s.generator);e||(e=this.availablePathGenerators.get(s.generator),e&&(this.pathGenerators.set(s.generator,e),e.init())),t.pathGenerator=e}t.gravity={enable:i.enable,acceleration:H(i.acceleration),inverse:i.inverse},us(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,n=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,c=t.retina.moveDrift,l=t.size.max,h=r*(i.size?t.getRadius()/l:1)*n*(e.factor||1)*a,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const n=e.spin.direction===It.clockwise,o={x:n?Math.cos:Math.sin,y:n?Math.sin:Math.cos};e.position.x=e.spin.center.x+e.spin.radius*o.x(e.spin.angle)*s,e.position.y=e.spin.center.y+e.spin.radius*o.y(e.spin.angle)*s,e.spin.radius+=e.spin.acceleration*s;const r=Math.max(t.canvas.size.width,t.canvas.size.height),c=r*a;e.spin.radius>c?(e.spin.radius=c,e.spin.acceleration*=-1):e.spin.radius<0&&(e.spin.radius=0,e.spin.acceleration*=-1),e.spin.angle+=.01*i*(1-e.spin.radius/r)}(s,t,h,o):ds(t,i,h,d,c,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=j(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,c=r.horizontal,l=r.vertical;if(!c&&!l)return;if((c&&n>=c||l&&o>=l)&&!t.misplaced)t.misplaced=!!c&&n>c||!!l&&o>l,c&&(t.velocity.x=t.velocity.y*a-t.velocity.x),l&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!c||n<c)&&(!l||o<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;c&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Se()}redrawInit(){return this.#Se()}update(){for(const t of this.pathGenerators.values())t.update()}async#Se(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class fs{#Oe=!0;#De;#u;#at;#_e;#Re;constructor(t,e){this.#u=t,this.#De=[],this.#_e=e,this.#Re=new Map,this.#at={mouseDown:()=>{this.#Te()},mouseLeave:()=>{this.#Ee()},mouseMove:t=>{this.#Le(t)},mouseUp:t=>{this.#Be(t)},touchStart:t=>{this.#Fe(t)},touchMove:t=>{this.#Le(t)},touchEnd:t=>{this.#Ae(t)},touchCancel:t=>{this.#Ae(t)},touchEndClick:t=>{this.#Ue(t)},visibilityChange:()=>{this.#ct()}}}addListeners(){this.#ht(!0)}init(){this.#De.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#De.push(t)}removeListeners(){this.#ht(!1)}#qe=t=>{const e=this.#u,i=this.#_e,s=e.actualOptions;if(this.#Oe){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;lt(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#Ee()},500)};#ct=()=>{this.#Ee()};#Ve=t=>{const e=this.#at,i=this.#u,s=this.#_e,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),(!t||n.interactivity?.events.onHover.enable||n.interactivity?.events.onClick.enable)&&(gt(a,Ei,e.mouseMove,t),gt(a,Li,e.touchStart,t),gt(a,Fi,e.touchMove,t),t?n.interactivity?.events.onClick.enable?(gt(a,Bi,e.touchEndClick,t),gt(a,Ri,e.mouseUp,t),gt(a,_i,e.mouseDown,t)):gt(a,Bi,e.touchEnd,t):(gt(a,Bi,e.touchEndClick,t),gt(a,Ri,e.mouseUp,t),gt(a,_i,e.mouseDown,t),gt(a,Bi,e.touchEnd,t)),gt(a,Ti,e.mouseLeave,t),gt(a,Ai,e.touchCancel,t))};#ht=t=>{const e=this.#at,i=this.#u,n=this.#_e,a=i.actualOptions,o=a.interactivity?.detectsOn,r=i.canvas.domElement;o===xi.window?n.interactivityData.element=st():o===xi.parent&&r?n.interactivityData.element=r.parentElement??r.parentNode:n.interactivityData.element=r,this.#Ve(t),gt(document,s,e.visibilityChange,t,!1)};#Te=()=>{const{interactivityData:t}=this.#_e,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position};#Be=t=>{const e=this.#u,i=this.#_e,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.#De)if(a=t.clickPositionValid?.(o)??!1,a)break;a||this.#qe(t),n.clicking=!1}};#Ee=()=>{const{interactivityData:t}=this.#_e,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Ti,e.inside=!1,e.clicking=!1};#Le=t=>{const e=this.#u,i=this.#_e,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#Oe=!0;const e=t;if(n.element===st()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===xi.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.#Oe="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=Ei};#Ae=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Re.delete(t.identifier);this.#Ee()};#Ue=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Re.delete(t.identifier);this.#Be(t)};#Fe=t=>{const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#Re.set(t.identifier,performance.now());this.#Le(t)}}class gs{interactivityData;#He;#u;#ye;#$e;#We;#Ge;#je;#p;constructor(t,e){this.#u=e,this.#p=t,this.#We=[],this.#$e=[],this.#je=[],this.#He=new Map,this.#ye=new fs(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Ge=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#Ne(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#He.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#He.set(Li,()=>{e.destroyed||(a=!0,o=!1)}),this.#He.set(Fi,()=>{e.destroyed||(o=!0)}),this.#He.set(Bi,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#He.set(Ai,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#He)s.addEventListener(t,e)}addListeners(){this.#ye.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#He)e.element?.removeEventListener(t,i);this.#He.clear()}}externalInteract(t){for(const e of this.#$e){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#$e)i.handleClickMode?.(t,e)}init(){this.#ye.init();for(const t of this.#We){switch(t.type){case Mi.external:this.#$e.push(t);break;case Mi.particles:this.#je.push(t)}t.init()}}async initInteractors(){const t=await(this.#p.getInteractors?.(this.#u,!0));t&&(this.#We=t,this.#$e=[],this.#je=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#$e)i.clear(t,e);for(const s of this.#je)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#ye.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#$e)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#je)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Ge&&this.#Ge.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Ge&&this.#Ge.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.#We)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.setCellSize(t*e.retina.pixelRatio)}#Ne=t=>{const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var ys=Object.freeze({__proto__:null,InteractivityPluginInstance:class{interactionManager;#u;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactionManager=new gs(t,e),this.#u.addClickHandler=t=>{this.interactionManager.addClickHandler(t)}}addClickHandler(t){this.interactionManager.addClickHandler(t)}clearClickHandlers(){this.interactionManager.clearClickHandlers()}destroy(){this.clearClickHandlers(),this.#p.interactors?.delete(this.#u)}particleCreated(t){const e=t,i=new Si(this.#p,this.#u);i.load(this.#u.actualOptions.interactivity),i.load(e.options.interactivity),e.interactivity=i}particleReset(t){this.interactionManager.reset(t)}postParticleUpdate(t,e){this.interactionManager.particlesInteract(t,e)}postUpdate(t){this.interactionManager.externalInteract(t),this.interactionManager.updateMaxDistance()}async preInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}async redrawInit(){await this.interactionManager.initInteractors(),this.interactionManager.init()}start(){return this.interactionManager.addListeners(),this.interactionManager.startObserving(),Promise.resolve()}stop(){this.interactionManager.removeListeners(),this.interactionManager.stopObserving()}}});function vs(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=F(),e.set(i,n)),n}var ms=Object.freeze({__proto__:null,LinkInstance:class{#Xe=new Map;#u;#Ye;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Ye={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,o=e.retina.linksWidth??0,c=e.getPosition(),l=e.options.twinkle?.links,h=n.triangles.enable,d=h?new Set(i.map(t=>t.destination.id)):null,u=t.globalAlpha;let p="",f=-1,g=-1,y=!1;const v=()=>{y&&(t.stroke(),y=!1)};for(const u of i){if(n.frequency<1&&this.#Qe(e,u.destination)>n.frequency)continue;const i=u.destination.getPosition();if(h&&!u.isWarped&&d&&(v(),this.#Je(s,e,u,d,c,i,t)),u.opacity<=0||o<=0)continue;if(!n.enable)continue;let m=u.opacity,w=u.color;const b=l?.enable&&F()<l.frequency?Pe(this.#p,l.color):void 0;if(l&&b&&(w=b,m=H(l.opacity)),!w){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;w=Oe(e,u.destination,t)}if(!w)continue;const P=this.#Ke(w);if(P===p&&o===f&&m===g||(v(),t.strokeStyle=P,t.lineWidth=o,t.globalAlpha=m,p=P,f=o,g=m,t.beginPath(),y=!0),u.isWarped){const e=this.#u.canvas.size,s=i.x-c.x,n=i.y-c.y;let o=r.x,l=r.y;Math.abs(s)>e.width*a&&(o=s>0?-e.width:e.width),Math.abs(n)>e.height*a&&(l=n>0?-e.height:e.height),t.moveTo(c.x,c.y),t.lineTo(i.x+o,i.y+l),t.moveTo(c.x-o,c.y-l),t.lineTo(i.x,i.y)}else t.moveTo(c.x,c.y),t.lineTo(i.x,i.y)}v(),t.globalAlpha=u}init(){return this.#Ye.links.clear(),this.#Ye.triangles.clear(),this.#Xe.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Je(t,e,i,s,n,o,r){const c=i.destination,l=t.links?.triangles;if(!l?.enable||!c.options.links?.triangles.enable)return;const h=c.links;if(h?.length)for(const d of h){if(d.isWarped||this.#Qe(c,d.destination)>c.options.links.frequency||!s.has(d.destination.id))continue;const h=d.destination;if(this.#Ze(e,c,h)>(t.links?.triangles.frequency??0))continue;const u=l.opacity??(i.opacity+d.opacity)*a,p=Pe(this.#p,l.color)??i.color;if(!p||u<=0)continue;const f=h.getPosition();r.save(),r.fillStyle=this.#Ke(p),r.globalAlpha=u,r.beginPath(),r.moveTo(n.x,n.y),r.lineTo(o.x,o.y),r.lineTo(f.x,f.y),r.closePath(),r.fill(),r.restore()}}#Ke(t){const e=`${t.r},${t.g},${t.b}`;let i=this.#Xe.get(e);return i||(i=Ce(t,this.#u.hdr),this.#Xe.set(e,i)),i}#Qe(t,e){return vs([t,e],this.#Ye.links)}#Ze(t,e,i){return vs([t,e,i],this.#Ye.triangles)}}});t.loadTrianglesPreset=Xi,t.tsParticles=Le}),Object.assign(globalThis.window||globalThis,{loadTrianglesPreset:(globalThis.__tsParticlesInternals.presets.triangles||{}).loadTrianglesPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
-
/* Preset v4.0
|
|
2
|
+
/* Preset v4.1.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/plugin-interactivity'), require('@tsparticles/interaction-particles-links')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/plugin-interactivity', '@tsparticles/interaction-particles-links'], factory) :
|