@tsparticles/preset-confetti-falling 4.3.0 → 4.3.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-confetti-falling",
3
- "version": "4.3.0",
3
+ "version": "4.3.1",
4
4
  "description": "tsParticles confetti falling preset",
5
5
  "homepage": "https://particles.js.org",
6
6
  "repository": {
@@ -106,15 +106,15 @@
106
106
  "./package.json": "./package.json"
107
107
  },
108
108
  "dependencies": {
109
- "@tsparticles/basic": "4.3.0",
110
- "@tsparticles/engine": "4.3.0",
111
- "@tsparticles/palette-confetti": "4.3.0",
112
- "@tsparticles/plugin-motion": "4.3.0",
113
- "@tsparticles/shape-square": "4.3.0",
114
- "@tsparticles/updater-roll": "4.3.0",
115
- "@tsparticles/updater-rotate": "4.3.0",
116
- "@tsparticles/updater-tilt": "4.3.0",
117
- "@tsparticles/updater-wobble": "4.3.0"
109
+ "@tsparticles/basic": "4.3.1",
110
+ "@tsparticles/engine": "4.3.1",
111
+ "@tsparticles/palette-confetti": "4.3.1",
112
+ "@tsparticles/plugin-motion": "4.3.1",
113
+ "@tsparticles/shape-square": "4.3.1",
114
+ "@tsparticles/updater-roll": "4.3.1",
115
+ "@tsparticles/updater-rotate": "4.3.1",
116
+ "@tsparticles/updater-tilt": "4.3.1",
117
+ "@tsparticles/updater-wobble": "4.3.1"
118
118
  },
