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