@tsparticles/preset-fountain 4.3.2 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.presets.fountain=t.__tsParticlesInternals.presets.fountain||{}))}(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,P=.25;var b;function x(t){return"z"in t?t.z:o.z}!function(t){t.bottom="bottom",t.bottomLeft="bottom-left",t.bottomRight="bottom-right",t.left="left",t.none="none",t.right="right",t.top="top",t.topLeft="top-left",t.topRight="top-right",t.outside="outside",t.inside="inside"}(b||(b={}));class 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 O(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function D(t){return null==t}const _=Math.PI/180;let E=Math.random;const L=t=>requestAnimationFrame(t),R=t=>{cancelAnimationFrame(t)};function F(){return B(E(),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 j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function H(t){return t*_}function q(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return function(t){return{x:(t.position?.x??F()*s)*t.size.width/s,y:(t.position?.y??F()*s)*t.size.height/s}}({size:t.size,position:e})}function N(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function X(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Y,Q;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Y||(Y={})),function(t){t.precise="precise",t.percent="percent"}(Q||(Q={}));function K(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function Z(){return globalThis.document}function J(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function tt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(F()*t.length)]}function et(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Y.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Y.left||(n=t.right>i.x);!n||s&&s!==Y.right||(n=t.left<e.width+i.y);!n||s&&s!==Y.top||(n=t.bottom>i.y);return n}(it(t,s??0),e,i,n)}function it(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function st(t,...e){for(const i of e){if(D(i))continue;if(!O(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):O(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return O(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(K(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(K(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>st(void 0,t)):st(e[s],n)}}return t}function nt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function at(t,e,i){return I(t)?tt(t,e,i):t}function ot(t,e){return function(t,e){if(t.mode!==Q.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/s*e.width,y:t.y/s*e.height}:{width:t.width/s*e.width,height:t.height/s*e.height}}(t,e)}let rt,lt;function ct(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 ht(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 dt{#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 ut;!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"}(ut||(ut={}));class pt{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(ut.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 ht(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 ht(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 ft=t=>(...e)=>{t(...e)},gt={debug:ft(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:ft(console.info),log:ft(console.log),trace:ft(console.trace),verbose:ft(console.log),warning:ft(console.warn)};function mt(){return gt}const yt="100%";class vt{pluginManager=new pt(this);#h=[];#d=new dt;#o=!1;get items(){return this.#h}get version(){return"4.3.2"}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 hs}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=at(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(mt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=at(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=Z();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=yt,s.style.height||=yt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=Z();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 wt,Pt,bt,xt,Mt,zt,Ct,kt,St,Ot,It,Dt;!function(t){t.circle="circle",t.rectangle="rectangle"}(wt||(wt={}));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 Et extends _t{radius;constructor(t,e,i){super(t,e,wt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,j(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof Et||t.type===wt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Lt||t.type===wt.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 Lt extends _t{size;constructor(t,e,i,s){super(t,e,wt.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 Et)return t.intersects(this);if(!(t instanceof Lt))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"}(Pt||(Pt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(bt||(bt={})),function(t){t.delete="delete",t.wait="wait"}(xt||(xt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Mt||(Mt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(zt||(zt={})),function(t){t.none="none",t.max="max",t.min="min"}(Ct||(Ct={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(kt||(kt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(St||(St={})),function(t){t.max="max",t.min="min",t.random="random"}(Ot||(Ot={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(It||(It={})),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"}(Dt||(Dt={}));class Rt{load(t){D(t)||this.doLoad(t)}}function Ft(t,...e){for(const i of e)t.load(i)}function Tt(t,e,i){void 0!==i&&(t[e]=i)}function Bt(t,e,i){void 0!==i&&(t[e]=W(i))}function At(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Ut(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 Vt extends Rt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Bt(this,"count",t.count),Tt(this,"enable",t.enable),Bt(this,"speed",t.speed),Bt(this,"decay",t.decay),Bt(this,"delay",t.delay),Tt(this,"sync",t.sync)}}class $t extends Vt{mode=bt.auto;startValue=Ot.random;doLoad(t){super.doLoad(t),Tt(this,"mode",t.mode),Tt(this,"startValue",t.startValue)}}class Wt extends Vt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Tt(this,"max",t.max),Tt(this,"min",t.min),Bt(this,"offset",t.offset)}}class Gt extends Rt{h=new Wt(0,y);l=new Wt(0,w);s=new Wt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class jt extends Rt{value="";static create(t,e){const i=new jt;return i.load(t),void 0!==e&&(k(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){D(t.value)||(this.value=t.value)}}class Ht extends jt{animation=new Gt;static create(t,e){const i=new Ht;return i.load(t),void 0!==e&&(k(e)||I(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 qt extends Rt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new jt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=jt.create(this.color,t.color)),Tt(this,"element",t.element),Tt(this,"draw",t.draw),Tt(this,"image",t.image),Tt(this,"position",t.position),Tt(this,"repeat",t.repeat),Tt(this,"size",t.size),Tt(this,"opacity",t.opacity)}}class Nt extends Rt{enable=!0;zIndex=0;doLoad(t){Tt(this,"enable",t.enable),Tt(this,"zIndex",t.zIndex)}}class Xt extends Rt{delay=.5;enable=!0;doLoad(t){Tt(this,"delay",t.delay),Tt(this,"enable",t.enable)}}class Yt extends Rt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}Tt(this,"close",t.close),Tt(this,"type",t.type)}}class Qt extends Rt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),Tt(this,"enable",t.enable),Bt(this,"opacity",t.opacity)}}class Kt extends Rt{offset=0;value=90;doLoad(t){Bt(this,"offset",t.offset),Bt(this,"value",t.value)}}class Zt extends Rt{mode=Q.percent;radius=0;x=50;y=50;doLoad(t){Tt(this,"x",t.x),Tt(this,"y",t.y),Tt(this,"mode",t.mode),Tt(this,"radius",t.radius)}}class Jt extends Rt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Bt(this,"acceleration",t.acceleration),Tt(this,"enable",t.enable),Tt(this,"inverse",t.inverse),Bt(this,"maxSpeed",t.maxSpeed)}}class te extends Rt{value=0;doLoad(t){D(t.value)||(this.value=W(t.value))}}class ee extends te{animation=new Vt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ie extends ee{animation=new $t}class se extends Rt{clamp=!0;delay=new te;enable=!1;generator;options={};doLoad(t){Tt(this,"clamp",t.clamp),this.delay.load(t.delay),Tt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=st(this.options,t.options))}}class ne extends Rt{bottom;default=Mt.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 ae extends Rt{acceleration=0;enable=!1;position;doLoad(t){Bt(this,"acceleration",t.acceleration),Tt(this,"enable",t.enable),t.position&&(this.position=st({},t.position))}}class oe extends Rt{angle=new Kt;center=new Zt;decay=0;direction=b.none;distance={};drift=0;enable=!1;gravity=new Jt;outModes=new ne;path=new se;random=!1;size=!1;speed=2;spin=new ae;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(S(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Bt(this,"decay",t.decay),Tt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=S(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Bt(this,"drift",t.drift),Tt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(O(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Tt(this,"random",t.random),Tt(this,"size",t.size),Bt(this,"speed",t.speed),this.spin.load(t.spin),Tt(this,"straight",t.straight),Tt(this,"vibrate",t.vibrate),Tt(this,"warp",t.warp)}}class re extends Rt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),Bt(this,"width",t.width),Bt(this,"opacity",t.opacity)}}class le extends Rt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=Ht.create(this.color,t.color)),At(this,"fill",t.fill,()=>new Qt),At(this,"stroke",t.stroke,()=>new re)}}class ce extends te{value=1}class he extends Rt{horizontal=new ce;vertical=new ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class de extends Rt{enable=!1;height=1080;width=1920;doLoad(t){Tt(this,"enable",t.enable),Tt(this,"width",t.width),Tt(this,"height",t.height)}}class ue extends Rt{mode=xt.delete;value=0;doLoad(t){Tt(this,"mode",t.mode),Tt(this,"value",t.value)}}class pe extends Rt{density=new de;limit=new ue;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Tt(this,"value",t.value)}}class fe extends Rt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=st(this.options[t]??{},i))}Tt(this,"close",t.close),Tt(this,"type",t.type)}}class ge extends te{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Tt(this,"opacityRate",t.opacityRate),Tt(this,"sizeRate",t.sizeRate),Tt(this,"velocityRate",t.velocityRate)}}class me extends Rt{bounce=new he;effect=new Yt;groups={};move=new oe;number=new pe;paint;palette;reduceDuplicates=!1;shape=new fe;zIndex=new ge;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new le,this.paint.color=new Ht,this.paint.color.value="#fff",this.paint.fill=new Qt,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]=st(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&&(I(e)?this.paint=nt(e,t=>{const e=new le;return e.load(t),e}):I(this.paint)?(this.paint=new le,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:[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 ye(t,e,...i){const s=new me(t,e);return Ft(s,...i),s}class ve extends Rt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new qt,this.fullScreen=new Nt,this.particles=ye(this.#p,this.#u),this.resize=new Xt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,nt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Tt(this,"autoPlay",t.autoPlay),Tt(this,"clear",t.clear),Tt(this,"key",t.key),Tt(this,"name",t.name),Bt(this,"delay",t.delay),Tt(this,"detectRetina",t.detectRetina),Bt(this,"duration",t.duration),Tt(this,"fpsLimit",t.fpsLimit),Tt(this,"hdr",t.hdr),Tt(this,"pauseOnBlur",t.pauseOnBlur),Tt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Tt(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=st(this.style,t.style),Tt(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 we=new Map;function Pe(t,e){let i=we.get(t);return i||(i=e(),we.size>2e3&&we.clear(),we.set(t,i)),i}function be(t,e,i,s=!0){if(!e)return;const n=k(e)?{value:e}:e;if(k(n.value))return xe(t,n.value,i,s);if(I(n.value)){const e=tt(n.value,i,s);if(!e)return;return be(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function xe(t,e,i,s=!0){if(!e)return;const n=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(I(n.value)){const e=tt(n.value,i,s);if(!e)return;return xe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Me(t,e,i,s=!0){const a=be(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 ze(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 Ce(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*ze(c,l,a+h)),u=Math.min(m,m*ze(c,l,a)),p=Math.min(m,m*ze(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function ke(t,e,i){const s=e?4:2,n=i??1;return Pe(`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 Se(t,e,i){const s=e?4:2,a=i??1;return Pe(`hsl-${t.h.toFixed(s)}-${t.s.toFixed(s)}-${t.l.toFixed(s)}-${e?"hdr":"sdr"}-${a.toString()}`,()=>e?ke(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*ze(c,l,a+h)),g:Math.min(m,m*ze(c,l,a)),b:Math.min(m,m*ze(c,l,a-h))}}(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${a.toString()})`)}function Oe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ie(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&&(De(s.h,e.h,i),De(s.s,e.s,i),De(s.l,e.l,i)),s}function De(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=U(e.speed)/s*i,t.decay=1-U(e.decay),t.status=It.increasing,t.loops=0,t.maxLoops=U(e.count),t.time=0,t.delayTime=U(e.delay)*a,e.sync||(t.velocity*=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!==It.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=It.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=It.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=B(t.value,l,r)}function Ee(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 Le=new vt;class Re{enable=!1;mode="destination-out";load(t){D(t)||(Tt(this,"mode",t.mode),Tt(this,"enable",t.enable))}}class Fe{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return ds});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.blend;s?.load||(e.blend=s=new Re),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Re,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Te(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Fe)})}class Be{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=O(s)?{min:H(s.min),max:H(s.max)}:{min:0,max:H(s)}}}async function Ae(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Be))})}var Ue;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ue||(Ue={}));const Ve=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,$e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class We{accepts(t){return t.startsWith("#")}handleColor(t){return this.#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(Ve,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=$e.exec(e);return i?{a:i[Ue.a]?Number.parseInt(i[Ue.a],16)/255:1,b:Number.parseInt(i[Ue.b]??"0",16),g:Number.parseInt(i[Ue.g]??"0",16),r:Number.parseInt(i[Ue.r]??"0",16)}:void 0}}async function Ge(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new We)})}var je;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(je||(je={}));const He=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class qe{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 Ce(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ce({h:U(e.h),l:U(e.l),s:U(e.s)})}parseString(t){if(!this.accepts(t))return;const e=He.exec(t);return e?function(t){const e=Ce(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?X(e[je.a]):1,h:Number.parseInt(e[je.h]??"0",10),l:Number.parseInt(e[je.l]??"0",10),s:Number.parseInt(e[je.s]??"0",10)}):void 0}}async function Ne(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new qe)})}class Xe{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return fs});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Ye(t){t.checkVersion("4.3.2"),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,ht(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Xe(t.pluginManager))})}function Qe(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 bt.increase:o.status=It.increasing;break;case bt.decrease:o.status=It.decreasing;break;case bt.random:o.status=F()>=n?It.increasing:It.decreasing}const t=s.mode===bt.auto;switch(s.startValue){case Ot.min:o.value=o.min,t&&(o.status=It.increasing);break;case Ot.max:o.value=o.max,t&&(o.status=It.decreasing);break;case Ot.random:default:o.value=A(o),t&&(o.status=F()>=n?It.increasing:It.decreasing)}}return o.initialValue=o.value,o}function Ke(t,e,i,s,n){if(t.destroyed||!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;const a=(e.velocity??0)*n.factor,o=e.min,r=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case It.increasing:e.value+=a;break;case It.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case It.increasing:e.value>=r&&(e.status=It.decreasing,e.loops??=0,e.loops++);break;case It.decreasing:e.value<=o&&(e.status=It.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Ct.max:i>=n&&t.destroy();break;case Ct.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=B(e.value,o,r))}}class Ze extends $t{destroy=Ct.none;load(t){super.load(t),D(t)||Tt(this,"destroy",t.destroy)}}class Je extends ie{animation=new Ze;value=1;load(t){if(D(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ti{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=Qe(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){Ut(t,"opacity",Je,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&Ke(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function ei(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ti(t)))})}class ii{modes;#u;#y;constructor(t){this.#u=t,this.modes=[Mt.bounce,Mt.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=it(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Mt.bounce&&t.outMode!==Mt.split||t.direction!==Y.left&&t.direction!==Y.right)return;t.bounds.right<0&&t.direction===Y.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Y.right&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const e=t.particle.velocity.x;let i=!1;if(t.outOfCanvas&&(t.direction===Y.right&&e>0||t.direction===Y.left&&e<0)){const e=U(t.particle.options.bounce.horizontal.value);t.particle.velocity.x*=-e,i=!0}if(!i)return;const s=t.offset.x+t.size;t.outOfCanvas&&t.direction===Y.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Y.left&&(t.particle.position.x=s),t.outMode===Mt.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!==Mt.bounce&&t.outMode!==Mt.split||t.direction!==Y.bottom&&t.direction!==Y.top)return;t.bounds.bottom<0&&t.direction===Y.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Y.bottom&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const e=t.particle.velocity.y;let i=!1;if(t.outOfCanvas&&(t.direction===Y.bottom&&e>0||t.direction===Y.top&&e<0)){const e=U(t.particle.options.bounce.vertical.value);t.particle.velocity.y*=-e,i=!0}if(!i)return;const s=t.offset.y+t.size;t.outOfCanvas&&t.direction===Y.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Y.top&&(t.particle.position.y=s),t.outMode===Mt.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class si{modes;constructor(t){this.modes=[Mt.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case St.normal:case St.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case St.inside:{const{dx:e,dy:i}=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 ni{modes;#u;constructor(t){this.#u=t,this.modes=[Mt.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Y.left||e===Y.right))??(t.options.move.distance.vertical&&(e===Y.top||e===Y.bottom)))return;const n=t.options.move.gravity,a=this.#u,r=a.canvas.size,l=t.getRadius();if(n.enable){const i=t.position;(!n.inverse&&i.y>r.height+l&&e===Y.bottom||n.inverse&&i.y<-l&&e===Y.top)&&t.destroy()}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;et(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const ai=z.origin;class oi{modes;#u;constructor(t){this.#u=t,this.modes=[Mt.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case St.inside:{const{x:e,y:i}=t.velocity;ai.setTo(o),ai.length=t.moveCenter.radius,ai.angle=t.velocity.angle+Math.PI,ai.addTo(t.moveCenter);const{dx:s,dy:a}=G(t.position,ai);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(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 St.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 St.normal:{const i=t.options.move.warp,s=n.canvas.size,a={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},o=t.getRadius(),r=it(t.position,o);e===Y.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Y.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=F()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Y.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Y.top&&r.bottom<-t.offset.y&&(i||(t.position.x=F()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class ri{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,Mt.bounce,t=>new ii(t)),this.#v(t,Mt.out,t=>new oi(t)),this.#v(t,Mt.destroy,t=>new si(t)),this.#v(t,Mt.none,t=>new ni(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,e){const i=t.options.move.outModes;t.justWarped=!1,this.#w(t,e,i.bottom??i.default,Y.bottom),this.#w(t,e,i.left??i.default,Y.left),this.#w(t,e,i.right??i.default,Y.right),this.#w(t,e,i.top??i.default,Y.top)}#v(t,e,i){const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))}#w(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function li(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ri(t)))})}class ci{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=at(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=U(o.opacity),t.fillAnimation=i.animation;const s=Me(this.#p,i);s&&(t.fillColor=Ie(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=Ht.create(void 0===a?void 0:Ht.create(void 0,a),r.color);t.strokeWidth=U(r.width)*e.retina.pixelRatio,t.strokeOpacity=U(r.opacity??1),t.strokeAnimation=i.animation;const s=Me(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ie(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),o=!!s&&(void 0!==n?.h.value&&n.h.enable||void 0!==n?.s.value&&n.s.enable||void 0!==n?.l.value&&n.l.enable);return!t.destroyed&&!t.spawning&&(a||o)}update(t,e){this.isEnabled(t)&&(Ee(t.fillColor,e,this.#u.hdr),Ee(t.strokeColor,e,this.#u.hdr))}}async function hi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ci(t.pluginManager,e)))})}var di;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(di||(di={}));const ui=/rgba?\(\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*[\s,]\s*(\d{1,3})\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class pi{accepts(t){return t.startsWith("rgb")}handleColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return e}handleRangeColor(t){const e=t.value.rgb??t.value;if("r"in e&&"g"in e&&"b"in e)return{r:U(e.r),g:U(e.g),b:U(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ui.exec(t);return e?{a:e.length>4?X(e[di.a]):1,b:parseInt(e[di.b]??"0",10),g:parseInt(e[di.g]??"0",10),r:parseInt(e[di.r]??"0",10)}:void 0}}async function fi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new pi)})}class gi extends $t{destroy=Ct.none;load(t){super.load(t),D(t)||Tt(this,"destroy",t.destroy)}}class mi extends ie{animation=new gi;value=3;load(t){if(super.load(t),D(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class yi{#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){Ut(t,"size",mi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=Qe(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&&Ke(t,t.size,0,t.options.size.animation.destroy,e)}}async function vi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new yi(t)))})}async function wi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{await Promise.all([Te(t),Ge(t),Ne(t),fi(t),Ye(t),Ae(t),hi(t),ei(t),li(t),vi(t)])})}class Pi{bottom;left;right;top;load(t){D(t)||(Bt(this,"bottom",t.bottom),Bt(this,"left",t.left),Bt(this,"right",t.right),Bt(this,"top",t.top))}}var bi;!function(t){t.explode="explode",t.none="none",t.split="split"}(bi||(bi={}));class xi{maxSizeFactor=3;speed=2;load(t){D(t)||(Tt(this,"maxSizeFactor",t.maxSizeFactor),Tt(this,"speed",t.speed))}}class Mi extends te{value=3}class zi extends te{value={min:4,max:9}}class Ci{count=1;factor=new Mi;fillColor;fillColorOffset;particles;rate=new zi;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){D(t)||(void 0!==t.fillColor&&(this.fillColor=jt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=jt.create(this.strokeColor,t.strokeColor)),Tt(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=nt(t.particles,t=>st({},t)),Tt(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class ki{bounds=new Pi;explode=new xi;mode=bi.none;split=new Ci;load(t){D(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function Si(t,e,i,s){return t&&s?function(t,e){const i=U(e.h??0),s=U(e.s??0),n=U(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return Ht.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?Ht.create(void 0,e):i?Ht.create(void 0,i):s?function(t){return Ht.create(void 0,{value:{hsl:t}})}(s):void 0}function Oi(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=ye(t,e,i.options),r=at(a.fillColor),l=at(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:Q.precise}});const d=1/U(a.factor.value),u=o.size;u&&(S(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=at(o.paint),f=p?.fill,g=p?.stroke,m=Si(a.fillColorOffset,r,f?.color,c),y=Si(a.strokeColorOffset,l,g?.color,h);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?W(-i.size.value,i.size.value):0,w={x:i.position.x+A(v),y:i.position.y+A(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=A(W(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Ii{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=U(a)*h.height/s),o&&(c.left=U(o)*h.width/s),r&&(c.right=U(r)*h.width/s),l&&(c.top=U(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){Ut(t,"destroy",ki,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case bi.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=U(n.rate.value),o=at(n.particles);for(let s=0;s<a;s++)Oi(t,e,i,o)}(this.#p,this.#u,t);break;case bi.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Di(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Ii(t.pluginManager,e)))})}class _i{count;delay;duration;wait=!1;load(t){D(t)||(Tt(this,"count",t.count),Bt(this,"delay",t.delay),Bt(this,"duration",t.duration),Tt(this,"wait",t.wait))}}class Ei{delay=.1;quantity=1;load(t){D(t)||(Bt(this,"quantity",t.quantity),Bt(this,"delay",t.delay))}}class Li{color=!1;opacity=!1;load(t){D(t)||(Tt(this,"color",t.color),Tt(this,"opacity",t.opacity))}}class Ri{options={};replace=new Li;type="square";load(t){D(t)||(void 0!==t.options&&(this.options=st({},t.options??{})),this.replace.load(t.replace),Tt(this,"type",t.type))}}class Fi{height=0;mode=Q.percent;width=0;load(t){D(t)||(Tt(this,"mode",t.mode),Tt(this,"height",t.height),Tt(this,"width",t.width))}}class Ti{fill;stroke;load(t){D(t)||(t.fill&&(this.fill??=new Qt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new re,this.stroke.load(t.stroke)))}}class Bi{autoPlay=!0;direction;domId;fill=!0;life=new _i;name;particles;position;rate=new Ei;shape=new Ri;size;spawn=new Ti;spawnFillColor;spawnStrokeColor;startCount=0;load(t){D(t)||(Tt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Fi,this.size.load(t.size)),Tt(this,"direction",t.direction),Tt(this,"domId",t.domId),Tt(this,"fill",t.fill),this.life.load(t.life),Tt(this,"name",t.name),this.particles=nt(t.particles,t=>st({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=W(t.position.x)),void 0!==t.position.y&&(this.position.y=W(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new Ht,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new Ht,this.spawnStrokeColor.load(t.spawnStrokeColor)),Tt(this,"startCount",t.startCount))}}class Ai{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return gs});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=nt(i.emitters,t=>{const e=new Bi;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return I(e)&&!!e.length||void 0!==e}}const Ui=new WeakMap;var Vi;async function $i(t){t.checkVersion("4.3.2"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Ui.get(e);return i||(i=Promise.resolve().then(function(){return vs}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Ui.delete(e),t}),Ui.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ys}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Ai(e))})}!function(t){t.emitter="emitter"}(Vi||(Vi={}));class Wi{color;image;load(t){D(t)||(void 0!==t.color&&(this.color=jt.create(this.color,t.color)),Tt(this,"image",t.image))}}class Gi{enable=!1;fill=new Wi;length=10;load(t){D(t)||(Tt(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),Tt(this,"length",t.length))}}class ji{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return ws});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new Gi),s.load(i?.trail)}needsPlugin(){return!0}}async function Hi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ji(t.pluginManager))})}const qi={fpsLimit:120,particles:{bounce:{vertical:{value:{min:.75,max:.85}}},paint:{fill:{color:{value:["#3998D0","#2EB6AF","#A9BD33","#FEC73B","#F89930","#F45623","#D62E32","#EB586E","#9952CF"]},enable:!0}},number:{value:0},destroy:{mode:"split",split:{count:2,factor:{value:{min:1.1,max:2}},rate:{value:{min:2,max:3}}}},opacity:{value:.5},size:{value:{min:10,max:20}},move:{enable:!0,gravity:{enable:!0,maxSpeed:50},speed:{min:10,max:20},direction:b.none,random:!1,straight:!1,outModes:{bottom:Mt.split,default:Mt.bounce,top:Mt.none}}},detectRetina:!0,background:{color:"#fff"},emitters:{direction:b.top,life:{count:0,duration:.15,delay:3},rate:{delay:.1,quantity:5},size:{width:0,height:0}},trail:{enable:!0,fill:{color:"#fff"},length:3}};async function Ni(t){await t.pluginManager.register(async t=>{await Promise.all([wi(t),Di(t),$i(t),Hi(t)]),t.pluginManager.addPreset("fountain",qi)})}const Xi=globalThis;Xi.loadFountainPreset=Ni,Xi.tsParticles=Le;function Yi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Qi{#b;#x;#M;#z;#C;#u;#k;#S;#O;#I;#D;#_;#p;#E;#L;#R={};#F=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#k=null,this.#b=null,this.#x=new Set,this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#D=[],this.#_={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#M)if(t.canvasClear?.())return;for(const t of Object.values(Dt))if("number"==typeof t)for(const e of this.#B(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#b=null,this.#x.clear(),this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#D=[];for(const t of Object.values(Dt))"number"==typeof t&&(this.#_[t]=[])}draw(t){const e=this.#k;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.#A(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.#T,f=this.#R,g=a?Se(a,r.hdr,h*d):void 0,m=o?Se(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.#D)i.drawParticleSetup?.(s,t,e);this.#U(s,t,i,d,f,p),this.#V({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#$(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#W(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#z.size.width,a=this.#z.size.height;if(this.#b)try{s.drawImage(this.#b,o.x,o.y,n,a)}catch{this.#G("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#G("background-draw-error","Error in background.draw callback")}for(const t of this.#B(Dt.BackgroundMask))t.canvasPaint?.();for(const e of this.#B(Dt.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#B(Dt.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#B(Dt.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#j(),this.paint()}initPlugins(){this.#M=[],this.#C=[],this.#O=[],this.#D=[],this.#I=[];for(const t of Object.values(Dt))"number"==typeof t&&(this.#_[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#M.push(t),t.canvasPaint&&this.#B(Dt.BackgroundMask).push(t),t.drawSettingsSetup&&this.#B(Dt.CanvasSetup).push(t),t.draw&&this.#B(Dt.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#B(Dt.CanvasCleanup).push(t)}initUpdaters(){this.#L=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#B(Dt.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.#z.size.width,this.#z.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.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}#$(t){for(const e of this.#E)e.afterDraw?.(t)}#U(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)Yi(a,t,e)}o.beforeDraw?.(e)}}#H(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#q(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#V(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.#q(y,m),this.#N(v,m),this.#X(v,m),this.#Y(v,m),this.#H(y,m),i.resetTransform()}#W(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(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())}#Y(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#N(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#B(t){return this.#_[t]}#A(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=Me(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Me(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#F[0]=e,this.#F[1]=i,this.#F}#j(){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.#G("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#G("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)}#G(t,e){this.#x.has(t)||(this.#x.add(t),mt().warning(e))}}const Ki=new WeakMap;function Zi(t,e,i=!1){if(!e)return;const s=t.style,n=new Set;for(let t=0;t<s.length;t++){const e=s.item(t);e&&n.add(e)}for(let t=0;t<e.length;t++){const i=e.item(t);i&&n.add(i)}for(const t of n){const n=e.getPropertyValue(t);n?s.setProperty(t,n,i?"important":""):s.removeProperty(t)}}class Ji{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#K;#Z;#p;#J;#tt;#et;#it;constructor(t,e){this.#p=t,this.#u=e,this.render=new Qi(t,e,this),this.#et={height:0,width:0};const i=e.retina.pixelRatio,s=this.#et;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#tt=[],this.#J="none"}get#st(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#nt();this.render.destroy(),this.#tt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#it?this.#it:{x:e*n/t,y:i*n/t}}init(){this.#at(t=>{t.disconnect()}),this.#K=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ot()}),this.resize(),this.#rt(),this.initBackground(),this.#at(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#lt(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=be(this.#p,e.color);s.backgroundColor=n?ke(n,t.actualOptions.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#tt=[];for(const t of this.#u.plugins)t.resize&&this.#tt.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=Ki.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Ki.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Z=function(t){const e=Z().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||D(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#et,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.#et,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.#J=t,this.#ot())}setZoom(t,e){this.zoom=t,this.#it=e}stop(){this.#at(t=>{t.disconnect()}),this.#K=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ct(),e&&await t.refresh()}#ct(){for(const t of this.#tt)t.resize?.()}#lt(){const t=this.#u.actualOptions.hdr&&J("(color-gamut: p3)")?.matches&&J("(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))}#rt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#st?this.#ht():this.#nt();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")}}}#ot(){const t=this.domElement;if(!t)return;this.#at(t=>{t.disconnect()}),this.#rt(),this.initBackground();const e=this.#J;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#at(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#nt(){const t=this.domElement,e=this.#Z;t&&e&&Zi(t,e,!0)}#at(t){this.#K&&t(this.#K)}#ht(){const t=this.domElement;t&&Zi(t,function(t){if(rt!==t||!lt){rt=t;const e=Z().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)}lt=e}return lt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class ts{#u;#dt;#ut;#pt;constructor(t){this.#u=t,this.#dt={visibilityChange:()=>{this.#ft()},resize:()=>{this.#gt()}}}addListeners(){this.#mt(!0)}removeListeners(){this.#mt(!1)}#ft(){const t=this.#u;t.actualOptions.pauseOnBlur&&(Z().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#gt(){this.#pt&&(clearTimeout(this.#pt),this.#pt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#pt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#mt(t){const e=this.#dt;this.#yt(t),ct(document,"visibilitychange",e.visibilityChange,t,!1)}#yt(t){const e=this.#dt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void ct(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#ut&&!t?(s&&this.#ut.unobserve(s),this.#ut.disconnect(),this.#ut=void 0):!this.#ut&&t&&s&&(this.#ut=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#gt()}),this.#ut.observe(s))}}function es(t){if(e=t.outMode,i=t.checkModes,!(e===i||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 is(t,e){const i=t%e;return i<0?i+e:i}function ss(t,e,i,s){const n=ye(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=at(n.effect.type,t.id,a),t.shape=at(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=at(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=at(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 st({close:e.close},at(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 st({close:e.close},at(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 ns{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;#vt={fillOpacity:1,opacity:1,strokeOpacity:1};#wt=M.origin;#Pt={sin:0,cos:0};#bt={a:1,b:0,c:0,d:1};#u;#xt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#xt.push(t),this.#xt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#xt.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(ut.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.#Mt(this.#zt(Oe(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getModifier(t){return this.#xt.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.#zt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#vt.fillOpacity=s*n*e,this.#vt.opacity=s*e,this.#vt.strokeOpacity=s*a*e,this.#vt}getPosition(){return this.#wt.x=this.position.x+this.offset.x,this.#wt.y=this.position.y+this.offset.y,this.#wt.z=this.position.z,this.#wt}getRadius(){return this.#zt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Pt.sin=Math.sin(t),this.#Pt.cos=Math.cos(t),this.#Pt}getStrokeColor(){return this.#Mt(this.#zt(Oe(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=St.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=ss(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Ct(e),this.initialVelocity=this.#kt(),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.#St({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#St({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=is(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=is(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=is(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.#xt.findIndex(e=>e.id===t);e>=0&&this.#xt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#zt(t,e){let i=t;for(const t of this.#xt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Ot(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=N({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.#Dt(c,r,o.top??o.default),this.#Dt(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}}#kt(){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===b.inside||t.direction===b.outside)return e;const i=H(U(t.angle.value)),s=H(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){es({outMode:i,checkModes:[Mt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Dt(t,e,i){es({outMode:i,checkModes:[Mt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#_t(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Mt.bounce;return t===Y.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Y.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Y.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Y.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Et(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#St(t){const e=this.#_t(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.#Et(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}#Mt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?function(t,e,i){return{h:t.h,s:t.s,l:t.l+(e===zt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Ct(t){const e=this.#u,i=Math.floor(U(this.options.zIndex.value)),s=this.#Ot(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={...ot(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 H(t);switch(t){case b.top:return-Math.PI*n;case b.topRight:return-Math.PI*P;case b.right:return 0;case b.bottomRight:return Math.PI*P;case b.bottom:return Math.PI*n;case b.bottomLeft:return.75*Math.PI;case b.left:return Math.PI;case b.topLeft:return.75*-Math.PI;case b.inside:return Math.atan2(i.y-e.y,i.x-e.x);case b.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return F()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case b.inside:this.outType=St.inside;break;case b.outside:this.outType=St.outside}this.offset=z.origin}#Lt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class as{#Rt;#Ft=new Map;#Tt=[];#Bt;#At;#Ut=[];#Vt;constructor(t){this.#Rt=t,this.#Bt=0,this.#Vt=0}clear(){this.#Ft.clear();const t=this.#At;t&&(this.#Rt=t),this.#At=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#$t(e,i);this.#Ft.has(s)||this.#Ft.set(s,[]),this.#Ft.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Wt(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.#Ft.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.#Gt(t.x,t.y,e),a=this.query(n,i,s);return this.#jt(),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.#jt(),a}setCellSize(t){this.#At=t}#Gt(t,e,i){return(this.#Tt[this.#Bt++]??=new Et(t,e,i)).reset(t,e,i)}#Ht(t,e,i,s){return(this.#Ut[this.#Vt++]??=new Lt(t,e,i,s)).reset(t,e,i,s)}#$t(t,e){return`${Math.floor(t/this.#Rt)}_${Math.floor(e/this.#Rt)}`}#Wt(t){if(t instanceof Et){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 Lt){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}#jt(){this.#Bt=0,this.#Vt=0}}class os{checkParticlePositionPlugins;grid;#qt;#u;#Nt;#Xt;#Yt;#Qt;#Kt;#Zt;#p;#Jt;#te;#ee;#ie;#se;#ne;constructor(t,e){this.#p=t,this.#u=e,this.#Yt=0,this.#qt=[],this.#Jt=[],this.#Xt=0,this.#Nt=new Map,this.#Qt=new Map,this.#ne=this.#ae(this.#u.zLayers),this.grid=new as(100),this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Zt=[],this.#ee=[],this.#te=[],this.#se=[]}get count(){return this.#qt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Xt:this.#Nt.get(i)??this.#Xt,o=this.count;if(a>0)switch(n){case xt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case xt.wait:if(o>=a)return}try{const n=this.#Jt.pop()??new ns(this.#p,this.#u);n.init(this.#Yt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#qt.push(n),this.#oe(n),this.#Yt++,this.#u.dispatchEvent(ut.particleAdded,{particle:n}),n):void this.#Jt.push(n)}catch(t){mt().warning(`error adding particle: ${t}`)}}clear(){this.#qt=[],this.#Qt.clear(),this.#re(this.#u.zLayers)}destroy(){this.#qt=[],this.#Jt.length=0,this.#Qt.clear(),this.#ne=[],this.checkParticlePositionPlugins=[],this.#Kt=[],this.#Zt=[],this.#ee=[],this.#te=[],this.#se=[]}drawParticles(t){for(let e=this.#ne.length-1;e>=0;e--){const i=this.#ne[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#qt.filter(t)}find(t){return this.#qt.find(t)}get(t){return this.#qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#se=[],this.#Zt=[],this.#ee=[],this.#Kt=[],this.#te=[],this.#Qt.clear(),this.#re(t.zLayers),this.grid=new as(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#se.push(e),e.particleUpdate&&this.#Zt.push(e),e.postUpdate&&this.#ee.push(e),e.particleReset&&this.#Kt.push(e),e.postParticleUpdate&&this.#te.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.#qt.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.#le(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=ye(this.#p,this.#u,s);this.#ce(n,i,t)}this.#ce(t.particles,i)}setResizeFactor(t){this.#ie=t}update(t){this.grid.clear();for(const e of this.#se)e.update?.(t);const e=this.#he(t);for(const e of this.#ee)e.postUpdate?.(t);if(this.#de(t,e),e.size)for(const t of e)this.remove(t);this.#ie=void 0}#ue(...t){this.#Jt.push(...t)}#ce(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Xt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Nt.set(i,s?.number.limit.value??n.limit.value));const a=this.#pe(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.#Xt=n.limit.value*a:this.#Nt.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)}#ae(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#fe(t){const e=this.#ne.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#pe(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}#oe(t){const e=this.#fe(t.position.z),i=this.#ne[e];i&&(i.push(t),this.#Qt.set(t.id,e))}#le(t,e,i){const s=this.#qt[t];return!!s&&(s.group===e&&(this.#qt.splice(t,1),this.#ge(s),s.destroy(i),this.#u.dispatchEvent(ut.particleRemoved,{particle:s}),this.#ue(s),!0))}#ge(t){const e=this.#Qt.get(t.id)??this.#fe(t.position.z),i=this.#ne[e];if(!i)return void this.#Qt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Qt.delete(t.id)}#re(t){const e=Math.max(Math.floor(t),1);if(this.#ne.length===e)for(const t of this.#ne)t.length=0;else this.#ne=this.#ae(e)}#me(t){const e=this.#fe(t.position.z),i=this.#Qt.get(t.id);if(void 0===i)return void this.#oe(t);if(i===e)return;const s=this.#ne[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ne[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.#Qt.set(t.id,e)}else this.#Qt.set(t.id,e)}#he(t){const e=new Set,i=this.#ie;for(const s of this.#qt){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.#Kt)t.particleReset?.(s);for(const e of this.#Zt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#de(t,e){for(const i of this.#qt)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.#te)e.postParticleUpdate?.(i,t);this.#me(i)}}}class rs{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 ls(t){return!t.destroyed}function cs(t,e,...i){const s=new ve(t,e);return Ft(s,...i),s}var hs=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#ye;#ve;#we={value:0,factor:0};#Pe;#be;#xe;#Me;#ze;#Ce;#ke;#Se;#Oe;#Ie;#De;#p;#_e;#Ee;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#Pe=e,this.#Oe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.#_e=!1,this.#ye=0,this.#xe=0,this.#Se=0,this.#ze=!0,this.started=!1,this.destroyed=!1,this.#De=!0,this.#ke=0,this.zLayers=100,this.pageHidden=!1,this.#Ee=a,this.#Ce=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new rs(this),this.canvas=new Ji(this.#p,this),this.particles=new os(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ie=cs(this.#p,this),this.actualOptions=cs(this.#p,this),this.#Me=new ts(this),this.dispatchEvent(ut.containerBuilt)}get animationStatus(){return!this.#De&&!this.pageHidden&&ls(this)}get options(){return this.#Ie}get sourceOptions(){return this.#Ee}addLifeTime(t){this.#Se+=t}alive(){return!this.#xe||this.#Se<=this.#xe}destroy(t=!0){if(ls(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.#Oe(t),this.dispatchEvent(ut.containerDestroyed)}}dispatchEvent(t,e){this.#Pe(t,{container:this,data:e})}draw(t){if(!ls(this))return;let e=t;this.#be=L(t=>{e&&(this.#ke=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}mt().error(`Export plugin with type ${t} not found`)}async init(){if(!ls(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=cs(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=cs(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.#xe=U(i)*a,this.#ye=U(e)*a,this.#Se=0,this.fpsLimit=s>0?s:120,this.#_e=o;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ut.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ut.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(ls(this)&&(void 0!==this.#be&&(t=this.#be,R(t),this.#be=void 0),!this.#De)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#De=!0),this.dispatchEvent(ut.containerPaused)}}play(t){if(!ls(this))return;const e=this.#De||t;if(!this.#ze||this.actualOptions.autoPlay){if(this.#De&&(this.#De=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ut.containerPlay),this.draw(e??!1)}else this.#ze=!1}async refresh(){if(ls(this))return this.stop(),this.start()}async reset(t){if(ls(this))return this.#Ce=t,this.#Ee=t,this.#Ie=cs(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=cs(this.#p,this,this.#Ie),this.refresh()}async start(){ls(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Me.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(ut.containerStarted),this.play(),t()};this.#ve=setTimeout(()=>{e()},this.#ye)}))}stop(){if(ls(this)&&this.started){this.#ve&&(clearTimeout(this.#ve),this.#ve=void 0),this.#ze=!0,this.started=!1,this.#Me.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.#Ee=this.#Ie,this.dispatchEvent(ut.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Le(t){try{if(!this.#_e&&void 0!==this.#ke&&t<this.#ke+a/this.fpsLimit)return void this.draw(!1);if(this.#ke??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#we,t-this.#ke,this.fpsLimit,this.#_e),this.addLifeTime(this.#we.value),this.#ke=t,this.#we.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#we),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){mt().error("error in animation loop",t)}}}});var ds=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=Dt.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 us(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 ps(t,e){const i=e.options.move.spin;if(!i.enable)return;const s=i.position??{x:50,y:50},n={x:.01*s.x*t.canvas.size.width,y:.01*s.y*t.canvas.size.height},a=e.getPosition(),o=(l=a,c=n,Math.sqrt(j(l,c))),r=U(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?Pt.clockwise:Pt.counterClockwise,angle:F()*u,radius:o,acceleration:e.retina.spinAcceleration}}var fs=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},ps(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===Pt.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):us(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.#Fe()}redrawInit(){return this.#Fe()}update(){for(const t of this.pathGenerators.values())t.update()}async#Fe(){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 gs=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(I(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ms=new Map;var ys=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ms.set(t,e)}getShapeGenerator(t){return ms.get(t)}getSupportedShapeGenerators(){return ms.keys()}}});var vs=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Te;#p;constructor(t){this.#Te=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Bi;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return xs}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#Te.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Te.get(t);return e||(e=[],this.#Te.set(t,e)),e}initContainer(t){this.#Te.has(t)||(this.#Te.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||S(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var ws=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=Dt.PluginContent;#u;#p;#Be;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#Be;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(ke(i.color,t.hdr,i.opacity)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#Ae()}catch(t){mt().error(t)}}async#Ae(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=be(this.#p,e.color);if(!t)return;this.#Be={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const n=Z().createElement("img");n.addEventListener("load",()=>{this.#Be={image:n,opacity:i},t()}),n.addEventListener("error",t=>{mt().error(t),s(new Error("Error loading image"))}),n.src=e.image})}}});function Ps(t,e,i,s){(t.paint??=new le).fill={color:Ht.create(void 0,{value:e}),enable:s,opacity:i}}function bs(t,e,i,s){(t.paint??=new le).stroke={color:Ht.create(void 0,{value:e}),opacity:i,width:s}}var xs=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ue;#Ve;#$e;#xe;#We;#Ge;#je;#He;#qe;#K;#Ne;#De;#p;#Xe;#ut;#Ye;#Qe;#Ke;#Ze;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#Xe=i,this.#Ue=0,this.#Ve=0,this.#$e=0,this.#He=o,n instanceof Bi?this.options=n:(this.options=new Bi,this.options.load(n)),this.#Ke=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#He??this.#Ot(),this.name=this.options.name,this.fill=this.options.fill,this.#Ge=!this.options.life.wait,this.#Ze=!1;const r=st({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Me(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Me(this.#p,this.options.spawn.stroke.color)),this.#De=!this.options.autoPlay,this.#Ne=r,this.#Qe=this.#Je(),this.size=this.#Qe.mode===Q.percent?{width:this.#Qe.width/s*this.#u.canvas.size.width,height:this.#Qe.height/s*this.#u.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#qe=this.options.life.count??-1,this.#je=this.#qe<=0,this.options.domId){const t=Z().getElementById(this.options.domId);t&&(this.#K=new MutationObserver(()=>{this.resize()}),this.#ut=new ResizeObserver(()=>{this.resize()}),this.#K.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#ut.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#Ye=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#De=!0,this.pause()}externalPlay(){this.#De=!1,this.play()}async init(){await(this.#Ye?.init())}pause(){this.#De||(this.#We=void 0)}play(){if(this.#De)return;if(!(this.#qe>0||this.#je)&&this.options.life.count||!(this.#Ge||this.#$e>=(this.#Ke??0)))return;const t=this.#u;if(void 0===this.#We){const e=U(this.options.rate.delay);this.#We=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#qe>0||this.#je)&&this.#ti()}resize(){const t=this.#He,e=this.#u;this.position=t&&et(t,e.canvas.size,z.origin)?t:this.#Ot(),this.#Qe=this.#Je(),this.size=this.#Qe.mode===Q.percent?{width:this.#Qe.width/s*e.canvas.size.width,height:this.#Qe.height/s*e.canvas.size.height}:{width:this.#Qe.width,height:this.#Qe.height},this.#Ye?.resize(this.position,this.size)}update(t){if(this.#De)return;const e=this.#u;this.#Ge&&(this.#Ge=!1,this.#$e=this.#Ke??0,this.#Ve=this.#We??0),this.#Ze||(this.#Ze=!0,this.#ei(this.options.startCount)),void 0!==this.#xe&&(this.#Ue+=t.value,this.#Ue>=this.#xe&&(this.pause(),void 0!==this.#Ke&&(this.#Ke=void 0),this.#je||this.#qe--,this.#qe>0||this.#je?(this.position=this.#Ot(),this.#Ye?.resize(this.position,this.size),this.#Ke=e.retina.reduceFactor?U(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#ii(),this.#Ue-=this.#xe,this.#xe=void 0)),void 0!==this.#Ke&&(this.#$e+=t.value,this.#$e>=this.#Ke&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#$e-=this.#Ke,this.#Ke=void 0)),void 0!==this.#We&&(this.#Ve+=t.value,this.#Ve>=this.#We&&(this.#si(),this.#Ve-=this.#We))}#Ot(){const t=this.#u;if(this.options.domId){const e=Z().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return q({size:t.canvas.size,position:this.options.position})}#Je(){const t=this.#u;if(this.options.domId){const e=Z().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Q.precise}}}return this.options.size??(()=>{const t=new Fi;return t.load({height:0,mode:Q.percent,width:0}),t})()}#ii(){this.#K?.disconnect(),this.#K=void 0,this.#ut?.disconnect(),this.#ut=void 0,this.#Xe(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#si(){if(this.#De)return;const t=U(this.options.rate.quantity);this.#ei(t)}#ei(t){const e=at(this.#Ne)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:U(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:U(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:U(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#Ye,u=c||h,p=u||d,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?st({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#ni(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#ni(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#ni(i.l,this.spawnFillColor.l,f.l)),Ps(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#ni(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#ni(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#ni(a.l,this.spawnStrokeColor.l,f.l)),bs(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ye){const e=this.#Ye.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Ps(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ti(){if(this.#De)return;const t=void 0!==this.options.life.duration?U(this.options.life.duration):void 0;(this.#qe>0||this.#je)&&void 0!==t&&t>0&&(this.#xe=t*a)}#ni(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=A(t.offset),r=U(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+U(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFountainPreset=Ni,t.tsParticles=Le}),Object.assign(globalThis.window||globalThis,{loadFountainPreset:(globalThis.__tsParticlesInternals.presets.fountain||{}).loadFountainPreset}),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.fountain=t.__tsParticlesInternals.presets.fountain||{}))}(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,P=.25,b=400;var x;function M(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"}(x||(x={}));class z{x;y;z;constructor(t=o.x,e=o.y,i=o.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(o.x,o.y,o.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??o.y,i??o.z):new z(t.x,t.y,M(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends z{constructor(t=o.x,e=o.y){super(t,e,o.z)}static get origin(){return C.create(o.x,o.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??o.y):new C(t.x,t.y)}}function k(t){return"boolean"==typeof t}function S(t){return"string"==typeof t}function O(t){return"number"==typeof t}function I(t){return"object"==typeof t&&null!==t}function D(t){return Array.isArray(t)}function _(t){return null==t}const E=Math.PI/180;let L=Math.random;const R=t=>requestAnimationFrame(t),F=t=>{cancelAnimationFrame(t)};function T(){return A(L(),0,1-Number.EPSILON)}function B(t,e){return T()*(e-t)+t}function A(t,e,i){return Math.min(Math.max(t,e),i)}function U(t){const e=H(t);let i=V(t);return e===i&&(i=0),B(i,e)}function $(t){return O(t)?t:U(t)}function V(t){return O(t)?t:t.min}function H(t){return O(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&O(t))return t;const i=V(t),s=H(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function G(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function j(t){return t*E}function q(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return function(t){return{x:(t.position?.x??T()*s)*t.size.width/s,y:(t.position?.y??T()*s)*t.size.height/s}}({size:t.size,position:e})}function X(t){const{position:e,size:i}=t;return{x:e?.x??T()*i.width,y:e?.y??T()*i.height}}function Y(t){return t?t.endsWith("%")?parseFloat(t)/s:parseFloat(t):1}var Q,K;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(Q||(Q={})),function(t){t.precise="precise",t.percent="percent"}(K||(K={}));function Z(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function J(){return globalThis.document}function tt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function et(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(T()*t.length)]}function it(t,e,i,s,n){return function(t,e,i,s){let n=!0;s&&s!==Q.bottom||(n=t.top<e.height+i.x);!n||s&&s!==Q.left||(n=t.right>i.x);!n||s&&s!==Q.right||(n=t.left<e.width+i.y);!n||s&&s!==Q.top||(n=t.bottom>i.y);return n}(st(t,s??0),e,i,n)}function st(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function nt(t,...e){for(const i of e){if(_(i))continue;if(!I(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):I(t)&&!Array.isArray(t)||(t=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(Z(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(Z(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>nt(void 0,t)):nt(e[s],n)}}return t}function at(t,e){return D(t)?t.map((t,i)=>e(t,i)):e(t,0)}function ot(t,e,i){return D(t)?et(t,e,i):t}function rt(t,e){return function(t,e){if(t.mode!==K.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 lt,ct;function ht(t,e,i,s,n){if(s){let s={passive:!0};k(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 dt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class ut{#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 pt;!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"}(pt||(pt={}));class ft{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#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(pt.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 dt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return dt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return 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 gt=t=>(...e)=>{t(...e)},mt={debug:gt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:gt(console.info),log:gt(console.log),trace:gt(console.trace),verbose:gt(console.log),warning:gt(console.warn)};function yt(){return mt}const vt="100%";class wt{pluginManager=new ft(this);#h=[];#d=new ut;#o=!1;get items(){return this.#h}get version(){return"4.4.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 ws}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*T()).toString()}`,{index:a,url:o}=t,r=o?await async function(t){const e=ot(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(yt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:o,index:a}):t.options,l=ot(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=J();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=vt,s.style.height||=vt,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||=vt,s.style.height||=vt,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=J();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 Pt,bt,xt,Mt,zt,Ct,kt,St,Ot,It,Dt,_t,Et;!function(t){t.circle="circle",t.rectangle="rectangle"}(Pt||(Pt={}));class Lt{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 Rt extends Lt{radius;constructor(t,e,i){super(t,e,Pt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,G(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 Rt||t.type===Pt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ft||t.type===Pt.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 Ft extends Lt{size;constructor(t,e,i,s){super(t,e,Pt.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 Rt)return t.intersects(this);if(!(t instanceof Ft))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"}(bt||(bt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(xt||(xt={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(Mt||(Mt={})),function(t){t.delete="delete",t.wait="wait"}(zt||(zt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Ct||(Ct={})),function(t){t.darken="darken",t.enlighten="enlighten"}(kt||(kt={})),function(t){t.none="none",t.max="max",t.min="min"}(St||(St={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ot||(Ot={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(It||(It={})),function(t){t.max="max",t.min="min",t.random="random"}(Dt||(Dt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(_t||(_t={})),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"}(Et||(Et={}));class Tt{load(t){_(t)||this.doLoad(t)}}function Bt(t,...e){for(const i of e)t.load(i)}function At(t,e,i){void 0!==i&&(t[e]=i)}function Ut(t,e,i){void 0!==i&&(t[e]=N(i))}function $t(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Vt(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 Ht extends Tt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ut(this,"count",t.count),At(this,"enable",t.enable),Ut(this,"speed",t.speed),Ut(this,"decay",t.decay),Ut(this,"delay",t.delay),At(this,"sync",t.sync)}}class Nt extends Ht{mode=xt.auto;startValue=Dt.random;doLoad(t){super.doLoad(t),At(this,"mode",t.mode),At(this,"startValue",t.startValue)}}class Wt extends Ht{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),At(this,"max",t.max),At(this,"min",t.min),Ut(this,"offset",t.offset)}}class Gt extends Tt{h=new Wt(0,y);l=new Wt(0,w);s=new Wt(0,v);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class jt extends Tt{value="";static create(t,e){const i=new jt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){_(t.value)||(this.value=t.value)}}class qt extends jt{animation=new Gt;static create(t,e){const i=new qt;return i.load(t),void 0!==e&&(S(e)||D(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Xt extends Tt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new jt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=jt.create(this.color,t.color)),At(this,"element",t.element),At(this,"draw",t.draw),At(this,"image",t.image),At(this,"position",t.position),At(this,"repeat",t.repeat),At(this,"size",t.size),At(this,"opacity",t.opacity)}}class Yt extends Tt{enable=!0;zIndex=0;doLoad(t){At(this,"enable",t.enable),At(this,"zIndex",t.zIndex)}}class Qt extends Tt{enable=!0;mode=Mt.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!k(t.enable))throw new Error(`Invalid HDR "enable" value: expected a boolean, got "${String(t.enable)}"`);if(void 0!==t.mode&&("string"!=typeof t.mode||!Object.values(Mt).includes(t.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(Mt).join(", ")}, got "${e=t.mode,String(e)}"`);var e;if(void 0!==t.peakNits&&(!O(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(t.peakNits)}"`);At(this,"enable",t.enable),At(this,"mode",t.mode),At(this,"peakNits",t.peakNits)}}class Kt extends Tt{delay=.5;enable=!0;doLoad(t){At(this,"delay",t.delay),At(this,"enable",t.enable)}}class Zt extends Tt{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]=nt(this.options[t]??{},i))}At(this,"close",t.close),At(this,"type",t.type)}}class Jt extends Tt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),At(this,"enable",t.enable),Ut(this,"opacity",t.opacity)}}class te extends Tt{offset=0;value=90;doLoad(t){Ut(this,"offset",t.offset),Ut(this,"value",t.value)}}class ee extends Tt{mode=K.percent;radius=0;x=50;y=50;doLoad(t){At(this,"x",t.x),At(this,"y",t.y),At(this,"mode",t.mode),At(this,"radius",t.radius)}}class ie extends Tt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ut(this,"acceleration",t.acceleration),At(this,"enable",t.enable),At(this,"inverse",t.inverse),Ut(this,"maxSpeed",t.maxSpeed)}}class se extends Tt{value=0;doLoad(t){_(t.value)||(this.value=N(t.value))}}class ne extends se{animation=new Ht;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ae extends ne{animation=new Nt}class oe extends Tt{clamp=!0;delay=new se;enable=!1;generator;options={};doLoad(t){At(this,"clamp",t.clamp),this.delay.load(t.delay),At(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=nt(this.options,t.options))}}class re extends Tt{bottom;default=Ct.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 le extends Tt{acceleration=0;enable=!1;position;doLoad(t){Ut(this,"acceleration",t.acceleration),At(this,"enable",t.enable),t.position&&(this.position=nt({},t.position))}}class ce extends Tt{angle=new te;center=new ee;decay=0;direction=x.none;distance={};drift=0;enable=!1;gravity=new ie;outModes=new re;path=new oe;random=!1;size=!1;speed=2;spin=new le;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(O(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ut(this,"decay",t.decay),At(this,"direction",t.direction),void 0!==t.distance&&(this.distance=O(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ut(this,"drift",t.drift),At(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),At(this,"random",t.random),At(this,"size",t.size),Ut(this,"speed",t.speed),this.spin.load(t.spin),At(this,"straight",t.straight),At(this,"vibrate",t.vibrate),At(this,"warp",t.warp)}}class he extends Tt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),Ut(this,"width",t.width),Ut(this,"opacity",t.opacity)}}class de extends Tt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),$t(this,"fill",t.fill,()=>new Jt),$t(this,"stroke",t.stroke,()=>new he)}}class ue extends se{value=1}class pe extends Tt{horizontal=new ue;vertical=new ue;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class fe extends Tt{enable=!1;height=1080;width=1920;doLoad(t){At(this,"enable",t.enable),At(this,"width",t.width),At(this,"height",t.height)}}class ge extends Tt{mode=zt.delete;value=0;doLoad(t){At(this,"mode",t.mode),At(this,"value",t.value)}}class me extends Tt{density=new fe;limit=new ge;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),At(this,"value",t.value)}}class ye extends Tt{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]=nt(this.options[t]??{},i))}At(this,"close",t.close),At(this,"type",t.type)}}class ve extends se{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),At(this,"opacityRate",t.opacityRate),At(this,"sizeRate",t.sizeRate),At(this,"velocityRate",t.velocityRate)}}class we extends Tt{bounce=new pe;effect=new Zt;groups={};move=new ce;number=new me;paint;palette;reduceDuplicates=!1;shape=new ye;zIndex=new ve;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new de,this.paint.color=new qt,this.paint.color.value="#fff",this.paint.fill=new Jt,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]=nt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(D(e)?this.paint=at(e,t=>{const e=new de;return e.load(t),e}):D(this.paint)?(this.paint=new de,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(D(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function Pe(t,e,...i){const s=new we(t,e);return Bt(s,...i),s}class be extends Tt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr;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 Xt,this.fullScreen=new Yt,this.hdr=new Qt,this.particles=Pe(this.#p,this.#u),this.resize=new Kt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,at(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),At(this,"autoPlay",t.autoPlay),At(this,"clear",t.clear),At(this,"key",t.key),At(this,"name",t.name),Ut(this,"delay",t.delay),At(this,"detectRetina",t.detectRetina),Ut(this,"duration",t.duration),At(this,"fpsLimit",t.fpsLimit);const e=t.hdr;k(e)?(this.hdr.enable=e,this.hdr.mode=Mt.standard,this.hdr.peakNits=400):this.hdr.load(e),At(this,"pauseOnBlur",t.pauseOnBlur),At(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),At(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;k(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=nt(this.style,t.style),At(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 xe=new Map,Me=1.15,ze=1.05,Ce=.2126,ke=.7152,Se=.0722;function Oe(t,e){let i=xe.get(t);return i||(i=e(),xe.size>2e3&&xe.clear(),xe.set(t,i)),i}function Ie(t){return A(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function De(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return _e(t,n.value,i,s);if(D(n.value)){const e=et(n.value,i,s);if(!e)return;return De(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function _e(t,e,i,s=!0){if(!e)return;const n=S(e)?{value:e}:e;if(S(n.value))return n.value===d?function(){const t=0,e=256,i=()=>Math.floor(B(t,e));return{b:i(),g:i(),r:i()}}():function(t,e){return function(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}(t,e)}(t,n.value);if(D(n.value)){const e=et(n.value,i,s);if(!e)return;return _e(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ee(t,e,i,s=!0){const a=De(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 Le(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 Re(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*Le(c,l,a+h)),u=Math.min(m,m*Le(c,l,a)),p=Math.min(m,m*Le(c,l,a-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Fe(t,e,i,s,n){const a=e?4:2,o=i??1;return Oe(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${o.toString()}-${(s??400).toString()}-${n??Mt.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${o.toString()}`,()=>e?function(t,e,i=400,s=Mt.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/m,a=t.g/m,o=t.b/m;if(s!==Mt.natural&&s!==Mt.vivid&&s!==Mt.cinematic&&s!==Mt.dynamic)return{b:o,g:a,r:n};const r=Math.max(1,e),l=Ce*n+ke*a+Se*o,c=function(t,e,i){if(t<=i)return Ie(t);const s=t+(t-i)*(e-1);return Ie(s)}(l,e,i),h=l>0?c/l:1;return function(t,e,i,s,n){switch(s){case Mt.vivid:{const s=(t+e+i)/3;return{b:A(A(s+(i-s)*Me,0,n)*ze,0,n),g:A(A(s+(e-s)*Me,0,n)*ze,0,n),r:A(A(s+(t-s)*Me,0,n)*ze,0,n)}}case Mt.cinematic:{const s=1.05*t,a=.95*i,o=(s+e+a)/3;return{b:A(o+1.1*(a-o),0,n),g:A(o+1.1*(e-o),0,n),r:A(o+1.1*(s-o),0,n)}}case Mt.dynamic:{const s=Ce*t+ke*e+Se*i,a=Math.min(1,2*s),o=1-a,r=(t+e+i)/3,l=A(r+(t-r)*Me,0,n)*ze,c=A(r+(e-r)*Me,0,n)*ze,h=A(r+(i-r)*Me,0,n)*ze;return{b:A(i*o+h*a,0,n),g:A(e*o+c*a,0,n),r:A(t*o+l*a,0,n)}}case Mt.standard:case Mt.natural:default:return{b:i,g:e,r:t}}}(A(n*h,0,r),A(a*h,0,r),A(o*h,0,r),s,r)}(t,n,.18,s);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(e??1).toString()})`}(t,i,s,n):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function Te(t,e,i,s,a){const o=e?4:2,r=i??1;return Oe(e?`hsl-${t.h.toFixed(o)}-${t.s.toFixed(o)}-${t.l.toFixed(o)}-hdr-${r.toString()}-${(s??b).toString()}-${a??Mt.standard}`:`hsl-${t.h.toFixed(o)}-${t.s.toFixed(o)}-${t.l.toFixed(o)}-sdr-${r.toString()}`,()=>e?Fe(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*Le(c,l,a+h)),g:Math.min(m,m*Le(c,l,a)),b:Math.min(m,m*Le(c,l,a-h))}}(t),!0,i,s,a):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${r.toString()})`)}function Be(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Ae(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&&(Ue(s.h,e.h,i),Ue(s.s,e.s,i),Ue(s.l,e.l,i)),s}function Ue(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=$(e.speed)/s*i,t.decay=1-$(e.decay),t.status=_t.increasing,t.loops=0,t.maxLoops=$(e.count),t.time=0,t.delayTime=$(e.delay)*a,e.sync||(t.velocity*=T(),t.value*=T()),t.initialValue=t.value,t.offset=N(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?U(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,o=t.decay??1,r=t.max,l=t.min;e&&t.status!==_t.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=_t.increasing)):(t.value+=a,t.value>r&&(t.loops??=0,t.loops++,e?t.status=_t.decreasing:t.value-=r)),t.velocity&&1!==o&&(t.velocity*=o),t.value=A(t.value,l,r)}function Ve(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;$e(s,!1,e),$e(n,!0,e),$e(a,!0,e)}const He=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new wt}();class Ne{enable=!1;mode="destination-out";load(t){_(t)||(At(this,"mode",t.mode),At(this,"enable",t.enable))}}class We{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Ps});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 Ne),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Ne,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ge(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new We)})}class je{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 qe(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new je))})}var Xe;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Xe||(Xe={}));const Ye=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Qe=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ke{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(Ye,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Qe.exec(e);return i?{a:i[Xe.a]?Number.parseInt(i[Xe.a],16)/255:1,b:Number.parseInt(i[Xe.b]??"0",16),g:Number.parseInt(i[Xe.g]??"0",16),r:Number.parseInt(i[Xe.r]??"0",16)}:void 0}}async function Ze(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ke)})}var Je;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Je||(Je={}));const ti=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class ei{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 Re(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Re({h:$(e.h),l:$(e.l),s:$(e.s)})}parseString(t){if(!this.accepts(t))return;const e=ti.exec(t);return e?function(t){const e=Re(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?Y(e[Je.a]):1,h:Number.parseInt(e[Je.h]??"0",10),l:Number.parseInt(e[Je.l]??"0",10),s:Number.parseInt(e[Je.s]??"0",10)}):void 0}}async function ii(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new ei)})}class si{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ms});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function ni(t){t.checkVersion("4.4.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,dt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new si(t.pluginManager))})}function ai(t,e){const i=t.value,s=t.animation,o={delayTime:$(s.delay)*a,enable:s.enable,value:$(t.value)*e,max:H(i)*e,min:V(i)*e,loops:0,maxLoops:$(s.count),time:0};if(s.enable){switch(o.decay=1-$(s.decay),s.mode){case xt.increase:o.status=_t.increasing;break;case xt.decrease:o.status=_t.decreasing;break;case xt.random:o.status=T()>=n?_t.increasing:_t.decreasing}const t=s.mode===xt.auto;switch(s.startValue){case Dt.min:o.value=o.min,t&&(o.status=_t.increasing);break;case Dt.max:o.value=o.max,t&&(o.status=_t.decreasing);break;case Dt.random:default:o.value=U(o),t&&(o.status=T()>=n?_t.increasing:_t.decreasing)}}return o.initialValue=o.value,o}function oi(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 _t.increasing:e.value+=a;break;case _t.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case _t.increasing:e.value>=r&&(e.status=_t.decreasing,e.loops??=0,e.loops++);break;case _t.decreasing:e.value<=o&&(e.status=_t.increasing,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case St.max:i>=n&&t.destroy();break;case St.min:i<=s&&t.destroy()}}(t,s,e.value,o,r),t.destroyed||(e.value=A(e.value,o,r))}}class ri extends Nt{destroy=St.none;load(t){super.load(t),_(t)||At(this,"destroy",t.destroy)}}class li extends ae{animation=new ri;value=1;load(t){if(_(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class ci{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=ai(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=$(i.speed)/s*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){Vt(t,"opacity",li,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&oi(t,t.opacity,0,t.options.opacity.animation.destroy,e)}}async function hi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new ci(t)))})}class di{modes;#u;#y;constructor(t){this.#u=t,this.modes=[Ct.bounce,Ct.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=st(o,l),h=n.canvas.size,d=!t.isInsideCanvasForOutMode(s,e);!function(t){if(t.outMode!==Ct.bounce&&t.outMode!==Ct.split||t.direction!==Q.left&&t.direction!==Q.right)return;t.bounds.right<0&&t.direction===Q.left?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&t.direction===Q.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===Q.right&&e>0||t.direction===Q.left&&e<0)){const e=$(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===Q.right?t.particle.position.x=t.canvasSize.width-s:t.outOfCanvas&&t.direction===Q.left&&(t.particle.position.x=s),t.outMode===Ct.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!==Ct.bounce&&t.outMode!==Ct.split||t.direction!==Q.bottom&&t.direction!==Q.top)return;t.bounds.bottom<0&&t.direction===Q.top?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&t.direction===Q.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===Q.bottom&&e>0||t.direction===Q.top&&e<0)){const e=$(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===Q.bottom?t.particle.position.y=t.canvasSize.height-s:t.outOfCanvas&&t.direction===Q.top&&(t.particle.position.y=s),t.outMode===Ct.split&&t.particle.destroy()}({particle:t,outMode:s,direction:e,bounds:c,canvasSize:h,offset:r,outOfCanvas:d,size:l})}}class ui{modes;constructor(t){this.modes=[Ct.destroy]}update(t,e,i,s){if(this.modes.includes(s)){switch(t.outType){case It.normal:case It.outside:if(t.isInsideCanvasForOutMode(s,e))return;break;case It.inside:{const{dx:e,dy:i}=W(t.position,t.moveCenter),{x:s,y:n}=t.velocity;if(s<0&&e>t.moveCenter.radius||n<0&&i>t.moveCenter.radius||s>=0&&e<-t.moveCenter.radius||n>=0&&i<-t.moveCenter.radius)return;break}}t.destroy(!0)}}}class pi{modes;#u;constructor(t){this.#u=t,this.modes=[Ct.none]}update(t,e,i,s){if(!this.modes.includes(s))return;if((t.options.move.distance.horizontal&&(e===Q.left||e===Q.right))??(t.options.move.distance.vertical&&(e===Q.top||e===Q.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===Q.bottom||n.inverse&&i.y<-l&&e===Q.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;it(t.position,a.canvas.size,o,l,e)||t.destroy()}}}const fi=C.origin;class gi{modes;#u;constructor(t){this.#u=t,this.modes=[Ct.out]}update(t,e,i,s){if(!this.modes.includes(s))return;const n=this.#u;switch(t.outType){case It.inside:{const{x:e,y:i}=t.velocity;fi.setTo(o),fi.length=t.moveCenter.radius,fi.angle=t.velocity.angle+Math.PI,fi.addTo(t.moveCenter);const{dx:s,dy:a}=W(t.position,fi);if(e<=0&&s>=0||i<=0&&a>=0||e>=0&&s<=0||i>=0&&a<=0)return;t.position.x=Math.floor(U({min:0,max:n.canvas.size.width})),t.position.y=Math.floor(U({min:0,max:n.canvas.size.height}));const{dx:r,dy:l}=W(t.position,t.moveCenter);t.direction=Math.atan2(-l,-r),t.velocity.angle=t.direction,t.justWarped=!0;break}default:if(t.isInsideCanvasForOutMode(s,e))return;switch(t.outType){case It.outside:{t.position.x=Math.floor(U({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(U({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=W(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0;break}case It.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=st(t.position,o);e===Q.right&&r.left>s.width+t.offset.x?(t.position.x=a.left,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0):e===Q.left&&r.right<-t.offset.x&&(t.position.x=a.right,t.initialPosition.x=t.position.x,i||(t.position.y=T()*s.height,t.initialPosition.y=t.position.y),t.justWarped=!0),e===Q.bottom&&r.top>s.height+t.offset.y?(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.top,t.initialPosition.y=t.position.y,t.justWarped=!0):e===Q.top&&r.bottom<-t.offset.y&&(i||(t.position.x=T()*s.width,t.initialPosition.x=t.position.x),t.position.y=a.bottom,t.initialPosition.y=t.position.y,t.justWarped=!0);break}}}}}class mi{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(t){this.#v(t,Ct.bounce,t=>new di(t)),this.#v(t,Ct.out,t=>new gi(t)),this.#v(t,Ct.destroy,t=>new ui(t)),this.#v(t,Ct.none,t=>new pi(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,Q.bottom),this.#w(t,e,i.left??i.default,Q.left),this.#w(t,e,i.right??i.default,Q.right),this.#w(t,e,i.top??i.default,Q.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 yi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new mi(t)))})}class vi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=ot(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,o=s?.fill,r=s?.stroke;if(o){const i=qt.create(void 0===a?void 0:qt.create(void 0,a),o.color);t.fillEnabled=o.enable,t.fillOpacity=$(o.opacity),t.fillAnimation=i.animation;const s=Ee(this.#p,i);s&&(t.fillColor=Ae(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=qt.create(void 0===a?void 0:qt.create(void 0,a),r.color);t.strokeWidth=$(r.width)*e.retina.pixelRatio,t.strokeOpacity=$(r.opacity??1),t.strokeAnimation=i.animation;const s=Ee(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Ae(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)&&(Ve(t.fillColor,e,this.#u.hdr),Ve(t.strokeColor,e,this.#u.hdr))}}async function wi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new vi(t.pluginManager,e)))})}var Pi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Pi||(Pi={}));const bi=/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 xi{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:$(e.r),g:$(e.g),b:$(e.b)}}parseString(t){if(!this.accepts(t))return;const e=bi.exec(t);return e?{a:e.length>4?Y(e[Pi.a]):1,b:parseInt(e[Pi.b]??"0",10),g:parseInt(e[Pi.g]??"0",10),r:parseInt(e[Pi.r]??"0",10)}:void 0}}async function Mi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new xi)})}class zi extends Nt{destroy=St.none;load(t){super.load(t),_(t)||At(this,"destroy",t.destroy)}}class Ci extends ae{animation=new zi;value=3;load(t){if(super.load(t),_(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ki{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const n=i.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/s*e.retina.reduceFactor,n.sync||(t.size.velocity*=T()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){Vt(t,"size",Ci,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=ai(i,e),t.retina.sizeAnimationSpeed=$(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&oi(t,t.size,0,t.options.size.animation.destroy,e)}}async function Si(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ki(t)))})}async function Oi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{await Promise.all([Ge(t),Ze(t),ii(t),Mi(t),ni(t),qe(t),wi(t),hi(t),yi(t),Si(t)])})}class Ii{bottom;left;right;top;load(t){_(t)||(Ut(this,"bottom",t.bottom),Ut(this,"left",t.left),Ut(this,"right",t.right),Ut(this,"top",t.top))}}var Di;!function(t){t.explode="explode",t.none="none",t.split="split"}(Di||(Di={}));class _i{maxSizeFactor=3;speed=2;load(t){_(t)||(At(this,"maxSizeFactor",t.maxSizeFactor),At(this,"speed",t.speed))}}class Ei extends se{value=3}class Li extends se{value={min:4,max:9}}class Ri{count=1;factor=new Ei;fillColor;fillColorOffset;particles;rate=new Li;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){_(t)||(void 0!==t.fillColor&&(this.fillColor=jt.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=jt.create(this.strokeColor,t.strokeColor)),At(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=at(t.particles,t=>nt({},t)),At(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class Fi{bounds=new Ii;explode=new _i;mode=Di.none;split=new Ri;load(t){_(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function Ti(t,e,i,s){return t&&s?function(t,e){const i=$(e.h??0),s=$(e.s??0),n=$(e.l??0),a=(t.h+i)%360,o=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return qt.create(void 0,{value:{hsl:{h:a<0?a+360:a,s:o,l:r}}})}(s,t):e?qt.create(void 0,e):i?qt.create(void 0,i):s?function(t){return qt.create(void 0,{value:{hsl:t}})}(s):void 0}function Bi(t,e,i,s){const n=i.options.destroy;if(!n)return;const a=n.split,o=Pe(t,e,i.options),r=ot(a.fillColor),l=ot(a.strokeColor),c=i.getFillColor(),h=i.getStrokeColor();o.move.load({center:{x:i.position.x,y:i.position.y,mode:K.precise}});const d=1/$(a.factor.value),u=o.size;u&&(O(u.value)?u.value*=d:(u.value.min*=d,u.value.max*=d)),o.load(s);const p=ot(o.paint),f=p?.fill,g=p?.stroke,m=Ti(a.fillColorOffset,r,f?.color,c),y=Ti(a.strokeColorOffset,l,g?.color,h);m&&f&&(f.color=m),y&&g&&(g.color=y);const v=a.sizeOffset?N(-i.size.value,i.size.value):0,w={x:i.position.x+U(v),y:i.position.y+U(v)};return e.particles.addParticle(w,o,i.group,t=>!(t.size.value<.5)&&(t.velocity.length=U(N(i.velocity.length,t.velocity.length)),t.splitCount=(i.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class Ai{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const n=i.bounds;t.destroyBounds??={};const{bottom:a,left:o,right:r,top:l}=n,{destroyBounds:c}=t,h=e.canvas.size;a&&(c.bottom=$(a)*h.height/s),o&&(c.left=$(o)*h.width/s),r&&(c.right=$(r)*h.width/s),l&&(c.top=$(l)*h.height/s)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){Vt(t,"destroy",Fi,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case Di.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const a=$(n.rate.value),o=ot(n.particles);for(let s=0;s<a;s++)Bi(t,e,i,o)}(this.#p,this.#u,t);break;case Di.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,a=t.getOpacity();t.exploding={initialFillOpacity:a.fillOpacity,initialSize:s,initialStrokeOpacity:a.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=a.fillOpacity,t.strokeOpacity=a.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function Ui(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new Ai(t.pluginManager,e)))})}class $i{count;delay;duration;wait=!1;load(t){_(t)||(At(this,"count",t.count),Ut(this,"delay",t.delay),Ut(this,"duration",t.duration),At(this,"wait",t.wait))}}class Vi{delay=.1;quantity=1;load(t){_(t)||(Ut(this,"quantity",t.quantity),Ut(this,"delay",t.delay))}}class Hi{color=!1;opacity=!1;load(t){_(t)||(At(this,"color",t.color),At(this,"opacity",t.opacity))}}class Ni{options={};replace=new Hi;type="square";load(t){_(t)||(void 0!==t.options&&(this.options=nt({},t.options??{})),this.replace.load(t.replace),At(this,"type",t.type))}}class Wi{height=0;mode=K.percent;width=0;load(t){_(t)||(At(this,"mode",t.mode),At(this,"height",t.height),At(this,"width",t.width))}}class Gi{fill;stroke;load(t){_(t)||(t.fill&&(this.fill??=new Jt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new he,this.stroke.load(t.stroke)))}}class ji{autoPlay=!0;direction;domId;fill=!0;life=new $i;name;particles;position;rate=new Vi;shape=new Ni;size;spawn=new Gi;spawnFillColor;spawnStrokeColor;startCount=0;load(t){_(t)||(At(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Wi,this.size.load(t.size)),At(this,"direction",t.direction),At(this,"domId",t.domId),At(this,"fill",t.fill),this.life.load(t.life),At(this,"name",t.name),this.particles=at(t.particles,t=>nt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=N(t.position.x)),void 0!==t.position.y&&(this.position.y=N(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new qt,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new qt,this.spawnStrokeColor.load(t.spawnStrokeColor)),At(this,"startCount",t.startCount))}}class qi{id="emitters";#P;constructor(t){this.#P=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return zs});return new e(this.#P,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=at(i.emitters,t=>{const e=new ji;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return D(e)&&!!e.length||void 0!==e}}const Xi=new WeakMap;var Yi;async function Qi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=Xi.get(e);return i||(i=Promise.resolve().then(function(){return Ss}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw Xi.delete(e),t}),Xi.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return ks}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new qi(e))})}!function(t){t.emitter="emitter"}(Yi||(Yi={}));class Ki{color;image;load(t){_(t)||(void 0!==t.color&&(this.color=jt.create(this.color,t.color)),At(this,"image",t.image))}}class Zi{enable=!1;fill=new Ki;length=10;load(t){_(t)||(At(this,"enable",t.enable),void 0!==t.fill&&this.fill.load(t.fill),At(this,"length",t.length))}}class Ji{id="trail";#p;constructor(t){this.#p=t}async getPlugin(t){const{TrailPluginInstance:e}=await Promise.resolve().then(function(){return Os});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.trail;s?.load||(e.trail=s=new Zi),s.load(i?.trail)}needsPlugin(){return!0}}async function ts(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ji(t.pluginManager))})}const es={fpsLimit:120,particles:{bounce:{vertical:{value:{min:.75,max:.85}}},paint:{fill:{color:{value:["#3998D0","#2EB6AF","#A9BD33","#FEC73B","#F89930","#F45623","#D62E32","#EB586E","#9952CF"]},enable:!0}},number:{value:0},destroy:{mode:"split",split:{count:2,factor:{value:{min:1.1,max:2}},rate:{value:{min:2,max:3}}}},opacity:{value:.5},size:{value:{min:10,max:20}},move:{enable:!0,gravity:{enable:!0,maxSpeed:50},speed:{min:10,max:20},direction:x.none,random:!1,straight:!1,outModes:{bottom:Ct.split,default:Ct.bounce,top:Ct.none}}},detectRetina:!0,background:{color:"#fff"},emitters:{direction:x.top,life:{count:0,duration:.15,delay:3},rate:{delay:.1,quantity:5},size:{width:0,height:0}},trail:{enable:!0,fill:{color:"#fff"},length:3}};async function is(t){await t.pluginManager.register(async t=>{await Promise.all([Oi(t),Ui(t),Qi(t),ts(t)]),t.pluginManager.addPreset("fountain",es)})}const ss=globalThis;ss.loadFountainPreset=is,ss.tsParticles=He;function ns(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class as{#b;#x;#M;#z;#C;#u;#k;#S;#O;#I;#D;#_;#p;#E;#L;#R={};#F=[void 0,void 0];#T={};constructor(t,e,i){this.#p=t,this.#u=e,this.#z=i,this.#k=null,this.#b=null,this.#x=new Set,this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#D=[],this.#_={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}clear(){for(const t of this.#M)if(t.canvasClear?.())return;for(const t of Object.values(Et))if("number"==typeof t)for(const e of this.#B(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#b=null,this.#x.clear(),this.#L=[],this.#E=[],this.#M=[],this.#C=[],this.#O=[],this.#I=[],this.#D=[];for(const t of Object.values(Et))"number"==typeof t&&(this.#_[t]=[])}draw(t){const e=this.#k;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.#A(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.#T,f=this.#R,g=a?Te(a,r.hdr,h*d,r.peakNits,r.hdrMode):void 0,m=o?Te(o,r.hdr,u*d,r.peakNits,r.hdrMode):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.#D)i.drawParticleSetup?.(s,t,e);this.#U(s,t,i,d,f,p),this.#$({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#V(t);for(const i of this.#I)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#O)this.#H(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#z.size.width,a=this.#z.size.height;if(this.#b)try{s.drawImage(this.#b,o.x,o.y,n,a)}catch{this.#N("background-element-draw-error","Error drawing background element onto canvas")}const r=i.background;if(r.draw)try{r.draw(s,t)}catch{this.#N("background-draw-error","Error in background.draw callback")}for(const t of this.#B(Et.BackgroundMask))t.canvasPaint?.();for(const e of this.#B(Et.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#B(Et.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#B(Et.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#W(),this.paint()}initPlugins(){this.#M=[],this.#C=[],this.#O=[],this.#D=[],this.#I=[];for(const t of Object.values(Et))"number"==typeof t&&(this.#_[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#C.push(t),t.drawParticle&&this.#O.push(t),t.drawParticleSetup&&this.#D.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#M.push(t),t.canvasPaint&&this.#B(Et.BackgroundMask).push(t),t.drawSettingsSetup&&this.#B(Et.CanvasSetup).push(t),t.draw&&this.#B(Et.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#B(Et.CanvasCleanup).push(t)}initUpdaters(){this.#L=[],this.#E=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#E.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#L.push(t)}paint(){let t=!1;for(const e of this.#B(Et.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.#z.size.width,this.#z.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.#z.size.width,this.#z.size.height),i.globalAlpha=s})}setContext(t){this.#k=t,this.#k&&(this.#k.globalCompositeOperation=i)}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(o.x,o.y,this.#z.size.width,this.#z.size.height)})}#V(t){for(const e of this.#E)e.afterDraw?.(t)}#U(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)ns(a,t,e)}o.beforeDraw?.(e)}}#G(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)}#$(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.#X(v,m),this.#Y(v,m),this.#G(y,m),i.resetTransform()}#H(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#X(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())}#Y(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)}#B(t){return this.#_[t]}#A(t){let e,i;for(const s of this.#C)if(!e&&s.particleFillColor&&(e=Ee(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ee(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#F[0]=e,this.#F[1]=i,this.#F}#W(){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);"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?this.#b=e:e?this.#N("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#N("background-element-not-found",`Background element selector "${t.element}" not found`)}}else("undefined"!=typeof HTMLCanvasElement&&t.element instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t.element instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t.element instanceof HTMLImageElement)&&(this.#b=t.element)}#N(t,e){this.#x.has(t)||(this.#x.add(t),yt().warning(e))}}const os=new WeakMap;function rs(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 ls{domElement;render;renderCanvas;size;zoom=1;#u;#Q;#K;#Z;#J;#p;#tt;#et;#it;#st;constructor(t,e){this.#p=t,this.#u=e,this.render=new as(t,e,this),this.#it={height:0,width:0};const i=e.retina.pixelRatio,s=this.#it;this.size={height:s.height*i,width:s.width*i},this.#Q=!1,this.#et=[],this.#tt="none"}get#nt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#at();this.render.destroy(),this.#et=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#st?this.#st:{x:e*n/t,y:i*n/t}}init(){this.#ot(t=>{t.disconnect()}),this.#Z=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#rt()}),this.resize(),this.#lt(),this.#ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#ct(),this.initBackground(),this.#ht(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=De(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Fe(n,t.hdr,e.opacity,i.peakNits,i.mode)}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#et=[];for(const t of this.#u.plugins)t.resize&&this.#et.push(t)}loadCanvas(t){this.#Q&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#Q=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=os.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 os.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#J=function(t){const e=J().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||_(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#it,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.#it,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.#tt=t,this.#rt())}setZoom(t,e){this.zoom=t,this.#st=e}stop(){this.#ot(t=>{t.disconnect()}),this.#Z=void 0,this.#dt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ut(),e&&await t.refresh()}#ut(){for(const t of this.#et)t.resize?.()}#ct(){const t=this.#u,e=t.actualOptions.hdr.enable&&tt("(color-gamut: p3)")?.matches&&tt("(dynamic-range: high)")?.matches;t.hdr=e??!1,t.hdrMode=t.actualOptions.hdr.mode,t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return;let s;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...e?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{s=i.getContext("2d",this.render.settings)}catch{s=null}if(e&&!s){t.hdr=!1;const e={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(e);try{s=i.getContext("2d",e)}catch{s=null}}this.render.setContext(s)}#ht(){this.#dt();const t=tt("(color-gamut: p3)"),e=tt("(dynamic-range: high)"),i=()=>{this.#pt(),this.#ct(),this.initBackground()},s=[];t&&(t.addEventListener("change",i),s.push({handler:i,mql:t})),e&&(e.addEventListener("change",i),s.push({handler:i,mql:e})),this.#K=s}#lt(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#nt?this.#ft():this.#at();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")}}}#pt(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#dt(){if(this.#K){for(const{handler:t,mql:e}of this.#K)e.removeEventListener("change",t);this.#K=void 0}}#rt(){const t=this.domElement;if(!t)return;this.#ot(t=>{t.disconnect()}),this.#lt(),this.initBackground();const e=this.#tt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#at(){const t=this.domElement,e=this.#J;t&&e&&rs(t,e,!0)}#ot(t){this.#Z&&t(this.#Z)}#ft(){const t=this.domElement;t&&rs(t,function(t){if(lt!==t||!ct){lt=t;const e=J().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)}ct=e}return ct}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class cs{#u;#gt;#mt;#yt;constructor(t){this.#u=t,this.#gt={visibilityChange:()=>{this.#vt()},resize:()=>{this.#wt()}}}addListeners(){this.#Pt(!0)}removeListeners(){this.#Pt(!1)}#vt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(J().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#wt(){this.#yt&&(clearTimeout(this.#yt),this.#yt=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#yt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*a)}#Pt(t){const e=this.#gt;this.#bt(t),ht(document,"visibilitychange",e.visibilityChange,t,!1)}#bt(t){const e=this.#gt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void ht(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#mt&&!t?(s&&this.#mt.unobserve(s),this.#mt.disconnect(),this.#mt=void 0):!this.#mt&&t&&s&&(this.#mt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#wt()}),this.#mt.observe(s))}}function hs(t){if(e=t.outMode,i=t.checkModes,!(e===i||D(i)&&i.includes(e)))return;var e,i;const s=2*t.radius;t.coord>t.maxCoord-s?t.setCb(-t.radius):t.coord<s&&t.setCb(t.radius)}function ds(t,e){const i=t%e;return i<0?i+e:i}function us(t,e,i,s){const n=Pe(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=ot(n.effect.type,t.id,a),t.shape=ot(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=ot(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=ot(e,t.id,a);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===d){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(T()*i.length)]}if(t.shape===d){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(T()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return nt({close:e.close},ot(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 nt({close:e.close},ot(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 ps{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;#xt={fillOpacity:1,opacity:1,strokeOpacity:1};#Mt=z.origin;#zt={sin:0,cos:0};#Ct={a:1,b:0,c:0,d:1};#u;#kt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#kt.push(t),this.#kt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#kt.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(pt.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.#St(this.#Ot(Be(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*n}getModifier(t){return this.#kt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=$(this.opacity?.value??1),s=this.#Ot(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#xt.fillOpacity=n,this.#xt.opacity=s*e,this.#xt.strokeOpacity=a,this.#xt}getPosition(){return this.#Mt.x=this.position.x+this.offset.x,this.#Mt.y=this.position.y+this.offset.y,this.#Mt.z=this.position.z,this.#Mt}getRadius(){return this.#Ot(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#zt.sin=Math.sin(t),this.#zt.cos=Math.cos(t),this.#zt}getStrokeColor(){return this.#St(this.#Ot(Be(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#Ct.a=e.cos*(t.a??r),this.#Ct.b=i?e.sin*(t.b??1):t.b??l,this.#Ct.c=i?-e.sin*(t.c??1):t.c??c,this.#Ct.d=e.cos*(t.d??h),this.#Ct}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=It.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=us(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#It(e),this.initialVelocity=this.#Dt(),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.#_t({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#_t({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=ds(t,u);return e>=Math.PI*n&&e<3*Math.PI*n}if(this.roll.horizontal){const e=ds(t+Math.PI*n,u);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=ds(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.#kt.findIndex(e=>e.id===t);e>=0&&this.#kt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Ot(t,e){let i=t;for(const t of this.#kt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Et(t,e){let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,o=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=X({size:l,position:s}),c=z.create(t.x,t.y,e);this.#Lt(c,r,o.left??o.default),this.#Lt(c,r,o.right??o.default),this.#Rt(c,r,o.top??o.default),this.#Rt(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}}#Dt(){const t=this.options.move,e=function(t){const e=C.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===x.inside||t.direction===x.outside)return e;const i=j($(t.angle.value)),s=j($(t.angle.offset)),a={left:s-i*n,right:s+i*n};return t.straight||(e.angle+=U(N(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=T()),e}#Lt(t,e,i){hs({outMode:i,checkModes:[Ct.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Rt(t,e,i){hs({outMode:i,checkModes:[Ct.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ft(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Ct.bounce;return t===Q.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===Q.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===Q.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===Q.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"}}#Tt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#_t(t){const e=this.#Ft(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.#Tt(t.direction,t.outMode),l=a?this.#Bt(a(r),"shape"):void 0,c=o?this.#Bt(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}#St(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===kt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#It(t){const e=this.#u,i=Math.floor($(this.options.zIndex.value)),s=this.#Et(t,A(i,0,e.zLayers));if(!s)throw new Error("a valid position cannot be found for particle");this.position=s,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...rt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(O(t))return j(t);switch(t){case x.top:return-Math.PI*n;case x.topRight:return-Math.PI*P;case x.right:return 0;case x.bottomRight:return Math.PI*P;case x.bottom:return Math.PI*n;case x.bottomLeft:return.75*Math.PI;case x.left:return Math.PI;case x.topLeft:return.75*-Math.PI;case x.inside:return Math.atan2(i.y-e.y,i.x-e.x);case x.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return T()*u}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case x.inside:this.outType=It.inside;break;case x.outside:this.outType=It.outside}this.offset=C.origin}#Bt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class fs{#At;#Ut=new Map;#$t=[];#Vt;#Ht;#Nt=[];#Wt;constructor(t){this.#At=t,this.#Vt=0,this.#Wt=0}clear(){this.#Ut.clear();const t=this.#Ht;t&&(this.#At=t),this.#Ht=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Gt(e,i);this.#Ut.has(s)||this.#Ut.set(s,[]),this.#Ut.get(s)?.push(t)}query(t,e,i=[]){const s=this.#jt(t);if(!s)return i;const n=Math.floor(s.minX/this.#At),a=Math.floor(s.maxX/this.#At),o=Math.floor(s.minY/this.#At),r=Math.floor(s.maxY/this.#At);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++){const a=`${s}_${n}`,o=this.#Ut.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.#qt(t.x,t.y,e),a=this.query(n,i,s);return this.#Xt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Yt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Xt(),a}setCellSize(t){this.#Ht=t}#qt(t,e,i){return(this.#$t[this.#Vt++]??=new Rt(t,e,i)).reset(t,e,i)}#Yt(t,e,i,s){return(this.#Nt[this.#Wt++]??=new Ft(t,e,i,s)).reset(t,e,i,s)}#Gt(t,e){return`${Math.floor(t/this.#At)}_${Math.floor(e/this.#At)}`}#jt(t){if(t instanceof Rt){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 Ft){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}#Xt(){this.#Vt=0,this.#Wt=0}}class gs{checkParticlePositionPlugins;grid;#Qt;#u;#Kt;#Zt;#Jt;#te;#ee;#ie;#p;#se;#ne;#ae;#oe;#re;#le;constructor(t,e){this.#p=t,this.#u=e,this.#Jt=0,this.#Qt=[],this.#se=[],this.#Zt=0,this.#Kt=new Map,this.#te=new Map,this.#le=this.#ce(this.#u.zLayers),this.grid=new fs(100),this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#ae=[],this.#ne=[],this.#re=[]}get count(){return this.#Qt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Zt:this.#Kt.get(i)??this.#Zt,o=this.count;if(a>0)switch(n){case zt.delete:{const t=o+1-a;t>0&&this.removeQuantity(t);break}case zt.wait:if(o>=a)return}try{const n=this.#se.pop()??new ps(this.#p,this.#u);n.init(this.#Jt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Qt.push(n),this.#he(n),this.#Jt++,this.#u.dispatchEvent(pt.particleAdded,{particle:n}),n):void this.#se.push(n)}catch(t){yt().warning(`error adding particle: ${t}`)}}clear(){this.#Qt=[],this.#te.clear(),this.#de(this.#u.zLayers)}destroy(){this.#Qt=[],this.#se.length=0,this.#te.clear(),this.#le=[],this.checkParticlePositionPlugins=[],this.#ee=[],this.#ie=[],this.#ae=[],this.#ne=[],this.#re=[]}drawParticles(t){for(let e=this.#le.length-1;e>=0;e--){const i=this.#le[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Qt.filter(t)}find(t){return this.#Qt.find(t)}get(t){return this.#Qt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#re=[],this.#ie=[],this.#ae=[],this.#ee=[],this.#ne=[],this.#te.clear(),this.#de(t.zLayers),this.grid=new fs(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#re.push(e),e.particleUpdate&&this.#ie.push(e),e.postUpdate&&this.#ae.push(e),e.particleReset&&this.#ee.push(e),e.postParticleUpdate&&this.#ne.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.#Qt.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.#ue(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=Pe(this.#p,this.#u,s);this.#pe(n,i,t)}this.#pe(t.particles,i)}setResizeFactor(t){this.#oe=t}update(t){this.grid.clear();for(const e of this.#re)e.update?.(t);const e=this.#fe(t);for(const e of this.#ae)e.postUpdate?.(t);if(this.#ge(t,e),e.size)for(const t of e)this.remove(t);this.#oe=void 0}#me(...t){this.#se.push(...t)}#pe(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Zt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Kt.set(i,s?.number.limit.value??n.limit.value));const a=this.#ye(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.#Zt=n.limit.value*a:this.#Kt.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)}#ce(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ve(t){const e=this.#le.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#ye(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}#he(t){const e=this.#ve(t.position.z),i=this.#le[e];i&&(i.push(t),this.#te.set(t.id,e))}#ue(t,e,i){const s=this.#Qt[t];return!!s&&(s.group===e&&(this.#Qt.splice(t,1),this.#we(s),s.destroy(i),this.#u.dispatchEvent(pt.particleRemoved,{particle:s}),this.#me(s),!0))}#we(t){const e=this.#te.get(t.id)??this.#ve(t.position.z),i=this.#le[e];if(!i)return void this.#te.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#te.delete(t.id)}#de(t){const e=Math.max(Math.floor(t),1);if(this.#le.length===e)for(const t of this.#le)t.length=0;else this.#le=this.#ce(e)}#Pe(t){const e=this.#ve(t.position.z),i=this.#te.get(t.id);if(void 0===i)return void this.#he(t);if(i===e)return;const s=this.#le[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#le[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.#te.set(t.id,e)}else this.#te.set(t.id,e)}#fe(t){const e=new Set,i=this.#oe;for(const s of this.#Qt){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.#ee)t.particleReset?.(s);for(const e of this.#ie){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ge(t,e){for(const i of this.#Qt)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.#ne)e.postParticleUpdate?.(i,t);this.#Pe(i)}}}class ms{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=$(s.gravity.maxSpeed)*i,a.moveDrift=$(s.drift)*i,a.moveSpeed=$(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 ys(t){return!t.destroyed}function vs(t,e,...i){const s=new be(t,e);return Bt(s,...i),s}var ws=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;peakNits;plugins;retina;shapeDrawers;started;zLayers;#be;#xe;#Me={value:0,factor:0};#ze;#Ce;#ke;#Se;#Oe;#Ie;#De;#_e;#Ee;#Le;#Re;#p;#Fe;#Te;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#ze=e,this.#Ee=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=Mt.standard,this.peakNits=400,this.#Fe=!1,this.#be=0,this.#ke=0,this.#_e=0,this.#Oe=!0,this.started=!1,this.destroyed=!1,this.#Re=!0,this.#De=0,this.zLayers=100,this.pageHidden=!1,this.#Te=a,this.#Ie=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new ms(this),this.canvas=new ls(this.#p,this),this.particles=new gs(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Le=vs(this.#p,this),this.actualOptions=vs(this.#p,this),this.#Se=new cs(this),this.dispatchEvent(pt.containerBuilt)}get animationStatus(){return!this.#Re&&!this.pageHidden&&ys(this)}get options(){return this.#Le}get sourceOptions(){return this.#Te}addLifeTime(t){this.#_e+=t}alive(){return!this.#ke||this.#_e<=this.#ke}destroy(t=!0){if(ys(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#Ee(t),this.dispatchEvent(pt.containerDestroyed)}}dispatchEvent(t,e){this.#ze(t,{container:this,data:e})}draw(t){if(!ys(this))return;let e=t;this.#Ce=R(t=>{e&&(this.#De=void 0,e=!1),this.#Be(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}yt().error(`Export plugin with type ${t} not found`)}async init(){if(!ys(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.#Le=vs(this.#p,this,this.#Ie,this.sourceOptions),this.actualOptions=vs(this.#p,this,this.#Le),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,smooth:n,zLayers:o}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=r.mode,this.peakNits=r.peakNits,this.zLayers=o,this.#ke=$(i)*a,this.#be=$(e)*a,this.#_e=0,this.fpsLimit=s>0?s:120,this.#Fe=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(pt.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(pt.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(ys(this)&&(void 0!==this.#Ce&&(t=this.#Ce,F(t),this.#Ce=void 0),!this.#Re)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Re=!0),this.dispatchEvent(pt.containerPaused)}}play(t){if(!ys(this))return;const e=this.#Re||t;if(!this.#Oe||this.actualOptions.autoPlay){if(this.#Re&&(this.#Re=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(pt.containerPlay),this.draw(e??!1)}else this.#Oe=!1}async refresh(){if(ys(this))return this.stop(),this.start()}async reset(t){if(ys(this))return this.#Ie=t,this.#Te=t,this.#Le=vs(this.#p,this,this.#Ie,this.sourceOptions),this.actualOptions=vs(this.#p,this,this.#Le),this.refresh()}async start(){ys(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Se.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(pt.containerStarted),this.play(),t()};this.#xe=setTimeout(()=>{e()},this.#be)}))}stop(){if(ys(this)&&this.started){this.#xe&&(clearTimeout(this.#xe),this.#xe=void 0),this.#Oe=!0,this.started=!1,this.#Se.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.#Te=this.#Le,this.dispatchEvent(pt.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Be(t){try{if(!this.#Fe&&void 0!==this.#De&&t<this.#De+a/this.fpsLimit)return void this.draw(!1);if(this.#De??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/a}(this.#Me,t-this.#De,this.fpsLimit,this.#Fe),this.addLifeTime(this.#Me.value),this.#De=t,this.#Me.value>a)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Me),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){yt().error("error in animation loop",t)}}}});var Ps=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=Et.CanvasSetup;#u;#Ae;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.#Ae&&(t.globalCompositeOperation=this.#Ae)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Ae=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function bs(t,e,i,s,n,a,o){!function(t,e){const i=t.options,s=i.move.path;if(!s.enable)return;const n=t.pathDelay??0;if(t.lastPathTime<=n)return void(t.lastPathTime+=e.value);const a=t.pathGenerator?.generate(t,e);a&&t.velocity.addTo(a);s.clamp&&(t.velocity.x=A(t.velocity.x,-1,1),t.velocity.y=A(t.velocity.y,-1,1));t.lastPathTime-=n}(t,o);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*o.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*o.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(a);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}function xs(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(G(l,c))),r=$(i.acceleration);var l,c;e.retina.spinAcceleration=r*t.retina.pixelRatio,e.spin={center:n,direction:e.velocity.x>=0?bt.clockwise:bt.counterClockwise,angle:T()*u,radius:o,acceleration:e.retina.spinAcceleration}}var Ms=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-$(e.decay),t.pathDelay=$(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:$(i.acceleration),inverse:i.inverse},xs(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===bt.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):bs(t,i,h,d,l,o,e),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),a=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&a>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&a>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*n-t.velocity.x),c&&(t.velocity.y=t.velocity.x*n-t.velocity.y);else if((!l||a<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-T()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-T())}}(t)}preInit(){return this.#Ue()}redrawInit(){return this.#Ue()}update(){for(const t of this.pathGenerators.values())t.update()}async#Ue(){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 zs=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#P;constructor(t,e){this.#P=t,this.#u=e,this.#P.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(D(t))for(const e of t)await this.#P.addEmitter(this.#u,e);else await this.#P.addEmitter(this.#u,t)}pause(){for(const t of this.#P.getArray(this.#u))t.pause()}play(){for(const t of this.#P.getArray(this.#u))t.play()}resize(){for(const t of this.#P.getArray(this.#u))t.resize()}stop(){this.#P.clear(this.#u)}update(t){this.#P.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Cs=new Map;var ks=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Cs.set(t,e)}getShapeGenerator(t){return Cs.get(t)}getSupportedShapeGenerators(){return Cs.keys()}}});var Ss=Object.freeze({__proto__:null,EmittersInstancesManager:class{#$e;#p;constructor(t){this.#$e=new Map,this.#p=t}async addEmitter(t,e,i){const s=new ji;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return _s}),a=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await a.init(),this.getArray(t).push(a),a}clear(t){this.initContainer(t),this.#$e.set(t,[])}getArray(t){this.initContainer(t);let e=this.#$e.get(t);return e||(e=[],this.#$e.set(t,e)),e}initContainer(t){this.#$e.has(t)||(this.#$e.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||O(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var Os=Object.freeze({__proto__:null,TrailPluginInstance:class{layer=Et.PluginContent;#u;#p;#Ve;constructor(t,e){this.#u=e,this.#p=t}canvasClear(){const t=this.#u,e=t.actualOptions.trail,i=this.#Ve;if(!e?.enable||!i||e.length<=0)return!1;let s=!1;const n=t.canvas;return i.color?(n.render.paintBase(Fe(i.color,t.hdr,i.opacity,t.peakNits,t.hdrMode)),s=!0):i.image&&(n.render.paintImage(i.image,i.opacity),s=!0),s}async init(){try{await this.#He()}catch(t){yt().error(t)}}async#He(){const t=this.#u.actualOptions.trail;if(!t?.enable)return;const e=t.fill,i=1/t.length;if(e.color){const t=De(this.#p,e.color);if(!t)return;this.#Ve={color:{...t},opacity:i}}else await new Promise((t,s)=>{if(!e.image)return;const n=J().createElement("img");n.addEventListener("load",()=>{this.#Ve={image:n,opacity:i},t()}),n.addEventListener("error",t=>{yt().error(t),s(new Error("Error loading image"))}),n.src=e.image})}}});function Is(t,e,i,s){(t.paint??=new de).fill={color:qt.create(void 0,{value:e}),enable:s,opacity:i}}function Ds(t,e,i,s){(t.paint??=new de).stroke={color:qt.create(void 0,{value:e}),opacity:i,width:s}}var _s=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Ne;#We;#Ge;#ke;#je;#qe;#Xe;#Ye;#Qe;#Z;#Ke;#Re;#p;#Ze;#mt;#Je;#ti;#ei;#ii;constructor(t,e,i,n,o){this.#p=t,this.#u=e,this.#Ze=i,this.#Ne=0,this.#We=0,this.#Ge=0,this.#Ye=o,n instanceof ji?this.options=n:(this.options=new ji,this.options.load(n)),this.#ei=e.retina.reduceFactor?$(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0,this.position=this.#Ye??this.#Et(),this.name=this.options.name,this.fill=this.options.fill,this.#qe=!this.options.life.wait,this.#ii=!1;const r=nt({},this.options.particles);if(r.move??={},r.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ee(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ee(this.#p,this.options.spawn.stroke.color)),this.#Re=!this.options.autoPlay,this.#Ke=r,this.#ti=this.#si(),this.size=this.#ti.mode===K.percent?{width:this.#ti.width/s*this.#u.canvas.size.width,height:this.#ti.height/s*this.#u.canvas.size.height}:{width:this.#ti.width,height:this.#ti.height},this.#Qe=this.options.life.count??-1,this.#Xe=this.#Qe<=0,this.options.domId){const t=J().getElementById(this.options.domId);t&&(this.#Z=new MutationObserver(()=>{this.resize()}),this.#mt=new ResizeObserver(()=>{this.resize()}),this.#Z.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#mt.observe(t))}const l=this.options.shape,c=this.#p.emitterShapeManager?.getShapeGenerator(l.type);c&&(this.#Je=c.generate(this.#u,this.position,this.size,this.fill,l.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Re=!0,this.pause()}externalPlay(){this.#Re=!1,this.play()}async init(){await(this.#Je?.init())}pause(){this.#Re||(this.#je=void 0)}play(){if(this.#Re)return;if(!(this.#Qe>0||this.#Xe)&&this.options.life.count||!(this.#qe||this.#Ge>=(this.#ei??0)))return;const t=this.#u;if(void 0===this.#je){const e=$(this.options.rate.delay);this.#je=t.retina.reduceFactor?e*a/t.retina.reduceFactor:1/0}(this.#Qe>0||this.#Xe)&&this.#ni()}resize(){const t=this.#Ye,e=this.#u;this.position=t&&it(t,e.canvas.size,C.origin)?t:this.#Et(),this.#ti=this.#si(),this.size=this.#ti.mode===K.percent?{width:this.#ti.width/s*e.canvas.size.width,height:this.#ti.height/s*e.canvas.size.height}:{width:this.#ti.width,height:this.#ti.height},this.#Je?.resize(this.position,this.size)}update(t){if(this.#Re)return;const e=this.#u;this.#qe&&(this.#qe=!1,this.#Ge=this.#ei??0,this.#We=this.#je??0),this.#ii||(this.#ii=!0,this.#ai(this.options.startCount)),void 0!==this.#ke&&(this.#Ne+=t.value,this.#Ne>=this.#ke&&(this.pause(),void 0!==this.#ei&&(this.#ei=void 0),this.#Xe||this.#Qe--,this.#Qe>0||this.#Xe?(this.position=this.#Et(),this.#Je?.resize(this.position,this.size),this.#ei=e.retina.reduceFactor?$(this.options.life.delay??0)*a/e.retina.reduceFactor:1/0):this.#oi(),this.#Ne-=this.#ke,this.#ke=void 0)),void 0!==this.#ei&&(this.#Ge+=t.value,this.#Ge>=this.#ei&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Ge-=this.#ei,this.#ei=void 0)),void 0!==this.#je&&(this.#We+=t.value,this.#We>=this.#je&&(this.#ri(),this.#We-=this.#je))}#Et(){const t=this.#u;if(this.options.domId){const e=J().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*n)*s,y:(i.y+i.height*n)*s}}}return q({size:t.canvas.size,position:this.options.position})}#si(){const t=this.#u;if(this.options.domId){const e=J().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:K.precise}}}return this.options.size??(()=>{const t=new Wi;return t.load({height:0,mode:K.percent,width:0}),t})()}#oi(){this.#Z?.disconnect(),this.#Z=void 0,this.#mt?.disconnect(),this.#mt=void 0,this.#Ze(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ri(){if(this.#Re)return;const t=$(this.options.rate.quantity);this.#ai(t)}#ai(t){const e=ot(this.#Ke)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:$(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,o=void 0===this.options.spawn.stroke?.opacity?1:$(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:$(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#Je,u=c||h,p=u||d,f=u?{h:y,s:v,l:w}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?nt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=o,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#li(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#li(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#li(i.l,this.spawnFillColor.l,f.l)),Is(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#li(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#li(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#li(a.l,this.spawnStrokeColor.l,f.l)),Ds(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Je){const e=this.#Je.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Is(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#ni(){if(this.#Re)return;const t=void 0!==this.options.life.duration?$(this.options.life.duration):void 0;(this.#Qe>0||this.#Xe)&&void 0!==t&&t>0&&(this.#ke=t*a)}#li(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const o=U(t.offset),r=$(this.options.rate.delay),l=n.retina.reduceFactor?r*a/n.retina.reduceFactor:1/0;return(e+$(t.speed)*n.fpsLimit/l+o*s)%i}}});t.loadFountainPreset=is,t.tsParticles=He}),Object.assign(globalThis.window||globalThis,{loadFountainPreset:(globalThis.__tsParticlesInternals.presets.fountain||{}).loadFountainPreset}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(g){g.__tsParticlesInternals=g.__tsParticlesInternals||{};g.__tsParticlesInternals.bundles=g.__tsParticlesInternals.bundles||{};g.__tsParticlesInternals.effects=g.__tsParticlesInternals.effects||{};g.__tsParticlesInternals.engine=g.__tsParticlesInternals.engine||{};g.__tsParticlesInternals.interactions=g.__tsParticlesInternals.interactions||{};g.__tsParticlesInternals.palettes=g.__tsParticlesInternals.palettes||{};g.__tsParticlesInternals.paths=g.__tsParticlesInternals.paths||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins=g.__tsParticlesInternals.plugins||{};g.__tsParticlesInternals.plugins.emittersShapes=g.__tsParticlesInternals.plugins.emittersShapes||{};g.__tsParticlesInternals.presets=g.__tsParticlesInternals.presets||{};g.__tsParticlesInternals.shapes=g.__tsParticlesInternals.shapes||{};g.__tsParticlesInternals.updaters=g.__tsParticlesInternals.updaters||{};g.__tsParticlesInternals.utils=g.__tsParticlesInternals.utils||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas=g.__tsParticlesInternals.canvas||{};g.__tsParticlesInternals.canvas.utils=g.__tsParticlesInternals.canvas.utils||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path=g.__tsParticlesInternals.path||{};g.__tsParticlesInternals.path.utils=g.__tsParticlesInternals.path.utils||{};var __tsProxyFactory=typeof Proxy!=="undefined"?function(obj){return new Proxy(obj,{get:function(target,key){if(!(key in target)){target[key]={};}return target[key];}});}:function(obj){return obj;};g.__tsParticlesInternals.bundles=__tsProxyFactory(g.__tsParticlesInternals.bundles);g.__tsParticlesInternals.effects=__tsProxyFactory(g.__tsParticlesInternals.effects);g.__tsParticlesInternals.interactions=__tsProxyFactory(g.__tsParticlesInternals.interactions);g.__tsParticlesInternals.palettes=__tsProxyFactory(g.__tsParticlesInternals.palettes);g.__tsParticlesInternals.paths=__tsProxyFactory(g.__tsParticlesInternals.paths);g.__tsParticlesInternals.plugins=__tsProxyFactory(g.__tsParticlesInternals.plugins);g.__tsParticlesInternals.plugins.emittersShapes=__tsProxyFactory(g.__tsParticlesInternals.plugins.emittersShapes);g.__tsParticlesInternals.presets=__tsProxyFactory(g.__tsParticlesInternals.presets);g.__tsParticlesInternals.shapes=__tsProxyFactory(g.__tsParticlesInternals.shapes);g.__tsParticlesInternals.updaters=__tsProxyFactory(g.__tsParticlesInternals.updaters);g.__tsParticlesInternals.utils=__tsProxyFactory(g.__tsParticlesInternals.utils);g.__tsParticlesInternals.canvas=__tsProxyFactory(g.__tsParticlesInternals.canvas);g.__tsParticlesInternals.path=__tsProxyFactory(g.__tsParticlesInternals.path);g.tsparticlesInternalExports=g.tsparticlesInternalExports||{};})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
-
/* Preset v4.
|
|
2
|
+
/* Preset v4.4.0 */
|
|
3
3
|
(function (global, factory) {
|
|
4
4
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@tsparticles/basic'), require('@tsparticles/updater-destroy'), require('@tsparticles/plugin-emitters/plugin'), require('@tsparticles/plugin-trail'), require('@tsparticles/engine')) :
|
|
5
5
|
typeof define === 'function' && define.amd ? define(['exports', '@tsparticles/basic', '@tsparticles/updater-destroy', '@tsparticles/plugin-emitters/plugin', '@tsparticles/plugin-trail', '@tsparticles/engine'], factory) :
|