119
119
  "publishConfig": {
120
120
  "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.3.0 */
2
+ /* Preset v4.3.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) :
@@ -794,7 +794,7 @@
794
794
  return this.#domArray;
795
795
  }
796
796
  get version() {
797
- return "4.3.0";
797
+ return "4.3.1";
798
798
  }
799
799
  addEventListener(type, listener) {
800
800
  this.#eventDispatcher.addEventListener(type, listener);
@@ -2098,7 +2098,7 @@
2098
2098
  }
2099
2099
 
2100
2100
  async function loadBlendPlugin(engine) {
2101
- engine.checkVersion("4.3.0");
2101
+ engine.checkVersion("4.3.1");
2102
2102
  await engine.pluginManager.register(e => {
2103
2103
  e.pluginManager.addPlugin(new BlendPlugin());
2104
2104
  });
@@ -2135,7 +2135,7 @@
2135
2135
  }
2136
2136
 
2137
2137
  async function loadCircleShape(engine) {
2138
- engine.checkVersion("4.3.0");
2138
+ engine.checkVersion("4.3.1");
2139
2139
  await engine.pluginManager.register(e => {
2140
2140
  e.pluginManager.addShape(["circle"], () => {
2141
2141
  return Promise.resolve(new CircleDrawer());
@@ -2183,7 +2183,7 @@
2183
2183
  }
2184
2184
 
2185
2185
  async function loadHexColorPlugin(engine) {
2186
- engine.checkVersion("4.3.0");
2186
+ engine.checkVersion("4.3.1");
2187
2187
  await engine.pluginManager.register(e => {
2188
2188
  e.pluginManager.addColorManager("hex", new HexColorManager());
2189
2189
  });
@@ -2236,7 +2236,7 @@
2236
2236
  }
2237
2237
 
2238
2238
  async function loadHslColorPlugin(engine) {
2239
- engine.checkVersion("4.3.0");
2239
+ engine.checkVersion("4.3.1");
2240
2240
  await engine.pluginManager.register(e => {
2241
2241
  e.pluginManager.addColorManager("hsl", new HslColorManager());
2242
2242
  });
@@ -2260,7 +2260,7 @@
2260
2260
  }
2261
2261
 
2262
2262
  async function loadMovePlugin(engine) {
2263
- engine.checkVersion("4.3.0");
2263
+ engine.checkVersion("4.3.1");
2264
2264
  await engine.pluginManager.register(e => {
2265
2265
  const moveEngine = e, movePluginManager = moveEngine.pluginManager;
2266
2266
  movePluginManager.initializers.pathGenerators ??= new Map();
@@ -2476,7 +2476,7 @@
2476
2476
  }
2477
2477
 
2478
2478
  async function loadOpacityUpdater(engine) {
2479
- engine.checkVersion("4.3.0");
2479
+ engine.checkVersion("4.3.1");
2480
2480
  await engine.pluginManager.register(e => {
2481
2481
  e.pluginManager.addParticleUpdater("opacity", container => {
2482
2482
  return Promise.resolve(new OpacityUpdater(container));
@@ -2821,7 +2821,7 @@
2821
2821
  }
2822
2822
 
2823
2823
  async function loadOutModesUpdater(engine) {
2824
- engine.checkVersion("4.3.0");
2824
+ engine.checkVersion("4.3.1");
2825
2825
  await engine.pluginManager.register(e => {
2826
2826
  e.pluginManager.addParticleUpdater("outModes", container => {
2827
2827
  return Promise.resolve(new OutOfCanvasUpdater(container));
@@ -2892,7 +2892,7 @@
2892
2892
  }
2893
2893
 
2894
2894
  async function loadPaintUpdater(engine) {
2895
- engine.checkVersion("4.3.0");
2895
+ engine.checkVersion("4.3.1");
2896
2896
  await engine.pluginManager.register(e => {
2897
2897
  e.pluginManager.addParticleUpdater("paint", container => {
2898
2898
  return Promise.resolve(new PaintUpdater(e.pluginManager, container));
@@ -2947,7 +2947,7 @@
2947
2947
  }
2948
2948
 
2949
2949
  async function loadRgbColorPlugin(engine) {
2950
- engine.checkVersion("4.3.0");
2950
+ engine.checkVersion("4.3.1");
2951
2951
  await engine.pluginManager.register(e => {
2952
2952
  e.pluginManager.addColorManager("rgb", new RgbColorManager());
2953
2953
  });
@@ -3032,7 +3032,7 @@
3032
3032
  }
3033
3033
 
3034
3034
  async function loadSizeUpdater(engine) {
3035
- engine.checkVersion("4.3.0");
3035
+ engine.checkVersion("4.3.1");
3036
3036
  await engine.pluginManager.register(e => {
3037
3037
  e.pluginManager.addParticleUpdater("size", container => {
3038
3038
  return Promise.resolve(new SizeUpdater(container));
@@ -3041,7 +3041,7 @@
3041
3041
  }
3042
3042
 
3043
3043
  async function loadBasic(engine) {
3044
- engine.checkVersion("4.3.0");
3044
+ engine.checkVersion("4.3.1");
3045
3045
  await engine.pluginManager.register(async (e) => {
3046
3046
  await Promise.all([
3047
3047
  loadBlendPlugin(e),
@@ -3134,7 +3134,7 @@
3134
3134
  }
3135
3135
 
3136
3136
  async function loadMotionPlugin(engine) {
3137
- engine.checkVersion("4.3.0");
3137
+ engine.checkVersion("4.3.1");
3138
3138
  await engine.pluginManager.register(e => {
3139
3139
  e.pluginManager.addPlugin(new MotionPlugin());
3140
3140
  });
@@ -3267,7 +3267,7 @@
3267
3267
  }
3268
3268
 
3269
3269
  async function loadRollUpdater(engine) {
3270
- engine.checkVersion("4.3.0");
3270
+ engine.checkVersion("4.3.1");
3271
3271
  await engine.pluginManager.register(e => {
3272
3272
  e.pluginManager.addParticleUpdater("roll", () => {
3273
3273
  return Promise.resolve(new RollUpdater(e.pluginManager));
@@ -3373,7 +3373,7 @@
3373
3373
  }
3374
3374
 
3375
3375
  async function loadRotateUpdater(engine) {
3376
- engine.checkVersion("4.3.0");
3376
+ engine.checkVersion("4.3.1");
3377
3377
  await engine.pluginManager.register(e => {
3378
3378
  e.pluginManager.addParticleUpdater("rotate", container => {
3379
3379
  return Promise.resolve(new RotateUpdater(container));
@@ -3397,7 +3397,7 @@
3397
3397
  }
3398
3398
 
3399
3399
  async function loadSquareShape(engine) {
3400
- engine.checkVersion("4.3.0");
3400
+ engine.checkVersion("4.3.1");
3401
3401
  await engine.pluginManager.register(e => {
3402
3402
  e.pluginManager.addShape(["edge", "square"], () => Promise.resolve(new SquareDrawer()));
3403
3403
  });
@@ -3506,7 +3506,7 @@
3506
3506
  }
3507
3507
 
3508
3508
  async function loadTiltUpdater(engine) {
3509
- engine.checkVersion("4.3.0");
3509
+ engine.checkVersion("4.3.1");
3510
3510
  await engine.pluginManager.register(e => {
3511
3511
  e.pluginManager.addParticleUpdater("tilt", container => {
3512
3512
  return Promise.resolve(new TiltUpdater(container));
@@ -3608,7 +3608,7 @@
3608
3608
  }
3609
3609
 
3610
3610
  async function loadWobbleUpdater(engine) {
3611
- engine.checkVersion("4.3.0");
3611
+ engine.checkVersion("4.3.1");
3612
3612
  await engine.pluginManager.register(e => {
3613
3613
  e.pluginManager.addParticleUpdater("wobble", container => {
3614
3614
  return Promise.resolve(new WobbleUpdater(container));
@@ -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.confettiFalling=t.__tsParticlesInternals.presets.confettiFalling||{}))}(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",m=255,y=360,v=100,w=100,b=.25;var P;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"}(P||(P={}));class M{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 M.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 M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function k(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function _(t){return Array.isArray(t)}function O(t){return null==t}const D=Math.PI/180;let L=Math.random;const R=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function F(){return B(L(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function A(t){const e=$(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return S(t)?t:A(t)}function V(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function H(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*D}function q(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var X,Y;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(X||(X={})),function(t){t.precise="precise",t.percent="percent"}(Y||(Y={}));function Q(){return globalThis.document}function K(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function Z(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function J(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==X.bottom||(n=t.top<e.height+i.x);!n||s&&s!==X.left||(n=t.right>i.x);!n||s&&s!==X.right||(n=t.left<e.width+i.y);!n||s&&s!==X.top||(n=t.bottom>i.y);return n}(tt(t,s??0),e,i,n)}function tt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function et(t,...e){for(const i of e){if(O(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>et(void 0,t)):et(e[s],n)}}return t}function it(t,e){return _(t)?t.map((t,i)=>e(t,i)):e(t,0)}function st(t,e,i){return _(t)?Z(t,e,i):t}function nt(t,e){return function(t,e){if(t.mode!==Y.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 at,ot;function rt(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 lt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var ht;!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"}(ht||(ht={}));class dt{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(ht.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 lt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return lt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return 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 ut=t=>(...e)=>{t(...e)},pt={debug:ut(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:ut(console.info),log:ut(console.log),trace:ut(console.trace),verbose:ut(console.log),warning:ut(console.warn)};function ft(){return pt}const gt="100%";class mt{pluginManager=new dt(this);#h=[];#d=new ct;#o=!1;get items(){return this.#h}get version(){return"4.3.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 cs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=st(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ft().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=st(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=Q();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=gt,s.style.height||=gt,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||=gt,s.style.height||=gt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=Q();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 yt,vt,wt,bt,Pt,xt,Mt,zt,Ct,kt,St,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(yt||(yt={}));class _t{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 Ot extends _t{radius;constructor(t,e,i){super(t,e,yt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,H(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 Ot||t.type===yt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Dt||t.type===yt.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 Dt extends _t{size;constructor(t,e,i,s){super(t,e,yt.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 Ot)return t.intersects(this);if(!(t instanceof Dt))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"}(vt||(vt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(wt||(wt={})),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"}(Pt||(Pt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(xt||(xt={})),function(t){t.none="none",t.max="max",t.min="min"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(zt||(zt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Ct||(Ct={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(St||(St={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(It||(It={}));class Lt{load(t){O(t)||this.doLoad(t)}}function Rt(t,...e){for(const i of e)t.load(i)}function Et(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=W(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Bt(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 At extends Lt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Et(this,"sync",t.sync)}}class Ut extends At{mode=wt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Et(this,"mode",t.mode),Et(this,"startValue",t.startValue)}}class Vt extends At{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Et(this,"max",t.max),Et(this,"min",t.min),Ft(this,"offset",t.offset)}}class $t extends Lt{h=new Vt(0,y);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 Wt extends Lt{value="";static create(t,e){const i=new Wt;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){O(t.value)||(this.value=t.value)}}class Gt extends Wt{animation=new $t;static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(k(e)||_(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 Ht extends Lt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Wt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Et(this,"element",t.element),Et(this,"draw",t.draw),Et(this,"image",t.image),Et(this,"position",t.position),Et(this,"repeat",t.repeat),Et(this,"size",t.size),Et(this,"opacity",t.opacity)}}class jt extends Lt{enable=!0;zIndex=0;doLoad(t){Et(this,"enable",t.enable),Et(this,"zIndex",t.zIndex)}}class qt extends Lt{delay=.5;enable=!0;doLoad(t){Et(this,"delay",t.delay),Et(this,"enable",t.enable)}}class Nt extends Lt{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]=et(this.options[t]??{},i))}Et(this,"close",t.close),Et(this,"type",t.type)}}class Xt extends Lt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Et(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Yt extends Lt{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Qt extends Lt{mode=Y.percent;radius=0;x=50;y=50;doLoad(t){Et(this,"x",t.x),Et(this,"y",t.y),Et(this,"mode",t.mode),Et(this,"radius",t.radius)}}class Kt extends Lt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Et(this,"enable",t.enable),Et(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Zt extends Lt{value=0;doLoad(t){O(t.value)||(this.value=W(t.value))}}class Jt extends Zt{animation=new At;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 Lt{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Et(this,"clamp",t.clamp),this.delay.load(t.delay),Et(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=et(this.options,t.options))}}class ie extends Lt{bottom;default=Pt.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 Lt{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Et(this,"enable",t.enable),t.position&&(this.position=et({},t.position))}}class ne extends Lt{angle=new Yt;center=new Qt;decay=0;direction=P.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(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Et(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Et(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),Et(this,"random",t.random),Et(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Et(this,"straight",t.straight),Et(this,"vibrate",t.vibrate),Et(this,"warp",t.warp)}}class ae extends Lt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Lt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Xt),Tt(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Lt{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Lt{enable=!1;height=1080;width=1920;doLoad(t){Et(this,"enable",t.enable),Et(this,"width",t.width),Et(this,"height",t.height)}}class he extends Lt{mode=bt.delete;value=0;doLoad(t){Et(this,"mode",t.mode),Et(this,"value",t.value)}}class de extends Lt{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Et(this,"value",t.value)}}class ue extends Lt{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]=et(this.options[t]??{},i))}Et(this,"close",t.close),Et(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Et(this,"opacityRate",t.opacityRate),Et(this,"sizeRate",t.sizeRate),Et(this,"velocityRate",t.velocityRate)}}class fe extends Lt{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 Gt,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]=et(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(_(e)?this.paint=it(e,t=>{const e=new oe;return e.load(t),e}):_(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=(_(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 Rt(s,...i),s}class me extends Lt{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 Ht,this.fullScreen=new jt,this.particles=ge(this.#p,this.#u),this.resize=new qt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,it(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Et(this,"autoPlay",t.autoPlay),Et(this,"clear",t.clear),Et(this,"key",t.key),Et(this,"name",t.name),Ft(this,"delay",t.delay),Et(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Et(this,"fpsLimit",t.fpsLimit),Et(this,"hdr",t.hdr),Et(this,"pauseOnBlur",t.pauseOnBlur),Et(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Et(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=et(this.style,t.style),Et(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 ye=new Map;function ve(t,e){let i=ye.get(t);return i||(i=e(),ye.size>2e3&&ye.clear(),ye.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return be(t,n.value,i,s);if(_(n.value)){const e=Z(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 be(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(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(_(n.value)){const e=Z(n.value,i,s);if(!e)return;return be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Pe(t,e,i,s=!0){const a=we(t,e,i,s);return a?function(t){const e=t.r/m,i=t.g/m,s=t.b/m,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+=y);r.h>=y&&(r.h-=y);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 Me(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);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(m,m*xe(c,l,a+h)),u=Math.min(m,m*xe(c,l,a)),p=Math.min(m,m*xe(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function ze(t,e,i){const s=e?4:2,n=i??1;return ve(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*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=e?4:2,a=i??1;return ve(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${a.toString()}`,()=>e?ze(function(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=r*m;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;return{r:Math.min(m,m*xe(c,l,a+h)),g:Math.min(m,m*xe(c,l,a)),b:Math.min(m,m*xe(c,l,a-h))}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${a.toString()})`)}function ke(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Se(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max: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=St.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function _e(t,e,i,s){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 n=t.offset?A(t.offset):0,a=((t.velocity??0)*i.factor+3.6*n)*(s?.5075:1),o=t.decay??1,r=t.max,l=t.min;e&&t.status!==St.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=St.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=St.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=B(t.value,l,r)}function Oe(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;_e(s,!1,e,i),_e(n,!0,e,i),_e(a,!0,e,i)}const De=new mt;class Le{enable=!1;mode="destination-out";load(t){O(t)||(Et(this,"mode",t.mode),Et(this,"enable",t.enable))}}class Re{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Le),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Le,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ee(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Re)})}class Fe{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:j(s.min),max:j(s.max)}:{min:0,max:j(s)}}}async function Te(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Fe))})}var Be;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Be||(Be={}));const Ae=/^#?([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.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ae,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ue.exec(e);return i?{a:i[Be.a]?Number.parseInt(i[Be.a],16)/255:1,b:Number.parseInt(i[Be.b]??"0",16),g:Number.parseInt(i[Be.g]??"0",16),r:Number.parseInt(i[Be.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}var We;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(We||(We={}));const Ge=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class He{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 Me(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Me({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ge.exec(t);return e?function(t){const e=Me(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[We.a]):1,h:Number.parseInt(e[We.h]??"0",10),l:Number.parseInt(e[We.l]??"0",10),s:Number.parseInt(e[We.s]??"0",10)}):void 0}}async function je(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new He)})}class qe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ne(t){t.checkVersion("4.3.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,lt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(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 wt.increase:o.status=St.increasing;break;case wt.decrease:o.status=St.decreasing;break;case wt.random:o.status=F()>=n?St.increasing:St.decreasing}const t=s.mode===wt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=St.increasing);break;case kt.max:o.value=o.max,t&&(o.status=St.decreasing);break;case kt.random:default:o.value=A(o),t&&(o.status=F()>=n?St.increasing:St.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 St.increasing:e.value+=a;break;case St.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case St.increasing:e.value>=r&&(i?e.status=St.decreasing:e.value-=r,e.loops??=0,e.loops++);break;case St.decreasing:e.value<=o&&(i?e.status=St.increasing:e.value+=r,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=B(e.value,o,r))}}class Qe extends Ut{destroy=Mt.none;load(t){super.load(t),O(t)||Et(this,"destroy",t.destroy)}}class Ke extends te{animation=new Qe;value=1;load(t){if(O(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*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Bt(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.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ze(t)))})}class ti{modes;#u;#y;constructor(t){this.#u=t,this.modes=[Pt.bounce,Pt.split],this.#y=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.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=tt(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Pt.bounce&&t.outMode!==Pt.split||t.direction!==X.left&&t.direction!==X.right)return;t.bounds.right<0&&t.direction===X.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===X.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===X.right&&e>0||t.direction===X.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===X.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===X.left&&(t.particle.position.x=s),t.outMode===Pt.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!==Pt.bounce&&t.outMode!==Pt.split||t.direction!==X.bottom&&t.direction!==X.top)return;t.bounds.bottom<0&&t.direction===X.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===X.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===X.bottom&&e>0||t.direction===X.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===X.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===X.top&&(t.particle.position.y=s),t.outMode===Pt.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=[Pt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case Ct.normal:case Ct.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case Ct.inside:{const{dx:e,dy:i}=G(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=[Pt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===X.left||e===X.right))??(t.options.move.distance.vertical&&(e===X.top||e===X.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===X.bottom||n.inverse&&i.y<-l&&e===X.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;J(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const si=z.origin;class ni{modes;#u;constructor(t){this.#u=t,this.modes=[Pt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case Ct.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}=G(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(A({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(A({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=G(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 Ct.outside:{t.position.x=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Ct.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=tt(t.position,o);e===X.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===X.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===X.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===X.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,Pt.bounce,t=>new ti(t)),this.#v(t,Pt.out,t=>new ni(t)),this.#v(t,Pt.destroy,t=>new ei(t)),this.#v(t,Pt.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,X.bottom),this.#w(t,e,i.left??i.default,X.left),this.#w(t,e,i.right??i.default,X.right),this.#w(t,e,i.top??i.default,X.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.3.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=st(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Gt.create(void 0===a?void 0:Gt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=Pe(this.#p,i);s&&(t.fillColor=Se(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=Gt.create(void 0===a?void 0:Gt.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=Pe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Se(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)&&(Oe(t.fillColor,e,this.#u.hdr),Oe(t.strokeColor,e,this.#u.hdr))}}async function li(t){t.checkVersion("4.3.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?N(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.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi extends Ut{destroy=Mt.none;load(t){super.load(t),O(t)||Et(this,"destroy",t.destroy)}}class fi extends te{animation=new pi;value=3;load(t){if(super.load(t),O(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*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Bt(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 mi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new gi(t)))})}async function yi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(async t=>{await Promise.all([Ee(t),$e(t),je(t),ui(t),Ne(t),Te(t),li(t),Je(t),oi(t),mi(t)])})}const vi={name:"Confetti",background:"#1a1a2e",blendMode:"source-over",colors:{fill:{enable:!0,value:["#FF0044","#FF4400","#FFCC00","#00CC44","#00AAFF","#AA00FF","#FF00AA","#00FFCC","#FF6600","#FFFFFF"]}}};async function wi(t){await t.pluginManager.register(t=>{t.pluginManager.addPalette("confetti",vi)})}class bi{factor=4;value=!0;load(t){O(t)||(Et(this,"factor",t.factor),Et(this,"value",t.value))}}class Pi{disable=!0;reduce=new bi;load(t){O(t)||(Et(this,"disable",t.disable),this.reduce.load(t.reduce))}}class xi{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return fs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Pi),s.load(i?.motion)}needsPlugin(){return!0}}async function Mi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new xi)})}var zi;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(zi||(zi={}));class Ci{enable=!1;value=0;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"value",t.value))}}class ki{backColor;darken=new Ci;enable=!1;enlighten=new Ci;mode=zi.vertical;speed=25;load(t){O(t)||(void 0!==t.backColor&&(this.backColor=Wt.create(this.backColor,t.backColor)),this.darken.load(t.darken),Et(this,"enable",t.enable),this.enlighten.load(t.enlighten),Et(this,"mode",t.mode),Ft(this,"speed",t.speed))}}class Si{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t,e){const i=e.options.roll;if(i?.enable)if(e.roll={enable:i.enable,horizontal:i.mode===zi.horizontal||i.mode===zi.both,vertical:i.mode===zi.vertical||i.mode===zi.both,angle:F()*u,speed:U(i.speed)/360},i.backColor)e.backColor=Pe(t,i.backColor);else if(i.darken.enable&&i.enlighten.enable){const t=F()>=n?xt.darken:xt.enlighten;e.roll.alter={type:t,value:U(t===xt.darken?i.darken.value:i.enlighten.value)}}else i.darken.enable?e.roll.alter={type:xt.darken,value:U(i.darken.value)}:i.enlighten.enable&&(e.roll.alter={type:xt.enlighten,value:U(i.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Bt(t,"roll",ki,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function Ii(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Si(t.pluginManager)))})}class _i{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Et(this,"sync",t.sync))}}class Oi extends Zt{animation=new _i;direction=vt.clockwise;path=!1;load(t){O(t)||(super.load(t),Et(this,"direction",t.direction),this.animation.load(t.animation),Et(this,"path",t.path))}}class Di{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:j(U(e.value)),min:0,max:u},t.pathRotation=e.path;let i=e.direction;if(i===vt.random){i=Math.floor(2*F())>0?vt.counterClockwise:vt.clockwise}switch(i){case vt.counterClockwise:case"counterClockwise":t.rotate.status=St.decreasing;break;case vt.clockwise:t.rotate.status=St.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-U(s.decay),t.rotate.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=F())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Bt(t,"rotate",Oi,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ye(t,t.rotate,!1,Mt.none,e),t.rotation=t.rotate.value))}}async function Li(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Di(t)))})}class Ri{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Ei(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Ri))})}var Fi;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Fi||(Fi={}));class Ti{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Et(this,"sync",t.sync))}}class Bi extends Zt{animation=new Ti;direction=Fi.clockwise;enable=!1;load(t){super.load(t),O(t)||(this.animation.load(t.animation),Et(this,"direction",t.direction),Et(this,"enable",t.enable))}}class Ai{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:j(U(e.value)),sinDirection:F()>=n?1:-1,cosDirection:F()>=n?1:-1,min:0,max:u};let i=e.direction;if(i===Fi.random){i=Math.floor(2*F())>0?Fi.counterClockwise:Fi.clockwise}switch(i){case Fi.counterClockwise:case"counterClockwise":t.tilt.status=St.decreasing;break;case Fi.clockwise:t.tilt.status=St.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-U(s.decay),t.tilt.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.tilt.velocity*=F()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Bt(t,"tilt",Bi,...e)}update(t,e){this.isEnabled(t)&&t.tilt&&Ye(t,t.tilt,!1,Mt.none,e)}}async function Ui(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new Ai(t)))})}class Vi{angle=50;move=10;load(t){O(t)||(Ft(this,"angle",t.angle),Ft(this,"move",t.move))}}class $i{distance=5;enable=!1;speed=new Vi;load(t){if(!O(t)&&(Ft(this,"distance",t.distance),Et(this,"enable",t.enable),void 0!==t.speed))if(S(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Wi{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:F()*u,angleSpeed:U(e.speed.angle)/360,moveSpeed:U(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=U(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){Bt(t,"wobble",$i,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function Gi(t){t.checkVersion("4.3.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Wi(t)))})}const Hi={palette:"confetti",background:{color:{value:""}},fullScreen:{enable:!0,zIndex:100},particles:{number:{value:200,density:{enable:!0}},shape:{type:["square","circle"]},size:{value:{min:3,max:5}},move:{enable:!0,speed:5,direction:"bottom",outModes:"out"},rotate:{value:{min:0,max:360},direction:"random",move:!0,animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:30},enlighten:{enable:!0,value:30},enable:!0,mode:"both",speed:{min:15,max:25}},wobble:{distance:30,enable:!0,move:!0,speed:{min:-15,max:15}}},motion:{disable:!0}},ji=["confettiFalling","confetti-falling"];async function qi(t){await t.pluginManager.register(async t=>{await Promise.all([yi(t),wi(t),Ei(t),Mi(t),Gi(t),Ii(t),Li(t),Ui(t)]),ji.forEach(e=>{t.pluginManager.addPreset(e,Hi,!1)})})}const Ni=globalThis;Ni.loadConfettiFallingPreset=qi,Ni.tsParticles=De;function Xi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Yi{#b;#P;#x;#M;#z;#u;#C;#k;#S;#I;#_;#O;#p;#D;#L;#R={};#E=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#M=i,this.#C=null,this.#b=null,this.#P=new Set,this.#L=[],this.#D=[],this.#x=[],this.#z=[],this.#S=[],this.#I=[],this.#_=[],this.#O={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#M.size.width,this.#M.size.height)})}clear(){for(const t of this.#x)if(t.canvasClear?.())return;for(const t of Object.values(It))if("number"==typeof t)for(const e of this.#T(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#b=null,this.#P.clear(),this.#L=[],this.#D=[],this.#x=[],this.#z=[],this.#S=[],this.#I=[],this.#_=[];for(const t of Object.values(It))"number"==typeof t&&(this.#O[t]=[])}draw(t){const e=this.#C;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.#B(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.#F,f=this.#R,g=a?Ce(a,r.hdr,h*d):void 0,m=o?Ce(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#_)i.drawParticleSetup?.(s,t,e);this.#A(s,t,i,d,f,p),this.#U({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#V(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#S)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#M.size.width,a=this.#M.size.height;if(this.#b)try{s.drawImage(this.#b,o.x,o.y,n,a)}catch{this.#W("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#W("background-draw-error","Error in background.draw callback")}for(const t of this.#T(It.BackgroundMask))t.canvasPaint?.();for(const e of this.#T(It.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#T(It.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#T(It.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#G(),this.paint()}initPlugins(){this.#x=[],this.#z=[],this.#S=[],this.#_=[],this.#I=[];for(const t of Object.values(It))"number"==typeof t&&(this.#O[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#z.push(t),t.drawParticle&&this.#S.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#x.push(t),t.canvasPaint&&this.#T(It.BackgroundMask).push(t),t.drawSettingsSetup&&this.#T(It.CanvasSetup).push(t),t.draw&&this.#T(It.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#T(It.CanvasCleanup).push(t)}initUpdaters(){this.#L=[],this.#D=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#T(It.BackgroundMask))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.#M.size.width,this.#M.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.#M.size.width,this.#M.size.height),i.globalAlpha=s})}setContext(t){this.#C=t,this.#C&&(this.#C.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#M.size.width,this.#M.size.height)})}#V(t){for(const e of this.#D)e.afterDraw?.(t)}#A(t,e,i,s,n,a){for(const o of this.#L){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)Xi(a,t,e)}o.beforeDraw?.(e)}}#H(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#j(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#U(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 m={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?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#j(y,m),this.#q(v,m),this.#N(v,m),this.#X(v,m),this.#H(y,m),i.resetTransform()}#$(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)}#q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#T(t){return this.#O[t]}#B(t){let e,i;for(const s of this.#z)if(!e&&s.particleFillColor&&(e=Pe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Pe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#E[0]=e,this.#E[1]=i,this.#E}#G(){const t=this.#u.actualOptions.background;if(this.#b=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#b=e:e?this.#W("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#W("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#b=t.element)}#W(t,e){this.#P.has(t)||(this.#P.add(t),ft().warning(e))}}const Qi=new WeakMap;function Ki(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 Zi{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 Yi(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?ze(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=Qi.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 Qi.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=Q().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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&&K("(color-gamut: p3)")?.matches&&K("(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&&Ki(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&Ki(t,function(t){if(at!==t||!ot){at=t;const e=Q().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)}ot=e}return ot}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ji{#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&&(Q().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.#mt(t),rt(document,"visibilitychange",e.visibilityChange,t,!1)}#mt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void rt(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 ts(t){if(e=t.outMode,i=t.checkModes,!(e===i||_(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function es(t,e){const i=t%e;return i<0?i+e:i}function is(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=st(n.effect.type,t.id,a),t.shape=st(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=st(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=st(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(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return et({close:e.close},st(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 et({close:e.close},st(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 ss{backColor;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;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#yt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=M.origin;#wt={sin:0,cos:0};#bt={a:1,b:0,c:0,d:1};#u;#Pt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Pt.push(t),this.#Pt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Pt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();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(ht.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.#xt(this.#Mt(ke(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getModifier(t){return this.#Pt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=U(this.opacity?.value??1),s=this.#Mt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#yt.fillOpacity=s*n*e,this.#yt.opacity=s*e,this.#yt.strokeOpacity=s*a*e,this.#yt}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.#Mt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#xt(this.#Mt(ke(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#bt.a=e.cos*(t.a??r),this.#bt.b=i?e.sin*(t.b??1):t.b??l,this.#bt.c=i?-e.sin*(t.c??1):t.c??c,this.#bt.d=e.cos*(t.d??h),this.#bt}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=Ct.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=is(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#zt(e),this.initialVelocity=this.#Ct(),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.#kt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#kt({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=es(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=es(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=es(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Pt.findIndex(e=>e.id===t);e>=0&&this.#Pt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Mt(t,e){let i=t;for(const t of this.#Pt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#St(t,e){let i=0,s=t?M.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 M.create(i.x,i.y,e)}const t=q({size:l,position:s}),c=M.create(t.x,t.y,e);this.#It(c,r,o.left??o.default),this.#It(c,r,o.right??o.default),this.#_t(c,r,o.top??o.default),this.#_t(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}}#Ct(){const t=this.options.move,e=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===P.inside||t.direction===P.outside)return e;const i=j(U(t.angle.value)),s=j(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=A(W(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#It(t,e,i){ts({outMode:i,checkModes:[Pt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#_t(t,e,i){ts({outMode:i,checkModes:[Pt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Pt.bounce;return t===X.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===X.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===X.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===X.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()}}#kt(t){const e=this.#Ot(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.#Lt(a(r),"shape"):void 0,c=o?this.#Lt(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}#xt(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===xt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#zt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#St(t,B(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={...nt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return j(t);switch(t){case P.top:return-Math.PI*n;case P.topRight:return-Math.PI*b;case P.right:return 0;case P.bottomRight:return Math.PI*b;case P.bottom:return Math.PI*n;case P.bottomLeft:return.75*Math.PI;case P.left:return Math.PI;case P.topLeft:return.75*-Math.PI;case P.inside:return Math.atan2(i.y-e.y,i.x-e.x);case P.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case P.inside:this.outType=Ct.inside;break;case P.outside:this.outType=Ct.outside}this.offset=z.origin}#Lt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ns{#Rt;#Et=new Map;#Ft=[];#Tt;#Bt;#At=[];#Ut;constructor(t){this.#Rt=t,this.#Tt=0,this.#Ut=0}clear(){this.#Et.clear();const t=this.#Bt;t&&(this.#Rt=t),this.#Bt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Vt(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#$t(t);if(!s)return i;const n=Math.floor(s.minX/this.#Rt),a=Math.floor(s.maxX/this.#Rt),o=Math.floor(s.minY/this.#Rt),r=Math.floor(s.maxY/this.#Rt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.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.#Wt(t.x,t.y,e),a=this.query(n,i,s);return this.#Gt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ht(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Gt(),a}setCellSize(t){this.#Bt=t}#Wt(t,e,i){return(this.#Ft[this.#Tt++]??=new Ot(t,e,i)).reset(t,e,i)}#Ht(t,e,i,s){return(this.#At[this.#Ut++]??=new Dt(t,e,i,s)).reset(t,e,i,s)}#Vt(t,e){return`${Math.floor(t/this.#Rt)}_${Math.floor(e/this.#Rt)}`}#$t(t){if(t instanceof Ot){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 Dt){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}#Gt(){this.#Tt=0,this.#Ut=0}}class as{checkParticlePositionPlugins;grid;#jt;#u;#qt;#Nt;#Xt;#Yt;#Qt;#Kt;#p;#Zt;#Jt;#te;#ee;#ie;#se;constructor(t,e){this.#p=t,this.#u=e,this.#Xt=0,this.#jt=[],this.#Zt=[],this.#Nt=0,this.#qt=new Map,this.#Yt=new Map,this.#se=this.#ne(this.#u.zLayers),this.grid=new ns(100),this.checkParticlePositionPlugins=[],this.#Qt=[],this.#Kt=[],this.#te=[],this.#Jt=[],this.#ie=[]}get count(){return this.#jt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Nt:this.#qt.get(i)??this.#Nt,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.#Zt.pop()??new ss(this.#p,this.#u);n.init(this.#Xt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#jt.push(n),this.#ae(n),this.#Xt++,this.#u.dispatchEvent(ht.particleAdded,{particle:n}),n):void this.#Zt.push(n)}catch(t){ft().warning(`error adding particle: ${t}`)}}clear(){this.#jt=[],this.#Yt.clear(),this.#oe(this.#u.zLayers)}destroy(){this.#jt=[],this.#Zt.length=0,this.#Yt.clear(),this.#se=[],this.checkParticlePositionPlugins=[],this.#Qt=[],this.#Kt=[],this.#te=[],this.#Jt=[],this.#ie=[]}drawParticles(t){for(let e=this.#se.length-1;e>=0;e--){const i=this.#se[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#jt.filter(t)}find(t){return this.#jt.find(t)}get(t){return this.#jt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ie=[],this.#Kt=[],this.#te=[],this.#Qt=[],this.#Jt=[],this.#Yt.clear(),this.#oe(t.zLayers),this.grid=new ns(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ie.push(e),e.particleUpdate&&this.#Kt.push(e),e.postUpdate&&this.#te.push(e),e.particleReset&&this.#Qt.push(e),e.postParticleUpdate&&this.#Jt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#jt.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.#re(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.#le(n,i,t)}this.#le(t.particles,i)}setResizeFactor(t){this.#ee=t}update(t){this.grid.clear();for(const e of this.#ie)e.update?.(t);const e=this.#ce(t);for(const e of this.#te)e.postUpdate?.(t);if(this.#he(t,e),e.size)for(const t of e)this.remove(t);this.#ee=void 0}#de(...t){this.#Zt.push(...t)}#le(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Nt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#qt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ue(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.#Nt=n.limit.value*a:this.#qt.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)}#ne(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#pe(t){const e=this.#se.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ue(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}#ae(t){const e=this.#pe(t.position.z),i=this.#se[e];i&&(i.push(t),this.#Yt.set(t.id,e))}#re(t,e,i){const s=this.#jt[t];return!!s&&(s.group===e&&(this.#jt.splice(t,1),this.#fe(s),s.destroy(i),this.#u.dispatchEvent(ht.particleRemoved,{particle:s}),this.#de(s),!0))}#fe(t){const e=this.#Yt.get(t.id)??this.#pe(t.position.z),i=this.#se[e];if(!i)return void this.#Yt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Yt.delete(t.id)}#oe(t){const e=Math.max(Math.floor(t),1);if(this.#se.length===e)for(const t of this.#se)t.length=0;else this.#se=this.#ne(e)}#ge(t){const e=this.#pe(t.position.z),i=this.#Yt.get(t.id);if(void 0===i)return void this.#ae(t);if(i===e)return;const s=this.#se[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#se[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.#Yt.set(t.id,e)}else this.#Yt.set(t.id,e)}#ce(t){const e=new Set,i=this.#ee;for(const s of this.#jt){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.#Qt)t.particleReset?.(s);for(const e of this.#Kt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#he(t,e){for(const i of this.#jt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Jt)e.postParticleUpdate?.(i,t);this.#ge(i)}}}class os{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=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 rs(t){return!t.destroyed}function ls(t,e,...i){const s=new me(t,e);return Rt(s,...i),s}var cs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ye;#ve={value:0,factor:0};#we;#be;#Pe;#xe;#Me;#ze;#Ce;#ke;#Se;#Ie;#_e;#p;#Oe;#De;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#we=e,this.#Se=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Oe=!1,this.#me=0,this.#Pe=0,this.#ke=0,this.#Me=!0,this.started=!1,this.destroyed=!1,this.#_e=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#De=a,this.#ze=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new os(this),this.canvas=new Zi(this.#p,this),this.particles=new as(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ie=ls(this.#p,this),this.actualOptions=ls(this.#p,this),this.#xe=new Ji(this),this.dispatchEvent(ht.containerBuilt)}get animationStatus(){return!this.#_e&&!this.pageHidden&&rs(this)}get options(){return this.#Ie}get sourceOptions(){return this.#De}addLifeTime(t){this.#ke+=t}alive(){return!this.#Pe||this.#ke<=this.#Pe}destroy(t=!0){if(rs(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Se(t),this.dispatchEvent(ht.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!rs(this))return;let e=t;this.#be=R(t=>{e&&(this.#Ce=void 0,e=!1),this.#Le(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}ft().error(`Export plugin with type ${t} not found`)}async init(){if(!rs(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Ie=ls(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),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.#Pe=U(i)*a,this.#me=U(e)*a,this.#ke=0,this.fpsLimit=s>0?s:120,this.#Oe=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ht.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ht.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(rs(this)&&(void 0!==this.#be&&(t=this.#be,E(t),this.#be=void 0),!this.#_e)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#_e=!0),this.dispatchEvent(ht.containerPaused)}}play(t){if(!rs(this))return;const e=this.#_e||t;if(!this.#Me||this.actualOptions.autoPlay){if(this.#_e&&(this.#_e=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ht.containerPlay),this.draw(e??!1)}else this.#Me=!1}async refresh(){if(rs(this))return this.stop(),this.start()}async reset(t){if(rs(this))return this.#ze=t,this.#De=t,this.#Ie=ls(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),this.refresh()}async start(){rs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#xe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ht.containerStarted),this.play(),t()};this.#ye=setTimeout(()=>{e()},this.#me)}))}stop(){if(rs(this)&&this.started){this.#ye&&(clearTimeout(this.#ye),this.#ye=void 0),this.#Me=!0,this.started=!1,this.#xe.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.#Ie,this.dispatchEvent(ht.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Le(t){try{if(!this.#Oe&&void 0!==this.#Ce&&t<this.#Ce+a/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#ve,t-this.#Ce,this.fpsLimit,this.#Oe),this.addLifeTime(this.#ve.value),this.#Ce=t,this.#ve.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ve),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){ft().error("error in animation loop",t)}}}});var hs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=It.CanvasSetup;#u;#Re;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.#Re&&(t.globalCompositeOperation=this.#Re)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Re=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ds(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=B(t.velocity.x,-1,1),t.velocity.y=B(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 us(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(l=a,c=n,Math.sqrt(H(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?vt.clockwise:vt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var ps=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-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},us(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1: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===vt.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):ds(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(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*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ee()}redrawInit(){return this.#Ee()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ee(){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 fs=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=K("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Fe(i);i.addEventListener("change",()=>{(async()=>{this.#Fe(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Fe(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});t.loadConfettiFallingPreset=qi,t.tsParticles=De}),Object.assign(globalThis.window||globalThis,{loadConfettiFallingPreset:(globalThis.__tsParticlesInternals.presets.confettiFalling||{}).loadConfettiFallingPreset}),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.confettiFalling=t.__tsParticlesInternals.presets.confettiFalling||{}))}(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",m=255,y=360,v=100,w=100,b=.25;var P;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"}(P||(P={}));class M{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 M.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 M.create(t.x,t.y,x(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??o.y,i??o.z):new M(t.x,t.y,x(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+x(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=x(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return M.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=x(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-x(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=x(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class z extends M{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return z.create(o.x,o.y)}static clone(t){return z.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new z(t,e??o.y):new z(t.x,t.y)}}function C(t){return"boolean"==typeof t}function k(t){return"string"==typeof t}function S(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function _(t){return Array.isArray(t)}function O(t){return null==t}const D=Math.PI/180;let L=Math.random;const R=t=>requestAnimationFrame(t),E=t=>{cancelAnimationFrame(t)};function F(){return B(L(),0,1-Number.EPSILON)}function T(t,e){return F()*(e-t)+t}function B(t,e,i){return Math.min(Math.max(t,e),i)}function A(t){const e=$(t);let i=V(t);return e===i&&(i=0),T(i,e)}function U(t){return S(t)?t:A(t)}function V(t){return S(t)?t:t.min}function $(t){return S(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&S(t))return t;const i=V(t),s=$(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:W(i,s)}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function H(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*D}function q(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function N(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var X,Y;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(X||(X={})),function(t){t.precise="precise",t.percent="percent"}(Y||(Y={}));function Q(){return globalThis.document}function K(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function Z(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function J(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==X.bottom||(n=t.top<e.height+i.x);!n||s&&s!==X.left||(n=t.right>i.x);!n||s&&s!==X.right||(n=t.left<e.width+i.y);!n||s&&s!==X.top||(n=t.bottom>i.y);return n}(tt(t,s??0),e,i,n)}function tt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function et(t,...e){for(const i of e){if(O(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return I(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if("__proto__"===t||"constructor"===t||"prototype"===t)continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if("__proto__"===s||"constructor"===s||"prototype"===s)continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>et(void 0,t)):et(e[s],n)}}return t}function it(t,e){return _(t)?t.map((t,i)=>e(t,i)):e(t,0)}function st(t,e,i){return _(t)?Z(t,e,i):t}function nt(t,e){return function(t,e){if(t.mode!==Y.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 at,ot;function rt(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 lt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ct{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var ht;!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"}(ht||(ht={}));class dt{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(ht.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 lt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return lt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return 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 ut=t=>(...e)=>{t(...e)},pt={debug:ut(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:ut(console.info),log:ut(console.log),trace:ut(console.trace),verbose:ut(console.log),warning:ut(console.warn)};function ft(){return pt}const gt="100%";class mt{pluginManager=new dt(this);#h=[];#d=new ct;#o=!1;get items(){return this.#h}get version(){return"4.3.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 cs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=st(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(ft().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=st(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=Q();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=gt,s.style.height||=gt,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||=gt,s.style.height||=gt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=Q();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 yt,vt,wt,bt,Pt,xt,Mt,zt,Ct,kt,St,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(yt||(yt={}));class _t{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 Ot extends _t{radius;constructor(t,e,i){super(t,e,yt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,H(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 Ot||t.type===yt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Dt||t.type===yt.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 Dt extends _t{size;constructor(t,e,i,s){super(t,e,yt.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 Ot)return t.intersects(this);if(!(t instanceof Dt))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"}(vt||(vt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(wt||(wt={})),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"}(Pt||(Pt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(xt||(xt={})),function(t){t.none="none",t.max="max",t.min="min"}(Mt||(Mt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(zt||(zt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(Ct||(Ct={})),function(t){t.max="max",t.min="min",t.random="random"}(kt||(kt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(St||(St={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(It||(It={}));class Lt{load(t){O(t)||this.doLoad(t)}}function Rt(t,...e){for(const i of e)t.load(i)}function Et(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=W(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Bt(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 At extends Lt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Et(this,"sync",t.sync)}}class Ut extends At{mode=wt.auto;startValue=kt.random;doLoad(t){super.doLoad(t),Et(this,"mode",t.mode),Et(this,"startValue",t.startValue)}}class Vt extends At{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Et(this,"max",t.max),Et(this,"min",t.min),Ft(this,"offset",t.offset)}}class $t extends Lt{h=new Vt(0,y);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 Wt extends Lt{value="";static create(t,e){const i=new Wt;return i.load(t),void 0!==e&&(k(e)||_(e)?i.load({value:e}):i.load(e)),i}doLoad(t){O(t.value)||(this.value=t.value)}}class Gt extends Wt{animation=new $t;static create(t,e){const i=new Gt;return i.load(t),void 0!==e&&(k(e)||_(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 Ht extends Lt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Wt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Wt.create(this.color,t.color)),Et(this,"element",t.element),Et(this,"draw",t.draw),Et(this,"image",t.image),Et(this,"position",t.position),Et(this,"repeat",t.repeat),Et(this,"size",t.size),Et(this,"opacity",t.opacity)}}class jt extends Lt{enable=!0;zIndex=0;doLoad(t){Et(this,"enable",t.enable),Et(this,"zIndex",t.zIndex)}}class qt extends Lt{delay=.5;enable=!0;doLoad(t){Et(this,"delay",t.delay),Et(this,"enable",t.enable)}}class Nt extends Lt{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]=et(this.options[t]??{},i))}Et(this,"close",t.close),Et(this,"type",t.type)}}class Xt extends Lt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Et(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Yt extends Lt{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Qt extends Lt{mode=Y.percent;radius=0;x=50;y=50;doLoad(t){Et(this,"x",t.x),Et(this,"y",t.y),Et(this,"mode",t.mode),Et(this,"radius",t.radius)}}class Kt extends Lt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Et(this,"enable",t.enable),Et(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Zt extends Lt{value=0;doLoad(t){O(t.value)||(this.value=W(t.value))}}class Jt extends Zt{animation=new At;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 Lt{clamp=!0;delay=new Zt;enable=!1;generator;options={};doLoad(t){Et(this,"clamp",t.clamp),this.delay.load(t.delay),Et(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=et(this.options,t.options))}}class ie extends Lt{bottom;default=Pt.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 Lt{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Et(this,"enable",t.enable),t.position&&(this.position=et({},t.position))}}class ne extends Lt{angle=new Yt;center=new Qt;decay=0;direction=P.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(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Et(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Et(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),Et(this,"random",t.random),Et(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Et(this,"straight",t.straight),Et(this,"vibrate",t.vibrate),Et(this,"warp",t.warp)}}class ae extends Lt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Lt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Gt.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Xt),Tt(this,"stroke",t.stroke,()=>new ae)}}class re extends Zt{value=1}class le extends Lt{horizontal=new re;vertical=new re;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ce extends Lt{enable=!1;height=1080;width=1920;doLoad(t){Et(this,"enable",t.enable),Et(this,"width",t.width),Et(this,"height",t.height)}}class he extends Lt{mode=bt.delete;value=0;doLoad(t){Et(this,"mode",t.mode),Et(this,"value",t.value)}}class de extends Lt{density=new ce;limit=new he;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Et(this,"value",t.value)}}class ue extends Lt{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]=et(this.options[t]??{},i))}Et(this,"close",t.close),Et(this,"type",t.type)}}class pe extends Zt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Et(this,"opacityRate",t.opacityRate),Et(this,"sizeRate",t.sizeRate),Et(this,"velocityRate",t.velocityRate)}}class fe extends Lt{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 Gt,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]=et(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(_(e)?this.paint=it(e,t=>{const e=new oe;return e.load(t),e}):_(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=(_(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 Rt(s,...i),s}class me extends Lt{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 Ht,this.fullScreen=new jt,this.particles=ge(this.#p,this.#u),this.resize=new qt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,it(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Et(this,"autoPlay",t.autoPlay),Et(this,"clear",t.clear),Et(this,"key",t.key),Et(this,"name",t.name),Ft(this,"delay",t.delay),Et(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Et(this,"fpsLimit",t.fpsLimit),Et(this,"hdr",t.hdr),Et(this,"pauseOnBlur",t.pauseOnBlur),Et(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Et(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=et(this.style,t.style),Et(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 ye=new Map;function ve(t,e){let i=ye.get(t);return i||(i=e(),ye.size>2e3&&ye.clear(),ye.set(t,i)),i}function we(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return be(t,n.value,i,s);if(_(n.value)){const e=Z(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 be(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(T(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(_(n.value)){const e=Z(n.value,i,s);if(!e)return;return be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Pe(t,e,i,s=!0){const a=we(t,e,i,s);return a?function(t){const e=t.r/m,i=t.g/m,s=t.b/m,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+=y);r.h>=y&&(r.h-=y);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 Me(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=Math.round(r*m);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(m,m*xe(c,l,a+h)),u=Math.min(m,m*xe(c,l,a)),p=Math.min(m,m*xe(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function ze(t,e,i){const s=e?4:2,n=i??1;return ve(`rgb-${t.r.toFixed(s)}-${t.g.toFixed(s)}-${t.b.toFixed(s)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?function(t,e,i=400){const s=i/203;return`color(display-p3 ${(t.r/m*s).toString()} ${(t.g/m*s).toString()} ${(t.b/m*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=e?4:2,a=i??1;return ve(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${a.toString()}`,()=>e?ze(function(t){const e=(t.h%y+y)%y,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(w,t.l)),a=e/y,o=i/v,r=s/w;if(0===i){const t=r*m;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;return{r:Math.min(m,m*xe(c,l,a+h)),g:Math.min(m,m*xe(c,l,a)),b:Math.min(m,m*xe(c,l,a-h))}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${a.toString()})`)}function ke(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Se(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:y},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max: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=St.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=F(),t.value*=F()),t.initialValue=t.value,t.offset=W(e.offset)):t.velocity=0}function _e(t,e,i,s){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 n=t.offset?A(t.offset):0,a=((t.velocity??0)*i.factor+3.6*n)*(s?.5075:1),o=t.decay??1,r=t.max,l=t.min;e&&t.status!==St.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=St.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=St.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=B(t.value,l,r)}function Oe(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;_e(s,!1,e,i),_e(n,!0,e,i),_e(a,!0,e,i)}const De=new mt;class Le{enable=!1;mode="destination-out";load(t){O(t)||(Et(this,"mode",t.mode),Et(this,"enable",t.enable))}}class Re{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return hs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Le),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Le,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ee(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Re)})}class Fe{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:j(s.min),max:j(s.max)}:{min:0,max:j(s)}}}async function Te(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Fe))})}var Be;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Be||(Be={}));const Ae=/^#?([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.#m(t.value)}handleRangeColor(t){return this.#m(t.value)}parseString(t){return this.#m(t)}#m(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ae,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ue.exec(e);return i?{a:i[Be.a]?Number.parseInt(i[Be.a],16)/255:1,b:Number.parseInt(i[Be.b]??"0",16),g:Number.parseInt(i[Be.g]??"0",16),r:Number.parseInt(i[Be.r]??"0",16)}:void 0}}async function $e(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ve)})}var We;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(We||(We={}));const Ge=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class He{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 Me(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Me({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ge.exec(t);return e?function(t){const e=Me(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?N(e[We.a]):1,h:Number.parseInt(e[We.h]??"0",10),l:Number.parseInt(e[We.l]??"0",10),s:Number.parseInt(e[We.s]??"0",10)}):void 0}}async function je(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new He)})}class qe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return ps});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ne(t){t.checkVersion("4.3.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,lt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new qe(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 wt.increase:o.status=St.increasing;break;case wt.decrease:o.status=St.decreasing;break;case wt.random:o.status=F()>=n?St.increasing:St.decreasing}const t=s.mode===wt.auto;switch(s.startValue){case kt.min:o.value=o.min,t&&(o.status=St.increasing);break;case kt.max:o.value=o.max,t&&(o.status=St.decreasing);break;case kt.random:default:o.value=A(o),t&&(o.status=F()>=n?St.increasing:St.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 St.increasing:e.value+=a;break;case St.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case St.increasing:e.value>=r&&(i?e.status=St.decreasing:e.value-=r,e.loops??=0,e.loops++);break;case St.decreasing:e.value<=o&&(i?e.status=St.increasing:e.value+=r,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=B(e.value,o,r))}}class Qe extends Ut{destroy=Mt.none;load(t){super.load(t),O(t)||Et(this,"destroy",t.destroy)}}class Ke extends te{animation=new Qe;value=1;load(t){if(O(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*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Bt(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.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Ze(t)))})}class ti{modes;#u;#y;constructor(t){this.#u=t,this.modes=[Pt.bounce,Pt.split],this.#y=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.#y)if(a=s.particleBounce?.(t,i,e)??!1,a)break;if(a)return;const o=t.getPosition(),r=t.offset,l=t.getRadius(),c=tt(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Pt.bounce&&t.outMode!==Pt.split||t.direction!==X.left&&t.direction!==X.right)return;t.bounds.right<0&&t.direction===X.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===X.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===X.right&&e>0||t.direction===X.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===X.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===X.left&&(t.particle.position.x=s),t.outMode===Pt.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!==Pt.bounce&&t.outMode!==Pt.split||t.direction!==X.bottom&&t.direction!==X.top)return;t.bounds.bottom<0&&t.direction===X.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===X.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===X.bottom&&e>0||t.direction===X.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===X.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===X.top&&(t.particle.position.y=s),t.outMode===Pt.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=[Pt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case Ct.normal:case Ct.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case Ct.inside:{const{dx:e,dy:i}=G(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=[Pt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===X.left||e===X.right))??(t.options.move.distance.vertical&&(e===X.top||e===X.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===X.bottom||n.inverse&&i.y<-l&&e===X.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;J(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const si=z.origin;class ni{modes;#u;constructor(t){this.#u=t,this.modes=[Pt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case Ct.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}=G(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(A({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(A({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=G(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 Ct.outside:{t.position.x=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(A({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=G(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case Ct.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=tt(t.position,o);e===X.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===X.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===X.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===X.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,Pt.bounce,t=>new ti(t)),this.#v(t,Pt.out,t=>new ni(t)),this.#v(t,Pt.destroy,t=>new ei(t)),this.#v(t,Pt.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,X.bottom),this.#w(t,e,i.left??i.default,X.left),this.#w(t,e,i.right??i.default,X.right),this.#w(t,e,i.top??i.default,X.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.3.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=st(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Gt.create(void 0===a?void 0:Gt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=Pe(this.#p,i);s&&(t.fillColor=Se(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=Gt.create(void 0===a?void 0:Gt.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=Pe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Se(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)&&(Oe(t.fillColor,e,this.#u.hdr),Oe(t.strokeColor,e,this.#u.hdr))}}async function li(t){t.checkVersion("4.3.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?N(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.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new di)})}class pi extends Ut{destroy=Mt.none;load(t){super.load(t),O(t)||Et(this,"destroy",t.destroy)}}class fi extends te{animation=new pi;value=3;load(t){if(super.load(t),O(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*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Bt(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 mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new gi(t)))})}async function yi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(async t=>{await Promise.all([Ee(t),$e(t),je(t),ui(t),Ne(t),Te(t),li(t),Je(t),oi(t),mi(t)])})}const vi={name:"Confetti",background:"#1a1a2e",blendMode:"source-over",colors:{fill:{enable:!0,value:["#FF0044","#FF4400","#FFCC00","#00CC44","#00AAFF","#AA00FF","#FF00AA","#00FFCC","#FF6600","#FFFFFF"]}}};async function wi(t){await t.pluginManager.register(t=>{t.pluginManager.addPalette("confetti",vi)})}class bi{factor=4;value=!0;load(t){O(t)||(Et(this,"factor",t.factor),Et(this,"value",t.value))}}class Pi{disable=!0;reduce=new bi;load(t){O(t)||(Et(this,"disable",t.disable),this.reduce.load(t.reduce))}}class xi{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return fs});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new Pi),s.load(i?.motion)}needsPlugin(){return!0}}async function Mi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new xi)})}var zi;!function(t){t.both="both",t.horizontal="horizontal",t.vertical="vertical"}(zi||(zi={}));class Ci{enable=!1;value=0;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"value",t.value))}}class ki{backColor;darken=new Ci;enable=!1;enlighten=new Ci;mode=zi.vertical;speed=25;load(t){O(t)||(void 0!==t.backColor&&(this.backColor=Wt.create(this.backColor,t.backColor)),this.darken.load(t.darken),Et(this,"enable",t.enable),this.enlighten.load(t.enlighten),Et(this,"mode",t.mode),Ft(this,"speed",t.speed))}}class Si{#p;constructor(t){this.#p=t}getTransformValues(t){const e=t.roll?.enable&&t.roll,i=e&&e.horizontal,s=e&&e.vertical;return{a:i?Math.cos(e.angle):void 0,d:s?Math.sin(e.angle):void 0}}init(t){!function(t,e){const i=e.options.roll;if(i?.enable)if(e.roll={enable:i.enable,horizontal:i.mode===zi.horizontal||i.mode===zi.both,vertical:i.mode===zi.vertical||i.mode===zi.both,angle:F()*u,speed:U(i.speed)/360},i.backColor)e.backColor=Pe(t,i.backColor);else if(i.darken.enable&&i.enlighten.enable){const t=F()>=n?xt.darken:xt.enlighten;e.roll.alter={type:t,value:U(t===xt.darken?i.darken.value:i.enlighten.value)}}else i.darken.enable?e.roll.alter={type:xt.darken,value:U(i.darken.value)}:i.enlighten.enable&&(e.roll.alter={type:xt.enlighten,value:U(i.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this.#p,t)}isEnabled(t){const e=t.options.roll;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Bt(t,"roll",ki,...e)}update(t,e){this.isEnabled(t)&&function(t,e){const i=t.options.roll,s=t.roll;if(!s||!i?.enable)return;const n=s.speed*e.factor,a=u;s.angle+=n,s.angle>a&&(s.angle-=a)}(t,e)}}async function Ii(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("roll",()=>Promise.resolve(new Si(t.pluginManager)))})}class _i{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Et(this,"sync",t.sync))}}class Oi extends Zt{animation=new _i;direction=vt.clockwise;path=!1;load(t){O(t)||(super.load(t),Et(this,"direction",t.direction),this.animation.load(t.animation),Et(this,"path",t.path))}}class Di{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:j(U(e.value)),min:0,max:u},t.pathRotation=e.path;let i=e.direction;if(i===vt.random){i=Math.floor(2*F())>0?vt.counterClockwise:vt.clockwise}switch(i){case vt.counterClockwise:case"counterClockwise":t.rotate.status=St.decreasing;break;case vt.clockwise:t.rotate.status=St.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-U(s.decay),t.rotate.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=F())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Bt(t,"rotate",Oi,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(Ye(t,t.rotate,!1,Mt.none,e),t.rotation=t.rotate.value))}}async function Li(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new Di(t)))})}class Ri{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Ei(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new Ri))})}var Fi;!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(Fi||(Fi={}));class Ti{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(Et(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Et(this,"sync",t.sync))}}class Bi extends Zt{animation=new Ti;direction=Fi.clockwise;enable=!1;load(t){super.load(t),O(t)||(this.animation.load(t.animation),Et(this,"direction",t.direction),Et(this,"enable",t.enable))}}class Ai{#u;constructor(t){this.#u=t}getTransformValues(t){const e=t.tilt?.enable&&t.tilt;return{b:e?Math.cos(e.value)*e.cosDirection:void 0,c:e?Math.sin(e.value)*e.sinDirection:void 0}}init(t){const e=t.options.tilt;if(!e)return;t.tilt={enable:e.enable,value:j(U(e.value)),sinDirection:F()>=n?1:-1,cosDirection:F()>=n?1:-1,min:0,max:u};let i=e.direction;if(i===Fi.random){i=Math.floor(2*F())>0?Fi.counterClockwise:Fi.clockwise}switch(i){case Fi.counterClockwise:case"counterClockwise":t.tilt.status=St.decreasing;break;case Fi.clockwise:t.tilt.status=St.increasing}const s=t.options.tilt?.animation;s?.enable&&(t.tilt.decay=1-U(s.decay),t.tilt.velocity=U(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.tilt.velocity*=F()))}isEnabled(t){const e=t.options.tilt?.animation;return!t.destroyed&&!t.spawning&&!!e?.enable}loadOptions(t,...e){Bt(t,"tilt",Bi,...e)}update(t,e){this.isEnabled(t)&&t.tilt&&Ye(t,t.tilt,!1,Mt.none,e)}}async function Ui(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("tilt",t=>Promise.resolve(new Ai(t)))})}class Vi{angle=50;move=10;load(t){O(t)||(Ft(this,"angle",t.angle),Ft(this,"move",t.move))}}class $i{distance=5;enable=!1;speed=new Vi;load(t){if(!O(t)&&(Ft(this,"distance",t.distance),Et(this,"enable",t.enable),void 0!==t.speed))if(S(t.speed))this.speed.load({angle:t.speed});else{const e=t.speed;"min"in e?this.speed.load({angle:e}):this.speed.load(t.speed)}}}class Wi{#u;constructor(t){this.#u=t}init(t){const e=t.options.wobble;t.wobble=e?.enable?{angle:F()*u,angleSpeed:U(e.speed.angle)/360,moveSpeed:U(e.speed.move)/10}:{angle:0,angleSpeed:0,moveSpeed:0},t.retina.wobbleDistance=U(e?.distance??0)*this.#u.retina.pixelRatio}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.options.wobble?.enable}loadOptions(t,...e){Bt(t,"wobble",$i,...e)}update(t,e){this.isEnabled(t)&&function(t,e,i){const{wobble:s}=e.options,{wobble:n}=e;if(!s?.enable||!n)return;const a=t.retina.reduceFactor,o=n.angleSpeed*i.factor*a,r=n.moveSpeed*i.factor*a*(e.retina.wobbleDistance??0)/16.666666666666668,l=u,{position:c}=e;n.angle+=o,n.angle>l&&(n.angle-=l),c.x+=r*Math.cos(n.angle),c.y+=r*Math.abs(Math.sin(n.angle))}(this.#u,t,e)}}async function Gi(t){t.checkVersion("4.3.1"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("wobble",t=>Promise.resolve(new Wi(t)))})}const Hi={palette:"confetti",background:{color:{value:""}},fullScreen:{enable:!0,zIndex:100},particles:{number:{value:200,density:{enable:!0}},shape:{type:["square","circle"]},size:{value:{min:3,max:5}},move:{enable:!0,speed:5,direction:"bottom",outModes:"out"},rotate:{value:{min:0,max:360},direction:"random",move:!0,animation:{enable:!0,speed:60}},tilt:{direction:"random",enable:!0,value:{min:0,max:360},animation:{enable:!0,speed:60}},roll:{darken:{enable:!0,value:30},enlighten:{enable:!0,value:30},enable:!0,mode:"both",speed:{min:15,max:25}},wobble:{distance:30,enable:!0,move:!0,speed:{min:-15,max:15}}},motion:{disable:!0}},ji=["confettiFalling","confetti-falling"];async function qi(t){await t.pluginManager.register(async t=>{await Promise.all([yi(t),wi(t),Ei(t),Mi(t),Gi(t),Ii(t),Li(t),Ui(t)]),ji.forEach(e=>{t.pluginManager.addPreset(e,Hi,!1)})})}const Ni=globalThis;Ni.loadConfettiFallingPreset=qi,Ni.tsParticles=De;function Xi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Yi{#b;#P;#x;#M;#z;#u;#C;#k;#S;#I;#_;#O;#p;#D;#L;#R={};#E=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#M=i,this.#C=null,this.#b=null,this.#P=new Set,this.#L=[],this.#D=[],this.#x=[],this.#z=[],this.#S=[],this.#I=[],this.#_=[],this.#O={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#k}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#M.size.width,this.#M.size.height)})}clear(){for(const t of this.#x)if(t.canvasClear?.())return;for(const t of Object.values(It))if("number"==typeof t)for(const e of this.#T(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#b=null,this.#P.clear(),this.#L=[],this.#D=[],this.#x=[],this.#z=[],this.#S=[],this.#I=[],this.#_=[];for(const t of Object.values(It))"number"==typeof t&&(this.#O[t]=[])}draw(t){const e=this.#C;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.#B(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.#F,f=this.#R,g=a?Ce(a,r.hdr,h*d):void 0,m=o?Ce(o,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#_)i.drawParticleSetup?.(s,t,e);this.#A(s,t,i,d,f,p),this.#U({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#V(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#S)this.#$(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#M.size.width,a=this.#M.size.height;if(this.#b)try{s.drawImage(this.#b,o.x,o.y,n,a)}catch{this.#W("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#W("background-draw-error","Error in background.draw callback")}for(const t of this.#T(It.BackgroundMask))t.canvasPaint?.();for(const e of this.#T(It.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#T(It.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#T(It.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#G(),this.paint()}initPlugins(){this.#x=[],this.#z=[],this.#S=[],this.#_=[],this.#I=[];for(const t of Object.values(It))"number"==typeof t&&(this.#O[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#z.push(t),t.drawParticle&&this.#S.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#x.push(t),t.canvasPaint&&this.#T(It.BackgroundMask).push(t),t.drawSettingsSetup&&this.#T(It.CanvasSetup).push(t),t.draw&&this.#T(It.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#T(It.CanvasCleanup).push(t)}initUpdaters(){this.#L=[],this.#D=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#T(It.BackgroundMask))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.#M.size.width,this.#M.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.#M.size.width,this.#M.size.height),i.globalAlpha=s})}setContext(t){this.#C=t,this.#C&&(this.#C.globalCompositeOperation=i)}setContextSettings(t){this.#k=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#M.size.width,this.#M.size.height)})}#V(t){for(const e of this.#D)e.afterDraw?.(t)}#A(t,e,i,s,n,a){for(const o of this.#L){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)Xi(a,t,e)}o.beforeDraw?.(e)}}#H(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#j(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#U(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 m={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?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;this.#j(y,m),this.#q(v,m),this.#N(v,m),this.#X(v,m),this.#H(y,m),i.resetTransform()}#$(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)}#q(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#T(t){return this.#O[t]}#B(t){let e,i;for(const s of this.#z)if(!e&&s.particleFillColor&&(e=Pe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Pe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#E[0]=e,this.#E[1]=i,this.#E}#G(){const t=this.#u.actualOptions.background;if(this.#b=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLImageElement?this.#b=e:e?this.#W("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#W("background-element-not-found",`Background element selector "${t.element}" not found`)}}else(t.element instanceof HTMLCanvasElement||t.element instanceof OffscreenCanvas||t.element instanceof HTMLVideoElement||t.element instanceof HTMLImageElement)&&(this.#b=t.element)}#W(t,e){this.#P.has(t)||(this.#P.add(t),ft().warning(e))}}const Qi=new WeakMap;function Ki(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 Zi{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 Yi(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?ze(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=Qi.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 Qi.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=Q().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(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&&K("(color-gamut: p3)")?.matches&&K("(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&&Ki(t,e,!0)}#nt(t){this.#Q&&t(this.#Q)}#ct(){const t=this.domElement;t&&Ki(t,function(t){if(at!==t||!ot){at=t;const e=Q().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)}ot=e}return ot}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ji{#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&&(Q().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.#mt(t),rt(document,"visibilitychange",e.visibilityChange,t,!1)}#mt(t){const e=this.#ht,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void rt(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 ts(t){if(e=t.outMode,i=t.checkModes,!(e===i||_(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function es(t,e){const i=t%e;return i<0?i+e:i}function is(t,e,i,s){const n=ge(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=st(n.effect.type,t.id,a),t.shape=st(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=st(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=st(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(F()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(F()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return et({close:e.close},st(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 et({close:e.close},st(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 ss{backColor;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;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#yt={fillOpacity:1,opacity:1,strokeOpacity:1};#vt=M.origin;#wt={sin:0,cos:0};#bt={a:1,b:0,c:0,d:1};#u;#Pt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Pt.push(t),this.#Pt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Pt.length=0}destroy(t){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();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(ht.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.#xt(this.#Mt(ke(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getModifier(t){return this.#Pt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=U(this.opacity?.value??1),s=this.#Mt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#yt.fillOpacity=s*n*e,this.#yt.opacity=s*e,this.#yt.strokeOpacity=s*a*e,this.#yt}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.#Mt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#wt.sin=Math.sin(t),this.#wt.cos=Math.cos(t),this.#wt}getStrokeColor(){return this.#xt(this.#Mt(ke(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#bt.a=e.cos*(t.a??r),this.#bt.b=i?e.sin*(t.b??1):t.b??l,this.#bt.c=i?-e.sin*(t.c??1):t.c??c,this.#bt.d=e.cos*(t.d??h),this.#bt}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=Ct.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=is(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#zt(e),this.initialVelocity=this.#Ct(),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.#kt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#kt({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=es(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=es(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=es(t,u);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Pt.findIndex(e=>e.id===t);e>=0&&this.#Pt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Mt(t,e){let i=t;for(const t of this.#Pt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#St(t,e){let i=0,s=t?M.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 M.create(i.x,i.y,e)}const t=q({size:l,position:s}),c=M.create(t.x,t.y,e);this.#It(c,r,o.left??o.default),this.#It(c,r,o.right??o.default),this.#_t(c,r,o.top??o.default),this.#_t(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}}#Ct(){const t=this.options.move,e=function(t){const e=z.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===P.inside||t.direction===P.outside)return e;const i=j(U(t.angle.value)),s=j(U(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=A(W(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=F()),e}#It(t,e,i){ts({outMode:i,checkModes:[Pt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#_t(t,e,i){ts({outMode:i,checkModes:[Pt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Pt.bounce;return t===X.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===X.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===X.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===X.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()}}#kt(t){const e=this.#Ot(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.#Lt(a(r),"shape"):void 0,c=o?this.#Lt(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}#xt(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===xt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#zt(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#St(t,B(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={...nt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(S(t))return j(t);switch(t){case P.top:return-Math.PI*n;case P.topRight:return-Math.PI*b;case P.right:return 0;case P.bottomRight:return Math.PI*b;case P.bottom:return Math.PI*n;case P.bottomLeft:return.75*Math.PI;case P.left:return Math.PI;case P.topLeft:return.75*-Math.PI;case P.inside:return Math.atan2(i.y-e.y,i.x-e.x);case P.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case P.inside:this.outType=Ct.inside;break;case P.outside:this.outType=Ct.outside}this.offset=z.origin}#Lt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class ns{#Rt;#Et=new Map;#Ft=[];#Tt;#Bt;#At=[];#Ut;constructor(t){this.#Rt=t,this.#Tt=0,this.#Ut=0}clear(){this.#Et.clear();const t=this.#Bt;t&&(this.#Rt=t),this.#Bt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Vt(e,i);this.#Et.has(s)||this.#Et.set(s,[]),this.#Et.get(s)?.push(t)}query(t,e,i=[]){const s=this.#$t(t);if(!s)return i;const n=Math.floor(s.minX/this.#Rt),a=Math.floor(s.maxX/this.#Rt),o=Math.floor(s.minY/this.#Rt),r=Math.floor(s.maxY/this.#Rt);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Et.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.#Wt(t.x,t.y,e),a=this.query(n,i,s);return this.#Gt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Ht(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Gt(),a}setCellSize(t){this.#Bt=t}#Wt(t,e,i){return(this.#Ft[this.#Tt++]??=new Ot(t,e,i)).reset(t,e,i)}#Ht(t,e,i,s){return(this.#At[this.#Ut++]??=new Dt(t,e,i,s)).reset(t,e,i,s)}#Vt(t,e){return`${Math.floor(t/this.#Rt)}_${Math.floor(e/this.#Rt)}`}#$t(t){if(t instanceof Ot){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 Dt){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}#Gt(){this.#Tt=0,this.#Ut=0}}class as{checkParticlePositionPlugins;grid;#jt;#u;#qt;#Nt;#Xt;#Yt;#Qt;#Kt;#p;#Zt;#Jt;#te;#ee;#ie;#se;constructor(t,e){this.#p=t,this.#u=e,this.#Xt=0,this.#jt=[],this.#Zt=[],this.#Nt=0,this.#qt=new Map,this.#Yt=new Map,this.#se=this.#ne(this.#u.zLayers),this.grid=new ns(100),this.checkParticlePositionPlugins=[],this.#Qt=[],this.#Kt=[],this.#te=[],this.#Jt=[],this.#ie=[]}get count(){return this.#jt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Nt:this.#qt.get(i)??this.#Nt,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.#Zt.pop()??new ss(this.#p,this.#u);n.init(this.#Xt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#jt.push(n),this.#ae(n),this.#Xt++,this.#u.dispatchEvent(ht.particleAdded,{particle:n}),n):void this.#Zt.push(n)}catch(t){ft().warning(`error adding particle: ${t}`)}}clear(){this.#jt=[],this.#Yt.clear(),this.#oe(this.#u.zLayers)}destroy(){this.#jt=[],this.#Zt.length=0,this.#Yt.clear(),this.#se=[],this.checkParticlePositionPlugins=[],this.#Qt=[],this.#Kt=[],this.#te=[],this.#Jt=[],this.#ie=[]}drawParticles(t){for(let e=this.#se.length-1;e>=0;e--){const i=this.#se[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#jt.filter(t)}find(t){return this.#jt.find(t)}get(t){return this.#jt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ie=[],this.#Kt=[],this.#te=[],this.#Qt=[],this.#Jt=[],this.#Yt.clear(),this.#oe(t.zLayers),this.grid=new ns(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ie.push(e),e.particleUpdate&&this.#Kt.push(e),e.postUpdate&&this.#te.push(e),e.particleReset&&this.#Qt.push(e),e.postParticleUpdate&&this.#Jt.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#jt.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.#re(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.#le(n,i,t)}this.#le(t.particles,i)}setResizeFactor(t){this.#ee=t}update(t){this.grid.clear();for(const e of this.#ie)e.update?.(t);const e=this.#ce(t);for(const e of this.#te)e.postUpdate?.(t);if(this.#he(t,e),e.size)for(const t of e)this.remove(t);this.#ee=void 0}#de(...t){this.#Zt.push(...t)}#le(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Nt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#qt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ue(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.#Nt=n.limit.value*a:this.#qt.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)}#ne(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#pe(t){const e=this.#se.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ue(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}#ae(t){const e=this.#pe(t.position.z),i=this.#se[e];i&&(i.push(t),this.#Yt.set(t.id,e))}#re(t,e,i){const s=this.#jt[t];return!!s&&(s.group===e&&(this.#jt.splice(t,1),this.#fe(s),s.destroy(i),this.#u.dispatchEvent(ht.particleRemoved,{particle:s}),this.#de(s),!0))}#fe(t){const e=this.#Yt.get(t.id)??this.#pe(t.position.z),i=this.#se[e];if(!i)return void this.#Yt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Yt.delete(t.id)}#oe(t){const e=Math.max(Math.floor(t),1);if(this.#se.length===e)for(const t of this.#se)t.length=0;else this.#se=this.#ne(e)}#ge(t){const e=this.#pe(t.position.z),i=this.#Yt.get(t.id);if(void 0===i)return void this.#ae(t);if(i===e)return;const s=this.#se[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#se[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.#Yt.set(t.id,e)}else this.#Yt.set(t.id,e)}#ce(t){const e=new Set,i=this.#ee;for(const s of this.#jt){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.#Qt)t.particleReset?.(s);for(const e of this.#Kt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#he(t,e){for(const i of this.#jt)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Jt)e.postParticleUpdate?.(i,t);this.#ge(i)}}}class os{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=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 rs(t){return!t.destroyed}function ls(t,e,...i){const s=new me(t,e);return Rt(s,...i),s}var cs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#me;#ye;#ve={value:0,factor:0};#we;#be;#Pe;#xe;#Me;#ze;#Ce;#ke;#Se;#Ie;#_e;#p;#Oe;#De;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#we=e,this.#Se=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#Oe=!1,this.#me=0,this.#Pe=0,this.#ke=0,this.#Me=!0,this.started=!1,this.destroyed=!1,this.#_e=!0,this.#Ce=0,this.zLayers=100,this.pageHidden=!1,this.#De=a,this.#ze=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new os(this),this.canvas=new Zi(this.#p,this),this.particles=new as(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ie=ls(this.#p,this),this.actualOptions=ls(this.#p,this),this.#xe=new Ji(this),this.dispatchEvent(ht.containerBuilt)}get animationStatus(){return!this.#_e&&!this.pageHidden&&rs(this)}get options(){return this.#Ie}get sourceOptions(){return this.#De}addLifeTime(t){this.#ke+=t}alive(){return!this.#Pe||this.#ke<=this.#Pe}destroy(t=!0){if(rs(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Se(t),this.dispatchEvent(ht.containerDestroyed)}}dispatchEvent(t,e){this.#we(t,{container:this,data:e})}draw(t){if(!rs(this))return;let e=t;this.#be=R(t=>{e&&(this.#Ce=void 0,e=!1),this.#Le(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}ft().error(`Export plugin with type ${t} not found`)}async init(){if(!rs(this))return;const t=new Map;for(const e of this.#p.plugins){const i=await e.getPlugin(this);i.preInit&&await i.preInit(),t.set(e,i)}await this.initDrawersAndUpdaters(),this.#Ie=ls(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),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.#Pe=U(i)*a,this.#me=U(e)*a,this.#ke=0,this.fpsLimit=s>0?s:120,this.#Oe=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ht.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ht.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){var t;if(rs(this)&&(void 0!==this.#be&&(t=this.#be,E(t),this.#be=void 0),!this.#_e)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#_e=!0),this.dispatchEvent(ht.containerPaused)}}play(t){if(!rs(this))return;const e=this.#_e||t;if(!this.#Me||this.actualOptions.autoPlay){if(this.#_e&&(this.#_e=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ht.containerPlay),this.draw(e??!1)}else this.#Me=!1}async refresh(){if(rs(this))return this.stop(),this.start()}async reset(t){if(rs(this))return this.#ze=t,this.#De=t,this.#Ie=ls(this.#p,this,this.#ze,this.sourceOptions),this.actualOptions=ls(this.#p,this,this.#Ie),this.refresh()}async start(){rs(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#xe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ht.containerStarted),this.play(),t()};this.#ye=setTimeout(()=>{e()},this.#me)}))}stop(){if(rs(this)&&this.started){this.#ye&&(clearTimeout(this.#ye),this.#ye=void 0),this.#Me=!0,this.started=!1,this.#xe.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.#Ie,this.dispatchEvent(ht.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Le(t){try{if(!this.#Oe&&void 0!==this.#Ce&&t<this.#Ce+a/this.fpsLimit)return void this.draw(!1);if(this.#Ce??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#ve,t-this.#Ce,this.fpsLimit,this.#Oe),this.addLifeTime(this.#ve.value),this.#Ce=t,this.#ve.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#ve),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){ft().error("error in animation loop",t)}}}});var hs=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=It.CanvasSetup;#u;#Re;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.#Re&&(t.globalCompositeOperation=this.#Re)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Re=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function ds(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=B(t.velocity.x,-1,1),t.velocity.y=B(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 us(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(l=a,c=n,Math.sqrt(H(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?vt.clockwise:vt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var ps=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(t){const e=t.options.move,i=e.gravity,s=e.path;if(t.moveDecay=1-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},us(this.#u,t)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(t,e){const i=t.options.move;if(!i.enable)return;const s=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1: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===vt.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):ds(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=G(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*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(t)}preInit(){return this.#Ee()}redrawInit(){return this.#Ee()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ee(){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 fs=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=K("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Fe(i);i.addEventListener("change",()=>{(async()=>{this.#Fe(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Fe(t){const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});t.loadConfettiFallingPreset=qi,t.tsParticles=De}),Object.assign(globalThis.window||globalThis,{loadConfettiFallingPreset:(globalThis.__tsParticlesInternals.presets.confettiFalling||{}).loadConfettiFallingPreset}),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.3.0 */
2
+ /* Preset v4.3.1 */
3
3
  (function (global, factory) {
4
4
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/palette-confetti'), require('@tsparticles/plugin-motion'), require('@tsparticles/updater-roll'), require('@tsparticles/updater-rotate'), require('@tsparticles/shape-square'), require('@tsparticles/updater-tilt'), require('@tsparticles/updater-wobble')) :
5
5
  typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/palette-confetti', '@tsparticles/plugin-motion', '@tsparticles/updater-roll', '@tsparticles/updater-rotate', '@tsparticles/shape-square', '@tsparticles/updater-tilt', '@tsparticles/updater-wobble'], factory) :