@tsparticles/preset-bubbles 4.2.0 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsparticles/preset-bubbles",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"description": "tsParticles bubbles preset",
|
|
5
5
|
"homepage": "https://particles.js.org",
|
|
6
6
|
"repository": {
|
|
@@ -106,9 +106,9 @@
|
|
|
106
106
|
"./package.json": "./package.json"
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
|
-
"@tsparticles/basic": "4.2.
|
|
110
|
-
"@tsparticles/engine": "4.2.
|
|
111
|
-
"@tsparticles/plugin-emitters": "4.2.
|
|
109
|
+
"@tsparticles/basic": "4.2.1",
|
|
110
|
+
"@tsparticles/engine": "4.2.1",
|
|
111
|
+
"@tsparticles/plugin-emitters": "4.2.1"
|
|
112
112
|
},
|
|
113
113
|
"publishConfig": {
|
|
114
114
|
"access": "public"
|
|
@@ -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.2.
|
|
2
|
+
/* Preset v4.2.1 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -809,7 +809,7 @@
|
|
|
809
809
|
return this.#domArray;
|
|
810
810
|
}
|
|
811
811
|
get version() {
|
|
812
|
-
return "4.2.
|
|
812
|
+
return "4.2.1";
|
|
813
813
|
}
|
|
814
814
|
addEventListener(type, listener) {
|
|
815
815
|
this.#eventDispatcher.addEventListener(type, listener);
|
|
@@ -2085,7 +2085,7 @@
|
|
|
2085
2085
|
}
|
|
2086
2086
|
|
|
2087
2087
|
async function loadBlendPlugin(engine) {
|
|
2088
|
-
engine.checkVersion("4.2.
|
|
2088
|
+
engine.checkVersion("4.2.1");
|
|
2089
2089
|
await engine.pluginManager.register(e => {
|
|
2090
2090
|
e.pluginManager.addPlugin(new BlendPlugin());
|
|
2091
2091
|
});
|
|
@@ -2122,7 +2122,7 @@
|
|
|
2122
2122
|
}
|
|
2123
2123
|
|
|
2124
2124
|
async function loadCircleShape(engine) {
|
|
2125
|
-
engine.checkVersion("4.2.
|
|
2125
|
+
engine.checkVersion("4.2.1");
|
|
2126
2126
|
await engine.pluginManager.register(e => {
|
|
2127
2127
|
e.pluginManager.addShape(["circle"], () => {
|
|
2128
2128
|
return Promise.resolve(new CircleDrawer());
|
|
@@ -2170,7 +2170,7 @@
|
|
|
2170
2170
|
}
|
|
2171
2171
|
|
|
2172
2172
|
async function loadHexColorPlugin(engine) {
|
|
2173
|
-
engine.checkVersion("4.2.
|
|
2173
|
+
engine.checkVersion("4.2.1");
|
|
2174
2174
|
await engine.pluginManager.register(e => {
|
|
2175
2175
|
e.pluginManager.addColorManager("hex", new HexColorManager());
|
|
2176
2176
|
});
|
|
@@ -2223,7 +2223,7 @@
|
|
|
2223
2223
|
}
|
|
2224
2224
|
|
|
2225
2225
|
async function loadHslColorPlugin(engine) {
|
|
2226
|
-
engine.checkVersion("4.2.
|
|
2226
|
+
engine.checkVersion("4.2.1");
|
|
2227
2227
|
await engine.pluginManager.register(e => {
|
|
2228
2228
|
e.pluginManager.addColorManager("hsl", new HslColorManager());
|
|
2229
2229
|
});
|
|
@@ -2247,7 +2247,7 @@
|
|
|
2247
2247
|
}
|
|
2248
2248
|
|
|
2249
2249
|
async function loadMovePlugin(engine) {
|
|
2250
|
-
engine.checkVersion("4.2.
|
|
2250
|
+
engine.checkVersion("4.2.1");
|
|
2251
2251
|
await engine.pluginManager.register(e => {
|
|
2252
2252
|
const moveEngine = e, movePluginManager = moveEngine.pluginManager;
|
|
2253
2253
|
movePluginManager.initializers.pathGenerators ??= new Map();
|
|
@@ -2457,7 +2457,7 @@
|
|
|
2457
2457
|
}
|
|
2458
2458
|
|
|
2459
2459
|
async function loadOpacityUpdater(engine) {
|
|
2460
|
-
engine.checkVersion("4.2.
|
|
2460
|
+
engine.checkVersion("4.2.1");
|
|
2461
2461
|
await engine.pluginManager.register(e => {
|
|
2462
2462
|
e.pluginManager.addParticleUpdater("opacity", container => {
|
|
2463
2463
|
return Promise.resolve(new OpacityUpdater(container));
|
|
@@ -2802,7 +2802,7 @@
|
|
|
2802
2802
|
}
|
|
2803
2803
|
|
|
2804
2804
|
async function loadOutModesUpdater(engine) {
|
|
2805
|
-
engine.checkVersion("4.2.
|
|
2805
|
+
engine.checkVersion("4.2.1");
|
|
2806
2806
|
await engine.pluginManager.register(e => {
|
|
2807
2807
|
e.pluginManager.addParticleUpdater("outModes", container => {
|
|
2808
2808
|
return Promise.resolve(new OutOfCanvasUpdater(container));
|
|
@@ -2873,7 +2873,7 @@
|
|
|
2873
2873
|
}
|
|
2874
2874
|
|
|
2875
2875
|
async function loadPaintUpdater(engine) {
|
|
2876
|
-
engine.checkVersion("4.2.
|
|
2876
|
+
engine.checkVersion("4.2.1");
|
|
2877
2877
|
await engine.pluginManager.register(e => {
|
|
2878
2878
|
e.pluginManager.addParticleUpdater("paint", container => {
|
|
2879
2879
|
return Promise.resolve(new PaintUpdater(e.pluginManager, container));
|
|
@@ -2928,7 +2928,7 @@
|
|
|
2928
2928
|
}
|
|
2929
2929
|
|
|
2930
2930
|
async function loadRgbColorPlugin(engine) {
|
|
2931
|
-
engine.checkVersion("4.2.
|
|
2931
|
+
engine.checkVersion("4.2.1");
|
|
2932
2932
|
await engine.pluginManager.register(e => {
|
|
2933
2933
|
e.pluginManager.addColorManager("rgb", new RgbColorManager());
|
|
2934
2934
|
});
|
|
@@ -3013,7 +3013,7 @@
|
|
|
3013
3013
|
}
|
|
3014
3014
|
|
|
3015
3015
|
async function loadSizeUpdater(engine) {
|
|
3016
|
-
engine.checkVersion("4.2.
|
|
3016
|
+
engine.checkVersion("4.2.1");
|
|
3017
3017
|
await engine.pluginManager.register(e => {
|
|
3018
3018
|
e.pluginManager.addParticleUpdater("size", container => {
|
|
3019
3019
|
return Promise.resolve(new SizeUpdater(container));
|
|
@@ -3022,7 +3022,7 @@
|
|
|
3022
3022
|
}
|
|
3023
3023
|
|
|
3024
3024
|
async function loadBasic(engine) {
|
|
3025
|
-
engine.checkVersion("4.2.
|
|
3025
|
+
engine.checkVersion("4.2.1");
|
|
3026
3026
|
await engine.pluginManager.register(async (e) => {
|
|
3027
3027
|
await Promise.all([
|
|
3028
3028
|
loadBlendPlugin(e),
|
|
@@ -3245,7 +3245,7 @@
|
|
|
3245
3245
|
})(EmitterClickMode || (EmitterClickMode = {}));
|
|
3246
3246
|
|
|
3247
3247
|
async function loadEmittersPluginSimple(engine) {
|
|
3248
|
-
engine.checkVersion("4.2.
|
|
3248
|
+
engine.checkVersion("4.2.1");
|
|
3249
3249
|
await engine.pluginManager.register(async (e) => {
|
|
3250
3250
|
const instancesManager = await getEmittersInstancesManager(e);
|
|
3251
3251
|
await addEmittersShapesManager(e);
|
|
@@ -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.bubbles=t.__tsParticlesInternals.presets.bubbles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,w=100,P=.25;var b;function x(t){return"z"in t?t.z:o.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"}(b||(b={}));class z{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(o.x,o.y,o.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,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,x(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return z.clone(this)}div(t){return z.create(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),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return M.create(o.x,o.y)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??o.y):new M(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function k(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function D(t){return Array.isArray(t)}function _(t){return null==t}const O=Math.PI/180;let R=Math.random;const E=t=>requestAnimationFrame(t),L=t=>{cancelAnimationFrame(t)};function T(){return A(R(),0,1-Number.EPSILON)}function F(t,e){return T()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function B(t){const e=$(t);let i=V(t);return e===i&&(i=0),F(i,e)}function U(t){return k(t)?t:B(t)}function V(t){return k(t)?t:t.min}function $(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*O}function H(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??T()*s)*t.size.width/s,y:(t.position?.y??T()*s)*t.size.height/s}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(T()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(_(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>it(void 0,t)):it(e[n],a)}}return t}function st(t,e){return D(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return D(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(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 ct(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 ht{#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 dt;!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"}(dt||(dt={}));class ut{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.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 ct(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 ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const pt=t=>(...e)=>{t(...e)},ft={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 gt(){return ft}const yt="100%";class mt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.2.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 Ni}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.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:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return 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 vt,wt,Pt,bt,xt,zt,Mt,Ct,St,kt,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class Dt{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 _t extends Dt{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(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 _t||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ot||t.type===vt.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 Ot extends Dt{size;constructor(t,e,i,s){super(t,e,vt.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 _t)return t.intersects(this);if(!(t instanceof Ot))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"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(bt||(bt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(xt||(xt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(zt||(zt={})),function(t){t.none="none",t.max="max",t.min="min"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(It||(It={}));class Rt{load(t){_(t)||this.doLoad(t)}}function Et(t,...e){for(const i of e)t.load(i)}function Lt(t,e,i){void 0!==i&&(t[e]=i)}function Tt(t,e,i){void 0!==i&&(t[e]=G(i))}function Ft(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Rt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Tt(this,"count",t.count),Lt(this,"enable",t.enable),Tt(this,"speed",t.speed),Tt(this,"decay",t.decay),Tt(this,"delay",t.delay),Lt(this,"sync",t.sync)}}class Ut extends Bt{mode=Pt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Lt(this,"mode",t.mode),Lt(this,"startValue",t.startValue)}}class Vt extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Lt(this,"max",t.max),Lt(this,"min",t.min),Tt(this,"offset",t.offset)}}class $t extends Rt{h=new Vt(0,m);l=new Vt(0,w);s=new Vt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Rt{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class Wt extends Gt{animation=new $t;static create(t,e){const i=new Wt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class jt extends Rt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Lt(this,"image",t.image),Lt(this,"position",t.position),Lt(this,"repeat",t.repeat),Lt(this,"size",t.size),Lt(this,"opacity",t.opacity)}}class qt extends Rt{enable=!0;zIndex=0;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"zIndex",t.zIndex)}}class Ht extends Rt{delay=.5;enable=!0;doLoad(t){Lt(this,"delay",t.delay),Lt(this,"enable",t.enable)}}class Nt extends Rt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class Xt extends Rt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Lt(this,"enable",t.enable),Tt(this,"opacity",t.opacity)}}class Yt extends Rt{offset=0;value=90;doLoad(t){Tt(this,"offset",t.offset),Tt(this,"value",t.value)}}class Qt extends Rt{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Lt(this,"x",t.x),Lt(this,"y",t.y),Lt(this,"mode",t.mode),Lt(this,"radius",t.radius)}}class Kt extends Rt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Tt(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),Lt(this,"inverse",t.inverse),Tt(this,"maxSpeed",t.maxSpeed)}}class Zt extends Rt{value=0;doLoad(t){_(t.value)||(this.value=G(t.value))}}class Jt extends Zt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class te extends Jt{animation=new Ut}class ee extends Rt{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Lt(this,"clamp",t.clamp),this.delay.load(t.delay),Lt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class ie extends Rt{bottom;default=xt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class se extends Rt{acceleration=0;enable=!1;position;doLoad(t){Tt(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ne extends Rt{angle=new Yt;center=new Qt;decay=0;direction=b.none;distance={};drift=0;enable=!1;gravity=new Kt;outModes=new ie;path=new ee;random=!1;size=!1;speed=2;spin=new se;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Tt(this,"decay",t.decay),Lt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Tt(this,"drift",t.drift),Lt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Lt(this,"random",t.random),Lt(this,"size",t.size),Tt(this,"speed",t.speed),this.spin.load(t.spin),Lt(this,"straight",t.straight),Lt(this,"vibrate",t.vibrate),Lt(this,"warp",t.warp)}}class ae extends Rt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Tt(this,"width",t.width),Tt(this,"opacity",t.opacity)}}class oe extends Rt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Ft(this,"fill",t.fill,()=>new Xt),Ft(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Rt{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Rt{enable=!1;height=1080;width=1920;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"width",t.width),Lt(this,"height",t.height)}}class he extends Rt{mode=bt.delete;value=0;doLoad(t){Lt(this,"mode",t.mode),Lt(this,"value",t.value)}}class de extends Rt{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Lt(this,"value",t.value)}}class ue extends Rt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Lt(this,"opacityRate",t.opacityRate),Lt(this,"sizeRate",t.sizeRate),Lt(this,"velocityRate",t.velocityRate)}}class fe extends Rt{bounce=new le;effect=new Nt;groups={};move=new ne;number=new de;paint;palette;reduceDuplicates=!1;shape=new ue;zIndex=new pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new Wt,this.paint.color.value="#fff",this.paint.fill=new Xt,this.paint.fill.enable=!0}doLoad(t){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]=it(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&&(D(e)?this.paint=st(e,t=>{const e=new oe;return e.load(t),e}):D(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.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 ge(t,e,...i){const s=new fe(t,e);return Et(s,...i),s}class ye extends Rt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new jt,this.fullScreen=new qt,this.particles=ge(this.#p,this.#u),this.resize=new Ht}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Lt(this,"autoPlay",t.autoPlay),Lt(this,"clear",t.clear),Lt(this,"key",t.key),Lt(this,"name",t.name),Tt(this,"delay",t.delay),Lt(this,"detectRetina",t.detectRetina),Tt(this,"duration",t.duration),Lt(this,"fpsLimit",t.fpsLimit),Lt(this,"hdr",t.hdr),Lt(this,"pauseOnBlur",t.pauseOnBlur),Lt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Lt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Lt(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))}}const me=new Map;function ve(t,e){let i=me.get(t);return i||(i=e(),me.size>2e3&&me.clear(),me.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Pe(t,n.value,i,s);if(D(n.value)){const e=J(n.value,i,s);if(!e)return;return we(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(F(t,e));return{b:i(),g:i(),r:i()}}():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=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function be(t,e,i,s=!0){const a=we(t,e,i,s);return a?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=m);r.h>=m&&(r.h-=m);return r}(a):void 0}function xe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/m,o=i/v,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(y,y*xe(c,l,a+h)),u=Math.min(y,y*xe(c,l,a)),p=Math.min(y,y*xe(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Me(t,e,i){const s=i??1;return ve(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ce(t,e,i){const s=i??1;return ve(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Me(ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Se(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Ie(s.h,e.h,i),Ie(s.s,e.s,i),Ie(s.l,e.l,i)),s}function Ie(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=It.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function De(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?B(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!==It.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=It.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=It.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=A(t.value,r,o)}function _e(t,e){if(!t)return;const{h:i,s:s,l:n}=t;De(i,!1,e),De(s,!0,e),De(n,!0,e)}const Oe=new mt;class Re{enable=!1;mode="destination-out";load(t){_(t)||(Lt(this,"mode",t.mode),Lt(this,"enable",t.enable))}}class Ee{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Xi});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 Re),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Re,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Le(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ee)})}class Te{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Fe(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Te))})}var Ae;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ae||(Ae={}));const Be=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ue=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ve{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(Be,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ue.exec(e);return i?{a:i[Ae.a]?Number.parseInt(i[Ae.a],16)/255:1,b:Number.parseInt(i[Ae.b]??"0",16),g:Number.parseInt(i[Ae.g]??"0",16),r:Number.parseInt(i[Ae.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}var Ge;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ge||(Ge={}));const We=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class je{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 ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=We.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ge.a]):1,h:Number.parseInt(e[Ge.h]??"0",10),l:Number.parseInt(e[Ge.l]??"0",10),s:Number.parseInt(e[Ge.s]??"0",10)}):void 0}}async function qe(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new je)})}class He{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ki});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ne(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new He(t.pluginManager))})}function Xe(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=It.increasing;break;case Pt.decrease:o.status=It.decreasing;break;case Pt.random:o.status=T()>=n?It.increasing:It.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=It.increasing);break;case kt.max:o.value=o.max,t&&(o.status=It.decreasing);break;case kt.random:default:o.value=B(o),t&&(o.status=T()>=n?It.increasing:It.decreasing)}}return o.initialValue=o.value,o}function Ye(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,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case It.increasing:e.value+=a;break;case It.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case It.increasing:e.value>=r&&(e.status=It.decreasing,e.loops??=0,e.loops++);break;case It.decreasing:e.value<=o&&(e.status=It.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Mt.max:i>=n&&t.destroy();break;case Mt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class Qe extends Ut{destroy=Mt.none;load(t){super.load(t),_(t)||Lt(this,"destroy",t.destroy)}}class Ke extends te{animation=new Qe;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ze{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Xe(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=T()))}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){At(t,"opacity",Ke,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ye(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Je(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ze(t)))})}class ti{modes;#u;#m;constructor(t){this.#u=t,this.modes=[xt.bounce,xt.split],this.#m=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.#m)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.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===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(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===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.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===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(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===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class ei{modes;constructor(t){this.modes=[xt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=W(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 ii{modes;#u;constructor(t){this.#u=t,this.modes=[xt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const si=M.origin;class ni{modes;#u;constructor(t){this.#u=t,this.modes=[xt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;si.setTo(o),si.length=t.moveCenter.radius,si.angle=t.velocity.angle+Math.PI,si.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,si);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(B({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(B({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case St.outside:{t.position.x=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case St.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=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,xt.bounce,t=>new ti(t)),this.#v(t,xt.out,t=>new ni(t)),this.#v(t,xt.destroy,t=>new ei(t)),this.#v(t,xt.none,t=>new ii(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,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function oi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ai(t)))})}class ri{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Wt.create(void 0===a?void 0:Wt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=be(this.#p,i);s&&(t.fillColor=ke(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=Wt.create(void 0===a?void 0:Wt.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=be(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ke(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)&&(_e(t.fillColor,e),_e(t.strokeColor,e))}}async function li(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ri(t.pluginManager,e)))})}var ci;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ci||(ci={}));const hi=/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 di{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:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=hi.exec(t);return e?{a:e.length>4?X(e[ci.a]):1,b:parseInt(e[ci.b]??"0",10),g:parseInt(e[ci.g]??"0",10),r:parseInt(e[ci.r]??"0",10)}:void 0}}async function ui(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi extends Ut{destroy=Mt.none;load(t){super.load(t),_(t)||Lt(this,"destroy",t.destroy)}}class fi extends te{animation=new pi;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class gi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=T()))}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){At(t,"size",fi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Xe(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ye(t,t.size,0,t.options.size.animation.destroy,e)}}async function yi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new gi(t)))})}async function mi(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{await Promise.all([Le(t),$e(t),qe(t),ui(t),Ne(t),Fe(t),li(t),Je(t),oi(t),yi(t)])})}class vi{count;delay;duration;wait=!1;load(t){_(t)||(Lt(this,"count",t.count),Tt(this,"delay",t.delay),Tt(this,"duration",t.duration),Lt(this,"wait",t.wait))}}class wi{delay=.1;quantity=1;load(t){_(t)||(Tt(this,"quantity",t.quantity),Tt(this,"delay",t.delay))}}class Pi{color=!1;opacity=!1;load(t){_(t)||(Lt(this,"color",t.color),Lt(this,"opacity",t.opacity))}}class bi{options={};replace=new Pi;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Lt(this,"type",t.type))}}class xi{height=0;mode=Q.percent;width=0;load(t){_(t)||(Lt(this,"mode",t.mode),Lt(this,"height",t.height),Lt(this,"width",t.width))}}class zi{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new Xt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class Mi{autoPlay=!0;direction;domId;fill=!0;life=new vi;name;particles;position;rate=new wi;shape=new bi;size;spawn=new zi;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(Lt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new xi,this.size.load(t.size)),Lt(this,"direction",t.direction),Lt(this,"domId",t.domId),Lt(this,"fill",t.fill),this.life.load(t.life),Lt(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Wt,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Wt,this.spawnStrokeColor.load(t.spawnStrokeColor)),Lt(this,"startCount",t.startCount))}}class Ci{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Zi});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Mi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return D(e)&&!!e.length||void 0!==e}}const Si=new WeakMap;var ki;async function Ii(t){t.checkVersion("4.2.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Si.get(e);return i||(i=Promise.resolve().then(function(){return es}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Si.delete(e),t}),Si.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ts}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ci(e))})}!function(t){t.emitter="emitter"}(ki||(ki={}));const Di={fpsLimit:120,particles:{paint:{fill:{color:{value:"random"},enable:!0}},shape:{type:"circle"},opacity:{value:.3},size:{value:{min:5,max:10}},move:{angle:{offset:0,value:30},enable:!0,speed:15,direction:b.top,random:!1,straight:!1,outModes:{default:xt.destroy}}},detectRetina:!0,background:{color:"#fff"},emitters:[{direction:b.top,position:{y:100},life:{duration:3,delay:5,count:0}}]};async function _i(t){await t.pluginManager.register(async t=>{await Promise.all([mi(t),Ii(t)]),t.pluginManager.addPreset("bubbles",Di)})}const Oi=globalThis;Oi.loadBubblesPreset=_i,Oi.tsParticles=Oe;function Ri(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ei{#b;#x;#z;#M;#C;#u;#S;#k;#I;#D;#_;#O;#R;#E;#p;#L;#T;#F={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#x=i,this.#S=null,this.#T=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#D=[],this.#_=[],this.#O=[],this.#E=[],this.#R=[]}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}clear(){let t=!1;for(const e of this.#b)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#T=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#D=[],this.#_=[],this.#O=[],this.#E=[],this.#R=[]}draw(t){const e=this.#S;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.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#F,g=a?Ce(a,r.hdr,h*d):void 0,y=o?Ce(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.#_)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#D)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#E)e.drawSettingsSetup?.(i,t);for(const e of this.#O)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#M)e.clearDraw?.(i,t);for(const e of this.#R)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#_=[],this.#D=[],this.#O=[],this.#E=[],this.#R=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.canvasClear&&this.#b.push(t),t.canvasPaint&&this.#z.push(t),t.drawParticle&&this.#I.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#D.push(t),t.draw&&this.#O.push(t),t.drawSettingsSetup&&this.#E.push(t),t.drawSettingsCleanup&&this.#R.push(t),t.clearDraw&&this.#M.push(t)}initUpdaters(){this.#T=[],this.#L=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#L.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#T.push(t)}paint(){let t=!1;for(const e of this.#z)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#x.size.width,this.#x.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}#G(t){for(const e of this.#L)e.afterDraw?.(t)}#V(t,e,i,s,n,a){for(const o of this.#T){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)Ri(a,t,e)}o.beforeDraw?.(e)}}#j(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#$(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const 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 m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#q(m,y),this.#H(v,y),this.#N(v,y),this.#X(v,y),this.#j(m,y),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#N(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())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#H(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=be(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=be(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}}const Li=new WeakMap;function Ti(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 Fi{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Q;#K;#p;#Z;#J;#tt;#et;constructor(t,e){this.#p=t,this.#u=e,this.render=new Ei(t,e,this),this.#tt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#tt;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#J=[],this.#Z="none"}get#it(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#st();this.render.destroy(),this.#J=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#et?this.#et:{x:e*n/t,y:i*n/t}}init(){this.#nt(t=>{t.disconnect()}),this.#Q=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#ot(),this.initBackground(),this.#nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=we(this.#p,e.color);s.backgroundColor=n?Me(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#J=[];for(const t of this.#u.plugins)t.resize&&this.#J.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Li.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 Li.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#tt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#tt,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 l=this.size;return i.width=l.width=o.width,i.height=l.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.#Z=t,this.#at())}setZoom(t,e){this.zoom=t,this.#et=e}stop(){this.#nt(t=>{t.disconnect()}),this.#Q=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#lt(),e&&await t.refresh()}#lt(){for(const t of this.#J)t.resize?.()}#rt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ot(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#it?this.#ct():this.#st();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")}}}#at(){const t=this.domElement;if(!t)return;this.#nt(t=>{t.disconnect()}),this.#ot(),this.initBackground();const e=this.#Z;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#st(){const t=this.domElement,e=this.#K;t&&e&&Ti(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&Ti(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ai{#u;#ht;#dt;#ut;constructor(t){this.#u=t,this.#ht={visibilityChange:()=>{this.#pt()},resize:()=>{this.#ft()}}}addListeners(){this.#gt(!0)}removeListeners(){this.#gt(!1)}#pt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ft(){this.#ut&&(clearTimeout(this.#ut),this.#ut=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ut=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#gt(t){const e=this.#ht;this.#yt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#yt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#dt&&!t?(s&&this.#dt.unobserve(s),this.#dt.disconnect(),this.#dt=void 0):!this.#dt&&t&&s&&(this.#dt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#ft()}),this.#dt.observe(s))}}function Bi(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)}function Ui(t,e){const i=t%e;return i<0?i+e:i}function Vi(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(T()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(T()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class $i{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;#mt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=z.origin;#wt={sin:0,cos:0};#Pt={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(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#bt(this.bubble.color??Se(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#mt.fillOpacity=i*s*e,this.#mt.opacity=i*e,this.#mt.strokeOpacity=i*n*e,this.#mt}getPosition(){return this.#vt.x=this.position.x+this.offset.x,this.#vt.y=this.position.y+this.offset.y,this.#vt.z=this.position.z,this.#vt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#bt(this.bubble.color??Se(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??r),this.#Pt.b=i?e.sin*(t.b??1):t.b??l,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c,this.#Pt.d=e.cos*(t.d??h),this.#Pt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Vi(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#xt(e),this.initialVelocity=this.#zt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Mt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Mt({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=Ui(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=Ui(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ui(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ct(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(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=z.create(t.x,t.y,e);this.#St(c,r,o.left??o.default),this.#St(c,r,o.right??o.default),this.#kt(c,r,o.top??o.default),this.#kt(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#zt(){const t=this.options.move,e=function(t){const e=M.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=q(U(t.angle.value)),s=q(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=B(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=T()),e}#St(t,e,i){Bi({outMode:i,checkModes:[xt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#kt(t,e,i){Bi({outMode:i,checkModes:[xt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#It(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===xt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.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"}}#Dt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Mt(t){const e=this.#It(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.#Dt(t.direction,t.outMode),l=a?this.#_t(a(r),"shape"):void 0,c=o?this.#_t(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#bt(t){return 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===zt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#xt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ct(t,A(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 a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(k(t))return q(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*P;case b.right:return 0;case b.bottomRight:return Math.PI*P;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=St.inside;break;case b.outside:this.outType=St.outside}this.offset=M.origin}#_t(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Gi{#Ot;#Rt=new Map;#Et=[];#Lt;#Tt;#Ft=[];#At;constructor(t){this.#Ot=t,this.#Lt=0,this.#At=0}clear(){this.#Rt.clear();const t=this.#Tt;t&&(this.#Ot=t),this.#Tt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Bt(e,i);this.#Rt.has(s)||this.#Rt.set(s,[]),this.#Rt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ut(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ot),a=Math.floor(s.maxX/this.#Ot),o=Math.floor(s.minY/this.#Ot),r=Math.floor(s.maxY/this.#Ot);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Rt.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.#Vt(t.x,t.y,e),a=this.query(n,i,s);return this.#$t(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#$t(),a}setCellSize(t){this.#Tt=t}#Vt(t,e,i){return(this.#Et[this.#Lt++]??=new _t(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Ft[this.#At++]??=new Ot(t,e,i,s)).reset(t,e,i,s)}#Bt(t,e){return`${Math.floor(t/this.#Ot)}_${Math.floor(e/this.#Ot)}`}#Ut(t){if(t instanceof _t){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 Ot){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}#$t(){this.#Lt=0,this.#At=0}}class Wi{checkParticlePositionPlugins;grid;#Wt;#u;#jt;#qt;#Ht;#Nt;#Xt;#Yt;#p;#Qt;#Kt;#Zt;#Jt;#te;#ee;constructor(t,e){this.#p=t,this.#u=e,this.#Ht=0,this.#Wt=[],this.#Qt=[],this.#qt=0,this.#jt=new Map,this.#Nt=new Map,this.#ee=this.#ie(this.#u.zLayers),this.grid=new Gi(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}get count(){return this.#Wt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#jt.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case bt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case bt.wait:if(o>=a)return}try{const n=this.#Qt.pop()??new $i(this.#p,this.#u);n.init(this.#Ht,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Wt.push(n),this.#se(n),this.#Ht++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Qt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#Wt=[],this.#Nt.clear(),this.#ne(this.#u.zLayers)}destroy(){this.#Wt=[],this.#Qt.length=0,this.#Nt.clear(),this.#ee=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}drawParticles(t){for(let e=this.#ee.length-1;e>=0;e--){const i=this.#ee[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Wt.filter(t)}find(t){return this.#Wt.find(t)}get(t){return this.#Wt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#te=[],this.#Yt=[],this.#Zt=[],this.#Xt=[],this.#Kt=[],this.#Nt.clear(),this.#ne(t.zLayers),this.grid=new Gi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#te.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#Zt.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Kt.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.#Wt.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.#ae(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.#oe(n,i,t)}this.#oe(t.particles,i)}setResizeFactor(t){this.#Jt=t}update(t){this.grid.clear();for(const e of this.#te)e.update?.(t);const e=this.#re(t);for(const e of this.#Zt)e.postUpdate?.(t);if(this.#le(t,e),e.size)for(const t of e)this.remove(t);this.#Jt=void 0}#ce(...t){this.#Qt.push(...t)}#oe(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.#jt.set(i,s?.number.limit.value??n.limit.value));const a=this.#he(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#jt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#de(t){const e=this.#ee.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#he(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}#se(t){const e=this.#de(t.position.z),i=this.#ee[e];i&&(i.push(t),this.#Nt.set(t.id,e))}#ae(t,e,i){const s=this.#Wt[t];return!!s&&(s.group===e&&(this.#Wt.splice(t,1),this.#ue(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ce(s),!0))}#ue(t){const e=this.#Nt.get(t.id)??this.#de(t.position.z),i=this.#ee[e];if(!i)return void this.#Nt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Nt.delete(t.id)}#ne(t){const e=Math.max(Math.floor(t),1);if(this.#ee.length===e)for(const t of this.#ee)t.length=0;else this.#ee=this.#ie(e)}#pe(t){const e=this.#de(t.position.z),i=this.#Nt.get(t.id);if(void 0===i)return void this.#se(t);if(i===e)return;const s=this.#ee[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ee[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Nt.set(t.id,e)}else this.#Nt.set(t.id,e)}#re(t){const e=new Set,i=this.#Jt;for(const s of this.#Wt){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.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#le(t,e){for(const i of this.#Wt)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.#Kt)e.postParticleUpdate?.(i,t);this.#pe(i)}}}class ji{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=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(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 qi(t){return!t.destroyed}function Hi(t,e,...i){const s=new ye(t,e);return Et(s,...i),s}var Ni=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#fe;#ge;#ye={value:0,factor:0};#me;#ve;#we;#Pe;#be;#xe;#ze;#Me;#Ce;#Se;#ke;#p;#Ie;#De;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#me=e,this.#Ce=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Ie=!1,this.#fe=0,this.#we=0,this.#Me=0,this.#be=!0,this.started=!1,this.destroyed=!1,this.#ke=!0,this.#ze=0,this.zLayers=100,this.pageHidden=!1,this.#De=a,this.#xe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ji(this),this.canvas=new Fi(this.#p,this),this.particles=new Wi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Se=Hi(this.#p,this),this.actualOptions=Hi(this.#p,this),this.#Pe=new Ai(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#ke&&!this.pageHidden&&qi(this)}get options(){return this.#Se}get sourceOptions(){return this.#De}addLifeTime(t){this.#Me+=t}alive(){return!this.#we||this.#Me<=this.#we}destroy(t=!0){if(qi(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.#Ce(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#me(t,{container:this,data:e})}draw(t){if(!qi(this))return;let e=t;this.#ve=E(t=>{e&&(this.#ze=void 0,e=!1),this.#_e(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}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!qi(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.#Se=Hi(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=Hi(this.#p,this,this.#Se),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:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#we=U(i)*a,this.#fe=U(e)*a,this.#Me=0,this.fpsLimit=s>0?s:120,this.#Ie=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.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(qi(this)&&(void 0!==this.#ve&&(t=this.#ve,L(t),this.#ve=void 0),!this.#ke)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ke=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!qi(this))return;const e=this.#ke||t;if(!this.#be||this.actualOptions.autoPlay){if(this.#ke&&(this.#ke=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#be=!1}async refresh(){if(qi(this))return this.stop(),this.start()}async reset(t){if(qi(this))return this.#xe=t,this.#De=t,this.#Se=Hi(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=Hi(this.#p,this,this.#Se),this.refresh()}async start(){qi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ge=setTimeout(()=>{e()},this.#fe)}))}stop(){if(qi(this)&&this.started){this.#ge&&(clearTimeout(this.#ge),this.#ge=void 0),this.#be=!0,this.started=!1,this.#Pe.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.#De=this.#Se,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#_e(t){try{if(!this.#Ie&&void 0!==this.#ze&&t<this.#ze+a/this.fpsLimit)return void this.draw(!1);if(this.#ze??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#ye,t-this.#ze,this.fpsLimit,this.#Ie),this.addLifeTime(this.#ye.value),this.#ze=t,this.#ye.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ye),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var Xi=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Oe;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.#Oe&&(t.globalCompositeOperation=this.#Oe)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Oe=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Yi(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=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function Qi(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=(l=a,c=n,Math.sqrt(j(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:T()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Ki=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-U(e.decay),t.pathDelay=U(s.delay.value)*a,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:U(i.acceleration),inverse:i.inverse},Qi(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,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?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),l=r*n;e.spin.radius>l?(e.spin.radius=l,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):Yi(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this.#Re()}redrawInit(){return this.#Re()}update(){for(const t of this.pathGenerators.values())t.update()}async#Re(){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()}}}});var Zi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(D(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Ji=new Map;var ts=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Ji.set(t,e)}getShapeGenerator(t){return Ji.get(t)}getSupportedShapeGenerators(){return Ji.keys()}}});var es=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ee;#p;constructor(t){this.#Ee=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Mi;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ns}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ee.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ee.get(t);return e||(e=[],this.#Ee.set(t,e)),e}initContainer(t){this.#Ee.has(t)||(this.#Ee.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function is(t,e,i,s){(t.paint??=new oe).fill={color:Wt.create(void 0,{value:e}),enable:s,opacity:i}}function ss(t,e,i,s){(t.paint??=new oe).stroke={color:Wt.create(void 0,{value:e}),opacity:i,width:s}}var ns=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Le;#Te;#Fe;#we;#Ae;#Be;#Ue;#Ve;#$e;#Q;#Ge;#ke;#p;#We;#dt;#je;#qe;#He;#Ne;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#We=i,this.#Le=0,this.#Te=0,this.#Fe=0,this.#Ve=o,n instanceof Mi?this.options=n:(this.options=new Mi,this.options.load(n)),this.#He=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#Ve??this.#Ct(),this.name=this.options.name,this.fill=this.options.fill,this.#Be=!this.options.life.wait,this.#Ne=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=be(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=be(this.#p,this.options.spawn.stroke.color)),this.#ke=!this.options.autoPlay,this.#Ge=r,this.#qe=this.#Xe(),this.size=this.#qe.mode===Q.percent?{width:this.#qe.width/s*this.#u.canvas.size.width,height:this.#qe.height/s*this.#u.canvas.size.height}:{width:this.#qe.width,height:this.#qe.height},this.#$e=this.options.life.count??-1,this.#Ue=this.#$e<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Q=new MutationObserver(()=>{this.resize()}),this.#dt=new ResizeObserver(()=>{this.resize()}),this.#Q.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#dt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#je=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#ke=!0,this.pause()}externalPlay(){this.#ke=!1,this.play()}async init(){await(this.#je?.init())}pause(){this.#ke||(this.#Ae=void 0)}play(){if(this.#ke)return;if(!(this.#$e>0||this.#Ue)&&this.options.life.count||!(this.#Be||this.#Fe>=(this.#He??0)))return;const t=this.#u;if(void 0===this.#Ae){const e=U(this.options.rate.delay);this.#Ae=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#$e>0||this.#Ue)&&this.#Ye()}resize(){const t=this.#Ve,e=this.#u;this.position=t&&tt(t,e.canvas.size,M.origin)?t:this.#Ct(),this.#qe=this.#Xe(),this.size=this.#qe.mode===Q.percent?{width:this.#qe.width/s*e.canvas.size.width,height:this.#qe.height/s*e.canvas.size.height}:{width:this.#qe.width,height:this.#qe.height},this.#je?.resize(this.position,this.size)}update(t){if(this.#ke)return;const e=this.#u;this.#Be&&(this.#Be=!1,this.#Fe=this.#He??0,this.#Te=this.#Ae??0),this.#Ne||(this.#Ne=!0,this.#Qe(this.options.startCount)),void 0!==this.#we&&(this.#Le+=t.value,this.#Le>=this.#we&&(this.pause(),void 0!==this.#He&&(this.#He=void 0),this.#Ue||this.#$e--,this.#$e>0||this.#Ue?(this.position=this.#Ct(),this.#je?.resize(this.position,this.size),this.#He=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#Ke(),this.#Le-=this.#we,this.#we=void 0)),void 0!==this.#He&&(this.#Fe+=t.value,this.#Fe>=this.#He&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Fe-=this.#He,this.#He=void 0)),void 0!==this.#Ae&&(this.#Te+=t.value,this.#Te>=this.#Ae&&(this.#Ze(),this.#Te-=this.#Ae))}#Ct(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return H({size:t.canvas.size,position:this.options.position})}#Xe(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new xi;return t.load({height:0,mode:Q.percent,width:0}),t})()}#Ke(){this.#Q?.disconnect(),this.#Q=void 0,this.#dt?.disconnect(),this.#dt=void 0,this.#We(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#Ze(){if(this.#ke)return;const t=U(this.options.rate.quantity);this.#Qe(t)}#Qe(t){const e=nt(this.#Ge)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#je,u=c||h,p=u||d,f=u?{h:m,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Je(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Je(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Je(i.l,this.spawnFillColor.l,f.l)),is(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#Je(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Je(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Je(a.l,this.spawnStrokeColor.l,f.l)),ss(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#je){const e=this.#je.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&is(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ye(){if(this.#ke)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#$e>0||this.#Ue)&&void 0!==t&&t>0&&(this.#we=t*a)}#Je(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=B(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadBubblesPreset=_i,t.tsParticles=Oe}),Object.assign(globalThis.window||globalThis,{loadBubblesPreset:(globalThis.__tsParticlesInternals.presets.bubbles||{}).loadBubblesPreset}),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.bubbles=t.__tsParticlesInternals.presets.bubbles||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s=100,n=.5,a=1e3,o={x:0,y:0,z:0},r=1,l=0,c=0,h=1,d="random",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,w=100,P=.25;var b;function x(t){return"z"in t?t.z:o.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"}(b||(b={}));class z{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(o.x,o.y,o.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,x(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,x(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return z.clone(this)}div(t){return z.create(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),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class M extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return M.create(o.x,o.y)}static clone(t){return M.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new M(t,e??o.y):new M(t.x,t.y)}}function C(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function k(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function D(t){return Array.isArray(t)}function _(t){return null==t}const O=Math.PI/180;let R=Math.random;const E=t=>requestAnimationFrame(t),L=t=>{cancelAnimationFrame(t)};function T(){return A(R(),0,1-Number.EPSILON)}function F(t,e){return T()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function B(t){const e=$(t);let i=V(t);return e===i&&(i=0),F(i,e)}function U(t){return k(t)?t:B(t)}function V(t){return k(t)?t:t.min}function $(t){return k(t)?t:t.max}function G(t,e){if(t===e||void 0===e&&k(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:G(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function q(t){return t*O}function H(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??T()*s)*t.size.width/s,y:(t.position?.y??T()*s)*t.size.height/s}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(T()*t.length)]}function tt(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(et(t,s??0),e,i,n)}function et(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function it(t,...e){for(const i of e){if(_(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const n=i,a=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(a[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,a=i[n];e[n]=Array.isArray(a)?a.map(t=>it(void 0,t)):it(e[n],a)}}return t}function st(t,e){return D(t)?t.map((t,i)=>e(t,i)):e(t,0)}function nt(t,e,i){return D(t)?J(t,e,i):t}function at(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let ot,rt;function lt(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 ct(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 ht{#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 dt;!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"}(dt||(dt={}));class ut{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#o=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(t){const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(dt.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 ct(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 ct(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return async function(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}(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#o&&!this.#r){this.#r=!0,this.#a=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#a,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#o=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#o)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#a,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const pt=t=>(...e)=>{t(...e)},ft={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 gt(){return ft}const yt="100%";class mt{pluginManager=new ut(this);#h=[];#d=new ht;#o=!1;get items(){return this.#h}get version(){return"4.2.1"}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 Ni}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=nt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(gt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=nt(r,a),{items:c}=this,h=c.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:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return 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 vt,wt,Pt,bt,xt,zt,Mt,Ct,St,kt,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(vt||(vt={}));class Dt{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 _t extends Dt{radius;constructor(t,e,i){super(t,e,vt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(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 _t||t.type===vt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ot||t.type===vt.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 Ot extends Dt{size;constructor(t,e,i,s){super(t,e,vt.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 _t)return t.intersects(this);if(!(t instanceof Ot))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"}(wt||(wt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(Pt||(Pt={})),function(t){t.delete="delete",t.wait="wait"}(bt||(bt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(xt||(xt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(zt||(zt={})),function(t){t.none="none",t.max="max",t.min="min"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ct||(Ct={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(It||(It={}));class Rt{load(t){_(t)||this.doLoad(t)}}function Et(t,...e){for(const i of e)t.load(i)}function Lt(t,e,i){void 0!==i&&(t[e]=i)}function Tt(t,e,i){void 0!==i&&(t[e]=G(i))}function Ft(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Rt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Tt(this,"count",t.count),Lt(this,"enable",t.enable),Tt(this,"speed",t.speed),Tt(this,"decay",t.decay),Tt(this,"delay",t.delay),Lt(this,"sync",t.sync)}}class Ut extends Bt{mode=Pt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Lt(this,"mode",t.mode),Lt(this,"startValue",t.startValue)}}class Vt extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Lt(this,"max",t.max),Lt(this,"min",t.min),Tt(this,"offset",t.offset)}}class $t extends Rt{h=new Vt(0,m);l=new Vt(0,w);s=new Vt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Gt extends Rt{value="";static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class Wt extends Gt{animation=new $t;static create(t,e){const i=new Wt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class jt extends Rt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Gt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Lt(this,"image",t.image),Lt(this,"position",t.position),Lt(this,"repeat",t.repeat),Lt(this,"size",t.size),Lt(this,"opacity",t.opacity)}}class qt extends Rt{enable=!0;zIndex=0;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"zIndex",t.zIndex)}}class Ht extends Rt{delay=.5;enable=!0;doLoad(t){Lt(this,"delay",t.delay),Lt(this,"enable",t.enable)}}class Nt extends Rt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class Xt extends Rt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Lt(this,"enable",t.enable),Tt(this,"opacity",t.opacity)}}class Yt extends Rt{offset=0;value=90;doLoad(t){Tt(this,"offset",t.offset),Tt(this,"value",t.value)}}class Qt extends Rt{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Lt(this,"x",t.x),Lt(this,"y",t.y),Lt(this,"mode",t.mode),Lt(this,"radius",t.radius)}}class Kt extends Rt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Tt(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),Lt(this,"inverse",t.inverse),Tt(this,"maxSpeed",t.maxSpeed)}}class Zt extends Rt{value=0;doLoad(t){_(t.value)||(this.value=G(t.value))}}class Jt extends Zt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class te extends Jt{animation=new Ut}class ee extends Rt{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Lt(this,"clamp",t.clamp),this.delay.load(t.delay),Lt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=it(this.options,t.options))}}class ie extends Rt{bottom;default=xt.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class se extends Rt{acceleration=0;enable=!1;position;doLoad(t){Tt(this,"acceleration",t.acceleration),Lt(this,"enable",t.enable),t.position&&(this.position=it({},t.position))}}class ne extends Rt{angle=new Yt;center=new Qt;decay=0;direction=b.none;distance={};drift=0;enable=!1;gravity=new Kt;outModes=new ie;path=new ee;random=!1;size=!1;speed=2;spin=new se;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Tt(this,"decay",t.decay),Lt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Tt(this,"drift",t.drift),Lt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(I(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Lt(this,"random",t.random),Lt(this,"size",t.size),Tt(this,"speed",t.speed),this.spin.load(t.spin),Lt(this,"straight",t.straight),Lt(this,"vibrate",t.vibrate),Lt(this,"warp",t.warp)}}class ae extends Rt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Tt(this,"width",t.width),Tt(this,"opacity",t.opacity)}}class oe extends Rt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Ft(this,"fill",t.fill,()=>new Xt),Ft(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Rt{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Rt{enable=!1;height=1080;width=1920;doLoad(t){Lt(this,"enable",t.enable),Lt(this,"width",t.width),Lt(this,"height",t.height)}}class he extends Rt{mode=bt.delete;value=0;doLoad(t){Lt(this,"mode",t.mode),Lt(this,"value",t.value)}}class de extends Rt{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Lt(this,"value",t.value)}}class ue extends Rt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=it(this.options[t]??{},i))}Lt(this,"close",t.close),Lt(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Lt(this,"opacityRate",t.opacityRate),Lt(this,"sizeRate",t.sizeRate),Lt(this,"velocityRate",t.velocityRate)}}class fe extends Rt{bounce=new le;effect=new Nt;groups={};move=new ne;number=new de;paint;palette;reduceDuplicates=!1;shape=new ue;zIndex=new pe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new Wt,this.paint.color.value="#fff",this.paint.fill=new Xt,this.paint.fill.enable=!0}doLoad(t){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]=it(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&&(D(e)?this.paint=st(e,t=>{const e=new oe;return e.load(t),e}):D(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.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 ge(t,e,...i){const s=new fe(t,e);return Et(s,...i),s}class ye extends Rt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new jt,this.fullScreen=new qt,this.particles=ge(this.#p,this.#u),this.resize=new Ht}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,st(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Lt(this,"autoPlay",t.autoPlay),Lt(this,"clear",t.clear),Lt(this,"key",t.key),Lt(this,"name",t.name),Tt(this,"delay",t.delay),Lt(this,"detectRetina",t.detectRetina),Tt(this,"duration",t.duration),Lt(this,"fpsLimit",t.fpsLimit),Lt(this,"hdr",t.hdr),Lt(this,"pauseOnBlur",t.pauseOnBlur),Lt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Lt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=it(this.style,t.style),Lt(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))}}const me=new Map;function ve(t,e){let i=me.get(t);return i||(i=e(),me.size>2e3&&me.clear(),me.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return Pe(t,n.value,i,s);if(D(n.value)){const e=J(n.value,i,s);if(!e)return;return we(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Pe(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(F(t,e));return{b:i(),g:i(),r:i()}}():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=J(n.value,i,s);if(!e)return;return Pe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function be(t,e,i,s=!0){const a=we(t,e,i,s);return a?function(t){const e=t.r/y,i=t.g/y,s=t.b/y,a=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(a+o)*n,s:0};a!==o&&(r.s=r.l<n?(a-o)/(a+o):(a-o)/(2-a-o),r.h=e===a?(i-s)/(a-o):i===a?2+(s-e)/(a-o):4+(e-i)/(a-o));r.l*=w,r.s*=v,r.h*=60,r.h<0&&(r.h+=m);r.h>=m&&(r.h-=m);return r}(a):void 0}function xe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function ze(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/m,o=i/v,r=s/w;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=r<n?r*(1+o):r+o-r*o,c=2*r-l,h=1/3,d=Math.min(y,y*xe(c,l,a+h)),u=Math.min(y,y*xe(c,l,a)),p=Math.min(y,y*xe(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Me(t,e,i){const s=i??1;return ve(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/y*s).toString()} ${(t.g/y*s).toString()} ${(t.b/y*s).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Ce(t,e,i){const s=i??1;return ve(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Me(ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function Se(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ke(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:w}};return e&&(Ie(s.h,e.h,i),Ie(s.s,e.s,i),Ie(s.l,e.l,i)),s}function Ie(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=It.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=G(e.offset)):t.velocity=0}function De(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?B(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!==It.increasing?(t.value-=n,t.value<r&&(t.loops??=0,t.loops++,t.status=It.increasing)):(t.value+=n,t.value>o&&(t.loops??=0,t.loops++,e?t.status=It.decreasing:t.value-=o)),t.velocity&&1!==a&&(t.velocity*=a),t.value=A(t.value,r,o)}function _e(t,e){if(!t)return;const{h:i,s:s,l:n}=t;De(i,!1,e),De(s,!0,e),De(n,!0,e)}const Oe=new mt;class Re{enable=!1;mode="destination-out";load(t){_(t)||(Lt(this,"mode",t.mode),Lt(this,"enable",t.enable))}}class Ee{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Xi});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 Re),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Re,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Le(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ee)})}class Te{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(o.x,o.y,s,n.min,n.max,!1)}(t)}getSidesCount(){return 12}particleInit(t,e){const i=e.shapeData,s=i?.angle??{max:360,min:0};e.circleRange=I(s)?{min:q(s.min),max:q(s.max)}:{min:0,max:q(s)}}}async function Fe(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Te))})}var Ae;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ae||(Ae={}));const Be=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ue=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ve{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(Be,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ue.exec(e);return i?{a:i[Ae.a]?Number.parseInt(i[Ae.a],16)/255:1,b:Number.parseInt(i[Ae.b]??"0",16),g:Number.parseInt(i[Ae.g]??"0",16),r:Number.parseInt(i[Ae.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}var Ge;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Ge||(Ge={}));const We=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class je{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 ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return ze({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=We.exec(t);return e?function(t){const e=ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[Ge.a]):1,h:Number.parseInt(e[Ge.h]??"0",10),l:Number.parseInt(e[Ge.l]??"0",10),s:Number.parseInt(e[Ge.s]??"0",10)}):void 0}}async function qe(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new je)})}class He{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ki});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ne(t){t.checkVersion("4.2.1"),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,ct(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new He(t.pluginManager))})}function Xe(t,e){const i=t.value,s=t.animation,o={delayTime:U(s.delay)*a,enable:s.enable,value:U(t.value)*e,max:$(i)*e,min:V(i)*e,loops:0,maxLoops:U(s.count),time:0};if(s.enable){switch(o.decay=1-U(s.decay),s.mode){case Pt.increase:o.status=It.increasing;break;case Pt.decrease:o.status=It.decreasing;break;case Pt.random:o.status=T()>=n?It.increasing:It.decreasing}const t=s.mode===Pt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=It.increasing);break;case kt.max:o.value=o.max,t&&(o.status=It.decreasing);break;case kt.random:default:o.value=B(o),t&&(o.status=T()>=n?It.increasing:It.decreasing)}}return o.initialValue=o.value,o}function Ye(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,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case It.increasing:e.value+=a;break;case It.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case It.increasing:e.value>=r&&(e.status=It.decreasing,e.loops??=0,e.loops++);break;case It.decreasing:e.value<=o&&(e.status=It.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Mt.max:i>=n&&t.destroy();break;case Mt.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class Qe extends Ut{destroy=Mt.none;load(t){super.load(t),_(t)||Lt(this,"destroy",t.destroy)}}class Ke extends te{animation=new Qe;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Ze{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Xe(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=U(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=T()))}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){At(t,"opacity",Ke,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ye(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function Je(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ze(t)))})}class ti{modes;#u;#m;constructor(t){this.#u=t,this.modes=[xt.bounce,xt.split],this.#m=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.#m)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=et(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.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===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(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===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l}),function(t){if(t.outMode!==xt.bounce&&t.outMode!==xt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.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===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(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===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===xt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class ei{modes;constructor(t){this.modes=[xt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=W(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 ii{modes;#u;constructor(t){this.#u=t,this.modes=[xt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;tt(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const si=M.origin;class ni{modes;#u;constructor(t){this.#u=t,this.modes=[xt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;si.setTo(o),si.length=t.moveCenter.radius,si.angle=t.velocity.angle+Math.PI,si.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,si);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(B({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(B({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case St.outside:{t.position.x=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(B({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case St.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=et(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,xt.bounce,t=>new ti(t)),this.#v(t,xt.out,t=>new ni(t)),this.#v(t,xt.destroy,t=>new ei(t)),this.#v(t,xt.none,t=>new ii(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,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function oi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ai(t)))})}class ri{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=nt(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Wt.create(void 0===a?void 0:Wt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=be(this.#p,i);s&&(t.fillColor=ke(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=Wt.create(void 0===a?void 0:Wt.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=be(this.#p,i)??t.getFillColor();s&&(t.strokeColor=ke(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)&&(_e(t.fillColor,e),_e(t.strokeColor,e))}}async function li(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ri(t.pluginManager,e)))})}var ci;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(ci||(ci={}));const hi=/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 di{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:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=hi.exec(t);return e?{a:e.length>4?X(e[ci.a]):1,b:parseInt(e[ci.b]??"0",10),g:parseInt(e[ci.g]??"0",10),r:parseInt(e[ci.r]??"0",10)}:void 0}}async function ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi extends Ut{destroy=Mt.none;load(t){super.load(t),_(t)||Lt(this,"destroy",t.destroy)}}class fi extends te{animation=new pi;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class gi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=T()))}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){At(t,"size",fi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Xe(i,e),t.retina.sizeAnimationSpeed=U(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&Ye(t,t.size,0,t.options.size.animation.destroy,e)}}async function yi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new gi(t)))})}async function mi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{await Promise.all([Le(t),$e(t),qe(t),ui(t),Ne(t),Fe(t),li(t),Je(t),oi(t),yi(t)])})}class vi{count;delay;duration;wait=!1;load(t){_(t)||(Lt(this,"count",t.count),Tt(this,"delay",t.delay),Tt(this,"duration",t.duration),Lt(this,"wait",t.wait))}}class wi{delay=.1;quantity=1;load(t){_(t)||(Tt(this,"quantity",t.quantity),Tt(this,"delay",t.delay))}}class Pi{color=!1;opacity=!1;load(t){_(t)||(Lt(this,"color",t.color),Lt(this,"opacity",t.opacity))}}class bi{options={};replace=new Pi;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=it({},t.options??{})),this.replace.load(t.replace),Lt(this,"type",t.type))}}class xi{height=0;mode=Q.percent;width=0;load(t){_(t)||(Lt(this,"mode",t.mode),Lt(this,"height",t.height),Lt(this,"width",t.width))}}class zi{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new Xt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new ae,this.stroke.load(t.stroke)))}}class Mi{autoPlay=!0;direction;domId;fill=!0;life=new vi;name;particles;position;rate=new wi;shape=new bi;size;spawn=new zi;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(Lt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new xi,this.size.load(t.size)),Lt(this,"direction",t.direction),Lt(this,"domId",t.domId),Lt(this,"fill",t.fill),this.life.load(t.life),Lt(this,"name",t.name),this.particles=st(t.particles,t=>it({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=G(t.position.x)),void 0!==t.position.y&&(this.position.y=G(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Wt,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Wt,this.spawnStrokeColor.load(t.spawnStrokeColor)),Lt(this,"startCount",t.startCount))}}class Ci{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Zi});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=st(i.emitters,t=>{const e=new Mi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return D(e)&&!!e.length||void 0!==e}}const Si=new WeakMap;var ki;async function Ii(t){t.checkVersion("4.2.1"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Si.get(e);return i||(i=Promise.resolve().then(function(){return es}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Si.delete(e),t}),Si.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ts}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ci(e))})}!function(t){t.emitter="emitter"}(ki||(ki={}));const Di={fpsLimit:120,particles:{paint:{fill:{color:{value:"random"},enable:!0}},shape:{type:"circle"},opacity:{value:.3},size:{value:{min:5,max:10}},move:{angle:{offset:0,value:30},enable:!0,speed:15,direction:b.top,random:!1,straight:!1,outModes:{default:xt.destroy}}},detectRetina:!0,background:{color:"#fff"},emitters:[{direction:b.top,position:{y:100},life:{duration:3,delay:5,count:0}}]};async function _i(t){await t.pluginManager.register(async t=>{await Promise.all([mi(t),Ii(t)]),t.pluginManager.addPreset("bubbles",Di)})}const Oi=globalThis;Oi.loadBubblesPreset=_i,Oi.tsParticles=Oe;function Ri(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Ei{#b;#x;#z;#M;#C;#u;#S;#k;#I;#D;#_;#O;#R;#E;#p;#L;#T;#F={};#A=[void 0,void 0];#B={};constructor(t,e,i){this.#p=t,this.#u=e,this.#x=i,this.#S=null,this.#T=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#D=[],this.#_=[],this.#O=[],this.#E=[],this.#R=[]}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}clear(){let t=!1;for(const e of this.#b)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#T=[],this.#L=[],this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#D=[],this.#_=[],this.#O=[],this.#E=[],this.#R=[]}draw(t){const e=this.#S;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.#U(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#B,f=this.#F,g=a?Ce(a,r.hdr,h*d):void 0,y=o?Ce(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.#_)i.drawParticleSetup?.(s,t,e);this.#V(s,t,i,d,f,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#D)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#I)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#E)e.drawSettingsSetup?.(i,t);for(const e of this.#O)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#M)e.clearDraw?.(i,t);for(const e of this.#R)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#C=[],this.#b=[],this.#z=[],this.#M=[],this.#I=[],this.#_=[],this.#D=[],this.#O=[],this.#E=[],this.#R=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.canvasClear&&this.#b.push(t),t.canvasPaint&&this.#z.push(t),t.drawParticle&&this.#I.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#D.push(t),t.draw&&this.#O.push(t),t.drawSettingsSetup&&this.#E.push(t),t.drawSettingsCleanup&&this.#R.push(t),t.clearDraw&&this.#M.push(t)}initUpdaters(){this.#T=[],this.#L=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#L.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#T.push(t)}paint(){let t=!1;for(const e of this.#z)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,o.x,o.y,this.#x.size.width,this.#x.size.height),i.globalAlpha=s})}setContext(t){this.#S=t,this.#S&&(this.#S.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#x.size.width,this.#x.size.height)})}#G(t){for(const e of this.#L)e.afterDraw?.(t)}#V(t,e,i,s,n,a){for(const o of this.#T){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)Ri(a,t,e)}o.beforeDraw?.(e)}}#j(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#$(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),a.fill&&(i.fillStyle=a.fill);const 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 m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#q(m,y),this.#H(v,y),this.#N(v,y),this.#X(v,y),this.#j(m,y),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#N(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())}#X(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#H(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#U(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=be(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=be(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#A[0]=e,this.#A[1]=i,this.#A}}const Li=new WeakMap;function Ti(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 Fi{domElement;render;renderCanvas;size;zoom=1;#u;#Y;#Q;#K;#p;#Z;#J;#tt;#et;constructor(t,e){this.#p=t,this.#u=e,this.render=new Ei(t,e,this),this.#tt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#tt;this.size={height:s.height*i,width:s.width*i},this.#Y=!1,this.#J=[],this.#Z="none"}get#it(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Y){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#st();this.render.destroy(),this.#J=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#et?this.#et:{x:e*n/t,y:i*n/t}}init(){this.#nt(t=>{t.disconnect()}),this.#Q=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#at()}),this.resize(),this.#ot(),this.initBackground(),this.#nt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=we(this.#p,e.color);s.backgroundColor=n?Me(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#J=[];for(const t of this.#u.plugins)t.resize&&this.#J.push(t)}loadCanvas(t){this.#Y&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Y=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Li.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 Li.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#K=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#tt,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const o=this.#u.retina.pixelRatio,r=this.size;a.height=r.height=n.height*o,a.width=r.width=n.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#tt,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 l=this.size;return i.width=l.width=o.width,i.height=l.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.#Z=t,this.#at())}setZoom(t,e){this.zoom=t,this.#et=e}stop(){this.#nt(t=>{t.disconnect()}),this.#Q=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#lt(),e&&await t.refresh()}#lt(){for(const t of this.#J)t.resize?.()}#rt(){const t=this.#u.actualOptions.hdr&&Z("(color-gamut: p3)")?.matches&&Z("(dynamic-range: high)")?.matches;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...t?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});const e=this.renderCanvas;e&&this.render.setContext(e.getContext("2d",this.render.settings))}#ot(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#it?this.#ct():this.#st();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")}}}#at(){const t=this.domElement;if(!t)return;this.#nt(t=>{t.disconnect()}),this.#ot(),this.initBackground();const e=this.#Z;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#nt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#st(){const t=this.domElement,e=this.#K;t&&e&&Ti(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&Ti(t,function(t){if(ot!==t||!rt){ot=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}rt=e}return rt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ai{#u;#ht;#dt;#ut;constructor(t){this.#u=t,this.#ht={visibilityChange:()=>{this.#pt()},resize:()=>{this.#ft()}}}addListeners(){this.#gt(!0)}removeListeners(){this.#gt(!1)}#pt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#ft(){this.#ut&&(clearTimeout(this.#ut),this.#ut=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ut=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#gt(t){const e=this.#ht;this.#yt(t),lt(document,"visibilitychange",e.visibilityChange,t,!1)}#yt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void lt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#dt&&!t?(s&&this.#dt.unobserve(s),this.#dt.disconnect(),this.#dt=void 0):!this.#dt&&t&&s&&(this.#dt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#ft()}),this.#dt.observe(s))}}function Bi(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)}function Ui(t,e){const i=t%e;return i<0?i+e:i}function Vi(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=nt(n.effect.type,t.id,a),t.shape=nt(n.shape.type,t.id,a);const o=n.effect,r=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=nt(e,t.id,a);i&&(t.effect=i)}o.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=nt(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(T()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(T()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.effect,o,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return it({close:e.close},nt(n,i,s))}(t.shape,r,t.id,a):void 0,n.load(s);const l=t.effectData,c=t.shapeData;return l&&n.load(l.particles),c&&n.load(c.particles),t.effectClose=l?.close??n.effect.close,t.shapeClose=c?.close??n.shape.close,n}class $i{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;#mt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=z.origin;#wt={sin:0,cos:0};#Pt={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(dt.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#bt(this.bubble.color??Se(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??U(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#mt.fillOpacity=i*s*e,this.#mt.opacity=i*e,this.#mt.strokeOpacity=i*n*e,this.#mt}getPosition(){return this.#vt.x=this.position.x+this.offset.x,this.#vt.y=this.position.y+this.offset.y,this.#vt.z=this.position.z,this.#vt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#bt(this.bubble.color??Se(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Pt.a=e.cos*(t.a??r),this.#Pt.b=i?e.sin*(t.b??1):t.b??l,this.#Pt.c=i?-e.sin*(t.c??1):t.c??c,this.#Pt.d=e.cos*(t.d??h),this.#Pt}init(t,e,i,s){const n=this.#u;!function(t,e,i){t.id=e,t.group=i,t.justWarped=!1,t.effectClose=!0,t.shapeClose=!0,t.pathRotation=!1,t.lastPathTime=0,t.destroyed=!1,t.unbreakable=!1,t.isRotating=!1,t.rotation=0,t.misplaced=!1,t.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},t.size={value:1,max:1,min:1,enable:!1},t.outType=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Vi(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#xt(e),this.initialVelocity=this.#zt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/n.zLayers,this.sides=24,function(t,e){let i,s;t.effect&&(i=e.effectDrawers.get(t.effect)),i?.loadEffect&&i.loadEffect(t),t.shape&&(s=e.shapeDrawers.get(t.shape)),s?.loadShape&&s.loadShape(t);const n=s?.getSidesCount;n&&(t.sides=n(t))}(this,n),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(n.particleUpdaters,this),function(t,e){const i=e.shape?t.shapeDrawers.get(e.shape):void 0,s=e.effect?t.effectDrawers.get(e.effect):void 0;s?.particleInit?.(t,e),i?.particleInit?.(t,e)}(n,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(n,this)}isInsideCanvas(t){return this.#Mt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Mt({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=Ui(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=Ui(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ui(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ct(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(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=N({size:l,position:s}),c=z.create(t.x,t.y,e);this.#St(c,r,o.left??o.default),this.#St(c,r,o.right??o.default),this.#kt(c,r,o.top??o.default),this.#kt(c,r,o.bottom??o.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}}#zt(){const t=this.options.move,e=function(t){const e=M.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===b.inside||t.direction===b.outside)return e;const i=q(U(t.angle.value)),s=q(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=B(G(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=T()),e}#St(t,e,i){Bi({outMode:i,checkModes:[xt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#kt(t,e,i){Bi({outMode:i,checkModes:[xt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#It(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===xt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.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"}}#Dt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Mt(t){const e=this.#It(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.#Dt(t.direction,t.outMode),l=a?this.#_t(a(r),"shape"):void 0,c=o?this.#_t(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#bt(t){return 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===zt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#xt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ct(t,A(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 a=e.canvas.size;switch(this.moveCenter={...at(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(k(t))return q(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*P;case b.right:return 0;case b.bottomRight:return Math.PI*P;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=St.inside;break;case b.outside:this.outType=St.outside}this.offset=M.origin}#_t(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Gi{#Ot;#Rt=new Map;#Et=[];#Lt;#Tt;#Ft=[];#At;constructor(t){this.#Ot=t,this.#Lt=0,this.#At=0}clear(){this.#Rt.clear();const t=this.#Tt;t&&(this.#Ot=t),this.#Tt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Bt(e,i);this.#Rt.has(s)||this.#Rt.set(s,[]),this.#Rt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Ut(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ot),a=Math.floor(s.maxX/this.#Ot),o=Math.floor(s.minY/this.#Ot),r=Math.floor(s.maxY/this.#Ot);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Rt.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.#Vt(t.x,t.y,e),a=this.query(n,i,s);return this.#$t(),a}queryRectangle(t,e,i,s=[]){const n=this.#Gt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#$t(),a}setCellSize(t){this.#Tt=t}#Vt(t,e,i){return(this.#Et[this.#Lt++]??=new _t(t,e,i)).reset(t,e,i)}#Gt(t,e,i,s){return(this.#Ft[this.#At++]??=new Ot(t,e,i,s)).reset(t,e,i,s)}#Bt(t,e){return`${Math.floor(t/this.#Ot)}_${Math.floor(e/this.#Ot)}`}#Ut(t){if(t instanceof _t){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 Ot){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}#$t(){this.#Lt=0,this.#At=0}}class Wi{checkParticlePositionPlugins;grid;#Wt;#u;#jt;#qt;#Ht;#Nt;#Xt;#Yt;#p;#Qt;#Kt;#Zt;#Jt;#te;#ee;constructor(t,e){this.#p=t,this.#u=e,this.#Ht=0,this.#Wt=[],this.#Qt=[],this.#qt=0,this.#jt=new Map,this.#Nt=new Map,this.#ee=this.#ie(this.#u.zLayers),this.grid=new Gi(100),this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}get count(){return this.#Wt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#qt:this.#jt.get(i)??this.#qt,o=this.count;if(a>0)switch(n){case bt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case bt.wait:if(o>=a)return}try{const n=this.#Qt.pop()??new $i(this.#p,this.#u);n.init(this.#Ht,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Wt.push(n),this.#se(n),this.#Ht++,this.#u.dispatchEvent(dt.particleAdded,{particle:n}),n):void this.#Qt.push(n)}catch(t){gt().warning(`error adding particle: ${t}`)}}clear(){this.#Wt=[],this.#Nt.clear(),this.#ne(this.#u.zLayers)}destroy(){this.#Wt=[],this.#Qt.length=0,this.#Nt.clear(),this.#ee=[],this.checkParticlePositionPlugins=[],this.#Xt=[],this.#Yt=[],this.#Zt=[],this.#Kt=[],this.#te=[]}drawParticles(t){for(let e=this.#ee.length-1;e>=0;e--){const i=this.#ee[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Wt.filter(t)}find(t){return this.#Wt.find(t)}get(t){return this.#Wt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#te=[],this.#Yt=[],this.#Zt=[],this.#Xt=[],this.#Kt=[],this.#Nt.clear(),this.#ne(t.zLayers),this.grid=new Gi(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#te.push(e),e.particleUpdate&&this.#Yt.push(e),e.postUpdate&&this.#Zt.push(e),e.particleReset&&this.#Xt.push(e),e.postParticleUpdate&&this.#Kt.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.#Wt.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.#ae(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.#oe(n,i,t)}this.#oe(t.particles,i)}setResizeFactor(t){this.#Jt=t}update(t){this.grid.clear();for(const e of this.#te)e.update?.(t);const e=this.#re(t);for(const e of this.#Zt)e.postUpdate?.(t);if(this.#le(t,e),e.size)for(const t of e)this.remove(t);this.#Jt=void 0}#ce(...t){this.#Qt.push(...t)}#oe(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.#jt.set(i,s?.number.limit.value??n.limit.value));const a=this.#he(n.density),o=n.value,r=n.limit.value>0?n.limit.value:o,l=Math.min(o,r)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#qt=n.limit.value*a:this.#jt.set(i,n.limit.value*a),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#de(t){const e=this.#ee.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#he(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}#se(t){const e=this.#de(t.position.z),i=this.#ee[e];i&&(i.push(t),this.#Nt.set(t.id,e))}#ae(t,e,i){const s=this.#Wt[t];return!!s&&(s.group===e&&(this.#Wt.splice(t,1),this.#ue(s),s.destroy(i),this.#u.dispatchEvent(dt.particleRemoved,{particle:s}),this.#ce(s),!0))}#ue(t){const e=this.#Nt.get(t.id)??this.#de(t.position.z),i=this.#ee[e];if(!i)return void this.#Nt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Nt.delete(t.id)}#ne(t){const e=Math.max(Math.floor(t),1);if(this.#ee.length===e)for(const t of this.#ee)t.length=0;else this.#ee=this.#ie(e)}#pe(t){const e=this.#de(t.position.z),i=this.#Nt.get(t.id);if(void 0===i)return void this.#se(t);if(i===e)return;const s=this.#ee[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ee[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Nt.set(t.id,e)}else this.#Nt.set(t.id,e)}#re(t){const e=new Set,i=this.#Jt;for(const s of this.#Wt){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.#Xt)t.particleReset?.(s);for(const e of this.#Yt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#le(t,e){for(const i of this.#Wt)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.#Kt)e.postParticleUpdate?.(i,t);this.#pe(i)}}}class ji{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=U(s.gravity.maxSpeed)*i,a.moveDrift=U(s.drift)*i,a.moveSpeed=U(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 qi(t){return!t.destroyed}function Hi(t,e,...i){const s=new ye(t,e);return Et(s,...i),s}var Ni=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#fe;#ge;#ye={value:0,factor:0};#me;#ve;#we;#Pe;#be;#xe;#ze;#Me;#Ce;#Se;#ke;#p;#Ie;#De;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#me=e,this.#Ce=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Ie=!1,this.#fe=0,this.#we=0,this.#Me=0,this.#be=!0,this.started=!1,this.destroyed=!1,this.#ke=!0,this.#ze=0,this.zLayers=100,this.pageHidden=!1,this.#De=a,this.#xe=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ji(this),this.canvas=new Fi(this.#p,this),this.particles=new Wi(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Se=Hi(this.#p,this),this.actualOptions=Hi(this.#p,this),this.#Pe=new Ai(this),this.dispatchEvent(dt.containerBuilt)}get animationStatus(){return!this.#ke&&!this.pageHidden&&qi(this)}get options(){return this.#Se}get sourceOptions(){return this.#De}addLifeTime(t){this.#Me+=t}alive(){return!this.#we||this.#Me<=this.#we}destroy(t=!0){if(qi(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.#Ce(t),this.dispatchEvent(dt.containerDestroyed)}}dispatchEvent(t,e){this.#me(t,{container:this,data:e})}draw(t){if(!qi(this))return;let e=t;this.#ve=E(t=>{e&&(this.#ze=void 0,e=!1),this.#_e(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}gt().error(`Export plugin with type ${t} not found`)}async init(){if(!qi(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.#Se=Hi(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=Hi(this.#p,this,this.#Se),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:o,zLayers:r}=this.actualOptions;this.hdr=n,this.zLayers=r,this.#we=U(i)*a,this.#fe=U(e)*a,this.#Me=0,this.fpsLimit=s>0?s:120,this.#Ie=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(dt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(dt.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(qi(this)&&(void 0!==this.#ve&&(t=this.#ve,L(t),this.#ve=void 0),!this.#ke)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ke=!0),this.dispatchEvent(dt.containerPaused)}}play(t){if(!qi(this))return;const e=this.#ke||t;if(!this.#be||this.actualOptions.autoPlay){if(this.#ke&&(this.#ke=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(dt.containerPlay),this.draw(e??!1)}else this.#be=!1}async refresh(){if(qi(this))return this.stop(),this.start()}async reset(t){if(qi(this))return this.#xe=t,this.#De=t,this.#Se=Hi(this.#p,this,this.#xe,this.sourceOptions),this.actualOptions=Hi(this.#p,this,this.#Se),this.refresh()}async start(){qi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Pe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(dt.containerStarted),this.play(),t()};this.#ge=setTimeout(()=>{e()},this.#fe)}))}stop(){if(qi(this)&&this.started){this.#ge&&(clearTimeout(this.#ge),this.#ge=void 0),this.#be=!0,this.started=!1,this.#Pe.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.#De=this.#Se,this.dispatchEvent(dt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#_e(t){try{if(!this.#Ie&&void 0!==this.#ze&&t<this.#ze+a/this.fpsLimit)return void this.draw(!1);if(this.#ze??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#ye,t-this.#ze,this.fpsLimit,this.#Ie),this.addLifeTime(this.#ye.value),this.#ze=t,this.#ye.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ye),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){gt().error("error in animation loop",t)}}}});var Xi=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Oe;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.#Oe&&(t.globalCompositeOperation=this.#Oe)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Oe=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function Yi(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=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function Qi(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=(l=a,c=n,Math.sqrt(j(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?wt.clockwise:wt.counterClockwise,angle:T()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Ki=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-U(e.decay),t.pathDelay=U(s.delay.value)*a,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:U(i.acceleration),inverse:i.inverse},Qi(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,a=function(t){return t.slow.inRange?t.slow.factor:1}(t),o=s.retina.reduceFactor,r=t.retina.moveSpeed,l=t.retina.moveDrift,c=t.size.max,h=r*(i.size?t.getRadius()/c:1)*a*(e.factor||1)*n,d=t.retina.maxSpeed;i.spin.enable?function(t,e,i,s){if(!e.spin)return;const a=e.spin.direction===wt.clockwise,o={x:a?Math.cos:Math.sin,y:a?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),l=r*n;e.spin.radius>l?(e.spin.radius=l,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):Yi(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this.#Re()}redrawInit(){return this.#Re()}update(){for(const t of this.pathGenerators.values())t.update()}async#Re(){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()}}}});var Zi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(D(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Ji=new Map;var ts=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Ji.set(t,e)}getShapeGenerator(t){return Ji.get(t)}getSupportedShapeGenerators(){return Ji.keys()}}});var es=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ee;#p;constructor(t){this.#Ee=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Mi;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return ns}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Ee.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ee.get(t);return e||(e=[],this.#Ee.set(t,e)),e}initContainer(t){this.#Ee.has(t)||(this.#Ee.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||k(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function is(t,e,i,s){(t.paint??=new oe).fill={color:Wt.create(void 0,{value:e}),enable:s,opacity:i}}function ss(t,e,i,s){(t.paint??=new oe).stroke={color:Wt.create(void 0,{value:e}),opacity:i,width:s}}var ns=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Le;#Te;#Fe;#we;#Ae;#Be;#Ue;#Ve;#$e;#Q;#Ge;#ke;#p;#We;#dt;#je;#qe;#He;#Ne;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#We=i,this.#Le=0,this.#Te=0,this.#Fe=0,this.#Ve=o,n instanceof Mi?this.options=n:(this.options=new Mi,this.options.load(n)),this.#He=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#Ve??this.#Ct(),this.name=this.options.name,this.fill=this.options.fill,this.#Be=!this.options.life.wait,this.#Ne=!1;const r=it({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=be(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=be(this.#p,this.options.spawn.stroke.color)),this.#ke=!this.options.autoPlay,this.#Ge=r,this.#qe=this.#Xe(),this.size=this.#qe.mode===Q.percent?{width:this.#qe.width/s*this.#u.canvas.size.width,height:this.#qe.height/s*this.#u.canvas.size.height}:{width:this.#qe.width,height:this.#qe.height},this.#$e=this.options.life.count??-1,this.#Ue=this.#$e<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Q=new MutationObserver(()=>{this.resize()}),this.#dt=new ResizeObserver(()=>{this.resize()}),this.#Q.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#dt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#je=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#ke=!0,this.pause()}externalPlay(){this.#ke=!1,this.play()}async init(){await(this.#je?.init())}pause(){this.#ke||(this.#Ae=void 0)}play(){if(this.#ke)return;if(!(this.#$e>0||this.#Ue)&&this.options.life.count||!(this.#Be||this.#Fe>=(this.#He??0)))return;const t=this.#u;if(void 0===this.#Ae){const e=U(this.options.rate.delay);this.#Ae=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#$e>0||this.#Ue)&&this.#Ye()}resize(){const t=this.#Ve,e=this.#u;this.position=t&&tt(t,e.canvas.size,M.origin)?t:this.#Ct(),this.#qe=this.#Xe(),this.size=this.#qe.mode===Q.percent?{width:this.#qe.width/s*e.canvas.size.width,height:this.#qe.height/s*e.canvas.size.height}:{width:this.#qe.width,height:this.#qe.height},this.#je?.resize(this.position,this.size)}update(t){if(this.#ke)return;const e=this.#u;this.#Be&&(this.#Be=!1,this.#Fe=this.#He??0,this.#Te=this.#Ae??0),this.#Ne||(this.#Ne=!0,this.#Qe(this.options.startCount)),void 0!==this.#we&&(this.#Le+=t.value,this.#Le>=this.#we&&(this.pause(),void 0!==this.#He&&(this.#He=void 0),this.#Ue||this.#$e--,this.#$e>0||this.#Ue?(this.position=this.#Ct(),this.#je?.resize(this.position,this.size),this.#He=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#Ke(),this.#Le-=this.#we,this.#we=void 0)),void 0!==this.#He&&(this.#Fe+=t.value,this.#Fe>=this.#He&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Fe-=this.#He,this.#He=void 0)),void 0!==this.#Ae&&(this.#Te+=t.value,this.#Te>=this.#Ae&&(this.#Ze(),this.#Te-=this.#Ae))}#Ct(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return H({size:t.canvas.size,position:this.options.position})}#Xe(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new xi;return t.load({height:0,mode:Q.percent,width:0}),t})()}#Ke(){this.#Q?.disconnect(),this.#Q=void 0,this.#dt?.disconnect(),this.#dt=void 0,this.#We(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#Ze(){if(this.#ke)return;const t=U(this.options.rate.quantity);this.#Qe(t)}#Qe(t){const e=nt(this.#Ge)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#je,u=c||h,p=u||d,f=u?{h:m,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?it({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Je(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Je(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Je(i.l,this.spawnFillColor.l,f.l)),is(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#Je(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Je(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Je(a.l,this.spawnStrokeColor.l,f.l)),ss(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#je){const e=this.#je.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&is(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ye(){if(this.#ke)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#$e>0||this.#Ue)&&void 0!==t&&t>0&&(this.#we=t*a)}#Je(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=B(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadBubblesPreset=_i,t.tsParticles=Oe}),Object.assign(globalThis.window||globalThis,{loadBubblesPreset:(globalThis.__tsParticlesInternals.presets.bubbles||{}).loadBubblesPreset}),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.2.
|
|
2
|
+
/* Preset v4.2.1 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/plugin-emitters/plugin', '@tsparticles/engine'], factory) :
|