@tsparticles/preset-squares 4.4.0 → 4.5.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.squares=t.__tsParticlesInternals.presets.squares||{}))}(this,function(t){"use strict";const e="generated",i=100,s=.5,n=1e3,a=0,r=0,o=0,l=1,c=0,h=0,d=1,u="random",p=2*Math.PI,f="true",g="false",m="canvas",y=255,v=360,w=100,P=100,b=.25,x=400;var z;function M(t){return"z"in t?t.z:o}!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"}(z||(z={}));class k{x;y;z;constructor(t=a,e=r,i=o){this.x=t,this.y=e,this.z=i}static get origin(){return k.create(a,r,o)}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 k.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new k(t,e??r,i??o):new k(t.x,t.y,M(t))}add(t){return k.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return k.clone(this)}div(t){return k.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return k.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return k.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),o)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return k.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends k{constructor(t=a,e=r){super(t,e,o)}static get origin(){return C.create(a,r)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??r):new C(t.x,t.y)}}function S(t){return"boolean"==typeof t}function I(t){return"string"==typeof t}function D(t){return"number"==typeof t}function _(t){return"object"==typeof t&&null!==t}function E(t){return Array.isArray(t)}function O(t){return null==t}const L=Math.PI/180;let R=Math.random;const F=t=>requestAnimationFrame(t),T=t=>{cancelAnimationFrame(t)};function A(){return U(R(),0,1-Number.EPSILON)}function B(t,e){return A()*(e-t)+t}function U(t,e,i){return Math.min(Math.max(t,e),i)}function $(t){const e=q(t);let i=V(t);return e===i&&(i=0),B(i,e)}function H(t){return D(t)?t:$(t)}function V(t){return D(t)?t:t.min}function q(t){return D(t)?t:t.max}function N(t,e){if(t===e||void 0===e&&D(t))return t;const i=V(t),s=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:N(i,s)}function W(t){return t*L}function j(t){const e={x:void 0!==t.position?.x?H(t.position.x):void 0,y:void 0!==t.position?.y?H(t.position.y):void 0};return function(t){return{x:(t.position?.x??A()*i)*t.size.width/i,y:(t.position?.y??A()*i)*t.size.height/i}}({size:t.size,position:e})}function G(t){const{position:e,size:i}=t;return{x:e?.x??A()*i.width,y:e?.y??A()*i.height}}var X,Y;!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(X||(X={})),function(t){t.precise="precise",t.percent="percent"}(Y||(Y={}));function Q(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function K(){return globalThis.document}function Z(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function J(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(A()*t.length)]}function tt(t,...e){for(const i of e){if(O(i))continue;if(!_(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):_(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return _(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(Q(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(Q(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>tt(void 0,t)):tt(e[s],n)}}return t}function et(t,e){return E(t)?t.map((t,i)=>e(t,i)):e(t,0)}function it(t,e,i){return E(t)?J(t,e,i):t}function st(t,e){return function(t,e){if(t.mode!==Y.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/i*e.width,y:t.y/i*e.height}:{width:t.width/i*e.width,height:t.height/i*e.height}}(t,e)}let nt,at;function rt(t,e,i,s,n){if(s){let s={passive:!0};S(n)?s.capture=n:void 0!==n&&(s=n),t.addEventListener(e,i,s)}else{const s=n;t.removeEventListener(e,i,s)}}async function ot(t,e,i,s=!1){let n=e.get(t);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 lt{#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 ct;!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"}(ct||(ct={}));class ht{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;#r=!1;#o=!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(ct.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 ot(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 ot(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.#r&&!this.#o){this.#o=!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.#o=!1,this.#r=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#r)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#o?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 dt=t=>(...e)=>{t(...e)},ut={debug:dt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:dt(console.info),log:dt(console.log),trace:dt(console.trace),verbose:dt(console.log),warning:dt(console.warn)};function pt(){return ut}const ft="100%";class gt{pluginManager=new ht(this);#h=[];#d=new lt;#r=!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.#r||(await this.pluginManager.init(),this.#r=!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 Ei}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*A()).toString()}`,{index:a,url:r}=t,o=r?await async function(t){const e=it(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(pt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:r,index:a}):t.options,l=it(o,a),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=K();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===m)s=t,s.dataset[e]??=g,s.dataset[e]===f&&(s.style.width||=ft,s.style.height||=ft,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(m).item(0);n?(s=n,s.dataset[e]=g):(s=i.createElement(m),s.dataset[e]=f,t.appendChild(s)),s.style.width||=ft,s.style.height||=ft,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=K();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=f,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var mt,yt,vt,wt,Pt,bt,xt,zt,Mt,kt,Ct,St,It;!function(t){t.circle="circle",t.rectangle="rectangle"}(mt||(mt={}));class Dt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class _t extends Dt{radius;constructor(t,e,i){super(t,e,mt.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,function(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}(e,i)<=s*s;var e,i,s}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),a=Math.abs(i.y-e.y);if(t instanceof _t||t.type===mt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Et||t.type===mt.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Et extends Dt{size;constructor(t,e,i,s){super(t,e,mt.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof _t)return t.intersects(this);if(!(t instanceof Et))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>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"}(yt||(yt={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(vt||(vt={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(wt||(wt={})),function(t){t.delete="delete",t.wait="wait"}(Pt||(Pt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(bt||(bt={})),function(t){t.darken="darken",t.enlighten="enlighten"}(xt||(xt={})),function(t){t.none="none",t.max="max",t.min="min"}(zt||(zt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Mt||(Mt={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(kt||(kt={})),function(t){t.max="max",t.min="min",t.random="random"}(Ct||(Ct={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(St||(St={})),function(t){t[t.BackgroundElement=0]="BackgroundElement",t[t.BackgroundDraw=1]="BackgroundDraw",t[t.BackgroundMask=2]="BackgroundMask",t[t.CanvasSetup=3]="CanvasSetup",t[t.PluginContent=4]="PluginContent",t[t.Particles=5]="Particles",t[t.CanvasCleanup=6]="CanvasCleanup",t[t.Foreground=7]="Foreground"}(It||(It={}));class Ot{load(t){O(t)||this.doLoad(t)}}function Lt(t,...e){for(const i of e)t.load(i)}function Rt(t,e,i){void 0!==i&&(t[e]=i)}function Ft(t,e,i){void 0!==i&&(t[e]=N(i))}function Tt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function At(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}class Bt extends Ot{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Ft(this,"count",t.count),Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Ft(this,"delay",t.delay),Rt(this,"sync",t.sync)}}class Ut extends Bt{mode=vt.auto;startValue=Ct.random;doLoad(t){super.doLoad(t),Rt(this,"mode",t.mode),Rt(this,"startValue",t.startValue)}}class $t extends Bt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Rt(this,"max",t.max),Rt(this,"min",t.min),Ft(this,"offset",t.offset)}}class Ht extends Ot{h=new $t(0,v);l=new $t(0,P);s=new $t(0,w);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class Vt extends Ot{value="";static create(t,e){const i=new Vt;return i.load(t),void 0!==e&&(I(e)||E(e)?i.load({value:e}):i.load(e)),i}doLoad(t){O(t.value)||(this.value=t.value)}}class qt extends Vt{animation=new Ht;static create(t,e){const i=new qt;return i.load(t),void 0!==e&&(I(e)||E(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class Nt extends Ot{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new Vt,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=Vt.create(this.color,t.color)),Rt(this,"element",t.element),Rt(this,"draw",t.draw),Rt(this,"image",t.image),Rt(this,"position",t.position),Rt(this,"repeat",t.repeat),Rt(this,"size",t.size),Rt(this,"opacity",t.opacity)}}class Wt extends Ot{enable=!0;zIndex=0;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"zIndex",t.zIndex)}}class jt extends Ot{enable=!0;mode=wt.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!S(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(wt).includes(t.mode)))throw new Error(`Invalid HDR "mode" value: expected one of ${Object.values(wt).join(", ")}, got "${e=t.mode,String(e)}"`);var e;if(void 0!==t.peakNits&&(!D(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(`Invalid HDR "peakNits" value: expected a positive number, got "${String(t.peakNits)}"`);Rt(this,"enable",t.enable),Rt(this,"mode",t.mode),Rt(this,"peakNits",t.peakNits)}}class Gt extends Ot{delay=.5;enable=!0;doLoad(t){Rt(this,"delay",t.delay),Rt(this,"enable",t.enable)}}class Xt extends Ot{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]=tt(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class Yt extends Ot{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),Rt(this,"enable",t.enable),Ft(this,"opacity",t.opacity)}}class Qt extends Ot{offset=0;value=90;doLoad(t){Ft(this,"offset",t.offset),Ft(this,"value",t.value)}}class Kt extends Ot{mode=Y.percent;radius=0;x=50;y=50;doLoad(t){Rt(this,"x",t.x),Rt(this,"y",t.y),Rt(this,"mode",t.mode),Rt(this,"radius",t.radius)}}class Zt extends Ot{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),Rt(this,"inverse",t.inverse),Ft(this,"maxSpeed",t.maxSpeed)}}class Jt extends Ot{value=0;doLoad(t){O(t.value)||(this.value=N(t.value))}}class te extends Jt{animation=new Bt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class ee extends te{animation=new Ut}class ie extends Ot{clamp=!0;delay=new Jt;enable=!1;generator;options={};doLoad(t){Rt(this,"clamp",t.clamp),this.delay.load(t.delay),Rt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=tt(this.options,t.options))}}class se extends Ot{bottom;default=bt.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 ne extends Ot{acceleration=0;enable=!1;position;doLoad(t){Ft(this,"acceleration",t.acceleration),Rt(this,"enable",t.enable),t.position&&(this.position=tt({},t.position))}}class ae extends Ot{angle=new Qt;center=new Kt;decay=0;direction=z.none;distance={};drift=0;enable=!1;gravity=new Zt;outModes=new se;path=new ie;random=!1;size=!1;speed=2;spin=new ne;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(D(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Ft(this,"decay",t.decay),Rt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=D(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Ft(this,"drift",t.drift),Rt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(_(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Rt(this,"random",t.random),Rt(this,"size",t.size),Ft(this,"speed",t.speed),this.spin.load(t.spin),Rt(this,"straight",t.straight),Rt(this,"vibrate",t.vibrate),Rt(this,"warp",t.warp)}}class re extends Ot{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),Ft(this,"width",t.width),Ft(this,"opacity",t.opacity)}}class oe extends Ot{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=qt.create(this.color,t.color)),Tt(this,"fill",t.fill,()=>new Yt),Tt(this,"stroke",t.stroke,()=>new re)}}class le extends Jt{value=1}class ce extends Ot{horizontal=new le;vertical=new le;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class he extends Ot{enable=!1;height=1080;width=1920;doLoad(t){Rt(this,"enable",t.enable),Rt(this,"width",t.width),Rt(this,"height",t.height)}}class de extends Ot{mode=Pt.delete;value=0;doLoad(t){Rt(this,"mode",t.mode),Rt(this,"value",t.value)}}class ue extends Ot{density=new he;limit=new de;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Rt(this,"value",t.value)}}class pe extends Ot{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]=tt(this.options[t]??{},i))}Rt(this,"close",t.close),Rt(this,"type",t.type)}}class fe extends Jt{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Rt(this,"opacityRate",t.opacityRate),Rt(this,"sizeRate",t.sizeRate),Rt(this,"velocityRate",t.velocityRate)}}class ge extends Ot{bounce=new ce;effect=new Xt;groups={};move=new ae;number=new ue;paint;palette;reduceDuplicates=!1;shape=new pe;zIndex=new fe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new oe,this.paint.color=new qt,this.paint.color.value="#fff",this.paint.fill=new Yt,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]=tt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(E(e)?this.paint=et(e,t=>{const e=new oe;return e.load(t),e}):E(this.paint)?(this.paint=new oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(E(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 me(t,e,...i){const s=new ge(t,e);return Lt(s,...i),s}class ye extends Ot{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 Nt,this.fullScreen=new Wt,this.hdr=new jt,this.particles=me(this.#p,this.#u),this.resize=new Gt}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,et(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Rt(this,"autoPlay",t.autoPlay),Rt(this,"clear",t.clear),Rt(this,"key",t.key),Rt(this,"name",t.name),Ft(this,"delay",t.delay),Rt(this,"detectRetina",t.detectRetina),Ft(this,"duration",t.duration),Rt(this,"fpsLimit",t.fpsLimit);const e=t.hdr;S(e)?(this.hdr.enable=e,this.hdr.mode=wt.standard,this.hdr.peakNits=400):this.hdr.load(e),Rt(this,"pauseOnBlur",t.pauseOnBlur),Rt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Rt(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;S(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=tt(this.style,t.style),Rt(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 ve=new Map,we=1.15,Pe=1.05,be=.2126,xe=.7152,ze=.0722;function Me(t,e){let i=ve.get(t);return i||(i=e(),ve.size>2e3&&ve.clear(),ve.set(t,i)),i}function ke(t){return U(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function Ce(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return Se(t,n.value,i,s);if(E(n.value)){const e=J(n.value,i,s);if(!e)return;return Ce(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function Se(t,e,i,s=!0){if(!e)return;const n=I(e)?{value:e}:e;if(I(n.value))return n.value===u?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(E(n.value)){const e=J(n.value,i,s);if(!e)return;return Se(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Ie(t,e,i,n=!0){const a=Ce(t,e,i,n);return a?function(t){const e=t.r/y,i=t.g/y,n=t.b/y,a=Math.max(e,i,n),r=Math.min(e,i,n),o={h:0,l:(a+r)*s,s:0};a!==r&&(o.s=o.l<s?(a-r)/(a+r):(a-r)/(2-a-r),o.h=e===a?(i-n)/(a-r):i===a?2+(n-e)/(a-r):4+(e-i)/(a-r));o.l*=P,o.s*=w,o.h*=60,o.h<0&&(o.h+=v);o.h>=v&&(o.h-=v);return o}(a):void 0}function De(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 _e(t,e,i,s,n){const a=e?4:2,r=i??1;return Me(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${r.toString()}-${(s??400).toString()}-${n??wt.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${r.toString()}`,()=>e?function(t,e,i=400,s=wt.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/y,a=t.g/y,r=t.b/y;if(s!==wt.natural&&s!==wt.vivid&&s!==wt.cinematic&&s!==wt.dynamic)return{b:r,g:a,r:n};const o=Math.max(1,e),l=be*n+xe*a+ze*r,c=function(t,e,i){if(t<=i)return ke(t);const s=t+(t-i)*(e-1);return ke(s)}(l,e,i),h=l>0?c/l:1;return function(t,e,i,s,n){switch(s){case wt.vivid:{const s=(t+e+i)/3;return{b:U(U(s+(i-s)*we,0,n)*Pe,0,n),g:U(U(s+(e-s)*we,0,n)*Pe,0,n),r:U(U(s+(t-s)*we,0,n)*Pe,0,n)}}case wt.cinematic:{const s=1.05*t,a=.95*i,r=(s+e+a)/3;return{b:U(r+1.1*(a-r),0,n),g:U(r+1.1*(e-r),0,n),r:U(r+1.1*(s-r),0,n)}}case wt.dynamic:{const s=be*t+xe*e+ze*i,a=Math.min(1,2*s),r=1-a,o=(t+e+i)/3,l=U(o+(t-o)*we,0,n)*Pe,c=U(o+(e-o)*we,0,n)*Pe,h=U(o+(i-o)*we,0,n)*Pe;return{b:U(i*r+h*a,0,n),g:U(e*r+c*a,0,n),r:U(t*r+l*a,0,n)}}case wt.standard:case wt.natural:default:return{b:i,g:e,r:t}}}(U(n*h,0,o),U(a*h,0,o),U(r*h,0,o),s,o)}(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 Ee(t,e,i,n,a){const r=e?4:2,o=i??1;return Me(e?`hsl-${t.h.toFixed(r)}-${t.s.toFixed(r)}-${t.l.toFixed(r)}-hdr-${o.toString()}-${(n??x).toString()}-${a??wt.standard}`:`hsl-${t.h.toFixed(r)}-${t.s.toFixed(r)}-${t.l.toFixed(r)}-sdr-${o.toString()}`,()=>e?_e(function(t){const e=(t.h%v+v)%v,i=Math.max(0,Math.min(w,t.s)),n=Math.max(0,Math.min(P,t.l)),a=e/v,r=i/w,o=n/P;if(0===i){const t=o*y;return{r:t,g:t,b:t}}const l=o<s?o*(1+r):o+r-o*r,c=2*o-l,h=1/3;return{r:Math.min(y,y*De(c,l,a+h)),g:Math.min(y,y*De(c,l,a)),b:Math.min(y,y*De(c,l,a-h))}}(t),!0,i,n,a):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${o.toString()})`)}function Oe(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Le(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:v},s:{enable:!1,value:t.s,min:0,max:w},l:{enable:!1,value:t.l,min:0,max:P}};return e&&(Re(s.h,e.h,i),Re(s.s,e.s,i),Re(s.l,e.l,i)),s}function Re(t,e,s){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=H(e.speed)/i*s,t.decay=1-H(e.decay),t.status=St.increasing,t.loops=0,t.maxLoops=H(e.count),t.time=0,t.delayTime=H(e.delay)*n,e.sync||(t.velocity*=A(),t.value*=A()),t.initialValue=t.value,t.offset=N(e.offset)):t.velocity=0}function Fe(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?$(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,r=t.decay??1,o=t.max,l=t.min;e&&t.status!==St.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=St.increasing)):(t.value+=a,t.value>o&&(t.loops??=0,t.loops++,e?t.status=St.decreasing:t.value-=o)),t.velocity&&1!==r&&(t.velocity*=r),t.value=U(t.value,l,o)}function Te(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;Fe(s,!1,e),Fe(n,!0,e),Fe(a,!0,e)}const Ae=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new gt}();class Be{count;delay;duration;wait=!1;load(t){O(t)||(Rt(this,"count",t.count),Ft(this,"delay",t.delay),Ft(this,"duration",t.duration),Rt(this,"wait",t.wait))}}class Ue{delay=.1;quantity=1;load(t){O(t)||(Ft(this,"quantity",t.quantity),Ft(this,"delay",t.delay))}}class $e{color=!1;opacity=!1;load(t){O(t)||(Rt(this,"color",t.color),Rt(this,"opacity",t.opacity))}}class He{options={};replace=new $e;type="square";load(t){O(t)||(void 0!==t.options&&(this.options=tt({},t.options??{})),this.replace.load(t.replace),Rt(this,"type",t.type))}}class Ve{height=0;mode=Y.percent;width=0;load(t){O(t)||(Rt(this,"mode",t.mode),Rt(this,"height",t.height),Rt(this,"width",t.width))}}class qe{fill;stroke;load(t){O(t)||(t.fill&&(this.fill??=new Yt,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new re,this.stroke.load(t.stroke)))}}class Ne{autoPlay=!0;direction;domId;fill=!0;life=new Be;name;particles;position;rate=new Ue;shape=new He;size;spawn=new qe;spawnFillColor;spawnStrokeColor;startCount=0;load(t){O(t)||(Rt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Ve,this.size.load(t.size)),Rt(this,"direction",t.direction),Rt(this,"domId",t.domId),Rt(this,"fill",t.fill),this.life.load(t.life),Rt(this,"name",t.name),this.particles=et(t.particles,t=>tt({},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)),Rt(this,"startCount",t.startCount))}}class We{id="emitters";#m;constructor(t){this.#m=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Oi});return new e(this.#m,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=et(i.emitters,t=>{const e=new Ne;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return E(e)&&!!e.length||void 0!==e}}const je=new WeakMap;var Ge,Xe;async function Ye(t){t.checkVersion("4.4.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=je.get(e);return i||(i=Promise.resolve().then(function(){return Fi}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw je.delete(e),t}),je.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Ri}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new We(e))})}!function(t){t.emitter="emitter"}(Ge||(Ge={})),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 Qe=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ke=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ze{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Qe,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ke.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 Je(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ze)})}class ti{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=it(i.paint,t.id,i.reduceDuplicates),n=s?.color,a=n??void 0,r=s?.fill,o=s?.stroke;if(r){const i=qt.create(void 0===a?void 0:qt.create(void 0,a),r.color);t.fillEnabled=r.enable,t.fillOpacity=H(r.opacity),t.fillAnimation=i.animation;const s=Ie(this.#p,i);s&&(t.fillColor=Le(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(o){const i=qt.create(void 0===a?void 0:qt.create(void 0,a),o.color);t.strokeWidth=H(o.width)*e.retina.pixelRatio,t.strokeOpacity=H(o.opacity??1),t.strokeAnimation=i.animation;const s=Ie(this.#p,i)??t.getFillColor();s&&(t.strokeColor=Le(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,a=!!e&&(void 0!==i?.h.value&&i.h.enable||void 0!==i?.s.value&&i.s.enable||void 0!==i?.l.value&&i.l.enable),r=!!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||r)}update(t,e){this.isEnabled(t)&&(Te(t.fillColor,e,this.#u.hdr),Te(t.strokeColor,e,this.#u.hdr))}}async function ei(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ti(t.pluginManager,e)))})}class ii{decay=0;enable=!1;speed=0;sync=!1;load(t){O(t)||(Rt(this,"enable",t.enable),Ft(this,"speed",t.speed),Ft(this,"decay",t.decay),Rt(this,"sync",t.sync))}}class si extends Jt{animation=new ii;direction=yt.clockwise;path=!1;load(t){O(t)||(super.load(t),Rt(this,"direction",t.direction),this.animation.load(t.animation),Rt(this,"path",t.path))}}function ni(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,r=e.min,o=e.max,l=e.decay??1;e.time??=0;const c=e.delayTime??0;if(!(c>0&&e.time<c&&(e.time+=n.value,e.time<c))){switch(e.status){case St.increasing:e.value+=a;break;case St.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case St.increasing:e.value>=o&&(i?e.status=St.decreasing:e.value-=o,e.loops??=0,e.loops++);break;case St.decreasing:e.value<=r&&(i?e.status=St.increasing:e.value+=o,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case zt.max:i>=n&&t.destroy();break;case zt.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=U(e.value,r,o))}}class ai{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:W(H(e.value)),min:0,max:p},t.pathRotation=e.path;let i=e.direction;if(i===yt.random){i=Math.floor(2*A())>0?yt.counterClockwise:yt.clockwise}switch(i){case yt.counterClockwise:case"counterClockwise":t.rotate.status=St.decreasing;break;case yt.clockwise:t.rotate.status=St.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-H(s.decay),t.rotate.velocity=H(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=A())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){At(t,"rotate",si,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(ni(t,t.rotate,!1,zt.none,e),t.rotation=t.rotate.value))}}async function ri(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new ai(t)))})}class oi extends Ut{destroy=zt.none;load(t){super.load(t),O(t)||Rt(this,"destroy",t.destroy)}}class li extends ee{animation=new oi;value=3;load(t){if(super.load(t),O(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ci{#u;constructor(t){this.#u=t}init(t){const e=this.#u,s=t.options.size;if(!s)return;const n=s.animation;n.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/i*e.retina.reduceFactor,n.sync||(t.size.velocity*=A()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){At(t,"size",li,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=function(t,e){const i=t.value,a=t.animation,r={delayTime:H(a.delay)*n,enable:a.enable,value:H(t.value)*e,max:q(i)*e,min:V(i)*e,loops:0,maxLoops:H(a.count),time:0};if(a.enable){switch(r.decay=1-H(a.decay),a.mode){case vt.increase:r.status=St.increasing;break;case vt.decrease:r.status=St.decreasing;break;case vt.random:r.status=A()>=s?St.increasing:St.decreasing}const t=a.mode===vt.auto;switch(a.startValue){case Ct.min:r.value=r.min,t&&(r.status=St.increasing);break;case Ct.max:r.value=r.max,t&&(r.status=St.decreasing);break;case Ct.random:default:r.value=$(r),t&&(r.status=A()>=s?St.increasing:St.decreasing)}}return r.initialValue=r.value,r}(i,e),t.retina.sizeAnimationSpeed=H(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&ni(t,t.size,!0,t.options.size.animation.destroy,e)}}async function hi(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ci(t)))})}class di{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function ui(t){t.checkVersion("4.4.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new di))})}const pi={particles:{paint:{stroke:{width:5,color:{value:["#5bc0eb","#fde74c","#9bc53d","#e55934","#fa7921","#2FF3E0","#F8D210","#FA26A0","#F51720"]}},fill:{enable:!1}},shape:{type:"square"},rotate:{value:0,direction:yt.counterClockwise,animation:{enable:!0,speed:2,sync:!0}},size:{value:{min:1,max:500},animation:{enable:!0,startValue:Ct.min,speed:60,sync:!0,destroy:zt.max}}},background:{color:"#000"},emitters:{position:{y:50,x:50},rate:{delay:1,quantity:1}}};async function fi(t){await t.pluginManager.register(async t=>{await Promise.all([Je(t),Ye(t),ui(t),ri(t),hi(t),ei(t)]),t.pluginManager.addPreset("squares",pi)})}const gi=globalThis;gi.loadSquaresPreset=fi,gi.tsParticles=Ae;function mi(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class yi{#v;#w;#P;#b;#x;#u;#z;#M;#k;#C;#S;#I;#p;#D;#_;#E={};#O=[void 0,void 0];#L={};constructor(t,e,i){this.#p=t,this.#u=e,this.#b=i,this.#z=null,this.#v=null,this.#w=new Set,this.#_=[],this.#D=[],this.#P=[],this.#x=[],this.#k=[],this.#C=[],this.#S=[],this.#I={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#M}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(a,r,this.#b.size.width,this.#b.size.height)})}clear(){for(const t of this.#P)if(t.canvasClear?.())return;for(const t of Object.values(It))if("number"==typeof t)for(const e of this.#R(t))if(e.canvasClear?.())return;this.canvasClear()}destroy(){this.stop(),this.#v=null,this.#w.clear(),this.#_=[],this.#D=[],this.#P=[],this.#x=[],this.#k=[],this.#C=[],this.#S=[];for(const t of Object.values(It))"number"==typeof t&&(this.#I[t]=[])}draw(t){const e=this.#z;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,r]=this.#F(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#L,f=this.#E,g=a?Ee(a,o.hdr,h*d,o.peakNits,o.hdrMode):void 0,m=r?Ee(r,o.hdr,u*d,o.peakNits,o.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.#S)i.drawParticleSetup?.(s,t,e);this.#T(s,t,i,d,f,p),this.#A({container:o,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#B(t);for(const i of this.#C)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#k)this.#U(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u;this.clear(),e.update(t),this.draw(s=>{const n=this.#b.size.width,o=this.#b.size.height;if(this.#v)try{s.drawImage(this.#v,a,r,n,o)}catch{this.#$("background-element-draw-error","Error drawing background element onto canvas")}const l=i.background;if(l.draw)try{l.draw(s,t)}catch{this.#$("background-draw-error","Error in background.draw callback")}for(const t of this.#R(It.BackgroundMask))t.canvasPaint?.();for(const e of this.#R(It.CanvasSetup))e.drawSettingsSetup?.(s,t);for(const e of this.#R(It.PluginContent))e.draw?.(s,t);e.drawParticles(t);for(const e of this.#R(It.CanvasCleanup))e.clearDraw?.(s,t),e.drawSettingsCleanup?.(s,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#H(),this.paint()}initPlugins(){this.#P=[],this.#x=[],this.#k=[],this.#S=[],this.#C=[];for(const t of Object.values(It))"number"==typeof t&&(this.#I[t]=[]);for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#x.push(t),t.drawParticle&&this.#k.push(t),t.drawParticleSetup&&this.#S.push(t),t.drawParticleCleanup&&this.#C.push(t),t.canvasClear&&this.#P.push(t),t.canvasPaint&&this.#R(It.BackgroundMask).push(t),t.drawSettingsSetup&&this.#R(It.CanvasSetup).push(t),t.draw&&this.#R(It.PluginContent).push(t),(t.clearDraw??t.drawSettingsCleanup)&&this.#R(It.CanvasCleanup).push(t)}initUpdaters(){this.#_=[],this.#D=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#_.push(t)}paint(){let t=!1;for(const e of this.#R(It.BackgroundMask))if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(a,r,this.#b.size.width,this.#b.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,a,r,this.#b.size.width,this.#b.size.height),i.globalAlpha=s})}setContext(t){this.#z=t,this.#z&&(this.#z.globalCompositeOperation="source-over")}setContextSettings(t){this.#M=t}stop(){this.draw(t=>{t.clearRect(a,r,this.#b.size.width,this.#b.size.height)})}#B(t){for(const e of this.#D)e.afterDraw?.(t)}#T(t,e,i,s,n,a){for(const r of this.#_){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)mi(a,t,e)}r.beforeDraw?.(e)}}#V(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)}#A(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,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:r,drawRadius:1*r,opacity:o,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.#W(v,m),this.#j(v,m),this.#V(y,m),i.resetTransform()}#U(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#W(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())}#j(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)}#R(t){return this.#I[t]}#F(t){let e,i;for(const s of this.#x)if(!e&&s.particleFillColor&&(e=Ie(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Ie(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#O[0]=e,this.#O[1]=i,this.#O}#H(){const t=this.#u.actualOptions.background;if(this.#v=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.#v=e:e?this.#$("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#$("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.#v=t.element)}#$(t,e){this.#w.has(t)||(this.#w.add(t),pt().warning(e))}}const vi=new WeakMap;function wi(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 Pi{domElement;render;renderCanvas;size;zoom=1;#u;#G;#X;#Y;#Q;#p;#K;#Z;#J;#tt;constructor(t,e){this.#p=t,this.#u=e,this.render=new yi(t,e,this),this.#J={height:0,width:0};const i=e.retina.pixelRatio,s=this.#J;this.size={height:s.height*i,width:s.width*i},this.#G=!1,this.#Z=[],this.#K="none"}get#et(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#G){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#it();this.render.destroy(),this.#Z=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#tt?this.#tt:{x:e*s/t,y:i*s/t}}init(){this.#st(t=>{t.disconnect()}),this.#Y=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#nt()}),this.resize(),this.#at(),this.#st(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#rt(),this.initBackground(),this.#ot(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ce(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=_e(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.#Z=[];for(const t of this.#u.plugins)t.resize&&this.#Z.push(t)}loadCanvas(t){this.#G&&this.domElement&&this.domElement.remove();const i=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=i,this.#G=!!i&&"true"===i.dataset[e],this.renderCanvas=i?(t=>{const e=vi.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 vi.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(i):t;const s=this.domElement;s&&(s.ariaHidden="true",this.#Q=function(t){const e=K().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||O(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const a=t.getPropertyPriority?.(s);a?e.setProperty(s,n,a):e.setProperty(s,n)}return e}(s.style));const n=this.#J,a=this.renderCanvas;s?(n.height=s.offsetHeight,n.width=s.offsetWidth):(n.height=a.height,n.width=a.width);const r=this.#u.retina.pixelRatio,o=this.size;a.height=o.height=n.height*r,a.width=o.width=n.width*r}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.#J,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#K=t,this.#nt())}setZoom(t,e){this.zoom=t,this.#tt=e}stop(){this.#st(t=>{t.disconnect()}),this.#Y=void 0,this.#lt(),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.#Z)t.resize?.()}#rt(){const t=this.#u,e=t.actualOptions.hdr.enable&&Z("(color-gamut: p3)")?.matches&&Z("(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)}#ot(){this.#lt();const t=Z("(color-gamut: p3)"),e=Z("(dynamic-range: high)"),i=()=>{this.#ht(),this.#rt(),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.#X=s}#at(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#et?this.#dt():this.#it();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")}}}#ht(){const t=this.renderCanvas;t&&(this.domElement||(this.renderCanvas=new OffscreenCanvas(t.width,t.height)))}#lt(){if(this.#X){for(const{handler:t,mql:e}of this.#X)e.removeEventListener("change",t);this.#X=void 0}}#nt(){const t=this.domElement;if(!t)return;this.#st(t=>{t.disconnect()}),this.#at(),this.initBackground();const e=this.#K;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#st(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#it(){const t=this.domElement,e=this.#Q;t&&e&&wi(t,e,!0)}#st(t){this.#Y&&t(this.#Y)}#dt(){const t=this.domElement;t&&wi(t,function(t){if(nt!==t||!at){nt=t;const e=K().createElement("div").style,i=10,s={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in s){const i=s[t];void 0!==i&&e.setProperty(t,i)}at=e}return at}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class bi{#u;#ut;#pt;#ft;constructor(t){this.#u=t,this.#ut={visibilityChange:()=>{this.#gt()},resize:()=>{this.#mt()}}}addListeners(){this.#yt(!0)}removeListeners(){this.#yt(!1)}#gt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(K().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#mt(){this.#ft&&(clearTimeout(this.#ft),this.#ft=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ft=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*n)}#yt(t){const e=this.#ut;this.#vt(t),rt(document,"visibilitychange",e.visibilityChange,t,!1)}#vt(t){const e=this.#ut,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void rt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#pt&&!t?(s&&this.#pt.unobserve(s),this.#pt.disconnect(),this.#pt=void 0):!this.#pt&&t&&s&&(this.#pt=new ResizeObserver(t=>{t.find(t=>t.target===s)&&this.#mt()}),this.#pt.observe(s))}}function xi(t){if(e=t.outMode,i=t.checkModes,!(e===i||E(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 zi(t,e){const i=t%e;return i<0?i+e:i}function Mi(t,e,i,s){const n=me(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=it(n.effect.type,t.id,a),t.shape=it(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=it(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=it(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===u){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(A()*i.length)]}if(t.shape===u){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(A()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return tt({close:e.close},it(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return tt({close:e.close},it(n,i,s))}(t.shape,o,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 ki{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;#wt={fillOpacity:1,opacity:1,strokeOpacity:1};#Pt=k.origin;#bt={sin:0,cos:0};#xt={a:1,b:0,c:0,d:1};#u;#zt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#zt.push(t),this.#zt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#zt.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(ct.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.#kt(Oe(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*s}getModifier(t){return this.#zt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=H(this.opacity?.value??1),s=this.#kt(void 0,t=>t.opacity)??i,n=this.fillOpacity??1,a=this.strokeOpacity??1;return this.#wt.fillOpacity=n,this.#wt.opacity=s*e,this.#wt.strokeOpacity=a,this.#wt}getPosition(){return this.#Pt.x=this.position.x+this.offset.x,this.#Pt.y=this.position.y+this.offset.y,this.#Pt.z=this.position.z,this.#Pt}getRadius(){return this.#kt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#bt.sin=Math.sin(t),this.#bt.cos=Math.cos(t),this.#bt}getStrokeColor(){return this.#Mt(this.#kt(Oe(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#xt.a=e.cos*(t.a??l),this.#xt.b=i?e.sin*(t.b??1):t.b??c,this.#xt.c=i?-e.sin*(t.c??1):t.c??h,this.#xt.d=e.cos*(t.d??d),this.#xt}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=kt.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Mi(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.#St(),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.#It({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#It({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=zi(t,p);return e>=Math.PI*s&&e<3*Math.PI*s}if(this.roll.horizontal){const e=zi(t+Math.PI*s,p);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=zi(t,p);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#zt.findIndex(e=>e.id===t);e>=0&&this.#zt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#kt(t,e){let i=t;for(const t of this.#zt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Dt(t,e){let i=0,s=t?k.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return k.create(i.x,i.y,e)}const t=G({size:l,position:s}),c=k.create(t.x,t.y,e);this.#_t(c,o,r.left??r.default),this.#_t(c,o,r.right??r.default),this.#Et(c,o,r.top??r.default),this.#Et(c,o,r.bottom??r.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}}#St(){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===z.inside||t.direction===z.outside)return e;const i=W(H(t.angle.value)),n=W(H(t.angle.offset)),a={left:n-i*s,right:n+i*s};return t.straight||(e.angle+=$(N(a.left,a.right))),t.random&&"number"==typeof t.speed&&(e.length*=A()),e}#_t(t,e,i){xi({outMode:i,checkModes:[bt.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Et(t,e,i){xi({outMode:i,checkModes:[bt.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#Ot(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===bt.bounce;return t===X.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===X.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===X.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===X.top?{inside:a?n.y-i>0:n.y+i>0,reason:"default"}:{inside:n.x>=-i&&n.y>=-i&&n.y<=s.height+i&&n.x<=s.width+i,reason:"default"}}#Lt(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#It(t){const e=this.#Ot(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,a=s?.isInsideCanvas,r=n?.isInsideCanvas;if(!a&&!r)return e;const o=this.#Lt(t.direction,t.outMode),l=a?this.#Rt(a(o),"shape"):void 0,c=r?this.#Rt(r(o),"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===xt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Ct(t){const e=this.#u,i=Math.floor(H(this.options.zIndex.value)),n=this.#Dt(t,U(i,0,e.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const a=e.canvas.size;switch(this.moveCenter={...st(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(D(t))return W(t);switch(t){case z.top:return-Math.PI*s;case z.topRight:return-Math.PI*b;case z.right:return 0;case z.bottomRight:return Math.PI*b;case z.bottom:return Math.PI*s;case z.bottomLeft:return.75*Math.PI;case z.left:return Math.PI;case z.topLeft:return.75*-Math.PI;case z.inside:return Math.atan2(i.y-e.y,i.x-e.x);case z.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return A()*p}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case z.inside:this.outType=kt.inside;break;case z.outside:this.outType=kt.outside}this.offset=C.origin}#Rt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ci{#Ft;#Tt=new Map;#At=[];#Bt;#Ut;#$t=[];#Ht;constructor(t){this.#Ft=t,this.#Bt=0,this.#Ht=0}clear(){this.#Tt.clear();const t=this.#Ut;t&&(this.#Ft=t),this.#Ut=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Vt(e,i);this.#Tt.has(s)||this.#Tt.set(s,[]),this.#Tt.get(s)?.push(t)}query(t,e,i=[]){const s=this.#qt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ft),a=Math.floor(s.maxX/this.#Ft),r=Math.floor(s.minY/this.#Ft),o=Math.floor(s.maxY/this.#Ft);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++){const a=`${s}_${n}`,r=this.#Tt.get(a);if(r)for(const s of r)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Nt(t.x,t.y,e),a=this.query(n,i,s);return this.#Wt(),a}queryRectangle(t,e,i,s=[]){const n=this.#jt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Wt(),a}setCellSize(t){this.#Ut=t}#Nt(t,e,i){return(this.#At[this.#Bt++]??=new _t(t,e,i)).reset(t,e,i)}#jt(t,e,i,s){return(this.#$t[this.#Ht++]??=new Et(t,e,i,s)).reset(t,e,i,s)}#Vt(t,e){return`${Math.floor(t/this.#Ft)}_${Math.floor(e/this.#Ft)}`}#qt(t){if(t instanceof _t){const e=t.radius,{x:i,y:s}=t.position;return{minX:i-e,maxX:i+e,minY:s-e,maxY:s+e}}if(t instanceof Et){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}#Wt(){this.#Bt=0,this.#Ht=0}}class Si{checkParticlePositionPlugins;grid;#Gt;#u;#Xt;#Yt;#Qt;#Kt;#Zt;#Jt;#p;#te;#ee;#ie;#se;#ne;#ae;constructor(t,e){this.#p=t,this.#u=e,this.#Qt=0,this.#Gt=[],this.#te=[],this.#Yt=0,this.#Xt=new Map,this.#Kt=new Map,this.#ae=this.#re(this.#u.zLayers),this.grid=new Ci(100),this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Jt=[],this.#ie=[],this.#ee=[],this.#ne=[]}get count(){return this.#Gt.length}addParticle(t,e,i,s){const n=this.#u.actualOptions.particles.number.limit.mode,a=void 0===i?this.#Yt:this.#Xt.get(i)??this.#Yt,r=this.count;if(a>0)switch(n){case Pt.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case Pt.wait:if(r>=a)return}try{const n=this.#te.pop()??new ki(this.#p,this.#u);n.init(this.#Qt,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Gt.push(n),this.#oe(n),this.#Qt++,this.#u.dispatchEvent(ct.particleAdded,{particle:n}),n):void this.#te.push(n)}catch(t){pt().warning(`error adding particle: ${t}`)}}clear(){this.#Gt=[],this.#Kt.clear(),this.#le(this.#u.zLayers)}destroy(){this.#Gt=[],this.#te.length=0,this.#Kt.clear(),this.#ae=[],this.checkParticlePositionPlugins=[],this.#Zt=[],this.#Jt=[],this.#ie=[],this.#ee=[],this.#ne=[]}drawParticles(t){for(let e=this.#ae.length-1;e>=0;e--){const i=this.#ae[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Gt.filter(t)}find(t){return this.#Gt.find(t)}get(t){return this.#Gt[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#ne=[],this.#Jt=[],this.#ie=[],this.#Zt=[],this.#ee=[],this.#Kt.clear(),this.#le(t.zLayers),this.grid=new Ci(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#ne.push(e),e.particleUpdate&&this.#Jt.push(e),e.postUpdate&&this.#ie.push(e),e.particleReset&&this.#Zt.push(e),e.postParticleUpdate&&this.#ee.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.#Gt.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.#ce(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=me(this.#p,this.#u,s);this.#he(n,i,t)}this.#he(t.particles,i)}setResizeFactor(t){this.#se=t}update(t){this.grid.clear();for(const e of this.#ne)e.update?.(t);const e=this.#de(t);for(const e of this.#ie)e.postUpdate?.(t);if(this.#ue(t,e),e.size)for(const t of e)this.remove(t);this.#se=void 0}#pe(...t){this.#te.push(...t)}#he(t,e,i,s){const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Yt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Xt.set(i,s?.number.limit.value??n.limit.value));const a=this.#fe(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Yt=n.limit.value*a:this.#Xt.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)}#re(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#ge(t){const e=this.#ae.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#fe(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.#ge(t.position.z),i=this.#ae[e];i&&(i.push(t),this.#Kt.set(t.id,e))}#ce(t,e,i){const s=this.#Gt[t];return!!s&&(s.group===e&&(this.#Gt.splice(t,1),this.#me(s),s.destroy(i),this.#u.dispatchEvent(ct.particleRemoved,{particle:s}),this.#pe(s),!0))}#me(t){const e=this.#Kt.get(t.id)??this.#ge(t.position.z),i=this.#ae[e];if(!i)return void this.#Kt.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Kt.delete(t.id)}#le(t){const e=Math.max(Math.floor(t),1);if(this.#ae.length===e)for(const t of this.#ae)t.length=0;else this.#ae=this.#re(e)}#ye(t){const e=this.#ge(t.position.z),i=this.#Kt.get(t.id);if(void 0===i)return void this.#oe(t);if(i===e)return;const s=this.#ae[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#ae[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.#Kt.set(t.id,e)}else this.#Kt.set(t.id,e)}#de(t){const e=new Set,i=this.#se;for(const s of this.#Gt){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.#Zt)t.particleReset?.(s);for(const e of this.#Jt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e}#ue(t,e){for(const i of this.#Gt)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.#ee)e.postParticleUpdate?.(i,t);this.#ye(i)}}}class Ii{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,a=t.retina;a.maxSpeed=H(s.gravity.maxSpeed)*i,a.moveDrift=H(s.drift)*i,a.moveSpeed=H(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Di(t){return!t.destroyed}function _i(t,e,...i){const s=new ye(t,e);return Lt(s,...i),s}var Ei=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;#ve;#we;#Pe={value:0,factor:0};#be;#xe;#ze;#Me;#ke;#Ce;#Se;#Ie;#De;#_e;#Ee;#p;#Oe;#Le;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#be=e,this.#De=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=wt.standard,this.peakNits=400,this.#Oe=!1,this.#ve=0,this.#ze=0,this.#Ie=0,this.#ke=!0,this.started=!1,this.destroyed=!1,this.#Ee=!0,this.#Se=0,this.zLayers=100,this.pageHidden=!1,this.#Le=a,this.#Ce=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Ii(this),this.canvas=new Pi(this.#p,this),this.particles=new Si(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#_e=_i(this.#p,this),this.actualOptions=_i(this.#p,this),this.#Me=new bi(this),this.dispatchEvent(ct.containerBuilt)}get animationStatus(){return!this.#Ee&&!this.pageHidden&&Di(this)}get options(){return this.#_e}get sourceOptions(){return this.#Le}addLifeTime(t){this.#Ie+=t}alive(){return!this.#ze||this.#Ie<=this.#ze}destroy(t=!0){if(Di(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.#De(t),this.dispatchEvent(ct.containerDestroyed)}}dispatchEvent(t,e){this.#be(t,{container:this,data:e})}draw(t){if(!Di(this))return;let e=t;this.#xe=F(t=>{e&&(this.#Se=void 0,e=!1),this.#Re(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}pt().error(`Export plugin with type ${t} not found`)}async init(){if(!Di(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.#_e=_i(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=_i(this.#p,this,this.#_e),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:a,zLayers:r}=this.actualOptions,o=this.actualOptions.hdr;this.hdrMode=o.mode,this.peakNits=o.peakNits,this.zLayers=r,this.#ze=H(i)*n,this.#ve=H(e)*n,this.#Ie=0,this.fpsLimit=s>0?s:120,this.#Oe=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(ct.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(ct.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(Di(this)&&(void 0!==this.#xe&&(t=this.#xe,T(t),this.#xe=void 0),!this.#Ee)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ee=!0),this.dispatchEvent(ct.containerPaused)}}play(t){if(!Di(this))return;const e=this.#Ee||t;if(!this.#ke||this.actualOptions.autoPlay){if(this.#Ee&&(this.#Ee=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(ct.containerPlay),this.draw(e??!1)}else this.#ke=!1}async refresh(){if(Di(this))return this.stop(),this.start()}async reset(t){if(Di(this))return this.#Ce=t,this.#Le=t,this.#_e=_i(this.#p,this,this.#Ce,this.sourceOptions),this.actualOptions=_i(this.#p,this,this.#_e),this.refresh()}async start(){Di(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(ct.containerStarted),this.play(),t()};this.#we=setTimeout(()=>{e()},this.#ve)}))}stop(){if(Di(this)&&this.started){this.#we&&(clearTimeout(this.#we),this.#we=void 0),this.#ke=!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.#Le=this.#_e,this.dispatchEvent(ct.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Re(t){try{if(!this.#Oe&&void 0!==this.#Se&&t<this.#Se+n/this.fpsLimit)return void this.draw(!1);if(this.#Se??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/n}(this.#Pe,t-this.#Se,this.fpsLimit,this.#Oe),this.addLifeTime(this.#Pe.value),this.#Se=t,this.#Pe.value>n)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Pe),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){pt().error("error in animation loop",t)}}}});var Oi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#m;constructor(t,e){this.#m=t,this.#u=e,this.#m.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(E(t))for(const e of t)await this.#m.addEmitter(this.#u,e);else await this.#m.addEmitter(this.#u,t)}pause(){for(const t of this.#m.getArray(this.#u))t.pause()}play(){for(const t of this.#m.getArray(this.#u))t.play()}resize(){for(const t of this.#m.getArray(this.#u))t.resize()}stop(){this.#m.clear(this.#u)}update(t){this.#m.getArray(this.#u).forEach(e=>{e.update(t)})}}});const Li=new Map;var Ri=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Li.set(t,e)}getShapeGenerator(t){return Li.get(t)}getSupportedShapeGenerators(){return Li.keys()}}});var Fi=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Fe;#p;constructor(t){this.#Fe=new Map,this.#p=t}async addEmitter(t,e,i){const s=new Ne;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return Bi}),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.#Fe.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Fe.get(t);return e||(e=[],this.#Fe.set(t,e)),e}initContainer(t){this.#Fe.has(t)||(this.#Fe.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||D(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function Ti(t,e,i,s){(t.paint??=new oe).fill={color:qt.create(void 0,{value:e}),enable:s,opacity:i}}function Ai(t,e,i,s){(t.paint??=new oe).stroke={color:qt.create(void 0,{value:e}),opacity:i,width:s}}var Bi=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Te;#Ae;#Be;#ze;#Ue;#$e;#He;#Ve;#qe;#Y;#Ne;#Ee;#p;#We;#pt;#je;#Ge;#Xe;#Ye;constructor(t,e,s,a,r){this.#p=t,this.#u=e,this.#We=s,this.#Te=0,this.#Ae=0,this.#Be=0,this.#Ve=r,a instanceof Ne?this.options=a:(this.options=new Ne,this.options.load(a)),this.#Xe=e.retina.reduceFactor?H(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0,this.position=this.#Ve??this.#Dt(),this.name=this.options.name,this.fill=this.options.fill,this.#$e=!this.options.life.wait,this.#Ye=!1;const o=tt({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Ie(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Ie(this.#p,this.options.spawn.stroke.color)),this.#Ee=!this.options.autoPlay,this.#Ne=o,this.#Ge=this.#Qe(),this.size=this.#Ge.mode===Y.percent?{width:this.#Ge.width/i*this.#u.canvas.size.width,height:this.#Ge.height/i*this.#u.canvas.size.height}:{width:this.#Ge.width,height:this.#Ge.height},this.#qe=this.options.life.count??-1,this.#He=this.#qe<=0,this.options.domId){const t=K().getElementById(this.options.domId);t&&(this.#Y=new MutationObserver(()=>{this.resize()}),this.#pt=new ResizeObserver(()=>{this.resize()}),this.#Y.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#pt.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.#Ee=!0,this.pause()}externalPlay(){this.#Ee=!1,this.play()}async init(){await(this.#je?.init())}pause(){this.#Ee||(this.#Ue=void 0)}play(){if(this.#Ee)return;if(!(this.#qe>0||this.#He)&&this.options.life.count||!(this.#$e||this.#Be>=(this.#Xe??0)))return;const t=this.#u;if(void 0===this.#Ue){const e=H(this.options.rate.delay);this.#Ue=t.retina.reduceFactor?e*n/t.retina.reduceFactor:1/0}(this.#qe>0||this.#He)&&this.#Ke()}resize(){const t=this.#Ve,e=this.#u;var s,n,a;this.position=t&&(s=t,n=e.canvas.size,a=C.origin,function(t,e,i){let s=!0;return s=t.top<e.height+i.x,s&&(s=t.right>i.x),s&&(s=t.left<e.width+i.y),s&&(s=t.bottom>i.y),s}(function(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}(s,0),n,a))?t:this.#Dt(),this.#Ge=this.#Qe(),this.size=this.#Ge.mode===Y.percent?{width:this.#Ge.width/i*e.canvas.size.width,height:this.#Ge.height/i*e.canvas.size.height}:{width:this.#Ge.width,height:this.#Ge.height},this.#je?.resize(this.position,this.size)}update(t){if(this.#Ee)return;const e=this.#u;this.#$e&&(this.#$e=!1,this.#Be=this.#Xe??0,this.#Ae=this.#Ue??0),this.#Ye||(this.#Ye=!0,this.#Ze(this.options.startCount)),void 0!==this.#ze&&(this.#Te+=t.value,this.#Te>=this.#ze&&(this.pause(),void 0!==this.#Xe&&(this.#Xe=void 0),this.#He||this.#qe--,this.#qe>0||this.#He?(this.position=this.#Dt(),this.#je?.resize(this.position,this.size),this.#Xe=e.retina.reduceFactor?H(this.options.life.delay??0)*n/e.retina.reduceFactor:1/0):this.#Je(),this.#Te-=this.#ze,this.#ze=void 0)),void 0!==this.#Xe&&(this.#Be+=t.value,this.#Be>=this.#Xe&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Be-=this.#Xe,this.#Xe=void 0)),void 0!==this.#Ue&&(this.#Ae+=t.value,this.#Ae>=this.#Ue&&(this.#ti(),this.#Ae-=this.#Ue))}#Dt(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),n=t.retina.pixelRatio;return{x:(i.x+i.width*s)*n,y:(i.y+i.height*s)*n}}}return j({size:t.canvas.size,position:this.options.position})}#Qe(){const t=this.#u;if(this.options.domId){const e=K().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:Y.precise}}}return this.options.size??(()=>{const t=new Ve;return t.load({height:0,mode:Y.percent,width:0}),t})()}#Je(){this.#Y?.disconnect(),this.#Y=void 0,this.#pt?.disconnect(),this.#pt=void 0,this.#We(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#ti(){if(this.#Ee)return;const t=H(this.options.rate.quantity);this.#Ze(t)}#Ze(t){const e=it(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:H(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,r=void 0===this.options.spawn.stroke?.opacity?1:H(this.options.spawn.stroke.opacity),o=void 0===this.options.spawn.stroke?.width?1:H(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:v,s:w,l:P}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?tt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=r,this.spawnStrokeWidth=o,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#ei(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#ei(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#ei(i.l,this.spawnFillColor.l,f.l)),Ti(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#ei(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#ei(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#ei(a.l,this.spawnStrokeColor.l,f.l)),Ai(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&&Ti(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#Ke(){if(this.#Ee)return;const t=void 0!==this.options.life.duration?H(this.options.life.duration):void 0;(this.#qe>0||this.#He)&&void 0!==t&&t>0&&(this.#ze=t*n)}#ei(t,e,i,s=1){const a=this.#u;if(!t.enable)return e;const r=$(t.offset),o=H(this.options.rate.delay),l=a.retina.reduceFactor?o*n/a.retina.reduceFactor:1/0;return(e+H(t.speed)*a.fpsLimit/l+r*s)%i}}});t.loadSquaresPreset=fi,t.tsParticles=Ae}),Object.assign(globalThis.window||globalThis,{loadSquaresPreset:(globalThis.__tsParticlesInternals.presets.squares||{}).loadSquaresPreset}),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)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},function(t){"use strict";const e=/^\[tsParticles Error (TSP-\d+)\]\s*/,i=t=>(...e)=>{t(...e)},s={debug:i(console.debug),error:(t,...i)=>{if("string"==typeof t){const s=e.exec(t);if(s?.[1])return void console.error(`tsParticles - ${s[1]} - ${t.slice(s[0].length)}`,...i)}console.error(`tsParticles - Error - ${t}`,...i)},info:i(console.info),log:i(console.log),trace:i(console.trace),verbose:i(console.log),warning:i(console.warn)};function n(){return s}var a;!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"}(a||(a={}));const r="generated",o="100%",l=100,c=.5,h=1e3,d=0,u=0,p=0,f=1,g=0,m=0,y=1,v="random",w=2*Math.PI,P="true",b="false",z="canvas",x=255,k=360,M=100,S=100,C=.25,I=400;function _(t){return"z"in t?t.z:p}class O{x;y;z;constructor(t=d,e=u,i=p){this.x=t,this.y=e,this.z=i}static get origin(){return O.create(d,u,p)}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 O.create(t.x,t.y,_(t))}static create(t,e,i){return"number"==typeof t?new O(t,e??u,i??p):new O(t.x,t.y,_(t))}add(t){return O.create(this.x+t.x,this.y+t.y,this.z+_(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=_(t)}copy(){return O.clone(this)}div(t){return O.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return O.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 O.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),p)}setTo(t){this.x=t.x,this.y=t.y,this.z=_(t)}sub(t){return O.create(this.x-t.x,this.y-t.y,this.z-_(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=_(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class D extends O{constructor(t=d,e=u){super(t,e,p)}static get origin(){return D.create(d,u)}static clone(t){return D.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new D(t,e??u):new D(t.x,t.y)}}function E(t){return"boolean"==typeof t}function L(t){return"string"==typeof t}function R(t){return"number"==typeof t}function F(t,e){return Object.values(t).some(t=>t===e)}function A(t,e,i){return F(t,e)?e:i}function T(t){return"object"==typeof t&&null!==t}function B(t){return Array.isArray(t)}function U(t){return null==t}const $=Math.PI/180;let q=Math.random;const V=t=>requestAnimationFrame(t),N=t=>{cancelAnimationFrame(t)};function H(){return j(q(),0,1-Number.EPSILON)}function W(t,e){return H()*(e-t)+t}function j(t,e,i){return Math.min(Math.max(t,e),i)}function G(t){const e=Q(t);let i=Y(t);return e===i&&(i=0),W(i,e)}function X(t){return R(t)?t:G(t)}function Y(t){return R(t)?t:t.min}function Q(t){return R(t)?t:t.max}function K(t,e){if(t===e||void 0===e&&R(t))return t;const i=Y(t),s=Q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:K(i,s)}function Z(t){return t*$}function J(t){const e={x:void 0!==t.position?.x?X(t.position.x):void 0,y:void 0!==t.position?.y?X(t.position.y):void 0};return function(t){return{x:(t.position?.x??H()*l)*t.size.width/l,y:(t.position?.y??H()*l)*t.size.height/l}}({size:t.size,position:e})}function tt(t){const{position:e,size:i}=t;return{x:e?.x??H()*i.width,y:e?.y??H()*i.height}}const et="TSP-1001",it="TSP-1002",st="TSP-1003",nt="TSP-1101",at="TSP-1102",rt="TSP-1201",ot="TSP-1202",lt="TSP-1203";function ct(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var ht,dt;function ut(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function pt(){return globalThis.document}function ft(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function gt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(H()*t.length)]}function mt(t,...e){for(const i of e){if(U(i))continue;if(!T(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):T(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return T(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(ut(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ut(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>mt(void 0,t)):mt(e[s],n)}}return t}function yt(t,e){return B(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return B(t)?gt(t,e,i):t}function wt(t,e){return function(t,e){if(t.mode!==dt.percent){const{mode:e,...i}=t;return i}return"x"in t?{x:t.x/l*e.width,y:t.y/l*e.height}:{width:t.width/l*e.width,height:t.height/l*e.height}}(t,e)}let Pt,bt;function zt(t,e,i,s,n){if(s){let s={passive:!0};E(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 xt(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function kt(t){const e=vt(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(B(t))return t.every(t=>T(t)&&!B(t));return T(t)&&!B(t)}(e))return e;n().error("invalid configuration data while retrieving config file")}else n().error(`${t.status.toString()} while retrieving config file`)}catch(t){n().error(`error while retrieving config file: ${t}`)}return t.fallback}!function(t){t.bottom="bottom",t.left="left",t.right="right",t.top="top"}(ht||(ht={})),function(t){t.precise="precise",t.percent="percent"}(dt||(dt={}));class Mt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var St,Ct,It,_t,Ot,Dt,Et,Lt,Rt,Ft,At,Tt,Bt,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"}(St||(St={}));class $t{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;#i=new Set;#s=new Map;#n;#a=new Set;#r=!1;#o=!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}get initialized(){return this.#r}addColorManager(t,e){this.#r||this.colorManagers.set(t,e)}addConfig(t){if(this.#r)return;const e=t.key??t.name??"default";this.#s.set(e,t),this.#n.dispatchEvent(St.configAdded,{data:{name:e,config:t}})}addEasing(t,e){this.#r||this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#r||this.initializers.effects.set(t,e)}addPalette(t,e){this.#r||this.palettes.set(t,e)}addParticleUpdater(t,e){this.#r||this.initializers.updaters.set(t,e)}addPlugin(t){this.#r||this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){this.#r||!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){if(!this.#r)for(const i of t)this.initializers.shapes.set(i,e)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}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 init(){if(!this.#r&&!this.#o){this.#o=!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.#o=!1,this.#r=!0}}}async register(...t){if(this.#r)throw new Error(ct(st));for(const e of t)this.#o?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))}}class qt{pluginManager=new $t(this);#h=[];#d=new Mt;#r=!1;get items(){return this.#h}get version(){return"4.5.0"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(ct(et,this.version))}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#r||(await this.pluginManager.init(),this.#r=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const{Container:i}=await Promise.resolve().then(function(){return Hi}),s=t.id??e?.id??`tsparticles${Math.floor(1e4*H()).toString()}`,{index:n,url:a}=t,l=vt(a?await kt({fallback:t.options,url:a,index:n}):t.options,n),{items:c}=this,h=c.findIndex(t=>t.id.description===s),d=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,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:function(t){let e;const i=pt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===z)e=t,e.dataset[r]??=b,e.dataset[r]===P&&(e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(z).item(0);s?(e=s,e.dataset[r]=b):(e=i.createElement(z),e.dataset[r]=P,t.appendChild(e)),e.style.width||=o,e.style.height||=o,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}(function(t,e){const i=pt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[r]=P,i.body.append(s),s)}(s,e));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)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Ct||(Ct={}));class Vt{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 Nt extends Vt{radius;constructor(t,e,i){super(t,e,Ct.circle),this.radius=i}contains(t){return e=t,i=this.position,s=this.radius,function(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}(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 Nt||t.type===Ct.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof Ht||t.type===Ct.rectangle){const e=t,{width:i,height:r}=e.size;return Math.pow(n-i,2)+Math.pow(a-r,2)<=s**2||n<=s+i&&a<=s+r||n<=i||a<=r}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Ht extends Vt{size;constructor(t,e,i,s){super(t,e,Ct.rectangle),this.size={height:s,width:i}}contains(t){const e=this.size.width,i=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+e&&t.y>=s.y&&t.y<=s.y+i}intersects(t){if(t instanceof Nt)return t.intersects(this);if(!(t instanceof Ht))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,a=t.size,r=a.width,o=a.height;return n.x<s.x+e&&n.x+r>s.x&&n.y<s.y+i&&n.y+o>s.y}reset(t,e,i,s){return this._resetPosition(t,e),this.size.width=i,this.size.height=s,this}}function Wt(t,e,i){void 0!==i&&(t[e]=i)}function jt(t,e,i){void 0!==i&&(t[e]=K(i))}function Gt(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function Xt(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}!function(t){t.clockwise="clockwise",t.counterClockwise="counter-clockwise",t.random="random"}(It||(It={})),function(t){t.auto="auto",t.increase="increase",t.decrease="decrease",t.random="random"}(_t||(_t={})),function(t){t.standard="standard",t.natural="natural",t.vivid="vivid",t.cinematic="cinematic",t.dynamic="dynamic"}(Ot||(Ot={})),function(t){t.delete="delete",t.wait="wait"}(Dt||(Dt={})),function(t){t.bounce="bounce",t.none="none",t.out="out",t.destroy="destroy",t.split="split"}(Et||(Et={})),function(t){t.darken="darken",t.enlighten="enlighten"}(Lt||(Lt={})),function(t){t.none="none",t.max="max",t.min="min"}(Rt||(Rt={})),function(t){t.linear="linear",t.radial="radial",t.random="random"}(Ft||(Ft={})),function(t){t.normal="normal",t.inside="inside",t.outside="outside"}(At||(At={})),function(t){t.max="max",t.min="min",t.random="random"}(Tt||(Tt={})),function(t){t.increasing="increasing",t.decreasing="decreasing"}(Bt||(Bt={})),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"}(Ut||(Ut={}));class Yt{load(t){U(t)||this.doLoad(t)}}function Qt(t,...e){for(const i of e)t.load(i)}class Kt extends Yt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){jt(this,"count",t.count),Wt(this,"enable",t.enable),jt(this,"speed",t.speed),jt(this,"decay",t.decay),jt(this,"delay",t.delay),Wt(this,"sync",t.sync)}}class Zt extends Kt{mode=_t.auto;startValue=Tt.random;doLoad(t){super.doLoad(t),Wt(this,"mode",t.mode),Wt(this,"startValue",t.startValue)}}class Jt extends Kt{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Wt(this,"max",t.max),Wt(this,"min",t.min),jt(this,"offset",t.offset)}}class te extends Yt{h=new Jt(0,k);l=new Jt(0,S);s=new Jt(0,M);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ee extends Yt{value="";static create(t,e){const i=new ee;return i.load(t),void 0!==e&&(L(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){U(t.value)||(this.value=t.value)}}class ie extends ee{animation=new te;static create(t,e){const i=new ie;return i.load(t),void 0!==e&&(L(e)||B(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 se extends Yt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ee,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ee.create(this.color,t.color)),Wt(this,"element",t.element),Wt(this,"draw",t.draw),Wt(this,"image",t.image),Wt(this,"position",t.position),Wt(this,"repeat",t.repeat),Wt(this,"size",t.size),Wt(this,"opacity",t.opacity)}}class ne extends Yt{enable=!0;zIndex=0;doLoad(t){Wt(this,"enable",t.enable),Wt(this,"zIndex",t.zIndex)}}class ae extends Yt{enable=!0;mode=Ot.standard;peakNits=400;doLoad(t){if(void 0!==t.enable&&!E(t.enable))throw new Error(ct(rt,String(t.enable)));if(void 0!==t.mode&&!F(Ot,t.mode))throw new Error(ct(ot,Object.values(Ot).join(", "),(e=t.mode,String(e))));var e;if(void 0!==t.peakNits&&(!R(t.peakNits)||!Number.isFinite(t.peakNits)||t.peakNits<=0))throw new Error(ct(lt,String(t.peakNits)));Wt(this,"enable",t.enable),Wt(this,"mode",t.mode),Wt(this,"peakNits",t.peakNits)}}class re extends Yt{delay=.5;enable=!0;doLoad(t){Wt(this,"delay",t.delay),Wt(this,"enable",t.enable)}}class oe extends Yt{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]=mt(this.options[t]??{},i))}Wt(this,"close",t.close),Wt(this,"type",t.type)}}class le extends Yt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ie.create(this.color,t.color)),Wt(this,"enable",t.enable),jt(this,"opacity",t.opacity)}}class ce extends Yt{offset=0;value=90;doLoad(t){jt(this,"offset",t.offset),jt(this,"value",t.value)}}class he extends Yt{mode=dt.percent;radius=0;x=50;y=50;doLoad(t){Wt(this,"x",t.x),Wt(this,"y",t.y),Wt(this,"mode",t.mode),Wt(this,"radius",t.radius)}}class de extends Yt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){jt(this,"acceleration",t.acceleration),Wt(this,"enable",t.enable),Wt(this,"inverse",t.inverse),jt(this,"maxSpeed",t.maxSpeed)}}class ue extends Yt{value=0;doLoad(t){U(t.value)||(this.value=K(t.value))}}class pe extends ue{animation=new Kt;doLoad(t){var e,i,s;super.doLoad(t),e=this,i="animation",void 0!==(s=t.animation)&&e[i].load(s)}}class fe extends pe{animation=new Zt}class ge extends Yt{clamp=!0;delay=new ue;enable=!1;generator;options={};doLoad(t){Wt(this,"clamp",t.clamp),this.delay.load(t.delay),Wt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options))}}class me extends Yt{bottom;default=Et.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 ye extends Yt{acceleration=0;enable=!1;position;doLoad(t){jt(this,"acceleration",t.acceleration),Wt(this,"enable",t.enable),t.position&&(this.position=mt({},t.position))}}class ve extends Yt{angle=new ce;center=new he;decay=0;direction=a.none;distance={};drift=0;enable=!1;gravity=new de;outModes=new me;path=new ge;random=!1;size=!1;speed=2;spin=new ye;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(R(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),jt(this,"decay",t.decay),Wt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=R(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),jt(this,"drift",t.drift),Wt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(T(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Wt(this,"random",t.random),Wt(this,"size",t.size),jt(this,"speed",t.speed),this.spin.load(t.spin),Wt(this,"straight",t.straight),Wt(this,"vibrate",t.vibrate),Wt(this,"warp",t.warp)}}class we extends Yt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ie.create(this.color,t.color)),jt(this,"width",t.width),jt(this,"opacity",t.opacity)}}class Pe extends Yt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ie.create(this.color,t.color)),Gt(this,"fill",t.fill,()=>new le),Gt(this,"stroke",t.stroke,()=>new we)}}class be extends ue{value=1}class ze extends Yt{horizontal=new be;vertical=new be;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class xe extends Yt{enable=!1;height=1080;width=1920;doLoad(t){Wt(this,"enable",t.enable),Wt(this,"width",t.width),Wt(this,"height",t.height)}}class ke extends Yt{mode=Dt.delete;value=0;doLoad(t){Wt(this,"mode",t.mode),Wt(this,"value",t.value)}}class Me extends Yt{density=new xe;limit=new ke;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Wt(this,"value",t.value)}}class Se extends Yt{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]=mt(this.options[t]??{},i))}Wt(this,"close",t.close),Wt(this,"type",t.type)}}class Ce extends ue{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Wt(this,"opacityRate",t.opacityRate),Wt(this,"sizeRate",t.sizeRate),Wt(this,"velocityRate",t.velocityRate)}}class Ie extends Yt{bounce=new ze;effect=new oe;groups={};move=new ve;number=new Me;paint;palette;reduceDuplicates=!1;shape=new Se;zIndex=new Ce;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Pe,this.paint.color=new ie,this.paint.color.value="#fff",this.paint.fill=new le,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]=mt(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&&(B(e)?this.paint=yt(e,t=>{const e=new Pe;return e.load(t),e}):B(this.paint)?(this.paint=new Pe,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.#u.particleUpdaters;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=(B(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function _e(t,e,...i){const s=new Ie(t,e);return Qt(s,...i),s}class Oe extends Yt{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 se,this.fullScreen=new ne,this.hdr=new ae,this.particles=_e(this.#p,this.#u),this.resize=new re}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,yt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),Wt(this,"autoPlay",t.autoPlay),Wt(this,"clear",t.clear),Wt(this,"key",t.key),Wt(this,"name",t.name),jt(this,"delay",t.delay),Wt(this,"detectRetina",t.detectRetina),jt(this,"duration",t.duration),Wt(this,"fpsLimit",t.fpsLimit);const e=t.hdr;E(e)?(this.hdr.enable=e,this.hdr.mode=Ot.standard,this.hdr.peakNits=400):this.hdr.load(e),Wt(this,"pauseOnBlur",t.pauseOnBlur),Wt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Wt(this,"zLayers",t.zLayers),this.background.load(t.background);const i=t.fullScreen;E(i)?this.fullScreen.enable=i:this.fullScreen.load(i),this.particles.load(t.particles),this.resize.load(t.resize),this.style=mt(this.style,t.style),Wt(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 De=new Map,Ee=1.15,Le=1.05,Re=.2126,Fe=.7152,Ae=.0722;function Te(t,e){let i=De.get(t);return i||(i=e(),De.size>2e3&&De.clear(),De.set(t,i)),i}function Be(t){return j(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function Ue(t,e,i,s=!0){if(!e)return;const n=L(e)?{value:e}:e;if(L(n.value))return $e(t,n.value,i,s);if(B(n.value)){const e=gt(n.value,i,s);if(!e)return;return Ue(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=L(e)?{value:e}:e;if(L(n.value))return n.value===v?function(){const t=0,e=256,i=()=>Math.floor(W(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(B(n.value)){const e=gt(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 qe(t,e,i,s=!0){const n=Ue(t,e,i,s);return n?function(t){const e=t.r/x,i=t.g/x,s=t.b/x,n=Math.max(e,i,s),a=Math.min(e,i,s),r={h:0,l:(n+a)*c,s:0};n!==a&&(r.s=r.l<c?(n-a)/(n+a):(n-a)/(2-n-a),r.h=e===n?(i-s)/(n-a):i===n?2+(s-e)/(n-a):4+(e-i)/(n-a));r.l*=S,r.s*=M,r.h*=60,r.h<0&&(r.h+=k);r.h>=k&&(r.h-=k);return r}(n):void 0}function Ve(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 Ne(t,e,i,s,n){const a=e?4:2,r=i??1;return Te(e?`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-hdr-${r.toString()}-${(s??400).toString()}-${n??Ot.standard}`:`rgb-${t.r.toFixed(a)}-${t.g.toFixed(a)}-${t.b.toFixed(a)}-sdr-${r.toString()}`,()=>e?function(t,e,i=400,s=Ot.standard){const n=i/203,a=function(t,e,i,s){const n=t.r/x,a=t.g/x,r=t.b/x;if(s!==Ot.natural&&s!==Ot.vivid&&s!==Ot.cinematic&&s!==Ot.dynamic)return{b:r,g:a,r:n};const o=Math.max(1,e),l=Re*n+Fe*a+Ae*r,c=function(t,e,i){if(t<=i)return Be(t);const s=t+(t-i)*(e-1);return Be(s)}(l,e,i),h=l>0?c/l:1;return function(t,e,i,s,n){switch(s){case Ot.vivid:{const s=(t+e+i)/3;return{b:j(j(s+(i-s)*Ee,0,n)*Le,0,n),g:j(j(s+(e-s)*Ee,0,n)*Le,0,n),r:j(j(s+(t-s)*Ee,0,n)*Le,0,n)}}case Ot.cinematic:{const s=1.05*t,a=.95*i,r=(s+e+a)/3;return{b:j(r+1.1*(a-r),0,n),g:j(r+1.1*(e-r),0,n),r:j(r+1.1*(s-r),0,n)}}case Ot.dynamic:{const s=Re*t+Fe*e+Ae*i,a=Math.min(1,2*s),r=1-a,o=(t+e+i)/3,l=j(o+(t-o)*Ee,0,n)*Le,c=j(o+(e-o)*Ee,0,n)*Le,h=j(o+(i-o)*Ee,0,n)*Le;return{b:j(i*r+h*a,0,n),g:j(e*r+c*a,0,n),r:j(t*r+l*a,0,n)}}case Ot.standard:case Ot.natural:default:return{b:i,g:e,r:t}}}(j(n*h,0,o),j(a*h,0,o),j(r*h,0,o),s,o)}(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 He(t,e,i,s,n){const a=e?4:2,r=i??1;return Te(e?`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-hdr-${r.toString()}-${(s??I).toString()}-${n??Ot.standard}`:`hsl-${t.h.toFixed(a)}-${t.s.toFixed(a)}-${t.l.toFixed(a)}-sdr-${r.toString()}`,()=>e?Ne(function(t){const e=(t.h%k+k)%k,i=Math.max(0,Math.min(M,t.s)),s=Math.max(0,Math.min(S,t.l)),n=e/k,a=i/M,r=s/S;if(0===i){const t=r*x;return{r:t,g:t,b:t}}const o=r<c?r*(1+a):r+a-r*a,l=2*r-o,h=1/3;return{r:Math.min(x,x*Ve(l,o,n+h)),g:Math.min(x,x*Ve(l,o,n)),b:Math.min(x,x*Ve(l,o,n-h))}}(t),!0,i,s,n):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${r.toString()})`)}function We(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function je(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:k},s:{enable:!1,value:t.s,min:0,max:M},l:{enable:!1,value:t.l,min:0,max:S}};return e&&(Ge(s.h,e.h,i),Ge(s.s,e.s,i),Ge(s.l,e.l,i)),s}function Ge(t,e,i){t.enable=e.enable,t.min=e.min,t.max=e.max,t.enable?(t.velocity=X(e.speed)/l*i,t.decay=1-X(e.decay),t.status=Bt.increasing,t.loops=0,t.maxLoops=X(e.count),t.time=0,t.delayTime=X(e.delay)*h,e.sync||(t.velocity*=H(),t.value*=H()),t.initialValue=t.value,t.offset=K(e.offset)):t.velocity=0}function Xe(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?G(t.offset):0,a=(t.velocity??0)*i.factor+3.6*n,r=t.decay??1,o=t.max,l=t.min;e&&t.status!==Bt.increasing?(t.value-=a,t.value<l&&(t.loops??=0,t.loops++,t.status=Bt.increasing)):(t.value+=a,t.value>o&&(t.loops??=0,t.loops++,e?t.status=Bt.decreasing:t.value-=o)),t.velocity&&1!==r&&(t.velocity*=r),t.value=j(t.value,l,o)}function Ye(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;Xe(s,!1,e),Xe(n,!0,e),Xe(a,!0,e)}const Qe=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new qt}();class Ke{count;delay;duration;wait=!1;load(t){U(t)||(Wt(this,"count",t.count),jt(this,"delay",t.delay),jt(this,"duration",t.duration),Wt(this,"wait",t.wait))}}class Ze{delay=.1;quantity=1;load(t){U(t)||(jt(this,"quantity",t.quantity),jt(this,"delay",t.delay))}}class Je{color=!1;opacity=!1;load(t){U(t)||(Wt(this,"color",t.color),Wt(this,"opacity",t.opacity))}}class ti{options={};replace=new Je;type="square";load(t){U(t)||(void 0!==t.options&&(this.options=mt({},t.options??{})),this.replace.load(t.replace),Wt(this,"type",t.type))}}class ei{height=0;mode=dt.percent;width=0;load(t){U(t)||(Wt(this,"mode",t.mode),Wt(this,"height",t.height),Wt(this,"width",t.width))}}class ii{fill;stroke;load(t){U(t)||(t.fill&&(this.fill??=new le,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new we,this.stroke.load(t.stroke)))}}class si{autoPlay=!0;direction;domId;draggable=!1;draw=!0;fill=!0;life=new Ke;name;particles;position;rate=new Ze;shape=new ti;size;spawn=new ii;spawnFillColor;spawnStrokeColor;startCount=0;load(t){U(t)||(Wt(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new ei,this.size.load(t.size)),Wt(this,"direction",t.direction),Wt(this,"domId",t.domId),Wt(this,"draggable",t.draggable),Wt(this,"draw",t.draw),Wt(this,"fill",t.fill),this.life.load(t.life),Wt(this,"name",t.name),this.particles=yt(t.particles,t=>mt({},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=K(t.position.x)),void 0!==t.position.y&&(this.position.y=K(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ie,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ie,this.spawnStrokeColor.load(t.spawnStrokeColor)),Wt(this,"startCount",t.startCount))}}class ni{id="emitters";#m;constructor(t){this.#m=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Wi});return new e(this.#m,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=yt(i.emitters,t=>{const e=new si;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return B(e)&&!!e.length||void 0!==e}}const ai=new WeakMap;var ri,oi;async function li(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=ai.get(e);return i||(i=Promise.resolve().then(function(){return Xi}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw ai.delete(e),t}),ai.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Gi}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new ni(e))})}!function(t){t.emitter="emitter"}(ri||(ri={})),function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(oi||(oi={}));const ci=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class di{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(ci,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=hi.exec(e);return i?{a:i[oi.a]?Number.parseInt(i[oi.a],16)/255:1,b:Number.parseInt(i[oi.b]??"0",16),g:Number.parseInt(i[oi.g]??"0",16),r:Number.parseInt(i[oi.r]??"0",16)}:void 0}}async function ui(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new di)})}class pi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=vt(i.paint,t.id,i.reduceDuplicates);this.#v(s,t,e),this.#w(s,t,e)}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),r=!!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||r)}update(t,e){this.isEnabled(t)&&(Ye(t.fillColor,e,this.#u.hdr),Ye(t.strokeColor,e,this.#u.hdr))}#v(t,e,i){const s=t?.fill,n=t?.color,a=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const r=ie.create(void 0===a?void 0:ie.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=X(s.opacity),e.fillAnimation=r.animation;const o=qe(this.#p,r);o&&(e.fillColor=je(o,e.fillAnimation,i.retina.reduceFactor))}#w(t,e,i){const s=t?.stroke,n=t?.color,a=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const r=ie.create(void 0===a?void 0:ie.create(void 0,a),s.color);e.strokeWidth=X(s.width)*i.retina.pixelRatio,e.strokeOpacity=X(s.opacity??1),e.strokeAnimation=r.animation;const o=qe(this.#p,r)??e.getFillColor();o&&(e.strokeColor=je(o,e.strokeAnimation,i.retina.reduceFactor))}}async function fi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new pi(t.pluginManager,e)))})}class gi{decay=0;enable=!1;speed=0;sync=!1;load(t){U(t)||(Wt(this,"enable",t.enable),jt(this,"speed",t.speed),jt(this,"decay",t.decay),Wt(this,"sync",t.sync))}}class mi extends ue{animation=new gi;direction=It.clockwise;path=!1;load(t){U(t)||(super.load(t),Wt(this,"direction",t.direction),this.animation.load(t.animation),Wt(this,"path",t.path))}}function yi(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,r=e.min,o=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 Bt.increasing:e.value+=a;break;case Bt.decreasing:e.value-=a}switch(e.velocity&&1!==l&&(e.velocity*=l),e.status){case Bt.increasing:e.value>=o&&(i?e.status=Bt.decreasing:e.value-=o,e.loops??=0,e.loops++);break;case Bt.decreasing:e.value<=r&&(i?e.status=Bt.increasing:e.value+=o,e.loops??=0,e.loops++)}!function(t,e,i,s,n){switch(e){case Rt.max:i>=n&&t.destroy();break;case Rt.min:i<=s&&t.destroy()}}(t,s,e.value,r,o),t.destroyed||(e.value=j(e.value,r,o))}}class vi{#u;constructor(t){this.#u=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:Z(X(e.value)),min:0,max:w},t.pathRotation=e.path;let i=e.direction;if(i===It.random){i=Math.floor(2*H())>0?It.counterClockwise:It.clockwise}switch(i){case It.counterClockwise:case"counterClockwise":t.rotate.status=Bt.decreasing;break;case It.clockwise:t.rotate.status=Bt.increasing}const s=e.animation;s.enable&&(t.rotate.decay=1-X(s.decay),t.rotate.velocity=X(s.speed)/360*this.#u.retina.reduceFactor,s.sync||(t.rotate.velocity*=H())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){Xt(t,"rotate",mi,...e)}update(t,e){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&(yi(t,t.rotate,!1,Rt.none,e),t.rotation=t.rotate.value))}}async function wi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new vi(t)))})}class Pi extends Zt{destroy=Rt.none;load(t){super.load(t),U(t)||Wt(this,"destroy",t.destroy)}}class bi extends fe{animation=new Pi;value=3;load(t){if(super.load(t),U(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class zi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/l*e.retina.reduceFactor,s.sync||(t.size.velocity*=H()))}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){Xt(t,"size",bi,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=function(t,e){const i=t.value,s=t.animation,n={delayTime:X(s.delay)*h,enable:s.enable,value:X(t.value)*e,max:Q(i)*e,min:Y(i)*e,loops:0,maxLoops:X(s.count),time:0};if(s.enable){switch(n.decay=1-X(s.decay),s.mode){case _t.increase:n.status=Bt.increasing;break;case _t.decrease:n.status=Bt.decreasing;break;case _t.random:n.status=H()>=c?Bt.increasing:Bt.decreasing}const t=s.mode===_t.auto;switch(s.startValue){case Tt.min:n.value=n.min,t&&(n.status=Bt.increasing);break;case Tt.max:n.value=n.max,t&&(n.status=Bt.decreasing);break;case Tt.random:default:n.value=G(n),t&&(n.status=H()>=c?Bt.increasing:Bt.decreasing)}}return n.initialValue=n.value,n}(i,e),t.retina.sizeAnimationSpeed=X(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&yi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function xi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new zi(t)))})}class ki{draw(t){!function(t){const{context:e,radius:i}=t,s=i*Math.SQRT1_2,n=2*s;e.rect(-s,-s,n,n)}(t)}getSidesCount(){return 4}}async function Mi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["edge","square"],()=>Promise.resolve(new ki))})}const Si={particles:{paint:{stroke:{width:5,color:{value:["#5bc0eb","#fde74c","#9bc53d","#e55934","#fa7921","#2FF3E0","#F8D210","#FA26A0","#F51720"]}},fill:{enable:!1}},shape:{type:"square"},rotate:{value:0,direction:It.counterClockwise,animation:{enable:!0,speed:2,sync:!0}},size:{value:{min:1,max:500},animation:{enable:!0,startValue:Tt.min,speed:60,sync:!0,destroy:Rt.max}}},background:{color:"#000"},emitters:{position:{y:50,x:50},rate:{delay:1,quantity:1}}};async function Ci(t){await t.pluginManager.register(async t=>{await Promise.all([ui(t),li(t),Mi(t),wi(t),xi(t),fi(t)]),t.pluginManager.addPreset("squares",Si)})}const Ii=globalThis;Ii.loadSquaresPreset=Ci,Ii.tsParticles=Qe;function _i(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Oi{#P;#b;#z;#x;#k;#u;#M;#S;#C;#I;#_;#O;#p;#D;#E;#L={};#R=[void 0,void 0];#F={};constructor(t,e,i){this.#p=t,this.#u=e,this.#x=i,this.#M=null,this.#P=null,this.#b=new Set,this.#E=[],this.#D=[],this.#z=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[],this.#O={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#S}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(d,u,this.#x.size.width,this.#x.size.height)})}clear(){const t=new Set;for(const e of this.#z)if(t.add(e),e.canvasClear?.())return e;for(const e of Object.values(Ut))if("number"==typeof e)for(const i of this.#A(e))if(!t.has(i)&&(t.add(i),i.canvasClear?.()))return i;this.canvasClear()}destroy(){this.stop(),this.#P=null,this.#b.clear(),this.#E=[],this.#D=[],this.#z=[],this.#k=[],this.#C=[],this.#I=[],this.#_=[];for(const t of Object.values(Ut))"number"==typeof t&&(this.#O[t]=[])}draw(t){const e=this.#M;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,r]=this.#T(t);if(a??=s,r??=n,!a&&!r)return;const o=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#F,f=this.#L,g=a?He(a,o.hdr,h*d,o.peakNits,o.hdrMode):void 0,m=r?He(r,o.hdr,u*d,o.peakNits,o.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.#_)i.drawParticleSetup?.(s,t,e);this.#B(s,t,i,d,f,p),this.#U({container:o,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.#C)this.#q(i,s,t,e)})}drawParticles(t){const{particles:e,actualOptions:i}=this.#u,s=this.clear();e.update(t),this.draw(n=>{const a=this.#x.size.width,r=this.#x.size.height;if(this.#P)try{n.drawImage(this.#P,d,u,a,r)}catch{this.#V("background-element-draw-error","Error drawing background element onto canvas")}const o=i.background;if(o.draw)try{o.draw(n,t)}catch{this.#V("background-draw-error","Error in background.draw callback")}for(const t of this.#A(Ut.BackgroundMask))t!==s&&t.canvasPaint?.();for(const e of this.#A(Ut.CanvasSetup))e.drawSettingsSetup?.(n,t);for(const e of this.#A(Ut.PluginContent))e.draw?.(n,t);e.drawParticles(t);for(const e of this.#A(Ut.CanvasCleanup))e.clearDraw?.(n,t),e.drawSettingsCleanup?.(n,t)})}init(){this.initUpdaters(),this.initPlugins(),this.#N(),this.paint()}initPlugins(){this.#z=[],this.#k=[],this.#C=[],this.#_=[],this.#I=[];for(const t of Object.values(Ut))"number"==typeof t&&(this.#O[t]=[]);this.#H()}initUpdaters(){this.#E=[],this.#D=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#D.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#E.push(t)}paint(){let t=!1;for(const e of this.#A(Ut.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(d,u,this.#x.size.width,this.#x.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,d,u,this.#x.size.width,this.#x.size.height),i.globalAlpha=s})}setContext(t){this.#M=t,this.#M&&(this.#M.globalCompositeOperation="source-over")}setContextSettings(t){this.#S=t}stop(){this.draw(t=>{t.clearRect(d,u,this.#x.size.width,this.#x.size.height)})}#$(t){for(const e of this.#D)e.afterDraw?.(t)}#B(t,e,i,s,n,a){for(const r of this.#E){if(r.getColorStyles){const{fill:a,stroke:o}=r.getColorStyles(e,t,i,s);a&&(n.fill=a),o&&(n.stroke=o)}if(r.getTransformValues){const t=r.getTransformValues(e);for(const e in t)_i(a,t,e)}r.beforeDraw?.(e)}}#W(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#j(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#U(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:r,opacity:o,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:r,drawRadius:1*r,opacity:o,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.#G(v,m),this.#X(v,m),this.#Y(v,m),this.#W(y,m),i.resetTransform()}#q(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)}#G(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#A(t){return this.#O[t]}#T(t){let e,i;for(const s of this.#k)if(!e&&s.particleFillColor&&(e=qe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=qe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#R[0]=e,this.#R[1]=i,this.#R}#Q(t){const e=[[Ut.BackgroundMask,!!t.canvasPaint],[Ut.CanvasSetup,!!t.drawSettingsSetup],[Ut.PluginContent,!!t.draw],[Ut.CanvasCleanup,!!(t.clearDraw??t.drawSettingsCleanup)]];for(const[i,s]of e)s&&this.#O[i].push(t)}#H(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#k.push(t),t.drawParticle&&this.#C.push(t),t.drawParticleSetup&&this.#_.push(t),t.drawParticleCleanup&&this.#I.push(t),t.canvasClear&&this.#z.push(t),this.#Q(t)}#K(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement}#N(){const t=this.#u.actualOptions.background;if(this.#P=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#K(e)?this.#P=e:e?this.#V("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#V("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#K(t.element)&&(this.#P=t.element)}#V(t,e){this.#b.has(t)||(this.#b.add(t),n().warning(e))}}const Di=new WeakMap;function Ei(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 Li{domElement;render;renderCanvas;size;zoom=1;#u;#Z;#J;#tt;#et;#p;#it;#st;#nt;#at;constructor(t,e){this.#p=t,this.#u=e,this.render=new Oi(t,e,this),this.#nt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#nt;this.size={height:s.height*i,width:s.width*i},this.#Z=!1,this.#st=[],this.#it="none"}get#rt(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#Z){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#ot();this.render.destroy(),this.#st=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#at?this.#at:{x:e*c/t,y:i*c/t}}init(){this.#lt(t=>{t.disconnect()}),this.#tt=function(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#ct()}),this.resize(),this.#ht(),this.#lt(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#dt(),this.initBackground(),this.#ut(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=Ue(this.#p,e.color);if(n){const i=t.actualOptions.hdr;s.backgroundColor=Ne(n,t.hdr,e.opacity,i.peakNits,A(Ot,i.mode,Ot.standard))}else s.backgroundColor="";s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#st=[];for(const t of this.#u.plugins)t.resize&&this.#st.push(t)}loadCanvas(t){this.#Z&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#Z=!!e&&"true"===e.dataset[r],this.renderCanvas=e?(t=>{const e=Di.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(ct(nt));try{const e=t.transferControlToOffscreen();return Di.set(t,e),e}catch{throw new TypeError(ct(at))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#et=function(t){const e=pt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||U(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}(i.style));const s=this.#nt,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const a=this.#u.retina.pixelRatio,o=this.size;n.height=o.height=s.height*a,n.width=o.width=s.width*a}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.#nt,n={width:t.offsetWidth,height:t.offsetHeight},a=e.retina.pixelRatio,r={width:n.width*a,height:n.height*a};if(n.height===s.height&&n.width===s.width&&r.height===i.height&&r.width===i.width)return!1;const o={...s};s.height=n.height,s.width=n.width;const l=this.size;return i.width=l.width=r.width,i.height=l.height=r.height,this.#u.started&&e.particles.setResizeFactor({width:s.width/o.width,height:s.height/o.height}),!0}setPointerEvents(t){this.domElement&&(this.#it=t,this.#ct())}setZoom(t,e){this.zoom=t,this.#at=e}stop(){this.#lt(t=>{t.disconnect()}),this.#tt=void 0,this.#pt(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#ft(),e&&await t.refresh()}#ft(){for(const t of this.#st)t.resize?.()}#dt(){const t=this.#u,e=t.actualOptions.hdr.enable&&ft("(color-gamut: p3)")?.matches&&ft("(dynamic-range: high)")?.matches;t.hdrMode=A(Ot,t.actualOptions.hdr.mode,Ot.standard),t.peakNits=t.actualOptions.hdr.peakNits;const i=this.renderCanvas;if(!i)return void(t.hdr=e??!1);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){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{s=i.getContext("2d",t)}catch{s=null}}if(this.render.setContext(s),s){const e=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(s);void 0!==e&&(t.hdr="display-p3"===e)}}#ut(){this.#pt();const t=ft("(color-gamut: p3)"),e=ft("(dynamic-range: high)"),i=()=>{this.#dt(),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.#J=s}#ht(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#rt?this.#gt():this.#ot();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(){if(this.#J){for(const{handler:t,mql:e}of this.#J)e.removeEventListener("change",t);this.#J=void 0}}#ct(){const t=this.domElement;if(!t)return;this.#lt(t=>{t.disconnect()}),this.#ht(),this.initBackground();const e=this.#it;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#lt(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#ot(){const t=this.domElement,e=this.#et;t&&e&&Ei(t,e,!0)}#lt(t){this.#tt&&t(this.#tt)}#gt(){const t=this.domElement;t&&Ei(t,function(t){if(Pt!==t||!bt){Pt=t;const e=pt().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)}bt=e}return bt}(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ri{#u;#mt;#yt;#vt;constructor(t){this.#u=t,this.#mt={visibilityChange:()=>{this.#wt()},resize:()=>{this.#Pt()}}}addListeners(){this.#bt(!0)}removeListeners(){this.#bt(!1)}#wt(){const t=this.#u;t.actualOptions.pauseOnBlur&&(pt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Pt(){this.#vt&&(clearTimeout(this.#vt),this.#vt=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#vt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*h)}#bt(t){const e=this.#mt;this.#zt(t),zt(document,"visibilitychange",e.visibilityChange,t,!1)}#zt(t){const e=this.#mt,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void zt(globalThis,"resize",e.resize,t);const s=i.canvas.domElement;this.#yt&&!t?(s&&this.#yt.unobserve(s),this.#yt.disconnect(),this.#yt=void 0):!this.#yt&&t&&s&&(this.#yt=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#Pt()}),this.#yt.observe(s))}}function Fi(t){if(e=t.outMode,i=t.checkModes,!(e===i||B(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 Ai(t,e){const i=t%e;return i<0?i+e:i}function Ti(t,e,i,s){const n=_e(i,e,e.actualOptions.particles),a=n.reduceDuplicates;t.effect=vt(n.effect.type,t.id,a),t.shape=vt(n.shape.type,t.id,a);const r=n.effect,o=n.shape;if(s){if(s.effect){const e=s.effect.type;if(e&&e!==t.effect){const i=vt(e,t.id,a);i&&(t.effect=i)}r.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=vt(e,t.id,a);i&&(t.shape=i)}o.load(s.shape)}}if(t.effect===v){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(H()*i.length)]}if(t.shape===v){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(H()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(t.effect,r,t.id,a):void 0,t.shapeData=t.shape?function(t,e,i,s){const n=e.options[t];return mt({close:e.close},vt(n,i,s))}(t.shape,o,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 Bi{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};#kt=O.origin;#Mt={sin:0,cos:0};#St={a:1,b:0,c:0,d:1};#u;#Ct=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Ct.push(t),this.#Ct.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Ct.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(St.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.#It(this.#_t(We(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*c}getModifier(t){return this.#Ct.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=X(this.opacity?.value??1),s=this.#_t(void 0,t=>t.opacity)??i;return this.#xt.fillOpacity=this.fillOpacity??1,this.#xt.opacity=s*e,this.#xt.strokeOpacity=this.strokeOpacity??1,this.#xt}getPosition(){return this.#kt.x=this.position.x+this.offset.x,this.#kt.y=this.position.y+this.offset.y,this.#kt.z=this.position.z,this.#kt}getRadius(){return this.#_t(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Mt.sin=Math.sin(t),this.#Mt.cos=Math.cos(t),this.#Mt}getStrokeColor(){return this.#It(this.#_t(We(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#St.a=e.cos*(t.a??f),this.#St.b=i?e.sin*(t.b??1):t.b??g,this.#St.c=i?-e.sin*(t.c??1):t.c??m,this.#St.d=e.cos*(t.d??y),this.#St}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=At.normal,t.ignoresResizeRatio=!0}(this,t,s),this.options=Ti(this,n,this.#p,i),n.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(n.particleUpdaters,this),this.#Ot(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.#Et({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Et({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=Ai(t,w);return e>=Math.PI*c&&e<3*Math.PI*c}if(this.roll.horizontal){const e=Ai(t+Math.PI*c,w);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ai(t,w);return e>=Math.PI&&e<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}removeModifier(t){const e=this.#Ct.findIndex(e=>e.id===t);e>=0&&this.#Ct.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#_t(t,e){let i=t;for(const t of this.#Ct)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Lt(t,e){let i=0,s=t?O.create(t.x,t.y,e):void 0;const n=this.#u,a=n.particlePositionPlugins,r=this.options.move.outModes,o=this.getRadius(),l=n.canvas.size;for(;;){for(const t of a){const i=t.particlePosition?.(s,this);if(i)return O.create(i.x,i.y,e)}const t=tt({size:l,position:s}),c=O.create(t.x,t.y,e);this.#Rt(c,o,r.left??r.default),this.#Rt(c,o,r.right??r.default),this.#Ft(c,o,r.top??r.default),this.#Ft(c,o,r.bottom??r.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=D.origin;return e.length=1,e.angle=t,e}(this.direction).copy();if(t.direction===a.inside||t.direction===a.outside)return e;const i=Z(X(t.angle.value)),s=Z(X(t.angle.offset)),n={left:s-i*c,right:s+i*c};return t.straight||(e.angle+=G(K(n.left,n.right))),t.random&&"number"==typeof t.speed&&(e.length*=H()),e}#Rt(t,e,i){Fi({outMode:i,checkModes:[Et.bounce],coord:t.x,maxCoord:this.#u.canvas.size.width,setCb:e=>t.x+=e,radius:e})}#Ft(t,e,i){Fi({outMode:i,checkModes:[Et.bounce],coord:t.y,maxCoord:this.#u.canvas.size.height,setCb:e=>t.y+=e,radius:e})}#At(t,e){const i=this.getRadius(),s=this.#u.canvas.size,n=this.position,a=e===Et.bounce;return t===ht.bottom?{inside:a?n.y+i<s.height:n.y-i<s.height,reason:"default"}:t===ht.left?{inside:a?n.x-i>0:n.x+i>0,reason:"default"}:t===ht.right?{inside:a?n.x+i<s.width:n.x-i<s.width,reason:"default"}:t===ht.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()}}#Et(t){const e=this.#At(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,r=n?.isInsideCanvas;if(!a&&!r)return e;const o=this.#Tt(t.direction,t.outMode),l=a?this.#Bt(a(o),"shape"):void 0,c=r?this.#Bt(r(o),"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}#It(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===Lt.darken?-1:1)*i}}(t,this.roll.alter.type,this.roll.alter.value):t:t}#Ot(t){const e=this.#u,i=Math.floor(X(this.options.zIndex.value)),s=this.#Lt(t,j(i,0,e.zLayers));if(!s)throw new Error(ct(it));this.position=s,this.initialPosition=this.position.copy();const n=e.canvas.size;switch(this.moveCenter={...wt(this.options.move.center,n),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=function(t,e,i){if(R(t))return Z(t);switch(t){case a.top:return-Math.PI*c;case a.topRight:return-Math.PI*C;case a.right:return 0;case a.bottomRight:return Math.PI*C;case a.bottom:return Math.PI*c;case a.bottomLeft:return.75*Math.PI;case a.left:return Math.PI;case a.topLeft:return.75*-Math.PI;case a.inside:return Math.atan2(i.y-e.y,i.x-e.x);case a.outside:return Math.atan2(e.y-i.y,e.x-i.x);default:return H()*w}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case a.inside:this.outType=At.inside;break;case a.outside:this.outType=At.outside}this.offset=D.origin}#Bt(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Ui{#Ut;#$t=new Map;#qt=[];#Vt;#Nt;#Ht=[];#Wt;constructor(t){this.#Ut=t,this.#Vt=0,this.#Wt=0}get cellSize(){return this.#Ut}set cellSize(t){this.#Nt=t}clear(){this.#$t.clear();const t=this.#Nt;t&&(this.#Ut=t),this.#Nt=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#jt(e,i);this.#$t.has(s)||this.#$t.set(s,[]),this.#$t.get(s)?.push(t)}query(t,e,i=[]){const s=this.#Gt(t);if(!s)return i;const n=Math.floor(s.minX/this.#Ut),a=Math.floor(s.maxX/this.#Ut),r=Math.floor(s.minY/this.#Ut),o=Math.floor(s.maxY/this.#Ut);for(let s=n;s<=a;s++)for(let n=r;n<=o;n++)this.#Xt(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#Yt(t.x,t.y,e),a=this.query(n,i,s);return this.#Qt(),a}queryRectangle(t,e,i,s=[]){const n=this.#Kt(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#Qt(),a}#Yt(t,e,i){const s=this.#Vt++;let n=this.#qt[s];return n||(n=new Nt(t,e,i),this.#qt[s]=n),n.reset(t,e,i)}#Kt(t,e,i,s){const n=this.#Wt++;let a=this.#Ht[n];return a||(a=new Ht(t,e,i,s),this.#Ht[n]=a),a.reset(t,e,i,s)}#jt(t,e){return`${Math.floor(t/this.#Ut)}_${Math.floor(e/this.#Ut)}`}#Gt(t){if(t instanceof Nt){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 Ht){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(t,e,i,s,n){const a=this.#$t.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}#Qt(){this.#Vt=0,this.#Wt=0}}class $i{checkParticlePositionPlugins;#Zt;#u;#Jt;#te;#ee;#ie;#se;#ne;#ae;#p;#re;#oe;#le;#ce;#he;#de;constructor(t,e){this.#p=t,this.#u=e,this.#ie=0,this.#Zt=[],this.#re=[],this.#ee=0,this.#te=new Map,this.#se=new Map,this.#de=this.#ue(this.#u.zLayers),this.#Jt=new Ui(100),this.checkParticlePositionPlugins=[],this.#ne=[],this.#ae=[],this.#le=[],this.#oe=[],this.#he=[]}get count(){return this.#Zt.length}get grid(){return this.#Jt}addParticle(t,e,i,s){if(!this.#pe(i,this.count))try{const n=this.#re.pop()??new Bi(this.#p,this.#u);n.init(this.#ie,t,e,i);let a=!0;return s&&(a=s(n)),a?(this.#Zt.push(n),this.#fe(n),this.#ie++,this.#u.dispatchEvent(St.particleAdded,{particle:n}),n):void this.#re.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#Zt=[],this.#se.clear(),this.#ge(this.#u.zLayers)}destroy(){this.#Zt=[],this.#re.length=0,this.#se.clear(),this.#de=[],this.checkParticlePositionPlugins=[],this.#ne=[],this.#ae=[],this.#le=[],this.#oe=[],this.#he=[]}drawParticles(t){for(let e=this.#de.length-1;e>=0;e--){const i=this.#de[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#Zt.filter(t)}find(t){return this.#Zt.find(t)}get(t){return this.#Zt[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#he=[],this.#ae=[],this.#le=[],this.#ne=[],this.#oe=[],this.#se.clear(),this.#ge(t.zLayers),this.#Jt=new Ui(100*t.retina.pixelRatio),this.#me(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#me(_e(this.#p,this.#u,i),t,i)}await this.#ye()}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.#Zt.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let a=0;for(let r=t;a<e&&r<this.count;r++)this.#ve(r,i,s,n)&&(r--,a++)}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=_e(this.#p,this.#u,s);this.#we(n,i,t)}this.#we(t.particles,i)}setResizeFactor(t){this.#ce=t}update(t){this.#Jt.clear();for(const e of this.#he)e.update?.(t);const e=this.#Pe(t);for(const e of this.#le)e.postUpdate?.(t);if(this.#be(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#ce=void 0}#ze(...t){this.#re.push(...t)}#we(t,e,i,s){const n=t.number;if(!n.density.enable)return void this.#me(t,i,s);const a=this.#xe(n.density),r=n.value,o=n.limit.value>0?n.limit.value:r,l=Math.min(r,o)*a+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#ee=n.limit.value*a:this.#te.set(i,{limit:n.limit.value*a,mode:A(Dt,n.limit.mode,Dt.delete)}),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)}#me(t,e,i){if(void 0===e){this.#ee=t.number.limit.value;const e=this.#u.actualOptions.particles.groups;for(const t of this.#te.keys())t in e||this.#te.delete(t)}else{const s=i?.number?.limit?.value??t.number.limit.value;s>0?this.#te.set(e,{limit:s,mode:A(Dt,i?.number?.limit?.mode??t.number.limit.mode,Dt.delete)}):this.#te.delete(e)}}#pe(t,e){const i=this.#ee,s=this.#u.actualOptions.particles.number.limit.mode;if(i>0&&s===Dt.wait&&e>=i)return!0;const n=void 0===t?void 0:this.#te.get(t);if(n&&n.limit>0&&n.mode===Dt.wait){if(this.filter(e=>e.group===t).length>=n.limit)return!0}if(n&&n.limit>0&&n.mode===Dt.delete){const e=this.filter(e=>e.group===t).length+1-n.limit;e>0&&this.removeQuantity(e,t)}if(i>0&&s===Dt.delete){const t=this.count+1-i;t>0&&this.#ke(t)}return!1}#ue(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#Me(t){const e=this.#de.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#xe(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}async#Se(){const t=this.#u;await t.initDrawersAndUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#ye(){await this.#Ce(),await this.#Se();let t=!1;const e=this.#u;for(const i of e.plugins)if(t=i.particlesInitialization?.()??t,t)break;if(t)return;const i=e.actualOptions.particles,s=i.groups;for(const t in s){const e=s[t];if(e)for(let s=this.count,n=0;n<e.number.value&&s<i.number.value;s++,n++)this.addParticle(void 0,e,t)}for(let t=this.count;t<i.number.value;t++)this.addParticle()}async#Ce(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#he.push(e),e.particleUpdate&&this.#ae.push(e),e.postUpdate&&this.#le.push(e),e.particleReset&&this.#ne.push(e),e.postParticleUpdate&&this.#oe.push(e)}#fe(t){const e=this.#Me(t.position.z),i=this.#de[e];i&&(i.push(t),this.#se.set(t.id,e))}#ke(t){this.removeAt(0,t,void 0,void 0,!1)}#ve(t,e,i,s=!0){const n=this.#Zt[t];return!!n&&((!s||n.group===e)&&(this.#Zt.splice(t,1),this.#Ie(n),n.destroy(i),this.#u.dispatchEvent(St.particleRemoved,{particle:n}),this.#ze(n),!0))}#Ie(t){const e=this.#se.get(t.id)??this.#Me(t.position.z),i=this.#de[e];if(!i)return void this.#se.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#se.delete(t.id)}#ge(t){const e=Math.max(Math.floor(t),1);if(this.#de.length===e)for(const t of this.#de)t.length=0;else this.#de=this.#ue(e)}#_e(t){const e=this.#Me(t.position.z),i=this.#se.get(t.id);if(void 0===i)return void this.#fe(t);if(i===e)return;const s=this.#de[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#de[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.#se.set(t.id,e)}else this.#se.set(t.id,e)}#Pe(t){const e=new Set,i=this.#ce;for(const s of this.#Zt){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.#ne)t.particleReset?.(s);for(const e of this.#ae){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#Jt.insert(s)}return e}#be(t,e){for(const i of this.#Zt)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.#oe)e.postParticleUpdate?.(i,t);this.#_e(i)}}}class qi{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=X(s.gravity.maxSpeed)*i,a.moveDrift=X(s.drift)*i,a.moveSpeed=X(s.speed)*i;const r=a.maxDistance;r.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,r.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Vi(t){return!t.destroyed}function Ni(t,e,...i){const s=new Oe(t,e);return Qt(s,...i),s}var Hi=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;#Oe;#De;#Ee={value:0,factor:0};#Le;#Re;#Fe;#Ae;#Te;#Be;#Ue;#$e;#qe;#Ve;#Ne;#p;#He;#We;constructor(t){const{dispatchCallback:e,pluginManager:i,id:s,onDestroy:n,sourceOptions:a}=t;this.#p=i,this.#Le=e,this.#qe=n,this.id=Symbol(s),this.fpsLimit=120,this.hdr=!1,this.hdrMode=Ot.standard,this.peakNits=400,this.#He=!1,this.#Oe=0,this.#Fe=0,this.#$e=0,this.#Te=!0,this.started=!1,this.destroyed=!1,this.#Ne=!0,this.#Ue=0,this.zLayers=100,this.pageHidden=!1,this.#We=a,this.#Be=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new qi(this),this.canvas=new Li(this.#p,this),this.particles=new $i(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#Ve=Ni(this.#p,this),this.actualOptions=Ni(this.#p,this),this.#Ae=new Ri(this),this.dispatchEvent(St.containerBuilt)}get animationStatus(){return!this.#Ne&&!this.pageHidden&&Vi(this)}get options(){return this.#Ve}get sourceOptions(){return this.#We}addLifeTime(t){this.#$e+=t}alive(){return!this.#Fe||this.#$e<=this.#Fe}destroy(t=!0){if(Vi(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.destroyed=!0,this.#qe(t),this.dispatchEvent(St.containerDestroyed)}}dispatchEvent(t,e){this.#Le(t,{container:this,data:e})}draw(t){if(!Vi(this))return;let e=t;this.#Re=V(t=>{e&&(this.#Ue=void 0,e=!1),this.#je(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}n().error(`Export plugin with type ${t} not found`)}async init(){if(!Vi(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.#Ve=Ni(this.#p,this,this.#Be,this.sourceOptions),this.actualOptions=Ni(this.#p,this,this.#Ve),this.#ye(t),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:e,duration:i,fpsLimit:s,smooth:n,zLayers:a}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=A(Ot,r.mode,Ot.standard),this.peakNits=r.peakNits,this.zLayers=a,this.#Fe=X(i)*h,this.#Oe=X(e)*h,this.#$e=0,this.fpsLimit=s>0?s:120,this.#He=n;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(St.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(St.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await xt(this,t.initializers.effects),this.shapeDrawers=await xt(this,t.initializers.shapes),this.particleUpdaters=await async function(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}(this,t.initializers.updaters)}pause(){var t;if(Vi(this)&&(void 0!==this.#Re&&(t=this.#Re,N(t),this.#Re=void 0),!this.#Ne)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Ne=!0),this.dispatchEvent(St.containerPaused)}}play(t){if(!Vi(this))return;const e=this.#Ne||t;if(!this.#Te||this.actualOptions.autoPlay){if(this.#Ne&&(this.#Ne=!1),e)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(St.containerPlay),this.draw(e??!1)}else this.#Te=!1}async refresh(){if(Vi(this))return this.stop(),this.start()}async reset(t){if(Vi(this))return this.#Be=t,this.#We=t,this.#Ve=Ni(this.#p,this,this.#Be,this.sourceOptions),this.actualOptions=Ni(this.#p,this,this.#Ve),this.refresh()}async start(){Vi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(t=>{const e=async()=>{this.#Ae.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(St.containerStarted),this.play(),t()};this.#De=setTimeout(()=>{e()},this.#Oe)}))}stop(){if(Vi(this)&&this.started){this.#De&&(clearTimeout(this.#De),this.#De=void 0),this.#Te=!0,this.started=!1,this.#Ae.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.#We=this.#Ve,this.dispatchEvent(St.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ye(t){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))}#je(t){try{if(!this.#He&&void 0!==this.#Ue&&t<this.#Ue+h/this.fpsLimit)return void this.draw(!1);if(this.#Ue??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/h}(this.#Ee,t-this.#Ue,this.fpsLimit,this.#He),this.addLifeTime(this.#Ee.value),this.#Ue=t,this.#Ee.value>h)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ee),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var Wi=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#m;constructor(t,e){this.#m=t,this.#u=e,this.#m.initContainer(e)}draw(t,e){for(const e of this.#m.getArray(this.#u))e.draw(t)}async init(){const t=this.#u.actualOptions.emitters;if(B(t))for(const e of t)await this.#m.addEmitter(this.#u,e);else await this.#m.addEmitter(this.#u,t)}pause(){for(const t of this.#m.getArray(this.#u))t.pause()}play(){for(const t of this.#m.getArray(this.#u))t.play()}resize(){for(const t of this.#m.getArray(this.#u))t.resize()}stop(){this.#m.clear(this.#u)}update(t){this.#m.getArray(this.#u).forEach(e=>{e.update(t)})}}});const ji=new Map;var Gi=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||ji.set(t,e)}getShapeGenerator(t){return ji.get(t)}getSupportedShapeGenerators(){return ji.keys()}}});var Xi=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ge;#p;constructor(t){this.#Ge=new Map,this.#p=t}async addEmitter(t,e,i){return this.addEmitters(t,[{options:e,position:i}]).then(t=>t[0])}async addEmitters(t,e){const{EmitterInstance:i}=await Promise.resolve().then(function(){return Ki}),s=[];for(const{options:n,position:a}of e){const e=new si;e.load(n);const r=new i(this.#p,t,e=>{this.removeEmitter(t,e)},e,a);await r.init(),this.getArray(t).push(r),s.push(r)}return s}clear(t){this.initContainer(t),this.#Ge.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ge.get(t);return e||(e=[],this.#Ge.set(t,e)),e}initContainer(t){this.#Ge.has(t)||(this.#Ge.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||R(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.addEmitters=async e=>this.addEmitters(t,e),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});function Yi(t,e,i,s){(t.paint??=new Pe).fill={color:ie.create(void 0,{value:e}),enable:s,opacity:i}}function Qi(t,e,i,s){(t.paint??=new Pe).stroke={color:ie.create(void 0,{value:e}),opacity:i,width:s}}var Ki=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#Xe;#Ye;#Qe;#Fe;#Ke;#Ze;#Je;#ti;#ei;#tt;#ii;#Ne;#p;#si=!1;#ni;#yt;#ai;#ri;#oi;#li;constructor(t,e,i,s,n){this.#p=t,this.#u=e,this.#ni=i,this.#Xe=0,this.#Ye=0,this.#Qe=0,this.#ti=n,s instanceof si?this.options=s:(this.options=new si,this.options.load(s)),this.#oi=e.retina.reduceFactor?X(this.options.life.delay??0)*h/e.retina.reduceFactor:1/0,this.position=this.#ti??this.#Lt(),this.name=this.options.name,this.fill=this.options.fill,this.#Ze=!this.options.life.wait,this.#li=!1;const a=mt({},this.options.particles);if(a.move??={},a.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=qe(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=qe(this.#p,this.options.spawn.stroke.color)),this.#Ne=!this.options.autoPlay,this.#ii=a,this.#ri=this.#ci(),this.size=this.#ri.mode===dt.percent?{width:this.#ri.width/l*this.#u.canvas.size.width,height:this.#ri.height/l*this.#u.canvas.size.height}:{width:this.#ri.width,height:this.#ri.height},this.#ei=this.options.life.count??-1,this.#Je=this.#ei<=0,this.options.domId){const t=pt().getElementById(this.options.domId);t&&(this.#tt=new MutationObserver(()=>{this.resize()}),this.#yt=new ResizeObserver(()=>{this.resize()}),this.#tt.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#yt.observe(t))}const r=this.options.shape,o=this.#p.emitterShapeManager?.getShapeGenerator(r.type);o&&(this.#ai=o.generate(this.#u,this.position,this.size,this.fill,r.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}draw(t){if(!this.options.draw||!this.#ai)return;const e=this.#u,i=this.options.spawn.fill?.enable??!0;t.save(),t.beginPath(),i&&(t.fillStyle=this.spawnFillColor?He(this.spawnFillColor,e.hdr,this.spawnFillOpacity??1,e.peakNits,e.hdrMode):Ne({r:0,g:0,b:0},e.hdr,1,e.peakNits,e.hdrMode)),this.spawnStrokeColor&&(t.strokeStyle=He(this.spawnStrokeColor,e.hdr,this.spawnStrokeOpacity??1,e.peakNits,e.hdrMode),t.lineWidth=this.spawnStrokeWidth??1),this.#ai.draw?.(t),i&&t.fill(),this.spawnStrokeColor&&t.stroke(),t.restore()}externalPause(){this.#Ne=!0,this.pause()}externalPlay(){this.#Ne=!1,this.play()}async init(){await(this.#ai?.init())}pause(){this.#Ne||(this.#Ke=void 0)}play(){if(this.#Ne)return;if(!(this.#ei>0||this.#Je)&&this.options.life.count||!(this.#Ze||this.#Qe>=(this.#oi??0)))return;const t=this.#u;if(void 0===this.#Ke){const e=X(this.options.rate.delay);this.#Ke=t.retina.reduceFactor?e*h/t.retina.reduceFactor:1/0}(this.#ei>0||this.#Je)&&this.#hi()}resize(){const t=this.#u;if(!this.#si){const n=this.#ti;this.position=n&&(e=n,i=t.canvas.size,s=D.origin,function(t,e,i){let s=!0;return s=t.top<e.height+i.x,s&&(s=t.right>i.x),s&&(s=t.left<e.width+i.y),s&&(s=t.bottom>i.y),s}(function(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}(e,0),i,s))?n:this.#Lt()}var e,i,s;this.#ri=this.#ci(),this.size=this.#ri.mode===dt.percent?{width:this.#ri.width/l*t.canvas.size.width,height:this.#ri.height/l*t.canvas.size.height}:{width:this.#ri.width,height:this.#ri.height},this.#ai?.resize(this.position,this.size)}setPosition(t){this.#si=!0,this.position={...t},this.#ai?.resize(this.position,this.size)}update(t){if(this.#Ne)return;const e=this.#u;this.#Ze&&(this.#Ze=!1,this.#Qe=this.#oi??0,this.#Ye=this.#Ke??0),this.#li||(this.#li=!0,this.#di(this.options.startCount)),void 0!==this.#Fe&&(this.#Xe+=t.value,this.#Xe>=this.#Fe&&(this.pause(),void 0!==this.#oi&&(this.#oi=void 0),this.#Je||this.#ei--,this.#ei>0||this.#Je?(this.position=this.#Lt(),this.#ai?.resize(this.position,this.size),this.#oi=e.retina.reduceFactor?X(this.options.life.delay??0)*h/e.retina.reduceFactor:1/0):this.#ui(),this.#Xe-=this.#Fe,this.#Fe=void 0)),void 0!==this.#oi&&(this.#Qe+=t.value,this.#Qe>=this.#oi&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Qe-=this.#oi,this.#oi=void 0)),void 0!==this.#Ke&&(this.#Ye+=t.value,this.#Ye>=this.#Ke&&(this.#pi(),this.#Ye-=this.#Ke))}#Lt(){const t=this.#u;if(this.options.domId){const e=pt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*c)*s,y:(i.y+i.height*c)*s}}}return J({size:t.canvas.size,position:this.options.position})}#ci(){const t=this.#u;if(this.options.domId){const e=pt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect();return{width:i.width*t.retina.pixelRatio,height:i.height*t.retina.pixelRatio,mode:dt.precise}}}return this.options.size??(()=>{const t=new ei;return t.load({height:0,mode:dt.percent,width:0}),t})()}#ui(){this.#tt?.disconnect(),this.#tt=void 0,this.#yt?.disconnect(),this.#yt=void 0,this.#ni(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})}#pi(){if(this.#Ne)return;const t=X(this.options.rate.quantity);this.#di(t)}#di(t){const e=vt(this.#ii)??{},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:X(this.options.spawn.fill.opacity),a=this.options.spawn.stroke?.color?.animation,r=void 0===this.options.spawn.stroke?.opacity?1:X(this.options.spawn.stroke.opacity),o=void 0===this.options.spawn.stroke?.width?1:X(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!a,d=!!this.#ai,u=c||h,p=u||d,f=u?{h:k,s:M,l:S}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?mt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=r,this.spawnStrokeWidth=o,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#fi(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#fi(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#fi(i.l,this.spawnFillColor.l,f.l)),Yi(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(a&&f&&(this.spawnStrokeColor.h=this.#fi(a.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#fi(a.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#fi(a.l,this.spawnStrokeColor.l,f.l)),Qi(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#ai){const e=this.#ai.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&Yi(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#hi(){if(this.#Ne)return;const t=void 0!==this.options.life.duration?X(this.options.life.duration):void 0;(this.#ei>0||this.#Je)&&void 0!==t&&t>0&&(this.#Fe=t*h)}#fi(t,e,i,s=1){const n=this.#u;if(!t.enable)return e;const a=G(t.offset),r=X(this.options.rate.delay),o=n.retina.reduceFactor?r*h/n.retina.reduceFactor:1/0;return(e+X(t.speed)*n.fpsLimit/o+a*s)%i}}});t.loadSquaresPreset=Ci,t.tsParticles=Qe}(t.__tsParticlesInternals.presets.squares=t.__tsParticlesInternals.presets.squares||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadSquaresPreset:(globalThis.__tsParticlesInternals.presets.squares||{}).loadSquaresPreset});
|
|
@@ -1,10 +1,10 @@
|
|
|
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);
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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);})(typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:this);
|
|
2
|
+
(function (g) {
|
|
3
|
+
/* Preset v4.5.0 */
|
|
4
|
+
g.__tsParticlesInternals = g.__tsParticlesInternals || {};
|
|
5
|
+
g.__tsParticlesInternals.presets = g.__tsParticlesInternals.presets || {};
|
|
6
|
+
(function (exports, plugin, pluginHexColor, updaterPaint, updaterRotate, updaterSize, shapeSquare, engine) {
|
|
7
|
+
'use strict';
|
|
8
8
|
|
|
9
9
|
const options = {
|
|
10
10
|
particles: {
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
|
|
79
79
|
exports.loadSquaresPreset = loadSquaresPreset;
|
|
80
80
|
|
|
81
|
-
}));
|
|
81
|
+
})(g.__tsParticlesInternals.presets.squares = g.__tsParticlesInternals.presets.squares || {}, g.__tsParticlesInternals.plugins.emitters/plugin, g.__tsParticlesInternals.plugins.hexColor, g.__tsParticlesInternals.updaters.paint, g.__tsParticlesInternals.updaters.rotate, g.__tsParticlesInternals.updaters.size, g.__tsParticlesInternals.shapes.square, g.__tsParticlesInternals.engine);
|
|
82
|
+
})(typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : self);
|
|
83
|
+
|
|
82
84
|
Object.assign(globalThis.window || globalThis, { loadSquaresPreset: (globalThis.__tsParticlesInternals.presets.squares || {}).loadSquaresPreset });
|
|
83
|
-
delete (globalThis.window || globalThis).tsparticlesInternalExports;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.bundles=s.__tsParticlesInternals.bundles||{},s.__tsParticlesInternals.effects=s.__tsParticlesInternals.effects||{},s.__tsParticlesInternals.engine=s.__tsParticlesInternals.engine||{},s.__tsParticlesInternals.interactions=s.__tsParticlesInternals.interactions||{},s.__tsParticlesInternals.palettes=s.__tsParticlesInternals.palettes||{},s.__tsParticlesInternals.paths=s.__tsParticlesInternals.paths||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins.emittersShapes=s.__tsParticlesInternals.plugins.emittersShapes||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.updaters=s.__tsParticlesInternals.updaters||{},s.__tsParticlesInternals.utils=s.__tsParticlesInternals.utils||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas.utils=s.__tsParticlesInternals.canvas.utils||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path.utils=s.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(s){return new Proxy(s,{get:function(s,t){return t in s||(s[t]={}),s[t]}})}:function(s){return s};s.__tsParticlesInternals.bundles=t(s.__tsParticlesInternals.bundles),s.__tsParticlesInternals.effects=t(s.__tsParticlesInternals.effects),s.__tsParticlesInternals.interactions=t(s.__tsParticlesInternals.interactions),s.__tsParticlesInternals.palettes=t(s.__tsParticlesInternals.palettes),s.__tsParticlesInternals.paths=t(s.__tsParticlesInternals.paths),s.__tsParticlesInternals.plugins=t(s.__tsParticlesInternals.plugins),s.__tsParticlesInternals.plugins.emittersShapes=t(s.__tsParticlesInternals.plugins.emittersShapes),s.__tsParticlesInternals.presets=t(s.__tsParticlesInternals.presets),s.__tsParticlesInternals.shapes=t(s.__tsParticlesInternals.shapes),s.__tsParticlesInternals.updaters=t(s.__tsParticlesInternals.updaters),s.__tsParticlesInternals.utils=t(s.__tsParticlesInternals.utils),s.__tsParticlesInternals.canvas=t(s.__tsParticlesInternals.canvas),s.__tsParticlesInternals.path=t(s.__tsParticlesInternals.path)
|
|
1
|
+
!function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.bundles=s.__tsParticlesInternals.bundles||{},s.__tsParticlesInternals.effects=s.__tsParticlesInternals.effects||{},s.__tsParticlesInternals.engine=s.__tsParticlesInternals.engine||{},s.__tsParticlesInternals.interactions=s.__tsParticlesInternals.interactions||{},s.__tsParticlesInternals.palettes=s.__tsParticlesInternals.palettes||{},s.__tsParticlesInternals.paths=s.__tsParticlesInternals.paths||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins=s.__tsParticlesInternals.plugins||{},s.__tsParticlesInternals.plugins.emittersShapes=s.__tsParticlesInternals.plugins.emittersShapes||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},s.__tsParticlesInternals.shapes=s.__tsParticlesInternals.shapes||{},s.__tsParticlesInternals.updaters=s.__tsParticlesInternals.updaters||{},s.__tsParticlesInternals.utils=s.__tsParticlesInternals.utils||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas=s.__tsParticlesInternals.canvas||{},s.__tsParticlesInternals.canvas.utils=s.__tsParticlesInternals.canvas.utils||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path=s.__tsParticlesInternals.path||{},s.__tsParticlesInternals.path.utils=s.__tsParticlesInternals.path.utils||{};var t="undefined"!=typeof Proxy?function(s){return new Proxy(s,{get:function(s,t){return t in s||(s[t]={}),s[t]}})}:function(s){return s};s.__tsParticlesInternals.bundles=t(s.__tsParticlesInternals.bundles),s.__tsParticlesInternals.effects=t(s.__tsParticlesInternals.effects),s.__tsParticlesInternals.interactions=t(s.__tsParticlesInternals.interactions),s.__tsParticlesInternals.palettes=t(s.__tsParticlesInternals.palettes),s.__tsParticlesInternals.paths=t(s.__tsParticlesInternals.paths),s.__tsParticlesInternals.plugins=t(s.__tsParticlesInternals.plugins),s.__tsParticlesInternals.plugins.emittersShapes=t(s.__tsParticlesInternals.plugins.emittersShapes),s.__tsParticlesInternals.presets=t(s.__tsParticlesInternals.presets),s.__tsParticlesInternals.shapes=t(s.__tsParticlesInternals.shapes),s.__tsParticlesInternals.updaters=t(s.__tsParticlesInternals.updaters),s.__tsParticlesInternals.utils=t(s.__tsParticlesInternals.utils),s.__tsParticlesInternals.canvas=t(s.__tsParticlesInternals.canvas),s.__tsParticlesInternals.path=t(s.__tsParticlesInternals.path)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(s){s.__tsParticlesInternals=s.__tsParticlesInternals||{},s.__tsParticlesInternals.presets=s.__tsParticlesInternals.presets||{},function(s,t,e,a,n,l,r,i){"use strict";const _={particles:{paint:{stroke:{width:5,color:{value:["#5bc0eb","#fde74c","#9bc53d","#e55934","#fa7921","#2FF3E0","#F8D210","#FA26A0","#F51720"]}},fill:{enable:!1}},shape:{type:"square"},rotate:{value:0,direction:i.RotateDirection.counterClockwise,animation:{enable:!0,speed:2,sync:!0}},size:{value:{min:1,max:500},animation:{enable:!0,startValue:i.StartValueType.min,speed:60,sync:!0,destroy:i.DestroyType.max}}},background:{color:"#000"},emitters:{position:{y:50,x:50},rate:{delay:1,quantity:1}}};async function c(s){await s.pluginManager.register(async s=>{await Promise.all([e.loadHexColorPlugin(s),t.loadEmittersPluginSimple(s),r.loadSquareShape(s),n.loadRotateUpdater(s),l.loadSizeUpdater(s),a.loadPaintUpdater(s)]),s.pluginManager.addPreset("squares",_)})}const P=globalThis;P.__tsParticlesInternals=P.__tsParticlesInternals??{},P.loadSquaresPreset=c,s.loadSquaresPreset=c}(s.__tsParticlesInternals.presets.squares=s.__tsParticlesInternals.presets.squares||{},s.__tsParticlesInternals.plugins.emitters/plugin,s.__tsParticlesInternals.plugins.hexColor,s.__tsParticlesInternals.updaters.paint,s.__tsParticlesInternals.updaters.rotate,s.__tsParticlesInternals.updaters.size,s.__tsParticlesInternals.shapes.square,s.__tsParticlesInternals.engine)}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadSquaresPreset:(globalThis.__tsParticlesInternals.presets.squares||{}).loadSquaresPreset});
|