@tsparticles/particles
Version:
Minimal tsParticles particles bundle — lightweight particle engine without confetti or fireworks extras. Perfect for pure particle backgrounds. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, In
2 lines • 121 kB
JavaScript
!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.bundles=t.__tsParticlesInternals.bundles||{},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;t.MoveDirection=void 0,(a=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",a.bottomLeft="bottom-left",a.bottomRight="bottom-right",a.left="left",a.none="none",a.right="right",a.top="top",a.topLeft="top-left",a.topRight="top-right",a.outside="outside",a.inside="inside";const o="generated",r="100%",l="source-over",c="resize",d="visibilitychange",h=100,u=.5,p=1e3,g={x:0,y:0,z:0},f={a:1,b:0,c:0,d:1},y="random",m="mid",v=2*Math.PI,b="true",P="false",w="canvas",M=255,x=360,k=100,z=100,C=.25,S=.75,O=400;function D(t){return"z"in t?t.z:g.z}class I{x;y;z;constructor(t=g.x,e=g.y,i=g.z){this.x=t,this.y=e,this.z=i}static get origin(){return I.create(g.x,g.y,g.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 I.create(t.x,t.y,D(t))}static create(t,e,i){return"number"==typeof t?new I(t,e??g.y,i??g.z):new I(t.x,t.y,D(t))}add(t){return I.create(this.x+t.x,this.y+t.y,this.z+D(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=D(t)}copy(){return I.clone(this)}div(t){return I.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return I.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 I.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),g.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=D(t)}sub(t){return I.create(this.x-t.x,this.y-t.y,this.z-D(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=D(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class L extends I{constructor(t=g.x,e=g.y){super(t,e,g.z)}static get origin(){return L.create(g.x,g.y)}static clone(t){return L.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new L(t,e??g.y):new L(t.x,t.y)}}function T(t){return"boolean"==typeof t}function _(t){return"string"==typeof t}function R(t){return"number"==typeof t}function E(t,e){return Object.values(t).some(t=>t===e)}function A(t,e,i){return E(t,e)?e:i}function F(t){return"object"==typeof t&&null!==t}function B(t){return Array.isArray(t)}function H(t){return null==t}const V=Math.PI/180;let U=Math.random;const N={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function q(){return G(U(),0,1-Number.EPSILON)}function $(t,e){return q()*(e-t)+t}function W(t){return N.nextFrame(t)}function j(t){N.cancel(t)}function G(t,e,i){return Math.min(Math.max(t,e),i)}function X(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function Y(t){const e=K(t);let i=Q(t);return e===i&&(i=0),$(i,e)}function Z(t){return R(t)?t:Y(t)}function Q(t){return R(t)?t:t.min}function K(t){return R(t)?t:t.max}function J(t,e){if(t===e||void 0===e&&R(t))return t;const i=Q(t),s=K(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:J(i,s)}function tt(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function et(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function it(t,e){return Math.sqrt(et(t,e))}function st(t,e,i){return et(t,e)<=i*i}function nt(t){return t*V}function at(e,i,s){if(R(e))return nt(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*C;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*C;case t.MoveDirection.bottom:return Math.PI*u;case t.MoveDirection.bottomLeft:return Math.PI*S;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*S;case t.MoveDirection.inside:return Math.atan2(s.y-i.y,s.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-s.y,i.x-s.x);default:return q()*v}}function ot(t){const e=L.origin;return e.length=1,e.angle=t,e}function rt(t,e,i,s){return L.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function lt(t){return{x:(t.position?.x??q()*h)*t.size.width/h,y:(t.position?.y??q()*h)*t.size.height/h}}function ct(t){const{position:e,size:i}=t;return{x:e?.x??q()*i.width,y:e?.y??q()*i.height}}function dt(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const ht={engineVersionMismatch:"TSP-1001",particlePositionNotFound:"TSP-1002",pluginRegisterAfterLoad:"TSP-1003",offscreenCanvasUnsupported:"TSP-1101",offscreenCanvasTransferFailed:"TSP-1102",hdrEnableInvalid:"TSP-1201",hdrModeInvalid:"TSP-1202",hdrPeakNitsInvalid:"TSP-1203"};function ut(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var pt,gt;function ft(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function yt(){return globalThis.document}function mt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function vt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function bt(t,e){return t===e||B(e)&&e.includes(t)}function Pt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(q()*t.length)]}function wt(t,e,i,s,n){return Mt(xt(t,s??0),e,i,n)}function Mt(e,i,s,n){let a=!0;return n&&n!==t.OutModeDirection.bottom||(a=e.top<i.height+s.x),!a||n&&n!==t.OutModeDirection.left||(a=e.right>s.x),!a||n&&n!==t.OutModeDirection.right||(a=e.left<i.width+s.y),!a||n&&n!==t.OutModeDirection.top||(a=e.bottom>s.y),a}function xt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function kt(t,...e){for(const i of e){if(H(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(ft(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(ft(s))continue;const e=t,n=i[s];e[s]=Array.isArray(n)?n.map(t=>kt(void 0,t)):kt(e[s],n)}}return t}function zt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:L.create(Z(t.options.bounce.horizontal.value),Z(t.options.bounce.vertical.value))}}function Ct(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,a]=[t.position,e.position],{dx:o,dy:r}=tt(a,n);if(i*o+s*r<0)return;const l=-Math.atan2(r,o),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=rt(h,u,c,d),g=rt(u,h,c,d),f=p.rotate(-l),y=g.rotate(-l);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function St(t,e){return B(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Ot(t,e,i){return B(t)?Pt(t,e,i):t}function Dt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/h*i.width,y:e.y/h*i.height}:{width:e.width/h*i.width,height:e.height/h*i.height}}(e,i)}function It(t){const e=yt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||H(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}let Lt,Tt;function _t(t){if(Lt!==t||!Tt){Lt=t;const e=yt().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)}Tt=e}return Tt}function Rt(t,e,i,s,n){if(s){let s={passive:!0};T(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 Et(t,e){return await Promise.all([...e.values()].map(e=>e(t)))}async function At(t,e){const i=await Promise.all([...e.entries()].map(([e,i])=>i(t).then(t=>[e,t])));return new Map(i)}async function Ft(t){const e=Ot(t.url,t.index);if(!e)return t.fallback;try{const t=await fetch(e);if(t.ok){const e=await t.json();if(function(t){if(B(t))return t.every(t=>F(t)&&!B(t));return F(t)&&!B(t)}(e))return e;n().error("invalid configuration data while retrieving config file")}else n().error(`${t.status.toString()} while retrieving config file`)}catch(t){n().error(`error while retrieving config file: ${t}`)}return t.fallback}function Bt(t){let e;const i=yt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===w)e=t,e.dataset[o]??=P,e.dataset[o]===b&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(w).item(0);s?(e=s,e.dataset[o]=P):(e=i.createElement(w),e.dataset[o]=b,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function Ht(t,e){const i=yt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[o]=b,i.body.append(s),s)}t.OutModeDirection=void 0,(pt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",pt.left="left",pt.right="right",pt.top="top",t.PixelMode=void 0,(gt=t.PixelMode||(t.PixelMode={})).precise="precise",gt.percent="percent";class Vt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Ut,Nt,qt,$t,Wt,jt,Gt,Xt,Yt,Zt,Qt,Kt,Jt,te;t.EventType=void 0,(Ut=t.EventType||(t.EventType={})).configAdded="configAdded",Ut.containerInit="containerInit",Ut.particlesSetup="particlesSetup",Ut.containerStarted="containerStarted",Ut.containerStopped="containerStopped",Ut.containerDestroyed="containerDestroyed",Ut.containerPaused="containerPaused",Ut.containerPlay="containerPlay",Ut.containerBuilt="containerBuilt",Ut.particleAdded="particleAdded",Ut.particleDestroyed="particleDestroyed",Ut.particleRemoved="particleRemoved";class ee{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(e){if(this.#o)return;const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}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(ut(ht.pluginRegisterAfterLoad));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 ie{pluginManager=new ee(this);#d=[];#h=new Vt;#o=!1;get items(){return this.#d}get version(){return"4.5.0"}addEventListener(t,e){this.#h.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(ut(ht.engineVersionMismatch,this.version))}dispatchEvent(t,e){this.#h.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 Sn}),s=t.id??e?.id??`tsparticles${Math.floor(1e4*q()).toString()}`,{index:n,url:a}=t,o=Ot(a?await Ft({fallback:t.options,url:a,index:n}):t.options,n),{items:r}=this,l=r.findIndex(t=>t.id.description===s),c=new i({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(c);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:o});if(l>=0){const t=this.item(l),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),r.splice(l,e,c)}else r.push(c);const d="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:Bt(Ht(s,e));return c.canvas.loadCanvas(d),await c.start(),c}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#h.removeEventListener(t,e)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Nt||(Nt={}));class se{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 ne extends se{radius;constructor(t,e,i){super(t,e,Nt.circle),this.radius=i}contains(t){return st(t,this.position,this.radius)}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 ne||t.type===Nt.circle){return s+t.radius>Math.hypot(n,a)}if(t instanceof ae||t.type===Nt.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 ae extends se{size;constructor(t,e,i,s){super(t,e,Nt.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 ne)return t.intersects(this);if(!(t instanceof ae))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 oe(t,e,i){void 0!==i&&(t[e]=i)}function re(t,e,i){void 0!==i&&(t[e]=J(i))}function le(t,e,i){void 0!==i&&t[e].load(i)}function ce(t,e,i,s){if(void 0!==i){const n=t;n[e]??=s(),n[e].load(i)}}function de(t,e,i,...s){const n=t;n[e]??=new i;const a=n[e];for(const t of s)a.load(t?.[e])}t.RotateDirection=void 0,(qt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",qt.counterClockwise="counter-clockwise",qt.random="random",t.AnimationMode=void 0,($t=t.AnimationMode||(t.AnimationMode={})).auto="auto",$t.increase="increase",$t.decrease="decrease",$t.random="random",t.HdrMode=void 0,(Wt=t.HdrMode||(t.HdrMode={})).standard="standard",Wt.natural="natural",Wt.vivid="vivid",Wt.cinematic="cinematic",Wt.dynamic="dynamic",t.LimitMode=void 0,(jt=t.LimitMode||(t.LimitMode={})).delete="delete",jt.wait="wait",t.OutMode=void 0,(Gt=t.OutMode||(t.OutMode={})).bounce="bounce",Gt.none="none",Gt.out="out",Gt.destroy="destroy",Gt.split="split",t.AlterType=void 0,(Xt=t.AlterType||(t.AlterType={})).darken="darken",Xt.enlighten="enlighten",t.DestroyType=void 0,(Yt=t.DestroyType||(t.DestroyType={})).none="none",Yt.max="max",Yt.min="min",t.GradientType=void 0,(Zt=t.GradientType||(t.GradientType={})).linear="linear",Zt.radial="radial",Zt.random="random",t.ParticleOutType=void 0,(Qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Qt.inside="inside",Qt.outside="outside",t.StartValueType=void 0,(Kt=t.StartValueType||(t.StartValueType={})).max="max",Kt.min="min",Kt.random="random",t.AnimationStatus=void 0,(Jt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Jt.decreasing="decreasing",t.DrawLayer=void 0,(te=t.DrawLayer||(t.DrawLayer={}))[te.BackgroundElement=0]="BackgroundElement",te[te.BackgroundDraw=1]="BackgroundDraw",te[te.BackgroundMask=2]="BackgroundMask",te[te.CanvasSetup=3]="CanvasSetup",te[te.PluginContent=4]="PluginContent",te[te.Particles=5]="Particles",te[te.CanvasCleanup=6]="CanvasCleanup",te[te.Foreground=7]="Foreground";class he{load(t){H(t)||this.doLoad(t)}}function ue(t,...e){for(const i of e)t.load(i)}class pe extends he{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){re(this,"count",t.count),oe(this,"enable",t.enable),re(this,"speed",t.speed),re(this,"decay",t.decay),re(this,"delay",t.delay),oe(this,"sync",t.sync)}}class ge extends pe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),oe(this,"mode",t.mode),oe(this,"startValue",t.startValue)}}class fe extends pe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),oe(this,"max",t.max),oe(this,"min",t.min),re(this,"offset",t.offset)}}class ye extends he{h=new fe(0,x);l=new fe(0,z);s=new fe(0,k);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class me extends he{value="";static create(t,e){const i=new me;return i.load(t),void 0!==e&&(_(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){H(t.value)||(this.value=t.value)}}class ve extends me{animation=new ye;static create(t,e){const i=new ve;return i.load(t),void 0!==e&&(_(e)||B(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class be extends he{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new me,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=me.create(this.color,t.color)),oe(this,"element",t.element),oe(this,"draw",t.draw),oe(this,"image",t.image),oe(this,"position",t.position),oe(this,"repeat",t.repeat),oe(this,"size",t.size),oe(this,"opacity",t.opacity)}}class Pe extends he{enable=!0;zIndex=0;doLoad(t){oe(this,"enable",t.enable),oe(this,"zIndex",t.zIndex)}}class we extends he{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!T(e.enable))throw new Error(ut(ht.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!E(t.HdrMode,e.mode))throw new Error(ut(ht.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!R(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(ut(ht.hdrPeakNitsInvalid,String(e.peakNits)));oe(this,"enable",e.enable),oe(this,"mode",e.mode),oe(this,"peakNits",e.peakNits)}}class Me extends he{delay=.5;enable=!0;doLoad(t){oe(this,"delay",t.delay),oe(this,"enable",t.enable)}}class xe extends he{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]=kt(this.options[t]??{},i))}oe(this,"close",t.close),oe(this,"type",t.type)}}class ke extends he{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),oe(this,"enable",t.enable),re(this,"opacity",t.opacity)}}class ze extends he{offset=0;value=90;doLoad(t){re(this,"offset",t.offset),re(this,"value",t.value)}}class Ce extends he{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){oe(this,"x",t.x),oe(this,"y",t.y),oe(this,"mode",t.mode),oe(this,"radius",t.radius)}}class Se extends he{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){re(this,"acceleration",t.acceleration),oe(this,"enable",t.enable),oe(this,"inverse",t.inverse),re(this,"maxSpeed",t.maxSpeed)}}class Oe extends he{value=0;doLoad(t){H(t.value)||(this.value=J(t.value))}}class De extends Oe{animation=new pe;doLoad(t){super.doLoad(t),le(this,"animation",t.animation)}}class Ie extends De{animation=new ge}class Le extends he{clamp=!0;delay=new Oe;enable=!1;generator;options={};doLoad(t){oe(this,"clamp",t.clamp),this.delay.load(t.delay),oe(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=kt(this.options,t.options))}}class Te extends he{bottom;default=t.OutMode.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 _e extends he{acceleration=0;enable=!1;position;doLoad(t){re(this,"acceleration",t.acceleration),oe(this,"enable",t.enable),t.position&&(this.position=kt({},t.position))}}class Re extends he{angle=new ze;center=new Ce;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new Se;outModes=new Te;path=new Le;random=!1;size=!1;speed=2;spin=new _e;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(R(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),re(this,"decay",t.decay),oe(this,"direction",t.direction),void 0!==t.distance&&(this.distance=R(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),re(this,"drift",t.drift),oe(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),oe(this,"random",t.random),oe(this,"size",t.size),re(this,"speed",t.speed),this.spin.load(t.spin),oe(this,"straight",t.straight),oe(this,"vibrate",t.vibrate),oe(this,"warp",t.warp)}}class Ee extends he{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),re(this,"width",t.width),re(this,"opacity",t.opacity)}}class Ae extends he{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ce(this,"fill",t.fill,()=>new ke),ce(this,"stroke",t.stroke,()=>new Ee)}}class Fe extends Oe{value=1}class Be extends he{horizontal=new Fe;vertical=new Fe;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class He extends he{enable=!1;height=1080;width=1920;doLoad(t){oe(this,"enable",t.enable),oe(this,"width",t.width),oe(this,"height",t.height)}}class Ve extends he{mode=t.LimitMode.delete;value=0;doLoad(t){oe(this,"mode",t.mode),oe(this,"value",t.value)}}class Ue extends he{density=new He;limit=new Ve;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),oe(this,"value",t.value)}}class Ne extends he{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]=kt(this.options[t]??{},i))}oe(this,"close",t.close),oe(this,"type",t.type)}}class qe extends Oe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),oe(this,"opacityRate",t.opacityRate),oe(this,"sizeRate",t.sizeRate),oe(this,"velocityRate",t.velocityRate)}}class $e extends he{bounce=new Be;effect=new xe;groups={};move=new Re;number=new Ue;paint;palette;reduceDuplicates=!1;shape=new Ne;zIndex=new qe;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Ae,this.paint.color=new ve,this.paint.color.value="#fff",this.paint.fill=new ke,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]=kt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(B(e)?this.paint=St(e,t=>{const e=new Ae;return e.load(t),e}):B(this.paint)?(this.paint=new Ae,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=(B(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,s=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:s,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:s}]}),n=s.length>1?s:s[0]??{};this.load({paint:n,blend:{enable:!0,mode:e.blendMode}})}}function We(t,e,...i){const s=new $e(t,e);return ue(s,...i),s}class je extends he{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 be,this.fullScreen=new Pe,this.hdr=new we,this.particles=We(this.#p,this.#u),this.resize=new Me}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,St(this.preset,t=>{this.#f(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#g(this.palette)),oe(this,"autoPlay",e.autoPlay),oe(this,"clear",e.clear),oe(this,"key",e.key),oe(this,"name",e.name),re(this,"delay",e.delay),oe(this,"detectRetina",e.detectRetina),re(this,"duration",e.duration),oe(this,"fpsLimit",e.fpsLimit);const i=e.hdr;T(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),oe(this,"pauseOnBlur",e.pauseOnBlur),oe(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),oe(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;T(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(e.particles),this.resize.load(e.resize),this.style=kt(this.style,e.style),oe(this,"smooth",e.smooth),this.#p.plugins.forEach(t=>{t.loadOptions(this.#u,this,e)})}#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 Ge=new Map,Xe=1.15,Ye=1.05,Ze=.2126,Qe=.7152,Ke=.0722;function Je(t,e){let i=Ge.get(t);return i||(i=e(),Ge.size>2e3&&Ge.clear(),Ge.set(t,i)),i}function ti(t){return G(t*(2.51*t+.03)/(t*(2.43*t+.59)+.14),0,1)}function ei(t){return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ii(t){return t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055}function si(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function ni(t,e,i,s=!0){if(!e)return;const n=_(e)?{value:e}:e;if(_(n.value))return ai(t,n.value,i,s);if(B(n.value)){const e=Pt(n.value,i,s);if(!e)return;return ni(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function ai(t,e,i,s=!0){if(!e)return;const n=_(e)?{value:e}:e;if(_(n.value))return n.value===y?pi():li(t,n.value);if(B(n.value)){const e=Pt(n.value,i,s);if(!e)return;return ai(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function oi(t,e,i,s=!0){const n=ni(t,e,i,s);return n?ri(n):void 0}function ri(t){const e=t.r/M,i=t.g/M,s=t.b/M,n=Math.max(e,i,s),a=Math.min(e,i,s),o={h:0,l:(n+a)*u,s:0};return n!==a&&(o.s=o.l<u?(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*=z,o.s*=k,o.h*=60,o.h<0&&(o.h+=x),o.h>=x&&(o.h-=x),o}function li(t,e){return si(t,e)}function ci(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 di(t){const e=(t.h%x+x)%x,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(z,t.l)),n=e/x,a=i/k,o=s/z;if(0===i){const t=Math.round(o*M);return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,l=2*o-r,c=1/3,d=Math.min(M,M*ci(l,r,n+c)),h=Math.min(M,M*ci(l,r,n)),p=Math.min(M,M*ci(l,r,n-c));return{r:Math.round(d),g:Math.round(h),b:Math.round(p)}}function hi(t){const e=(t.h%x+x)%x,i=Math.max(0,Math.min(k,t.s)),s=Math.max(0,Math.min(z,t.l)),n=e/x,a=i/k,o=s/z;if(0===i){const t=o*M;return{r:t,g:t,b:t}}const r=o<u?o*(1+a):o+a-o*a,l=2*o-r,c=1/3;return{r:Math.min(M,M*ci(l,r,n+c)),g:Math.min(M,M*ci(l,r,n)),b:Math.min(M,M*ci(l,r,n-c))}}function ui(t){const e=di(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function pi(t,e){const i=t??0;if(e)return{r:$(i,M),g:$(i,M),b:$(i,M)};const s=()=>Math.floor($(i,256));return{b:s(),g:s(),r:s()}}function gi(e,i,s,n,a){const o=i?4:2,r=s??1;return Je(i?`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-hdr-${r.toString()}-${(n??O).toString()}-${a??t.HdrMode.standard}`:`rgb-${e.r.toFixed(o)}-${e.g.toFixed(o)}-${e.b.toFixed(o)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const a=s/203,o=function(e,i,s,n){const a=e.r/M,o=e.g/M,r=e.b/M;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:o,r:a};const l=Math.max(1,i),c=Ze*a+Qe*o+Ke*r,d=function(t,e,i){if(t<=i)return ti(t);const s=t+(t-i)*(e-1);return ti(s)}(c,i,s),h=c>0?d/c:1;return function(e,i,s,n,a){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:G(G(t+(s-t)*Xe,0,a)*Ye,0,a),g:G(G(t+(i-t)*Xe,0,a)*Ye,0,a),r:G(G(t+(e-t)*Xe,0,a)*Ye,0,a)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,o=(t+i+n)/3;return{b:G(o+1.1*(n-o),0,a),g:G(o+1.1*(i-o),0,a),r:G(o+1.1*(t-o),0,a)}}case t.HdrMode.dynamic:{const t=Ze*e+Qe*i+Ke*s,n=Math.min(1,2*t),o=1-n,r=(e+i+s)/3,l=G(r+(e-r)*Xe,0,a)*Ye,c=G(r+(i-r)*Xe,0,a)*Ye,d=G(r+(s-r)*Xe,0,a)*Ye;return{b:G(s*o+d*n,0,a),g:G(i*o+c*n,0,a),r:G(e*o+l*n,0,a)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(G(a*h,0,l),G(o*h,0,l),G(r*h,0,l),n,l)}(e,a,.18,n);return`color(display-p3 ${o.r.toString()} ${o.g.toString()} ${o.b.toString()} / ${(i??1).toString()})`}(e,s,n,a):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function fi(e,i,s,n,a){const o=i?4:2,r=s??1;return Je(i?`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-hdr-${r.toString()}-${(n??O).toString()}-${a??t.HdrMode.standard}`:`hsl-${e.h.toFixed(o)}-${e.s.toFixed(o)}-${e.l.toFixed(o)}-sdr-${r.toString()}`,()=>i?gi(hi(e),!0,s,n,a):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function yi(t,e,i,s,n){let a=t,o=e;if("r"in a||(a=n?hi(t):di(t)),"r"in o||(o=n?hi(e):di(e)),n){const t={b:ei(a.b/M),g:ei(a.g/M),r:ei(a.r/M)},e={b:ei(o.b/M),g:ei(o.g/M),r:ei(o.r/M)},n=i+s;return{b:ii((t.b*i+e.b*s)/n)*M,g:ii((t.g*i+e.g*s)/n)*M,r:ii((t.r*i+e.r*s)/n)*M}}return{b:X(a.b,o.b,i,s),g:X(a.g,o.g,i,s),r:X(a.r,o.r,i,s)}}function mi(t,e,i,s){if(i===y)return pi();if(i!==m)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return yi(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return di(t)}}}function vi(t,e,i,s){const n=_(e)?e:e.value;return n===y?s?ni(t,{value:n}):i?y:m:n===m?m:ni(t,{value:n})}function bi(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function Pi(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:x},s:{enable:!1,value:t.s,min:0,max:k},l:{enable:!1,value:t.l,min:0,max:z}};return e&&(wi(s.h,e.h,i),wi(s.s,e.s,i),wi(s.l,e.l,i)),s}function wi(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=Z(i.speed)/h*s,e.decay=1-Z(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=Z(i.count),e.time=0,e.delayTime=Z(i.delay)*p,i.sync||(e.velocity*=q(),e.value*=q()),e.initialValue=e.value,e.offset=J(i.offset)):e.velocity=0}function Mi(e,i,s,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=s.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const a=e.offset?Y(e.offset):0,o=(e.velocity??0)*s.factor+3.6*a,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>l&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=l)),e.velocity&&1!==r&&(e.velocity*=r),e.value=G(e.value,c,l)}function xi(t,e,i){if(!t)return;const{h:s,s:n,l:a}=t;Mi(s,!1,e),Mi(n,!0,e),Mi(a,!0,e)}function ki(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const zi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new ie}(),Ci=new Map;async function Si(t,e,i,s){const n=Ci.get(e);if(n instanceof Promise)return n;if(n){if(!n.destroyed)return n;Ci.delete(e)}const a=(async()=>{const n=function(t,e){return{fullScreen:{enable:!e},particles:{number:{value:t.count??80},color:{value:t.color??"#fff"},links:{enable:t.links??!1,color:t.linksColor??"#fff",distance:t.linksLength??100},collisions:{enable:t.collisions??!1},move:{enable:!0,speed:t.speed??3},opacity:{value:t.opacity??1},shape:{type:t.shape??"circle"},size:{value:t.radius??3}}}}(i,s),a=await t.load({id:e,element:s,options:n});if(!a)return void Ci.delete(e);const{ParticlesInstance:o}=await Promise.resolve().then(function(){return On}),r=new o(a,e);return Ci.set(e,r),r})();return Ci.set(e,a),a}class Oi{enable=!1;mode="destination-out";load(t){H(t)||(oe(this,"mode",t.mode),oe(this,"enable",t.enable))}}class Di{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return Dn});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 Oi),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new Oi,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function Ii(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Di)})}class Li{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:v};const n=i.circleRange;e.arc(g.x,g.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:nt(s.min),max:nt(s.max)}:{min:0,max:nt(s)}}}async function Ti(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Li))})}var _i;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(_i||(_i={}));const Ri=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ei=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class Ai{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ri,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ei.exec(e);return i?{a:i[_i.a]?Number.parseInt(i[_i.a],16)/255:1,b:Number.parseInt(i[_i.b]??"0",16),g:Number.parseInt(i[_i.g]??"0",16),r:Number.parseInt(i[_i.r]??"0",16)}:void 0}}async function Fi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new Ai)})}var Bi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Bi||(Bi={}));const Hi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Vi{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 di(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return di({h:Z(e.h),l:Z(e.l),s:Z(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Hi.exec(t);return e?ui({a:e.length>4?dt(e[Bi.a]):1,h:Number.parseInt(e[Bi.h]??"0",10),l:Number.parseInt(e[Bi.l]??"0",10),s:Number.parseInt(e[Bi.s]??"0",10)}):void 0}}async function Ui(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Vi)})}class Ni{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Ln});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function qi(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 Ni(t.pluginManager))})}function $i(e,i){const s=e.value,n=e.animation,a={delayTime:Z(n.delay)*p,enable:n.enable,value:Z(e.value)*i,max:K(s)*i,min:Q(s)*i,loops:0,maxLoops:Z(n.count),time:0};if(n.enable){switch(a.decay=1-Z(n.decay),n.mode){case t.AnimationMode.increase:a.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:a.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:a.status=q()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:a.value=a.min,e&&(a.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:a.value=a.max,e&&(a.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:a.value=Y(a),e&&(a.status=q()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return a.initialValue=a.value,a}function Wi(e,i,s,n,a){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const o=(i.velocity??0)*a.factor,r=i.min,l=i.max,c=i.decay??1;i.time??=0;const d=i.delayTime??0;if(!(d>0&&i.time<d&&(i.time+=a.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=o;break;case t.AnimationStatus.decreasing:i.value-=o}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(i.status=t.AnimationStatus.decreasing,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(i.status=t.AnimationStatus.increasing,i.loops??=0,i.loops++)}!function(e,i,s,n,a){switch(i){case t.DestroyType.max:s>=a&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=G(i.value,r,l))}}class ji extends ge{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||oe(this,"destroy",t.destroy)}}class Gi extends Ie{animation=new ji;value=1;load(t){if(H(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=$i(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=Z(i.speed)/h*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=q()))}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){de(t,"opacity",Gi,...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 Yi(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Xi(t)))})}const Zi={[t.OutModeDirection.left]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!0},[t.OutModeDirection.right]:{axis:"x",canvas:"width",bounce:"horizontal",negativeEdge:"right",positiveEdge:"left",negative:!1},[t.OutModeDirection.top]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!0},[t.OutModeDirection.bottom]:{axis:"y",canvas:"height",bounce:"vertical",negativeEdge:"bottom",positiveEdge:"top",negative:!1}};class Qi{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;for(const t of this.#m)if(t.particleBounce?.(e,s,i))return;const a=e.getPosition(),o=e.offset,r=e.getRadius(),l=xt(a,r),c=this.#u.canvas.size,d=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||!(e.direction in Zi))return;const i=Zi[e.direction],s=e.bounds,n=e.canvasSize[i.canvas],a=e.particle.position,o=e.particle.velocity[i.axis];if(i.negative&&s[i.negativeEdge]<0?a[i.axis]=e.size+e.offset[i.axis]:!i.negative&&s[i.positiveEdge]>n&&(a[i.axis]=n-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&o<0||!i.negative&&o>0))return;e.particle.velocity[i.axis]*=-Z(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;a[i.axis]=i.negative?r:n-r,e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:l,canvasSize:c,offset:o,outOfCanvas:d,size:r})}}class Ki{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=tt(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ji{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const a=e.options.move.gravity,o=this.#u,r=o.canvas.size,l=e.getRadius();if(a.enable){const s=e.position;(!a.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||a.inverse&&s.y<-l&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+l||e.velocity.y<0&&e.position.y>=-l||e.velocity.x>0&&e.position.x<=r.width+l||e.velocity.x<0&&e.position.x>=-l)return;wt(e.position,o.canvas.size,g,l,i)||e.destroy()}}}const ts=L.origin;class es{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const a=this.#u;if(e.outType===t.ParticleOutType.inside)this.#v(e,a);else{if(e.isInsideCanvasForOutMode(n,i))return;e.outType===t.ParticleOutType.outside?this.#b(e):this.#P(e,a,i)}}#v(t,e){const{x:i,y:s}=t.velocity;ts.setTo(g),ts.length=t.moveCenter.radius,ts.angle=t.velocity.angle+Math.PI,ts.addTo(t.moveCenter);const{dx:n,dy:a}=tt(t.position,ts);if(i<=0&&n>=0||s<=0&&a>=0||i>=0&&n<=0||s>=0&&a<=0)return;t.position.x=Math.floor(Y({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Y({min:0,max:e.canvas.size.height}));const{dx:o,dy:r}=tt(t.position,t.moveCenter);t.direction=Math.atan2(-r,-o),t.velocity.angle=t.direction,t.justWarped=!0}#P(e,i,s){const n=e.options.move.warp,a=i.canvas.size,o=e.getRadius(),r={bottom:a.height+o+e.offset.y,left:-o-e.offset.x,right:a.width+o+e.offset.x,top:-o-e.offset.y},l=xt(e.position,o);s===t.OutModeDirection.right&&l.left>a.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,n||(e.position.y=q()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0):s===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=r.right,e.initialPosition.x=e.position.x,n||(e.position.y=q()*a.height,e.initialPosition.y=e.position.y),e.justWarped=!0),s===t.OutModeDirection.bottom&&l.top>a.height+e.offset.y?(n||(e.position.x=q()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.top,e.initialPosition.y=e.position.y,e.justWarped=!0):s===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(n||(e.position.x=q()*a.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#b(t){t.position.x=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Y({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:e,dy:i}=tt(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class is{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#w(e,t.OutMode.bounce,t=>new Qi(t)),this.#w(e,t.OutMode.out,t=>new es(t)),this.#w(e,t.OutMode.destroy,t=>new Ki(t)),this.#w(e,t.OutMode.none,t=>new Ji(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#M(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#M(e,i,s.left??s.default,t.OutModeDirection.left),this.#M(e,i,s.right??s.default,t.OutModeDirection.right),this.#M(e,i,s.top??s.default,t.OutModeDirection.top)}#w(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))}#M(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ss(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new is(t)))})}class ns{#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);this.#x(s,t,e),this.#k(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)&&(xi(t.fillColor,e,this.#u.hdr),xi(t.strokeColor,e,this.#u.hdr))}#x(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=ve.create(void 0===a?void 0:ve.create(void 0,a),s.color);e.fillEnabled=s.enable,e.fillOpacity=Z(s.opacity),e.fillAnimation=o.animation;const r=oi(this.#p,o);r&&(e.fillColor=Pi(r,e.fillAnimation,i.retina.reduceFactor))}#k(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=ve.create(void 0===a?void 0:ve.create(void 0,a),s.color);e.strokeWidth=Z(s.width)*i.retina.pixelRatio,e.strokeOpacity=Z(s.opacity??1),e.strokeAnimation=o.animation;const r=oi(this.#p,o)??e.getFillColor();r&&(e.strokeColor=Pi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function as(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new ns(t.pluginManager,e)))})}var os;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(os||(os={}));const rs=/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 ls{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:Z(e.r),g:Z(e.g),b:Z(e.b)}}parseString(t){if(!this.accepts(t))return;const e=rs.exec(t);return e?{a:e.length>4?dt(e[os.a]):1,b:parseInt(e[os.b]??"0",10),g:parseInt(e[os.g]??"0",10),r:parseInt(e[os.r]??"0",10)}:void 0}}async function cs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new ls)})}class ds extends ge{destroy=t.DestroyType.none;load(t){super.load(t),H(t)||oe(this,"destroy",t.destroy)}}class hs extends Ie{animation=new ds;value=3;load(t){if(super.load(t),H(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class us{#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/h*e.retina.reduceFactor,s.sync||(t.size.velocity*=q()))}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){de(t,"size",hs,...e)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=$i(i,e),t.retina.sizeAnimationSpeed=Z(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 ps(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new us(t)))})}async function gs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([Ii(t),Fi(t),Ui(t),cs(t),qi(t),Ti(t),as(t),Yi(t),ss(t),ps(t)])})}const fs="TSP-3201",ys="TSP-3202";class ms{enable=!1;mode=[];load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"mode",t.mode))}}var vs,bs,Ps;!function(t){t.circle="circle",t.rectangle="rectangle"}(vs||(vs={}));class ws{enable=!1;mode=[];selectors=[];type=vs.circle;load(t){H(t)||(oe(this,"selectors",t.selectors),oe(this,"enable",t.enable),oe(this,"mode",t.mode),oe(this,"type",t.type))}}class Ms{enable=!1;mode=[];load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"mode",t.mode))}}class xs{onClick=new ms;onDiv=new ws;onHover=new Ms;load(t){if(H(t))return;this.onClick.load(t.onClick);const e=t.onDiv;void 0!==e&&(this.onDiv=St(e,t=>{const e=new ws;return e.load(t),e})),this.onHover.load(t.onHover)}}!function(t){t.canvas="canvas",t.parent="parent",t.window="window"}(bs||(bs={}));class ks{#u;constructor(t){this.#u=t}load(t){if(H(t))return;if(!this.#u)return;const e=this.#u.interactionManager?.interactors??[];for(const i of e)i.loadModeOptions&&i.loadModeOptions(this,t)}}class zs{detectsOn=bs.window;events=new xs;modes;constructor(t){this.modes=new ks(t)}load(t){if(H(t))return;const e=t.detectsOn;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class Cs{id="interactivity";#p;constructor(t){this.#p=t}async getPlugin(t){const{InteractivityPluginInstance:e}=await Promise.resolve().then(function(){return Rn});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.interactivity;s?.load||(e.interactivity=s=new zs(t)),s.load(i?.interactivity);const n=t.interactionManager?.interactors;if(n)for(const t of n)t.loadOptions&&t.loadOptions(e,i)}loadParticlesOptions(t,e,i){i?.interactivity&&(e.interactivity=kt({},i.interactivity));const s=t.interactionManager?.interactors;if(s)for(const t of s)t.loadParticlesOptions?.(e,i)}needsPlugin(){return!0}}!function(t){t.external="external",t.particles="particles"}(Ps||(Ps={}));class Ss{type=Ps.particles;container;constructor(t){this.container=t}}const Os="pointerleave",Ds="pointermove",Is="touchstart",Ls="touchend",Ts="touchmove",_s="touchcancel";function Rs(t){if(!t.pluginManager.addInteractor)throw new Error(ut(fs))}var Es;!function(t){t.absorb="absorb",t.bounce="bounce",t.destroy="destroy",t.fluid="fluid"}(Es||(Es={}));class As{speed=2;load(t){H(t)||oe(this,"speed",t.speed)}}class Fs{maxForce=2.5;maxNeighbors=64;nearStiffness=.5;radius=30;restDensity=3;stiffness=.5;load(t){H(t)||(re(this,"maxForce",t.maxForce),oe(this,"maxNeighbors",t.maxNeighbors),re(this,"nearStiffness",t.nearStiffness),re(this,"radius",t.radius),re(this,"restDensity",t.restDensity),re(this,"stiffness",t.stiffness))}}class Bs{enable=!0;retries=0;load(t){H(t)||(oe(this,"enable",t.enable),oe(this,"retries",t.retries))}}class Hs{absorb=new As;bounce=new Be;enable=!1;fluid=new Fs;maxSpeed=50;mode=Es.bounce;overlap=new Bs;load(t){H(t)||(this.absorb.load(t.absorb),this.bounce.load(t.bounce),oe(this,"enable",t.enable),this.fluid.load(t.fluid),re(this,"maxSpeed",t.maxSpeed),oe(this,"mode",t.mode),this.overlap.load(t.overlap))}}const Vs=u,Us=1e-4;function Ns(t,e,i,s){t.x<e?t.x+=(e-t.x)*Vs:t.x>i&&(t.x-=(t.x-i)*Vs),t.y<e?t.y+=(e-t.y)*Vs:t.y>s&&(t.y-=(t.y-s)*Vs)}class qs{#z=L.origin;#C;#S=0;#O=[];#D;#I=0;constructor(){this.#C=t=>{const e=this.#D,i=t;if(!e||this.#O.length>=this.#S||i===e||i.destroyed||i.spawning||!i.options.collisions?.enable||i.options.collisions.mode!==Es.fluid)return!1;const s=e.getRadius();return Math.abs(Math.round(this.#I)-Math.round(i.getPosition().z))<=s+i.getRadius()}}separateOverlaps(t,e){const i=this.#O;t.position.setTo(e);for(let e=0;e<3;e++)for(const e of i)this.#L(t,e)}solve(t,e){const i=e.options.collisions;if(!i)return;const s=i.fluid,n=t.retina.pixelRatio,a=Z(s.radius)*n,o=Z(s.stiffness),r=Z(s.nearStiffness),l=Z(s.restDensity),c=Z(s.maxForce),d=s.maxNeighbors,h=e.getRadius(),p=e.position,g=t.canvas.size,f=g.width>0&&g.height>0,y=f?.15*h:0,m=g.width-y,v=g.height-y,b=this.#O;this.#D=e,this.#S=d,this.#I=e.getPosition().z,this.#T(t,e,a,d);for(let t=0;t<3;t++){const t=e.getPosition();let i=0,s=0;for(const e of b){const n=1-it(t,e.getPosition())/a,o=n*n;i+=o,s+=o*n}const n=(i-l)*o*u,d=s*r*u;f&&Ns(p,y,m,v);for(const i of b){const s=i.getPosition(),o=s.x-t.x,r=s.y-t.y,l=Math.sqrt(o*o+r*r);if(l>a)continue;const g=1-l/a,f=G(n+d*g,-c,c),y=h+i.getRadius(),m=Math.max(g*f*u,y-l);if(l>Us){const t=1/l;this.#z.x=o*t*m,this.#z.y=r*t*m}else this.#z.x=(e.id+i.id)%2==0?1:-1,this.#z.y=0,this.#z.multTo(m);p.x-=this.#z.x,p.y-=this.#z.y}}this.#T(t,e,a,d),f&&function(t,e,i,s){t.x<e?t.x=e:t.x>i&&(t.x=i),t.y<e?t.y=e:t.y>s&&(t.y=s)}(p,y,m,v),this.separateOverlaps(e,p),this.#_(e),f&&this.#R(e,y,m,v)}#R(t,e,i,s){const n=t.position,a=t.velocity;(n.x<=e||n.x>=i)&&(a.x=0),(n.y<=e||n.y>=s)&&(a.y=0)}#_(t){const e=this.#O,i=t.position,s=t.velocity;let n=0;for(const a of e){const e=a.getPosition(),o=i.x-e.x,r=i.y-e.y,l=o*o+r*r,c=t.getRadius()+a.getRadius();if(!(l>=c*c||l<=Us)&&!(++n<5))return s.x*=.1,void(s.y*=.1)}}#L(t,e){const i=t.position,s=e.position,n=i.x-s.x,a=i.y-s.y,o=n*n+a*a,r=t.getRadius()+e.getRadius();if(!(o>=r*r))if(o>Us){const t=Math.sqrt(o),e=1/t,s=r-t;i.x+=n*e*s,i.y+=a*e*s}else{const s=(t.id+e.id)%2==0?1:-1;i.x+=s*r}}#T(t,e,i,s){i<=0||s<=0||(this.#O.length=0,t.particles.grid.queryCircle(e.getPosition(),i,this.#C,this.#O))}}function $s(t,e,i,s,n,a){if(!t.options.collisions||!i.options.collisions)return;const o=G(t.options.collisions.absorb.speed*n.factor,0,s);t.size.value=Math.sqrt(e*e+o*o),i.size.value-=o,i.size.value<=a&&(i.size.value=0,i.destroy())}const Ws=t=>{t.options.collisions&&(t.collisionMaxSpeed??=Z(t.options.collisions.maxSpeed),t.velocity.length>t.collisionMaxSpeed&&(t.velocity.length=t.collisionMaxSpeed))};function js(t,e){const i=t.getMass(),s=e.getMass(),n=t.velocity.length,a=e.velocity.length,o=i*n*n+s*a*a;Ct(zt(t),zt(e));const r=t.velocity.length,l=e.velocity.length,c=i*r*r+s*l*l;if(c>1e-6*o){const i=Math.sqrt(o/c);Math.abs(i-1)>1e-4&&(t.velocity.length=r*i,e.velocity.length=l*i)}Ws(t),Ws(e)}function Gs(t,e,i,s){if(t.options.collisions&&e.options.collisions)switch(t.options.collisions.mode){case Es.absorb:!function(t,e,i,s){const n=t.getRadius(),a=e.getRadius();!n&&a?t.destroy():n&&!a?e.destroy():n&&a&&(n>=a?$s(t,n,e,a,i,s):$s(e,a,t,n,i,s))}(t,e,i,s);break;case Es.bounce:js(t,e);break;case Es.destroy:!function(t,e){t.unbreakable||e.unbreakable||js(t,e);const i=t.getRadius(),s=e.getRadius();!i&&s?t.destroy():i&&!s?e.destroy():i&&s&&(t.getRadius()>=e.getRadius()?e:t).destroy()}(t,e);case Es.fluid:}}class Xs extends Ss{#E;#A;constructor(t){super(t),this.#E=new qs,this.#A=0}get maxDistance(){return this.#A}clear(){}init(){}interact(t,e,i){if(t.destroyed||t.spawning)return;const s=t.options.collisions;if(!s?.enable)return;if(s.mode===Es.fluid){const e=Z(s.fluid.radius);return e>this.#A&&(this.#A=e),void this.#E.solve(this.container,t)}const n=this.container,a=t.getPosition(),o=t.getRadius(),r=n.particles.grid.queryCircle(a,2*o);for(const e of r){if(t===e||t.id>=e.id||!e.options.collisions?.enable||s.mode!==e.options.collisions.mode||e.destroyed||e.spawning)continue;const r=e.getPosition(),l=e.getRadius();if(Math.abs(Math.round(a.z)-Math.round(r.z))>o+l)continue;it(a,r)>o+l||Gs(t,e,i,n.retina.pixelRatio)}}isEnabled(t){return!!t.options.collisions?.enable}loadParticlesOptions(t,...e){de(t,"collisions",Hs,...e)}reset(t,e){}}const Ys="TSP-4001";class Zs{id="overlap";async getPlugin(t){const{OverlapPluginInstance:e}=await Promise.resolve().then(function(){return En});return new e(t)}loadOptions(){}needsPlugin(){return!0}}async function Qs(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{Rs(t),t.pluginManager.addPlugin(new Zs),t.pluginManager.addInteractor?.("particlesCollisions",t=>Promise.resolve(new Xs(t)))})}class Ks extends ne{#F;constructor(t,e,i,s){super(t,e,i),this.#F=s}contains(t){if(super.contains(t))return!0;const{width:e,height:i}=this.#F,{x:s,y:n}=t;return super.contains({x:s-e,y:n})||super.contains({x:s+e,y:n})||super.contains({x:s,y:n-i})||super.contains({x:s,y:n+i})||super.contains({x:s-e,y:n-i})||super.contains({x:s+e,y:n+i})||super.contains({x:s-e,y:n+i})||super.contains({x:s+e,y:n-i})}intersects(t){if(super.intersects(t))return!0;const{width:e,height:i}=this.#F,s=t.position,n=[{x:-e,y:0},{x:e,y:0},{x:0,y:-i},{x:0,y:i},{x:-e,y:-i},{x:e,y:i},{x:-e,y:i},{x:e,y:-i}];for(const e of n){const i={x:s.x+e.x,y:s.y+e.y};let n;if(t instanceof ne)n=new ne(i.x,i.y,t.radius);else{const e=t;n=new ae(i.x,i.y,e.size.width,e.size.height)}if(super.intersects(n))return!0}return!1}}class Js{blur=5;color=new me;enable=!1;constructor(){this.color.value="#000"}load(t){H(t)||(oe(this,"blur",t.blur),this.color=me.create(this.color,t.color),oe(this,"enable",t.enable))}}class tn{color;enable=!1;frequency=1;opacity;load(t){H(t)||(void 0!==t.color&&(this.color=me.create(this.color,t.color)),oe(this,"enable",t.enable),oe(this,"frequency",t.frequency),oe(this,"opacity",t.opacity))}}class en{blink=!1;color=new me;consent=!1;distance=100;enable=!1;frequency=1;id;opacity=1;shadow=new Js;triangles=new tn;warp=!1;width=1;constructor(){this.color.value="#fff"}load(t){H(t)||(oe(this,"id",t.id),oe(this,"blink",t.blink),this.color=me.create(this.color,t.color),oe(this,"consent",t.consent),oe(this,"distance",t.distance),oe(this,"enable",t.enable),oe(this,"frequency",t.frequency),oe(this,"opacity",t.opacity),this.shadow.load(t.shadow),this.triangles.load(t.triangles),oe(this,"width",t.width),oe(this,"warp",t.warp))}}function sn(t,e,i){const{dx:s,dy:n}=tt(t,e),a={x:Math.abs(s),y:Math.abs(n)},o={x:Math.min(a.x,i.width-a.x),y:Math.min(a.y,i.height-a.y)};return Math.hypot(o.x,o.y)}class nn extends Ss{#A;#p;constructor(t,e){super(e),this.#p=t,this.#A=0}get maxDistance(){return this.#A}clear(){}init(){this.container.particles.linksColor=void 0,this.container.particles.linksColors=new Map}interact(t){if(!t.options.links)return;t.links=[],t.linksDistance&&t.linksDistance>this.#A&&(this.#A=t.linksDistance);const e=t.getPosition(),i=this.container,s=i.canvas.size;if(e.x<g.x||e.y<g.y||e.x>s.width||e.y>s.height)return;const n=t.options.links,a=n.opacity,o=t.retina.linksDistance??0,r=n.warp,l=r?new Ks(e.x,e.y,o,s):new ne(e.x,e.y,o),c=i.particles.grid.query(l);for(const i of c){const l=i.options.links;if(t===i||!l?.enable||n.id!==l.id||i.spawning||i.destroyed||!i.links||t.links.some(t=>t.destination===i)||i.links.some(e=>e.destination===t))continue;const c=i.getPosition();if(c.x<g.x||c.y<g.y||c.x>s.width||c.y>s.height)continue;const d=tt(e,c).distance,h=r&&l.warp?sn(e,c,s):d,u=Math.min(d,h);if(u>o)continue;const p=(1-u/o)*a;this.#B(t),t.links.push({destination:i,opacity:p,color:this.#H(t,i),isWarped:h<d})}}isEnabled(t){return!!t.options.links?.enable}loadParticlesOptions(t,...e){de(t,"links",en,...e)}reset(){}#H(t,e){const i=this.container,s=t.options.links;if(!s)return;return mi(t,e,void 0!==s.id?i.particles.linksColors.get(s.id):i.particles.linksColor,i.hdr)}#B(t){if(!t.options.links)return;const e=this.container,i=t.options.links;let s=void 0===i.id?e.particles.linksColor:e.particles.linksColors.get(i.id);s||(s=vi(this.#p,i.color,i.blink,i.consent),void 0===i.id?e.particles.linksColor=s:e.particles.linksColors.set(i.id,s))}}class an{id="links";#p;constructor(t){this.#p=t}async getPlugin(t){const{LinkInstance:e}=await Promise.resolve().then(function(){return Fn});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function on(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t.pluginManager;Rs(t),e.addPlugin(new an(e)),e.addInteractor?.("particlesLinks",t=>Promise.resolve(new nn(e,t)))})}let rn=null;async function ln(t){t.checkVersion("4.5.0"),await t.pluginManager.register(async t=>{await Promise.all([gs(t),(async t=>{await async function(t){t.checkVersion("4.5.0"),await t.pluginManager.register(t=>{const e=t,i=e.pluginManager;i.addPlugin(new Cs(i)),i.initializers.interactors??=new Map,i.addInteractor=(t,e)=>{i.initialized||(i.initializers.interactors??=new Map,i.initializers.interactors.set(t,e))},i.setOnClickHandler=t=>{const{items:i}=e;if(!i.length)throw new Error(ut(ys));i.forEach(e=>{const i=e;i.addClickHandler?.(t)})}})}(t),await Promise.all([Qs(t),on(t)])})(t)])})}async function cn(t){return rn||(rn=ln(t),rn)}async function dn(t,e){let i,s;return await cn(zi),_(t)?(i=t,s=e??{}):(i="particles",s=t??{}),Si(zi,i,s)}dn.create=async(t,e)=>{await cn(zi);return Si(zi,t?.id??"particles",e??{},t??void 0)},dn.init=async()=>{await cn(zi)},dn.version="4.5.0",globalThis.particles=dn;const hn=globalThis;hn.particles=dn,hn.tsParticles=zi;function un(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class pn{#V;#U;#N;#q;#$;#u;#W;#j;#G;#X;#Y;#Z;#p;#Q;#K;#J={};#tt=[void 0,void 0];#et={};constructor(t,e,i){this.#p=t,this.#u=e,this.#q=i,this.#W=null,this.#V=null,this.#U=new Set,this.#K=[],this.#Q=[],this.#N=[],this.#$=[],this.#G=[],this.#X=[],this.#Y=[],this.#Z={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#j}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{t.clearRect(g.x,g.y,this.#q.size.width,this.#q.size.height)})}clear(){const e=new Set;for(const t of this.#N)if(e.add(t),t.canvasClear?.())return t;for(const i of Object.values(t.DrawLayer))if("number"==typeof i)for(const t of this.#it(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;this.canvasClear()}destroy(){this.stop(),this.#V=null,this.#U.clear(),this.#K=[],this.#Q=[],this.#N=[],this.#$=[],this.#G=[],this.#X=[],this.#Y=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Z[e]=[])}draw(t){const e=this.#W;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.#st(t);if(a??=s,o??=n,!a&&!o)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#et,g=this.#J,f=a?fi(a,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,y=o?fi(o,r.hdr,u*h,r.peakNits,r.hdrMode):f;p.a=p.b=p.c=p.d=void 0,g.fill=f,g.stroke=y,this.draw(s=>{for(const i of this.#Y)i.drawParticleSetup?.(s,t,e);this.#nt(s,t,i,h,g,p),this.#at({container:r,context:s,particle:t,delta:e,colorStyles:g,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#ot(t);for(const i of this.#X)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#G)this.#rt(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#u,n=this.clear();i.update(e),this.draw(a=>{const o=this.#q.size.width,r=this.#q.size.height;if(this.#V)try{a.drawImage(this.#V,g.x,g.y,o,r)}catch{this.#lt("background-element-draw-error","Error drawing background element onto canvas")}const l=s.background;if(l.draw)try{l.draw(a,e)}catch{this.#lt("background-draw-error","Error in background.draw callback")}for(const e of this.#it(t.DrawLayer.BackgroundMask))e!==n&&e.canvasPaint?.();for(const i of this.#it(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(a,e);for(const i of this.#it(t.DrawLayer.PluginContent))i.draw?.(a,e);i.drawParticles(e);for(const i of this.#it(t.DrawLayer.CanvasCleanup))i.clearDraw?.(a,e),i.drawSettingsCleanup?.(a,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#ct(),this.paint()}initPlugins(){this.#N=[],this.#$=[],this.#G=[],this.#Y=[],this.#X=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Z[e]=[]);this.#dt()}initUpdaters(){this.#K=[],this.#Q=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#Q.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#K.push(t)}paint(){let e=!1;for(const i of this.#it(t.DrawLayer.BackgroundMask))if(e=i.canvasPaint?.()??!1,e)break;e||this.paintBase()}paintBase(t){this.draw(e=>{e.fillStyle=t??"rgba(0,0,0,0)",e.fillRect(g.x,g.y,this.#q.size.width,this.#q.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,g.x,g.y,this.#q.size.width,this.#q.size.height),i.globalAlpha=s})}setContext(t){this.#W=t,this.#W&&(this.#W.globalCompositeOperation=l)}setContextSettings(t){this.#j=t}stop(){this.draw(t=>{t.clearRect(g.x,g.y,this.#q.size.width,this.#q.size.height)})}#ot(t){for(const e of this.#Q)e.afterDraw?.(t)}#nt(t,e,i,s,n,a){for(const o of this.#K){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)un(a,t,e)}o.beforeDraw?.(e)}}#ht(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#ut(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#at(t){const{container:e,context:i,particle:s,delta:n,colorStyles:a,radius:o,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:d}=e,h=s.getPosition(),u=s.getTransformData(l),p={x:h.x,y:h.y};i.setTransform(u.a,u.b,u.c,u.d,h.x,h.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 y={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:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#ut(m,y),this.#pt(v,y),this.#gt(v,y),this.#ft(v,y),this.#ht(m,y),i.resetTransform()}#rt(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#gt(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())}#ft(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#pt(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#it(t){return this.#Z[t]}#st(t){let e,i;for(const s of this.#$)if(!e&&s.particleFillColor&&(e=oi(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=oi(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#tt[0]=e,this.#tt[1]=i,this.#tt}#yt(e){const i=[[t.DrawLayer.BackgroundMask,!!e.canvasPaint],[t.DrawLayer.CanvasSetup,!!e.drawSettingsSetup],[t.DrawLayer.PluginContent,!!e.draw],[t.DrawLayer.CanvasCleanup,!!(e.clearDraw??e.drawSettingsCleanup)]];for(const[t,s]of i)s&&this.#Z[t].push(e)}#dt(){for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#$.push(t),t.drawParticle&&this.#G.push(t),t.drawParticleSetup&&this.#Y.push(t),t.drawParticleCleanup&&this.#X.push(t),t.canvasClear&&this.#N.push(t),this.#yt(t)}#mt(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}#ct(){const t=this.#u.actualOptions.background;if(this.#V=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){const e=document.querySelector(t.element);e&&this.#mt(e)?this.#V=e:e?this.#lt("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#lt("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#mt(t.element)&&(this.#V=t.element)}#lt(t,e){this.#U.has(t)||(this.#U.add(t),n().warning(e))}}const gn=new WeakMap;function fn(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 yn{domElement;render;renderCanvas;size;zoom=1;#u;#vt;#bt;#Pt;#wt;#p;#Mt;#xt;#kt;#zt;constructor(t,e){this.#p=t,this.#u=e,this.render=new pn(t,e,this),this.#kt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#kt;this.size={height:s.height*i,width:s.width*i},this.#vt=!1,this.#xt=[],this.#Mt="none"}get#Ct(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#vt){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#St();this.render.destroy(),this.#xt=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#zt?this.#zt:{x:e*u/t,y:i*u/t}}init(){this.#Ot(t=>{t.disconnect()}),this.#Pt=vt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Dt()}),this.resize(),this.#It(),this.#Ot(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#Lt(),this.initBackground(),this.#Tt(),this.render.init()}initBackground(){const e=this.#u,i=e.actualOptions.background,s=this.domElement;if(!s)return;const n=s.style,a=ni(this.#p,i.color);if(a){const s=e.actualOptions.hdr;n.backgroundColor=gi(a,e.hdr,i.opacity,s.peakNits,A(t.HdrMode,s.mode,t.HdrMode.standard))}else n.backgroundColor="";n.backgroundImage=i.image||"",n.backgroundPosition=i.position||"",n.backgroundRepeat=i.repeat||"",n.backgroundSize=i.size||""}initPlugins(){this.#xt=[];for(const t of this.#u.plugins)t.resize&&this.#xt.push(t)}loadCanvas(t){this.#vt&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#vt=!!e&&"true"===e.dataset[o],this.renderCanvas=e?(t=>{const e=gn.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(ut(ht.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return gn.set(t,e),e}catch{throw new TypeError(ut(ht.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#wt=It(i.style));const s=this.#kt,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.#kt,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.#Mt=t,this.#Dt())}setZoom(t,e){this.zoom=t,this.#zt=e}stop(){this.#Ot(t=>{t.disconnect()}),this.#Pt=void 0,this.#_t(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#Rt(),e&&await t.refresh()}#Rt(){for(const t of this.#xt)t.resize?.()}#Lt(){const e=this.#u,i=e.actualOptions.hdr.enable&&mt("(color-gamut: p3)")?.matches&&mt("(dynamic-range: high)")?.matches;e.hdrMode=A(t.HdrMode,e.actualOptions.hdr.mode,t.HdrMode.standard),e.peakNits=e.actualOptions.hdr.peakNits;const s=this.renderCanvas;if(!s)return void(e.hdr=i??!1);let n;this.render.setContextSettings({alpha:!0,desynchronized:!0,willReadFrequently:!1,...i?{colorSpace:"display-p3",colorType:"float16"}:{colorSpace:"srgb"}});try{n=s.getContext("2d",this.render.settings)}catch{n=null}if(i&&!n){const t={alpha:!0,desynchronized:!0,willReadFrequently:!1,colorSpace:"srgb"};this.render.setContextSettings(t);try{n=s.getContext("2d",t)}catch{n=null}}if(this.render.setContext(n),n){const t=(t=>{if(!t)return;const e=t;return e.getContextAttributes?.().colorSpace??void 0})(n);void 0!==t&&(e.hdr="display-p3"===t)}}#Tt(){this.#_t();const t=mt("(color-gamut: p3)"),e=mt("(dynamic-range: high)"),i=()=>{this.#Lt(),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.#bt=s}#It(){const t=this.domElement,e=this.#u.actualOptions;if(t){this.#Ct?this.#Et():this.#St();for(const i in e.style){if(!i||!(i in e.style))continue;const s=e.style[i];s&&t.style.setProperty(i,s,"important")}}}#_t(){if(this.#bt){for(const{handler:t,mql:e}of this.#bt)e.removeEventListener("change",t);this.#bt=void 0}}#Dt(){const t=this.domElement;if(!t)return;this.#Ot(t=>{t.disconnect()}),this.#It(),this.initBackground();const e=this.#Mt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#Ot(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#St(){const t=this.domElement,e=this.#wt;t&&e&&fn(t,e,!0)}#Ot(t){this.#Pt&&t(this.#Pt)}#Et(){const t=this.domElement;t&&fn(t,_t(this.#u.actualOptions.fullScreen.zIndex),!0)}}class mn{#u;#At;#Ft;#Bt;constructor(t){this.#u=t,this.#At={visibilityChange:()=>{this.#Ht()},resize:()=>{this.#Vt()}}}addListeners(){this.#Ut(!0)}removeListeners(){this.#Ut(!1)}#Ht(){const t=this.#u;t.actualOptions.pauseOnBlur&&(yt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Vt(){this.#Bt&&(clearTimeout(this.#Bt),this.#Bt=void 0);const t=async()=>{await this.#u.canvas.windowResize()};this.#Bt=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*p)}#Ut(t){const e=this.#At;this.#Nt(t),Rt(document,d,e.visibilityChange,t,!1)}#Nt(t){const e=this.#At,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Rt(globalThis,c,e.resize,t);const s=i.canvas.domElement;this.#Ft&&!t?(s&&this.#Ft.unobserve(s),this.#Ft.disconnect(),this.#Ft=void 0):!this.#Ft&&t&&s&&(this.#Ft=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#Vt()}),this.#Ft.observe(s))}}function vn(t){if(!bt(t.outMode,t.checkModes))return;const e=2*t.radius;t.coord>t.maxCoord-e?t.setCb(-t.radius):t.coord<e&&t.setCb(t.radius)}function bn(t,e){const i=t%e;return i<0?i+e:i}function Pn(t,e,i,s){const n=We(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===y){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(q()*i.length)]}if(t.shape===y){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(q()*i.length)]}t.effectData=t.effect?function(t,e,i,s){const n=e.options[t];return kt({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 kt({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 wn{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;#qt={fillOpacity:1,opacity:1,strokeOpacity:1};#$t=I.origin;#Wt={sin:0,cos:0};#jt={a:1,b:0,c:0,d:1};#u;#Gt=[];#p;constructor(t,e){this.#p=t,this.#u=e}addModifier(t){this.#Gt.push(t),this.#Gt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#Gt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Xt(this.#Yt(bi(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#Gt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=Z(this.opacity?.value??1),s=this.#Yt(void 0,t=>t.opacity)??i;return this.#qt.fillOpacity=this.fillOpacity??1,this.#qt.opacity=s*e,this.#qt.strokeOpacity=this.strokeOpacity??1,this.#qt}getPosition(){return this.#$t.x=this.position.x+this.offset.x,this.#$t.y=this.position.y+this.offset.y,this.#$t.z=this.position.z,this.#$t}getRadius(){return this.#Yt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#Wt.sin=Math.sin(t),this.#Wt.cos=Math.cos(t),this.#Wt}getStrokeColor(){return this.#Xt(this.#Yt(bi(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#jt.a=e.cos*(t.a??f.a),this.#jt.b=i?e.sin*(t.b??1):t.b??f.b,this.#jt.c=i?-e.sin*(t.c??1):t.c??f.c,this.#jt.d=e.cos*(t.d??f.d),this.#jt}init(e,i,s,n){const a=this.#u;!function(e,i,s){e.id=i,e.group=s,e.justWarped=!1,e.effectClose=!0,e.shapeClose=!0,e.pathRotation=!1,e.lastPathTime=0,e.destroyed=!1,e.unbreakable=!1,e.isRotating=!1,e.rotation=0,e.misplaced=!1,e.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},e.size={value:1,max:1,min:1,enable:!1},e.outType=t.ParticleOutType.normal,e.ignoresResizeRatio=!0}(this,e,n),this.options=Pn(this,a,this.#p,s),a.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(a.particleUpdaters,this),this.#Zt(i),this.initialVelocity=this.#Qt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/a.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,a),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(a.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)}(a,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(a,this)}isInsideCanvas(t){return this.#Kt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#Kt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=bn(t,v);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=bn(t+Math.PI*u,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=bn(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.#Gt.findIndex(e=>e.id===t);e>=0&&this.#Gt.splice(e,1)}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#Yt(t,e){let i=t;for(const t of this.#Gt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Jt(t,e){let i=0,s=t?I.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 I.create(i.x,i.y,e)}const t=ct({size:l,position:s}),c=I.create(t.x,t.y,e);this.#te(c,r,o.left??o.default),this.#te(c,r,o.right??o.default),this.#ee(c,r,o.top??o.default),this.#ee(c,r,o.bottom??o.default);let d=!0;for(const t of n.particles.checkParticlePositionPlugins)if(d=t.checkParticlePosition?.(this,c,i)??!0,!d)break;if(d)return c;i+=1,s=void 0}}#Qt(){const e=this.options.move,i=ot(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=nt(Z(e.angle.value)),n=nt(Z(e.angle.offset)),a={left:n-s*u,right:n+s*u};return e.straight||(i.angle+=Y(J(a.left,a.right))),e.random&&"number"==typeof e.speed&&(i.length*=q()),i}#te(e,i,s){vn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#ee(e,i,s){vn({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#ie(e,i){const s=this.getRadius(),n=this.#u.canvas.size,a=this.position,o=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:o?a.y+s<n.height:a.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:o?a.x-s>0:a.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:o?a.x+s<n.width:a.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:o?a.y-s>0:a.y+s>0,reason:"default"}:{inside:a.x>=-s&&a.y>=-s&&a.y<=n.height+s&&a.x<=n.width+s,reason:"default"}}#se(t,e){return{canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Kt(t){const e=this.#ie(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.#se(t.direction,t.outMode),l=a?this.#ne(a(r),"shape"):void 0,c=o?this.#ne(o(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e}#Xt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ki(t,this.roll.alter.type,this.roll.alter.value):t:t}#Zt(e){const i=this.#u,s=Math.floor(Z(this.options.zIndex.value)),n=this.#Jt(e,G(s,0,i.zLayers));if(!n)throw new Error(ut(ht.particlePositionNotFound));this.position=n,this.initialPosition=this.position.copy();const a=i.canvas.size;switch(this.moveCenter={...Dt(this.options.move.center,a),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=at(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case t.MoveDirection.inside:this.outType=t.ParticleOutType.inside;break;case t.MoveDirection.outside:this.outType=t.ParticleOutType.outside}this.offset=L.origin}#ne(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class Mn{#ae;#oe=new Map;#re=[];#le;#ce;#de=[];#he;constructor(t){this.#ae=t,this.#le=0,this.#he=0}get cellSize(){return this.#ae}set cellSize(t){this.#ce=t}clear(){this.#oe.clear();const t=this.#ce;t&&(this.#ae=t),this.#ce=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#ue(e,i);this.#oe.has(s)||this.#oe.set(s,[]),this.#oe.get(s)?.push(t)}query(t,e,i=[]){const s=this.#pe(t);if(!s)return i;const n=Math.floor(s.minX/this.#ae),a=Math.floor(s.maxX/this.#ae),o=Math.floor(s.minY/this.#ae),r=Math.floor(s.maxY/this.#ae);for(let s=n;s<=a;s++)for(let n=o;n<=r;n++)this.#ge(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#fe(t.x,t.y,e),a=this.query(n,i,s);return this.#ye(),a}queryRectangle(t,e,i,s=[]){const n=this.#me(t.x,t.y,e.width,e.height),a=this.query(n,i,s);return this.#ye(),a}#fe(t,e,i){const s=this.#le++;let n=this.#re[s];return n||(n=new ne(t,e,i),this.#re[s]=n),n.reset(t,e,i)}#me(t,e,i,s){const n=this.#he++;let a=this.#de[n];return a||(a=new ae(t,e,i,s),this.#de[n]=a),a.reset(t,e,i,s)}#ue(t,e){return`${Math.floor(t/this.#ae)}_${Math.floor(e/this.#ae)}`}#pe(t){if(t instanceof ne){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 ae){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}#ge(t,e,i,s,n){const a=this.#oe.get(`${t}_${e}`);if(a)for(const t of a)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}#ye(){this.#le=0,this.#he=0}}class xn{checkParticlePositionPlugins;#ve;#u;#be;#Pe;#we;#Me;#xe;#ke;#ze;#p;#Ce;#Se;#Oe;#De;#Ie;#Le;constructor(t,e){this.#p=t,this.#u=e,this.#Me=0,this.#ve=[],this.#Ce=[],this.#we=0,this.#Pe=new Map,this.#xe=new Map,this.#Le=this.#Te(this.#u.zLayers),this.#be=new Mn(100),this.checkParticlePositionPlugins=[],this.#ke=[],this.#ze=[],this.#Oe=[],this.#Se=[],this.#Ie=[]}get count(){return this.#ve.length}get grid(){return this.#be}addParticle(e,i,s,a){if(!this.#_e(s,this.count))try{const n=this.#Ce.pop()??new wn(this.#p,this.#u);n.init(this.#Me,e,i,s);let o=!0;return a&&(o=a(n)),o?(this.#ve.push(n),this.#Re(n),this.#Me++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:n}),n):void this.#Ce.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#ve=[],this.#xe.clear(),this.#Ee(this.#u.zLayers)}destroy(){this.#ve=[],this.#Ce.length=0,this.#xe.clear(),this.#Le=[],this.checkParticlePositionPlugins=[],this.#ke=[],this.#ze=[],this.#Oe=[],this.#Se=[],this.#Ie=[]}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.#ve.filter(t)}find(t){return this.#ve.find(t)}get(t){return this.#ve[t]}async init(){const t=this.#u;this.checkParticlePositionPlugins=[],this.#Ie=[],this.#ze=[],this.#Oe=[],this.#ke=[],this.#Se=[],this.#xe.clear(),this.#Ee(t.zLayers),this.#be=new Mn(100*t.retina.pixelRatio),this.#Ae(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#Ae(We(this.#p,this.#u,i),t,i)}await this.#Fe()}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.#ve.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.#Be(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=We(this.#p,this.#u,s);this.#He(n,i,t)}this.#He(t.particles,i)}setResizeFactor(t){this.#De=t}update(t){this.#be.clear();for(const e of this.#Ie)e.update?.(t);const e=this.#Ve(t);for(const e of this.#Oe)e.postUpdate?.(t);if(this.#Ue(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#De=void 0}#Ne(...t){this.#Ce.push(...t)}#He(e,i,s,n){const a=e.number;if(!a.density.enable)return void this.#Ae(e,s,n);const o=this.#qe(a.density),r=a.value,l=a.limit.value>0?a.limit.value:r,c=Math.min(r,l)*o+i,d=Math.min(this.count,this.filter(t=>t.group===s).length);void 0===s?this.#we=a.limit.value*o:this.#Pe.set(s,{limit:a.limit.value*o,mode:A(t.LimitMode,a.limit.mode,t.LimitMode.delete)}),d<c?this.push(Math.abs(c-d),void 0,e,s):d>c&&this.removeQuantity(d-c,s)}#Ae(e,i,s){if(void 0===i){this.#we=e.number.limit.value;const t=this.#u.actualOptions.particles.groups;for(const e of this.#Pe.keys())e in t||this.#Pe.delete(e)}else{const n=s?.number?.limit?.value??e.number.limit.value;n>0?this.#Pe.set(i,{limit:n,mode:A(t.LimitMode,s?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#Pe.delete(i)}}#_e(e,i){const s=this.#we,n=this.#u.actualOptions.particles.number.limit.mode;if(s>0&&n===t.LimitMode.wait&&i>=s)return!0;const a=void 0===e?void 0:this.#Pe.get(e);if(a&&a.limit>0&&a.mode===t.LimitMode.wait){if(this.filter(t=>t.group===e).length>=a.limit)return!0}if(a&&a.limit>0&&a.mode===t.LimitMode.delete){const t=this.filter(t=>t.group===e).length+1-a.limit;t>0&&this.removeQuantity(t,e)}if(s>0&&n===t.LimitMode.delete){const t=this.count+1-s;t>0&&this.#$e(t)}return!1}#Te(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#We(t){const e=this.#Le.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#qe(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#je(){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#Fe(){await this.#Ge(),await this.#je();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#Ge(){const t=this.#u;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Ie.push(e),e.particleUpdate&&this.#ze.push(e),e.postUpdate&&this.#Oe.push(e),e.particleReset&&this.#ke.push(e),e.postParticleUpdate&&this.#Se.push(e)}#Re(t){const e=this.#We(t.position.z),i=this.#Le[e];i&&(i.push(t),this.#xe.set(t.id,e))}#$e(t){this.removeAt(0,t,void 0,void 0,!1)}#Be(e,i,s,n=!0){const a=this.#ve[e];return!!a&&((!n||a.group===i)&&(this.#ve.splice(e,1),this.#Xe(a),a.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:a}),this.#Ne(a),!0))}#Xe(t){const e=this.#xe.get(t.id)??this.#We(t.position.z),i=this.#Le[e];if(!i)return void this.#xe.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#xe.delete(t.id)}#Ee(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.#Te(e)}#Ye(t){const e=this.#We(t.position.z),i=this.#xe.get(t.id);if(void 0===i)return void this.#Re(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.#xe.set(t.id,e)}else this.#xe.set(t.id,e)}#Ve(t){const e=new Set,i=this.#De;for(const s of this.#ve){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.#ke)t.particleReset?.(s);for(const e of this.#ze){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#be.insert(s)}return e}#Ue(t,e){for(const i of this.#ve)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.#Se)e.postParticleUpdate?.(i,t);this.#Ye(i)}}}class kn{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=Z(s.gravity.maxSpeed)*i,a.moveDrift=Z(s.drift)*i,a.moveSpeed=Z(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 zn(t){return!t.destroyed}function Cn(t,e,...i){const s=new je(t,e);return ue(s,...i),s}var Sn=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;#Ze;#Qe;#Ke={value:0,factor:0};#Je;#ti;#ei;#ii;#si;#ni;#ai;#oi;#ri;#li;#ci;#p;#di;#hi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:a,sourceOptions:o}=e;this.#p=s,this.#Je=i,this.#ri=a,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#di=!1,this.#Ze=0,this.#ei=0,this.#oi=0,this.#si=!0,this.started=!1,this.destroyed=!1,this.#ci=!0,this.#ai=0,this.zLayers=100,this.pageHidden=!1,this.#hi=o,this.#ni=o,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new kn(this),this.canvas=new yn(this.#p,this),this.particles=new xn(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#li=Cn(this.#p,this),this.actualOptions=Cn(this.#p,this),this.#ii=new mn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ci&&!this.pageHidden&&zn(this)}get options(){return this.#li}get sourceOptions(){return this.#hi}addLifeTime(t){this.#oi+=t}alive(){return!this.#ei||this.#oi<=this.#ei}destroy(e=!0){if(zn(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.#ri(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Je(t,{container:this,data:e})}draw(t){if(!zn(this))return;let e=t;this.#ti=W(t=>{e&&(this.#ai=void 0,e=!1),this.#ui(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(!zn(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#li=Cn(this.#p,this,this.#ni,this.sourceOptions),this.actualOptions=Cn(this.#p,this,this.#li),this.#Fe(e),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,smooth:a,zLayers:o}=this.actualOptions,r=this.actualOptions.hdr;this.hdrMode=A(t.HdrMode,r.mode,t.HdrMode.standard),this.peakNits=r.peakNits,this.zLayers=o,this.#ei=Z(s)*p,this.#Ze=Z(i)*p,this.#oi=0,this.fpsLimit=n>0?n:120,this.#di=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await At(this,t.initializers.effects),this.shapeDrawers=await At(this,t.initializers.shapes),this.particleUpdaters=await Et(this,t.initializers.updaters)}pause(){if(zn(this)&&(void 0!==this.#ti&&(j(this.#ti),this.#ti=void 0),!this.#ci)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ci=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!zn(this))return;const i=this.#ci||e;if(!this.#si||this.actualOptions.autoPlay){if(this.#ci&&(this.#ci=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#si=!1}async refresh(){if(zn(this))return this.stop(),this.start()}async reset(t){if(zn(this))return this.#ni=t,this.#hi=t,this.#li=Cn(this.#p,this,this.#ni,this.sourceOptions),this.actualOptions=Cn(this.#p,this,this.#li),this.refresh()}async start(){zn(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#ii.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#Qe=setTimeout(()=>{i()},this.#Ze)}))}stop(){if(zn(this)&&this.started){this.#Qe&&(clearTimeout(this.#Qe),this.#Qe=void 0),this.#si=!0,this.started=!1,this.#ii.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.#hi=this.#li,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#Fe(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))}#ui(t){try{if(!this.#di&&void 0!==this.#ai&&t<this.#ai+p/this.fpsLimit)return void this.draw(!1);if(this.#ai??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/p}(this.#Ke,t-this.#ai,this.fpsLimit,this.#di),this.addLifeTime(this.#Ke.value),this.#ai=t,this.#Ke.value>p)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#Ke),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){n().error("error in animation loop",t)}}}});var On=Object.freeze({__proto__:null,ParticlesInstance:class{#u;#pi;constructor(t,e){this.#u=t,this.#pi=e}get destroyed(){return this.#u.destroyed}destroy(){var t;this.#u.destroy(),t=this.#pi,Ci.delete(t)}pause(){this.#u.pause()}play(){this.#u.play()}stop(){this.#u.stop()}}});var Dn=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#u;#gi;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.#gi&&(t.globalCompositeOperation=this.#gi)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#gi=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function In(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 d=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&d.y>=0&&d.y>=s||r.inverse&&d.y<=0&&d.y<=-s)&&(d.y=l*s,i&&(t.velocity.y=d.y/i));const h=t.options.zIndex,u=(1-t.zIndexFactor)**h.velocityRate;d.multTo(u),d.multTo(a);const{position:p}=t;p.addTo(d),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*a,p.y+=Math.cos(p.y*Math.sin(p.x))*a)}var Ln=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(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-Z(i.decay),e.pathDelay=Z(n.delay.value)*p,n.generator){let t=this.pathGenerators.get(n.generator);t||(t=this.availablePathGenerators.get(n.generator),t&&(this.pathGenerators.set(n.generator,t),t.init())),e.pathGenerator=t}e.gravity={enable:s.enable,acceleration:Z(s.acceleration),inverse:s.inverse},function(e,i){const s=i.options.move.spin;if(!s.enable)return;const n=s.position??{x:50,y:50},a={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},o=it(i.getPosition(),a),r=Z(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:a,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:q()*v,radius:o,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,a=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),o=n.retina.reduceFactor,r=e.retina.moveSpeed,l=e.retina.moveDrift,c=e.size.max,d=r*(s.size?e.getRadius()/c:1)*a*(i.factor||1)*u,h=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const a=i.spin.direction===t.RotateDirection.clockwise,o={x:a?Math.cos:Math.sin,y:a?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*o.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*o.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const r=Math.max(e.canvas.size.width,e.canvas.size.height),l=r*u;i.spin.radius>l?(i.spin.radius=l,i.spin.acceleration*=-1):i.spin.radius<0&&(i.spin.radius=0,i.spin.acceleration*=-1),i.spin.angle+=.01*s*(1-i.spin.radius/r)}(n,e,d,o):In(e,s,d,h,l,o,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=tt(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*u-t.velocity.x),l&&(t.velocity.y=t.velocity.x*u-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*=-q()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-q())}}(e)}preInit(){return this.#fi()}redrawInit(){return this.#fi()}update(){for(const t of this.pathGenerators.values())t.update()}async#fi(){const t=this.#p;if(t.initializers.pathGenerators){this.availablePathGenerators=await At(this.#u,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});class Tn{#yi=!0;#mi;#u;#At;#vi;#bi;constructor(t,e){this.#u=t,this.#mi=[],this.#vi=e,this.#bi=new Map,this.#At={mouseDown:()=>{this.#Pi()},mouseLeave:()=>{this.#wi()},mouseMove:t=>{this.#Mi(t)},mouseUp:t=>{this.#xi(t)},touchStart:t=>{this.#ki(t)},touchMove:t=>{this.#Mi(t)},touchEnd:t=>{this.#zi(t)},touchCancel:t=>{this.#zi(t)},touchEndClick:t=>{this.#Ci(t)},visibilityChange:()=>{this.#Ht()}}}addListeners(){this.#Ut(!0)}init(){this.#mi.length=0;for(const t of this.#u.plugins.filter(t=>!!t.clickPositionValid))this.#mi.push(t)}removeListeners(){this.#Ut(!1)}#Si(t){const e=this.#u,i=this.#vi,s=e.actualOptions;if(this.#yi){const t=i.interactivityData.mouse,e=t.position;if(!e)return;t.clickPosition={...e},t.clickTime=performance.now();const n=s.interactivity?.events.onClick;if(!n?.mode)return;St(n.mode,t=>{i.handleClickMode(t)})}"touchend"===t.type&&setTimeout(()=>{this.#wi()},500)}#Ht(){this.#wi()}#Oi(t){const e=this.#At,i=this.#u,s=this.#vi,n=i.actualOptions,a=s.interactivityData.element;if(!a)return;const o=a,r=i.canvas;r.setPointerEvents(o===r.domElement?"initial":"none"),Rt(a,Ds,e.mouseMove,t),Rt(a,Is,e.touchStart,t),Rt(a,Ts,e.touchMove,t),Rt(a,Ls,n.interactivity?.events.onClick.enable?e.touchEndClick:e.touchEnd,t),Rt(a,"pointerup",e.mouseUp,t),Rt(a,"pointerdown",e.mouseDown,t),Rt(a,Os,e.mouseLeave,t),Rt(a,_s,e.touchCancel,t)}#Ut(t){const e=this.#At,i=this.#u,s=this.#vi,n=i.actualOptions,a=n.interactivity?.detectsOn,o=i.canvas.domElement;a===bs.window?s.interactivityData.element=yt():a===bs.parent&&o?s.interactivityData.element=o.parentElement??o.parentNode:s.interactivityData.element=o,this.#Oi(t),Rt(document,d,e.visibilityChange,t,!1)}#Pi(){const{interactivityData:t}=this.#vi,{mouse:e}=t;e.clicking=!0,e.downPosition=e.position}#xi(t){const e=this.#u,i=this.#vi,s=e.actualOptions,{mouse:n}=i.interactivityData;n.inside=!0;const a=n.position;if(a&&s.interactivity?.events.onClick.enable){let e=!1;for(const t of this.#mi)if(e=t.clickPositionValid?.(a)??!1,e)break;e||this.#Si(t)}n.clicking=!1}#wi(){const{interactivityData:t}=this.#vi,{mouse:e}=t;delete e.position,delete e.clickPosition,delete e.downPosition,t.status=Os,e.inside=!1,e.clicking=!1}#Mi(t){const e=this.#u,i=this.#vi,s=e.actualOptions,n=i.interactivityData,a=e.canvas.domElement;if(!n.element)return;let o;if(n.mouse.inside=!0,t.type.startsWith("pointer")){this.#yi=!0;const e=t;if(n.element===yt()){if(a){const t=a.getBoundingClientRect();o={x:e.clientX-t.left,y:e.clientY-t.top}}}else if(s.interactivity?.detectsOn===bs.parent){const t=e.target,i=e.currentTarget;if(a){const s=t.getBoundingClientRect(),n=i.getBoundingClientRect(),r=a.getBoundingClientRect();o={x:e.offsetX+2*s.left-(n.left+r.left),y:e.offsetY+2*s.top-(n.top+r.top)}}else o={x:e.offsetX,y:e.offsetY}}else e.target===a&&(o={x:e.offsetX,y:e.offsetY})}else if(this.#yi="touchmove"!==t.type,a){const e=t,i=e.touches[e.touches.length-1],s=a.getBoundingClientRect();if(!i)return;o={x:i.clientX-s.left,y:i.clientY-s.top}}const r=e.retina.pixelRatio;o&&(o.x*=r,o.y*=r),n.mouse.position=o,n.status=Ds}#zi(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#bi.delete(t.identifier);this.#wi()}#Ci(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#bi.delete(t.identifier);this.#xi(t)}#ki(t){const e=t,i=Array.from(e.changedTouches);for(const t of i)this.#bi.set(t.identifier,performance.now());this.#Mi(t);const{mouse:s}=this.#vi.interactivityData;s.clicking=!0,s.downPosition=s.position}}class _n{interactivityData;interactors;#Di;#u;#ii;#Ii;#Li;#Ti;#p;constructor(t,e){this.#u=e,this.#p=t,this.interactors=[],this.#Ii=[],this.#Ti=[],this.#Di=new Map,this.#ii=new Tn(e,this),this.interactivityData={mouse:{clicking:!1,inside:!1}},this.#Li=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)}(t=>{this.#_i(t)})}addClickHandler(t){const e=this.#u,i=this.interactivityData;if(e.destroyed)return;const s=i.element;if(!s)return;const n=(i,s,n)=>{if(e.destroyed)return;const a=e.retina.pixelRatio,o={x:s.x*a,y:s.y*a},r=e.particles.grid.queryCircle(o,n*a);t(i,r)};let a=!1,o=!1;this.#Di.set("click",t=>{if(e.destroyed)return;const i=t,s={x:i.offsetX,y:i.offsetY};n(t,s,1)}),this.#Di.set(Is,()=>{e.destroyed||(a=!0,o=!1)}),this.#Di.set(Ts,()=>{e.destroyed||(o=!0)}),this.#Di.set(Ls,t=>{if(!e.destroyed){if(a&&!o){const i=t,s=i.touches[i.touches.length-1];if(!s)return;const a=e.canvas.domElement,o=a?a.getBoundingClientRect():void 0,r={x:s.clientX-(o?o.left:0),y:s.clientY-(o?o.top:0)};n(t,r,Math.max(s.radiusX,s.radiusY))}a=!1,o=!1}}),this.#Di.set(_s,()=>{e.destroyed||(a=!1,o=!1)});for(const[t,e]of this.#Di)s.addEventListener(t,e)}addListeners(){this.#ii.addListeners()}clearClickHandlers(){const t=this.#u,e=this.interactivityData;if(!t.destroyed){for(const[t,i]of this.#Di)e.element?.removeEventListener(t,i);this.#Di.clear()}}externalInteract(t){for(const e of this.#Ii){const i=this.interactivityData;e.isEnabled(i)&&e.interact(i,t)}}handleClickMode(t){if(this.#u.destroyed)return;const e=this.interactivityData;for(const i of this.#Ii)i.handleClickMode?.(t,e)}init(){this.#ii.init();for(const t of this.interactors){switch(t.type){case Ps.external:this.#Ii.push(t);break;case Ps.particles:this.#Ti.push(t)}t.init()}}async initInteractors(){const t=this.#p;t.initializers.interactors&&(this.interactors=await Et(this.#u,t.initializers.interactors),this.#Ii=[],this.#Ti=[])}particlesInteract(t,e){const i=this.interactivityData;for(const i of this.#Ii)i.clear(t,e);for(const s of this.#Ti)s.isEnabled(t,i)&&s.interact(t,i,e)}removeListeners(){this.#ii.removeListeners()}reset(t){const e=this.interactivityData;for(const i of this.#Ii)i.isEnabled(e)&&i.reset(e,t);for(const i of this.#Ti)i.isEnabled(t,e)&&i.reset(e,t)}startObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.observe(t.element)}stopObserving(){const t=this.interactivityData;t.element instanceof HTMLElement&&this.#Li&&this.#Li.unobserve(t.element)}updateMaxDistance(){let t=0;for(const e of this.interactors)e.maxDistance>t&&(t=e.maxDistance);const e=this.#u;e.particles.grid.cellSize=t*e.retina.pixelRatio}#_i(t){const e=this.#u;if(!e.destroyed&&e.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivityData.element&&(i.isIntersecting?e.play():e.pause())}}var Rn=Object.freeze({__proto__:null,InteractivityPluginInstance:class{#u;constructor(t,e){e.addClickHandler=t=>{e.interactionManager?.addClickHandler(t)},e.interactionManager=new _n(t,e),this.#u=e}addClickHandler(t){this.#u.interactionManager?.addClickHandler(t)}clearClickHandlers(){this.#u.interactionManager?.clearClickHandlers()}destroy(){this.clearClickHandlers()}particleCreated(t){const e=t,i=this.#u,s=new zs(i);s.load(i.actualOptions.interactivity),s.load(e.options.interactivity),e.interactivity=s}particleReset(t){this.#u.interactionManager?.reset(t)}postParticleUpdate(t,e){this.#u.interactionManager?.particlesInteract(t,e)}postUpdate(t){const e=this.#u;e.interactionManager?.externalInteract(t),e.interactionManager?.updateMaxDistance()}async preInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}async redrawInit(){const t=this.#u;await(t.interactionManager?.initInteractors()),t.interactionManager?.init()}start(){const t=this.#u;return t.interactionManager?.addListeners(),t.interactionManager?.startObserving(),Promise.resolve()}stop(){this.#u.interactionManager?.removeListeners(),this.#u.interactionManager?.stopObserving()}}});var En=Object.freeze({__proto__:null,OverlapPluginInstance:class{#u;constructor(t){this.#u=t}checkParticlePosition(t,e,i){return!this.#Ri(t,e,i)}#Ri(t,e,i){const s=t.options.collisions;if(!s?.enable)return!1;const n=s.overlap;if(n.enable)return!1;const a=n.retries;if(a>=0&&i>a)throw new Error(ut(Ys));return!!this.#u.particles.find(i=>it(e,i.position)<t.getRadius()+i.getRadius())}}});function An(t,e){const i=(s=t.map(t=>t.id),[...s].sort((t,e)=>t-e).join("_"));var s;let n=e.get(i);return void 0===n&&(n=q(),e.set(i,n)),n}var Fn=Object.freeze({__proto__:null,LinkInstance:class{#Ei=new Map;#u;#Ai;#p;constructor(t,e){this.#p=t,this.#u=e,this.#Ai={links:new Map,triangles:new Map}}drawParticle(t,e){const{links:i,options:s}=e;if(!i?.length||!s.links)return;const n=s.links,a=e.retina.linksWidth??0,o=e.getPosition(),r=e.options.twinkle?.links,l=n.triangles.enable,c=l?new Set(i.map(t=>t.destination.id)):null,d=t.globalAlpha;let h="",p=-1,f=-1,y=!1;const m=()=>{y&&(t.stroke(),y=!1)};for(const d of i){if(n.frequency<1&&this.#Fi(e,d.destination)>n.frequency)continue;const i=d.destination.getPosition();if(l&&!d.isWarped&&c&&(m(),this.#Bi(s,e,d,c,o,i,t)),d.opacity<=0||a<=0)continue;if(!n.enable)continue;let v=d.opacity,b=d.color;const P=r?.enable&&q()<r.frequency?ni(this.#p,r.color):void 0;if(r&&P&&(b=P,v=Z(r.opacity)),!b){const t=void 0!==n.id?this.#u.particles.linksColors.get(n.id):this.#u.particles.linksColor;b=mi(e,d.destination,t)}if(!b)continue;const w=this.#Hi(b);if(w===h&&a===p&&v===f||(m(),t.strokeStyle=w,t.lineWidth=a,t.globalAlpha=v,h=w,p=a,f=v,t.beginPath(),y=!0),d.isWarped){const e=this.#u.canvas.size,s=i.x-o.x,n=i.y-o.y;let a=g.x,r=g.y;Math.abs(s)>e.width*u&&(a=s>0?-e.width:e.width),Math.abs(n)>e.height*u&&(r=n>0?-e.height:e.height),t.moveTo(o.x,o.y),t.lineTo(i.x+a,i.y+r),t.moveTo(o.x-a,o.y-r),t.lineTo(i.x,i.y)}else t.moveTo(o.x,o.y),t.lineTo(i.x,i.y)}m(),t.globalAlpha=d}init(){return this.#Ai.links.clear(),this.#Ai.triangles.clear(),this.#Ei.clear(),Promise.resolve()}particleCreated(t){if(t.links=[],!t.options.links)return;t.linksDistance=t.options.links.distance,t.linksWidth=t.options.links.width;const e=this.#u.retina.pixelRatio;t.retina.linksDistance=t.linksDistance*e,t.retina.linksWidth=t.linksWidth*e}particleDestroyed(t){t.links=[]}#Bi(t,e,i,s,n,a,o){const r=i.destination,l=t.links?.triangles;if(!l?.enable||!r.options.links?.triangles.enable)return;const c=r.links;if(c?.length)for(const d of c){if(d.isWarped||this.#Fi(r,d.destination)>r.options.links.frequency||!s.has(d.destination.id))continue;const c=d.destination;if(this.#Vi(e,r,c)>(t.links?.triangles.frequency??0))continue;const h=l.opacity??(i.opacity+d.opacity)*u,p=ni(this.#p,l.color)??i.color;if(!p||h<=0)continue;const g=c.getPosition();o.save(),o.fillStyle=this.#Hi(p),o.globalAlpha=h,o.beginPath(),o.moveTo(n.x,n.y),o.lineTo(a.x,a.y),o.lineTo(g.x,g.y),o.closePath(),o.fill(),o.restore()}}#Hi(t){const e=`${t.r},${t.g},${t.b}-${this.#u.hdr}-${this.#u.peakNits}-${this.#u.hdrMode}`;let i=this.#Ei.get(e);return i||(i=gi(t,this.#u.hdr,void 0,this.#u.peakNits,this.#u.hdrMode),this.#Ei.set(e,i)),i}#Fi(t,e){return An([t,e],this.#Ai.links)}#Vi(t,e,i){return An([t,e,i],this.#Ai.triangles)}}});t.AnimatableColor=ve,t.AnimationOptions=pe,t.AnimationValueWithRandom=De,t.Background=be,t.BaseRange=se,t.Circle=ne,t.ColorAnimation=fe,t.ErrorCodes=ht,t.Fill=ke,t.FullScreen=Pe,t.HDROptions=we,t.HslAnimation=ye,t.Move=Re,t.MoveAngle=ze,t.MoveCenter=Ce,t.MoveGravity=Se,t.MovePath=Le,t.OptionLoader=he,t.Options=je,t.OptionsColor=me,t.OutModes=Te,t.Paint=Ae,t.ParticlesBounce=Be,t.ParticlesBounceFactor=Fe,t.ParticlesDensity=He,t.ParticlesNumber=Ue,t.ParticlesNumberLimit=Ve,t.ParticlesOptions=$e,t.RangedAnimationOptions=ge,t.RangedAnimationValueWithRandom=Ie,t.Rectangle=ae,t.ResizeEvent=Me,t.Shape=Ne,t.Spin=_e,t.Stroke=Ee,t.ValueWithRandom=Oe,t.Vector=L,t.Vector3d=I,t.ZIndex=qe,t.addErrorMessages=function(t){},t.alterHsl=ki,t.animate=W,t.areBoundsInside=Mt,t.calcExactPositionOrRandomFromSize=ct,t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/h,y:t.position.y*t.size.height/h}:void 0},t.calcPositionOrRandomFromSize=lt,t.calcPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?Z(t.position.x):void 0,y:void 0!==t.position?.y?Z(t.position.y):void 0};return lt({size:t.size,position:e})},t.calculateBounds=xt,t.cancelAnimation=j,t.canvasFirstIndex=0,t.canvasTag=w,t.checkDistance=st,t.circleBounce=Ct,t.circleBounceDataFromParticle=zt,t.clamp=G,t.cloneStyle=It,t.collisionVelocity=rt,t.colorMix=yi,t.colorToRgb=ai,t.countOffset=1,t.decayOffset=1,t.deepExtend=kt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=l,t.defaultDensityFactor=1,t.defaultFps=60,t.defaultFpsLimit=120,t.defaultLoops=0,t.defaultOpacity=1,t.defaultRatio=1,t.defaultReduceFactor=1,t.defaultRemoveQuantity=1,t.defaultRetryCount=0,t.defaultRgbMin=0,t.defaultTime=0,t.defaultTransform=f,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=nt,t.deleteCount=1,t.double=2,t.doublePI=v,t.empty=0,t.executeOnSingleOrMultiple=St,t.fullPercent=r,t.generatedAttribute=o,t.generatedFalse=P,t.generatedTrue=b,t.getCanvasFromContainer=Bt,t.getDataFromUrl=Ft,t.getDistance=it,t.getDistanceSq=et,t.getDistances=tt,t.getDomContainer=Ht,t.getErrorMessage=ut,t.getFullScreenStyle=_t,t.getHslAnimationFromHsl=Pi,t.getHslFromAnimation=bi,t.getItemMapFromInitializer=At,t.getItemsFromInitializer=Et,t.getLinkColor=mi,t.getLinkRandomColor=vi,t.getLogger=n,t.getParticleBaseVelocity=ot,t.getParticleDirectionAngle=at,t.getPosition=Dt,t.getRandom=q,t.getRandomFn=function(){return U},t.getRandomInRange=$,t.getRandomRgbColor=pi,t.getRangeMax=K,t.getRangeMin=Q,t.getRangeValue=Z,t.getStyleFromHsl=fi,t.getStyleFromRgb=gi,t.hMax=x,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=di,t.hslToRgbFloat=hi,t.hslaToRgba=ui,t.identity=1,t.inverseFactorNumerator=1,t.isArray=B,t.isBoolean=T,t.isEnumValue=E,t.isFunction=function(t){return"function"==typeof t},t.isInArray=bt,t.isNull=H,t.isNumber=R,t.isObject=F,t.isPointInside=wt,t.isString=_,t.itemFromArray=Pt,t.itemFromSingleOrMultiple=Ot,t.lFactor=1,t.lMax=z,t.lMin=0,t.lengthOffset=1,t.loadExtendProperty=function(t,e,i){if(void 0!==i){const s=e;if("__proto__"===s||"constructor"===s||"prototype"===s)return;const n=t,a=Object.hasOwn(n,s)?n[s]:{};n[s]=kt(a,i)}},t.loadLazyProperty=ce,t.loadMinIndex=0,t.loadNestedProperty=le,t.loadOptionProperty=de,t.loadOptions=ue,t.loadParticlesOptions=We,t.loadProperty=oe,t.loadRandomFactor=1e4,t.loadRangeProperty=re,t.manageListener=Rt,t.maxNits=O,t.midColorValue=m,t.millisecondsToSeconds=p,t.minCount=0,t.minDistance=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minRadius=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=X,t.none=0,t.one=1,t.originPoint=g,t.parseAlpha=dt,t.particles=dn,t.percentDenominator=h,t.phaseNumerator=1,t.quarter=C,t.randomColorValue=y,t.randomInRangeValue=Y,t.rangeColorToHsl=oi,t.rangeColorToRgb=ni,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=c,t.rgbMax=M,t.rgbToHsl=ri,t.sMax=k,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=yt,t.safeMatchMedia=mt,t.safeMutationObserver=vt,t.setAnimationFunctions=function(t,e){N.nextFrame=t,N.cancel=e},t.setLogger=function(t){t.debug&&(s.debug=i(t.debug)),t.error&&(s.error=i(t.error)),t.info&&(s.info=i(t.info)),t.log&&(s.log=i(t.log)),t.trace&&(s.trace=i(t.trace)),t.verbose&&(s.verbose=i(t.verbose)),t.warning&&(s.warning=i(t.warning))},t.setRandom=function(t=Math.random){U=t},t.setRangeValue=J,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return si(t,e)?.a},t.stringToRgb=li,t.threeQuarter=S,t.toEnumValue=A,t.triple=3,t.tryCountIncrement=1,t.tsParticles=zi,t.updateColor=xi,t.updateColorValue=Mi,t.visibilityChangeEvent=d,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.particles=t.__tsParticlesInternals.bundles.particles||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{loadExtendProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadExtendProperty,loadLazyProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadLazyProperty,loadMinIndex:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadMinIndex,loadNestedProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadNestedProperty,loadOptionProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptionProperty,loadOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadParticlesOptions,loadProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadProperty,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRandomFactor,loadRangeProperty:(globalThis.__tsParticlesInternals.bundles.particles||{}).loadRangeProperty,tsParticles:(globalThis.__tsParticlesInternals.bundles.particles||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.particles||{});