UNPKG

@tsparticles/fireworks

Version:

tsParticles fireworks bundle — easily create spectacular fireworks and fountain particle effects with built-in presets. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.

2 lines • 140 kB
!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 o;t.MoveDirection=void 0,(o=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",o.bottomLeft="bottom-left",o.bottomRight="bottom-right",o.left="left",o.none="none",o.right="right",o.top="top",o.topLeft="top-left",o.topRight="top-right",o.outside="outside",o.inside="inside";const a="generated",r="100%",l="source-over",c="resize",d="visibilitychange",h=100,u=.5,p=1e3,f={x:0,y:0,z:0},g={a:1,b:0,c:0,d:1},m="random",y="mid",v=2*Math.PI,w="true",b="false",P="canvas",x=255,M=360,C=100,z=100,k=.25,S=.75,O=1e4,D=400;function I(t){return"z"in t?t.z:f.z}class F{x;y;z;constructor(t=f.x,e=f.y,i=f.z){this.x=t,this.y=e,this.z=i}static get origin(){return F.create(f.x,f.y,f.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 F.create(t.x,t.y,I(t))}static create(t,e,i){return"number"==typeof t?new F(t,e??f.y,i??f.z):new F(t.x,t.y,I(t))}add(t){return F.create(this.x+t.x,this.y+t.y,this.z+I(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=I(t)}copy(){return F.clone(this)}div(t){return F.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x*this.x+this.y*this.y}mult(t){return F.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 F.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),f.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=I(t)}sub(t){return F.create(this.x-t.x,this.y-t.y,this.z-I(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=I(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class E extends F{constructor(t=f.x,e=f.y){super(t,e,f.z)}static get origin(){return E.create(f.x,f.y)}static clone(t){return E.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new E(t,e??f.y):new E(t.x,t.y)}}function L(t){return"boolean"==typeof t}function R(t){return"string"==typeof t}function T(t){return"number"==typeof t}function A(t){return"function"==typeof t}function _(t,e){return Object.values(t).some(t=>t===e)}function B(t,e,i){return _(t,e)?e:i}function V(t){return"object"==typeof t&&null!==t}function U(t){return Array.isArray(t)}function N(t){return null==t}const H=Math.PI/180;let G=Math.random;const $={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function j(){return Y(G(),0,1-Number.EPSILON)}function q(t,e){return j()*(e-t)+t}function W(t){return $.nextFrame(t)}function X(t){$.cancel(t)}function Y(t,e,i){return Math.min(Math.max(t,e),i)}function Q(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function Z(t){const e=tt(t);let i=J(t);return e===i&&(i=0),q(i,e)}function K(t){return T(t)?t:Z(t)}function J(t){return T(t)?t:t.min}function tt(t){return T(t)?t:t.max}function et(t,e){if(t===e||void 0===e&&T(t))return t;const i=J(t),s=tt(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:et(i,s)}function it(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function st(t,e){return Math.sqrt(it(t,e))}function nt(t,e,i){return it(t,e)<=i*i}function ot(t){return t*H}function at(e,i,s){if(T(e))return ot(e);switch(e){case t.MoveDirection.top:return-Math.PI*u;case t.MoveDirection.topRight:return-Math.PI*k;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*k;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 j()*v}}function rt(t){const e=E.origin;return e.length=1,e.angle=t,e}function lt(t,e,i,s){return E.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function ct(t){return{x:(t.position?.x??j()*h)*t.size.width/h,y:(t.position?.y??j()*h)*t.size.height/h}}function dt(t){const e={x:void 0!==t.position?.x?K(t.position.x):void 0,y:void 0!==t.position?.y?K(t.position.y):void 0};return ct({size:t.size,position:e})}function ht(t){const{position:e,size:i}=t;return{x:e?.x??j()*i.width,y:e?.y??j()*i.height}}function ut(t){return t?t.endsWith("%")?Number.parseFloat(t)/h:Number.parseFloat(t):1}const pt={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 ft(t,...e){return`[tsParticles Error ${t}] https://particles.js.org/errors/#${t}`}var gt,mt;function yt(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function vt(){return globalThis.document}function wt(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function bt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function Pt(t,e){return t===e||U(e)&&e.includes(t)}function xt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(j()*t.length)]}function Mt(t,e,i,s,n){return Ct(zt(t,s??0),e,i,n)}function Ct(e,i,s,n){let o=!0;return n&&n!==t.OutModeDirection.bottom||(o=e.top<i.height+s.x),!o||n&&n!==t.OutModeDirection.left||(o=e.right>s.x),!o||n&&n!==t.OutModeDirection.right||(o=e.left<i.width+s.y),!o||n&&n!==t.OutModeDirection.top||(o=e.bottom>s.y),o}function zt(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(N(i))continue;if(!V(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):V(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return V(e)||Array.isArray(e)})){const s=i,n=t;for(const t of e){if(yt(t))continue;const e=s[t];void 0!==e&&(n[t]=e)}continue}for(const s of e){if(yt(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 St(t,e){return U(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Ot(t,e,i){return U(t)?xt(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=vt().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||N(s))continue;const n=t.getPropertyValue?.(s);if(!n)continue;const o=t.getPropertyPriority?.(s);o?e.setProperty(s,n,o):e.setProperty(s,n)}return e}let Ft,Et;function Lt(t){if(Ft!==t||!Et){Ft=t;const e=vt().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)}Et=e}return Et}function Rt(t,e,i,s,n){if(s){let s={passive:!0};L(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 Tt(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 _t(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(U(t))return t.every(t=>V(t)&&!U(t));return V(t)&&!U(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=vt();if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===P)e=t,e.dataset[a]??=b,e.dataset[a]===w&&(e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(P).item(0);s?(e=s,e.dataset[a]=b):(e=i.createElement(P),e.dataset[a]=w,t.appendChild(e)),e.style.width||=r,e.style.height||=r,e.style.pointerEvents="none",e.style.setProperty("pointer-events","none")}return e}function Vt(t,e){const i=vt();let s=e??i.getElementById(t);return s||(s=i.createElement("canvas"),s.id=t,s.dataset[a]=w,i.body.append(s),s)}t.OutModeDirection=void 0,(gt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",gt.left="left",gt.right="right",gt.top="top",t.PixelMode=void 0,(mt=t.PixelMode||(t.PixelMode={})).precise="precise",mt.percent="percent";class Ut{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);const i=this.#e.get(t);this.#e.set(t,i?[...i,e]:[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):this.#e.set(t,[...i.slice(0,n),...i.slice(n+1)]))}}var Nt,Ht,Gt,$t,jt,qt,Wt,Xt,Yt,Qt,Zt,Kt,Jt,te;t.EventType=void 0,(Nt=t.EventType||(t.EventType={})).configAdded="configAdded",Nt.containerInit="containerInit",Nt.particlesSetup="particlesSetup",Nt.containerStarted="containerStarted",Nt.containerStopped="containerStopped",Nt.containerDestroyed="containerDestroyed",Nt.containerPaused="containerPaused",Nt.containerPlay="containerPlay",Nt.containerBuilt="containerBuilt",Nt.particleAdded="particleAdded",Nt.particleDestroyed="particleDestroyed",Nt.particleRemoved="particleRemoved";class ee{colorManagers=new Map;easingFunctions=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;presets=new Map;#i=0;#s=new Set;#n=new Map;#o;#a=new Set;#r=new Set;#l=!1;#c;#d=!1;#h;#u=new Set;#p=[];#f;constructor(t){this.#o=t;const e=new WeakMap,i=()=>this.#i>0?Promise.resolve():t.init();this.#h=new Proxy(t,{get:(t,s)=>{if("init"===s)return i;const n=Reflect.get(t,s,t);if("function"!=typeof n)return n;let o=e.get(n);return o||(o=(...e)=>Reflect.apply(n,t,e),e.set(n,o)),o}})}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}get initialized(){return this.#l}get plugins(){return this.#f??=Object.freeze([...this.#p])}addColorManager(t,e){this.#g(),this.colorManagers.set(t,e)}addConfig(e){this.#g();const i=e.key??e.name??"default";this.#n.set(i,e),this.#o.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.#g(),this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.#g(),this.initializers.effects.set(t,e)}addPalette(t,e){this.#g(),this.palettes.set(t,e)}addParticleUpdater(t,e){this.#g(),this.initializers.updaters.set(t,e)}addPlugin(t){if(!this.#d)throw new Error(ft(pt.pluginRegisterAfterLoad));this.getPlugin(t.id)||(this.#p.push(t),this.#f=void 0)}addPreset(t,e,i=!1){this.#g(),!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){this.#g();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.#p.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async init(){if(!this.#l)return this.#c||(this.#c=Promise.resolve().then(async()=>{this.#d=!0,this.#s=new Set(this.#u);try{for(;this.#r.size>0||[...this.#s].some(t=>!this.#a.has(t));){for(const t of this.#s)await this.#m(t,this.#a,this.#s);const t=[...this.#r];t.length&&await Promise.all(t)}this.#u.clear(),this.#l=!0}finally{this.#d=!1,this.#c=void 0}})),this.#c}async register(...t){this.#g();for(const e of t)this.#d?(this.#u.add(e),await this.#m(e,this.#a,this.#s)):this.#u.add(e)}#g(){if(this.#l)throw new Error(ft(pt.pluginRegisterAfterLoad))}async#m(t,e,i){if(e.has(t))return;e.add(t),i.add(t),this.#i++;const s=(async()=>t(this.#h))();this.#r.add(s);try{await s}catch(i){throw e.delete(t),i}finally{this.#i--,this.#r.delete(s)}}}class ie{pluginManager=new ee(this);#y=0;#v=new WeakMap;#w=[];#b=new Ut;#l=!1;#P=0;#x=new Map;get items(){return this.#w}get version(){return"4.6.0"}addEventListener(t,e){this.#b.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(ft(pt.engineVersionMismatch,this.version))}dispatchEvent(t,e){this.#b.dispatchEvent(t,e)}async init(){this.#l||(await this.pluginManager.init(),this.#l=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let e;"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(e=t.element);const i=t.id??(e?this.#M(e):void 0)??`tsparticles${Math.floor(j()*O).toString()}`,s=++this.#P;this.#x.set(i,s);try{await this.init();const{Container:n}=await Promise.resolve().then(function(){return Hn}),{index:o,url:a}=t,r=a?await _t({fallback:t.options,url:a,index:o}):t.options;if(this.#x.get(i)!==s)return;const l=Ot(r,o),{items:c}=this,d=c.findIndex(t=>t.id.description===i),h=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:i,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(h);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(d>=0){const t=this.item(d),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(d,e,h)}else c.push(h);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:Bt(Vt(i,e));h.canvas.loadCanvas(u);try{await h.start()}catch(t){h.destroy(!1);const e=c.indexOf(h);throw e>=0&&c.splice(e,1),t}if(h.destroyed)return;return h}finally{this.#x.get(i)===s&&this.#x.delete(i)}}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#b.removeEventListener(t,e)}#C(t){let e=this.#v.get(t);return e||(e=`tsparticles${Math.floor(j()*O).toString()}_${this.#y++}`,this.#v.set(t,e)),e}#M(t){return t.id.length?t.id:this.#C(t)}}!function(t){t.circle="circle",t.rectangle="rectangle"}(Ht||(Ht={}));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,Ht.circle),this.radius=i}contains(t){return nt(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=i.x-e.x,o=i.y-e.y;if(t instanceof ne||t.type===Ht.circle){const e=s+t.radius;return e>0&&n*n+o*o<e*e}if(t instanceof oe||t.type===Ht.rectangle){const e=t,{width:i,height:a}=e.size,r=Math.abs(n),l=Math.abs(o),c=r-i,d=l-a;return c*c+d*d<=s*s||r<=s+i&&l<=s+a||r<=i||l<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class oe extends se{size;constructor(t,e,i,s){super(t,e,Ht.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 oe))return!1;const e=this.size.width,i=this.size.height,s=this.position,n=t.position,o=t.size,a=o.width,r=o.height;return n.x<s.x+e&&n.x+a>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 ae(t,e,i){void 0!==i&&(t[e]=i)}function re(t,e,i){void 0!==i&&(t[e]=et(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 o=n[e];for(const t of s)o.load(t?.[e])}t.RotateDirection=void 0,(Gt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Gt.counterClockwise="counter-clockwise",Gt.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,(jt=t.HdrMode||(t.HdrMode={})).standard="standard",jt.natural="natural",jt.vivid="vivid",jt.cinematic="cinematic",jt.dynamic="dynamic",t.LimitMode=void 0,(qt=t.LimitMode||(t.LimitMode={})).delete="delete",qt.wait="wait",t.OutMode=void 0,(Wt=t.OutMode||(t.OutMode={})).bounce="bounce",Wt.none="none",Wt.out="out",Wt.destroy="destroy",Wt.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,(Qt=t.GradientType||(t.GradientType={})).linear="linear",Qt.radial="radial",Qt.random="random",t.ParticleOutType=void 0,(Zt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Zt.inside="inside",Zt.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){N(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),ae(this,"enable",t.enable),re(this,"speed",t.speed),re(this,"decay",t.decay),re(this,"delay",t.delay),ae(this,"sync",t.sync)}}class fe extends pe{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),ae(this,"mode",t.mode),ae(this,"startValue",t.startValue)}}class ge extends pe{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),ae(this,"max",t.max),ae(this,"min",t.min),re(this,"offset",t.offset)}}class me extends he{h=new ge(0,M);l=new ge(0,z);s=new ge(0,C);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class ye extends he{value="";static create(t,e){const i=new ye;return i.load(t),void 0!==e&&(R(e)||U(e)?i.load({value:e}):i.load(e)),i}doLoad(t){N(t.value)||(this.value=t.value)}}class ve extends ye{animation=new me;static create(t,e){const i=new ve;return i.load(t),void 0!==e&&(R(e)||U(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 we extends he{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new ye,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=ye.create(this.color,t.color)),ae(this,"element",t.element),ae(this,"draw",t.draw),ae(this,"image",t.image),ae(this,"position",t.position),ae(this,"repeat",t.repeat),ae(this,"size",t.size),ae(this,"opacity",t.opacity)}}class be extends he{enable=!0;zIndex=0;doLoad(t){ae(this,"enable",t.enable),ae(this,"zIndex",t.zIndex)}}class Pe extends he{enable=!0;mode=t.HdrMode.standard;peakNits=400;doLoad(e){if(void 0!==e.enable&&!L(e.enable))throw new Error(ft(pt.hdrEnableInvalid,String(e.enable)));if(void 0!==e.mode&&!_(t.HdrMode,e.mode))throw new Error(ft(pt.hdrModeInvalid,Object.values(t.HdrMode).join(", "),(i=e.mode,String(i))));var i;if(void 0!==e.peakNits&&(!T(e.peakNits)||!Number.isFinite(e.peakNits)||e.peakNits<=0))throw new Error(ft(pt.hdrPeakNitsInvalid,String(e.peakNits)));ae(this,"enable",e.enable),ae(this,"mode",e.mode),ae(this,"peakNits",e.peakNits)}}class xe extends he{delay=.5;enable=!0;doLoad(t){ae(this,"delay",t.delay),ae(this,"enable",t.enable)}}class Me 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))}ae(this,"close",t.close),ae(this,"type",t.type)}}class Ce extends he{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ve.create(this.color,t.color)),ae(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 ke extends he{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){ae(this,"x",t.x),ae(this,"y",t.y),ae(this,"mode",t.mode),ae(this,"radius",t.radius)}}class Se extends he{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){re(this,"acceleration",t.acceleration),ae(this,"enable",t.enable),ae(this,"inverse",t.inverse),re(this,"maxSpeed",t.maxSpeed)}}class Oe extends he{value=0;doLoad(t){N(t.value)||(this.value=et(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 fe}class Fe extends he{clamp=!0;delay=new Oe;enable=!1;generator;options={};doLoad(t){ae(this,"clamp",t.clamp),this.delay.load(t.delay),ae(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=kt(this.options,t.options))}}class Ee 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 Le extends he{acceleration=0;enable=!1;position;doLoad(t){re(this,"acceleration",t.acceleration),ae(this,"enable",t.enable),t.position&&(this.position=kt({},t.position))}}class Re extends he{angle=new ze;center=new ke;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new Se;outModes=new Ee;path=new Fe;random=!1;size=!1;speed=2;spin=new Le;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(T(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),re(this,"decay",t.decay),ae(this,"direction",t.direction),void 0!==t.distance&&(this.distance=T(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),re(this,"drift",t.drift),ae(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(V(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),ae(this,"random",t.random),ae(this,"size",t.size),re(this,"speed",t.speed),this.spin.load(t.spin),ae(this,"straight",t.straight),ae(this,"vibrate",t.vibrate),ae(this,"warp",t.warp)}}class Te 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 Ce),ce(this,"stroke",t.stroke,()=>new Te)}}class _e extends Oe{value=1}class Be extends he{horizontal=new _e;vertical=new _e;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ve extends he{enable=!1;height=1080;width=1920;doLoad(t){ae(this,"enable",t.enable),ae(this,"width",t.width),ae(this,"height",t.height)}}class Ue extends he{mode=t.LimitMode.delete;value=0;doLoad(t){ae(this,"mode",t.mode),ae(this,"value",t.value)}}class Ne extends he{density=new Ve;limit=new Ue;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),ae(this,"value",t.value)}}class He 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))}ae(this,"close",t.close),ae(this,"type",t.type)}}class Ge extends Oe{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),ae(this,"opacityRate",t.opacityRate),ae(this,"sizeRate",t.sizeRate),ae(this,"velocityRate",t.velocityRate)}}class $e extends he{bounce=new Be;effect=new Me;groups={};move=new Re;number=new Ne;paint;palette;reduceDuplicates=!1;shape=new He;zIndex=new Ge;#z;#k;constructor(t,e){super(),this.#k=t,this.#z=e,this.paint=new Ae,this.paint.color=new ve,this.paint.color.value="#fff",this.paint.fill=new Ce,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#S(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&&(U(e)?this.paint=St(e,t=>{const e=new Ae;return e.load(t),e}):U(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.#z){for(const e of this.#k.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#z,this,t);const e=this.#z.particleUpdaters;for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#S(t){const e=this.#k.getPalette(t);if(!e)return;const i=e.colors,s=(U(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 je(t,e,...i){const s=new $e(t,e);return ue(s,...i),s}class qe 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;#z;#k;constructor(t,e){super(),this.#k=t,this.#z=e,this.background=new we,this.fullScreen=new be,this.hdr=new Pe,this.particles=je(this.#k,this.#z),this.resize=new xe}doLoad(e){void 0!==e.preset&&(this.preset=e.preset,St(this.preset,t=>{this.#O(t)})),void 0!==e.palette&&(this.palette=e.palette,this.#S(this.palette)),ae(this,"autoPlay",e.autoPlay),ae(this,"clear",e.clear),ae(this,"key",e.key),ae(this,"name",e.name),re(this,"delay",e.delay),ae(this,"detectRetina",e.detectRetina),re(this,"duration",e.duration),ae(this,"fpsLimit",e.fpsLimit);const i=e.hdr;L(i)?(this.hdr.enable=i,this.hdr.mode=t.HdrMode.standard,this.hdr.peakNits=400):this.hdr.load(i),ae(this,"pauseOnBlur",e.pauseOnBlur),ae(this,"pauseOnOutsideViewport",e.pauseOnOutsideViewport),ae(this,"zLayers",e.zLayers),this.background.load(e.background);const s=e.fullScreen;L(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),ae(this,"smooth",e.smooth),this.#k.plugins.forEach(t=>{t.loadOptions(this.#z,this,e)})}#S(t){const e=this.#k.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#O(t){this.load(this.#k.getPreset(t))}}const We=new Map,Xe=1.15,Ye=1.05,Qe=.2126,Ze=.7152,Ke=.0722;function Je(t,e){let i=We.get(t);return i||(i=e(),We.size>2e3&&We.clear(),We.set(t,i)),i}function ti(t){return Y(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=R(e)?{value:e}:e;if(R(n.value))return oi(t,n.value,i,s);if(U(n.value)){const e=xt(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 oi(t,e,i,s=!0){if(!e)return;const n=R(e)?{value:e}:e;if(R(n.value))return n.value===m?pi():li(t,n.value);if(U(n.value)){const e=xt(n.value,i,s);if(!e)return;return oi(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function ai(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/x,i=t.g/x,s=t.b/x,n=Math.max(e,i,s),o=Math.min(e,i,s),a={h:0,l:(n+o)*u,s:0};return n!==o&&(a.s=a.l<u?(n-o)/(n+o):(n-o)/(2-n-o),a.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),a.l*=z,a.s*=C,a.h*=60,a.h<0&&(a.h+=M),a.h>=M&&(a.h-=M),a}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%M+M)%M,i=Math.max(0,Math.min(C,t.s)),s=Math.max(0,Math.min(z,t.l)),n=e/M,o=i/C,a=s/z;if(0===i){const t=Math.round(a*x);return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,l=2*a-r,c=1/3,d=Math.min(x,x*ci(l,r,n+c)),h=Math.min(x,x*ci(l,r,n)),p=Math.min(x,x*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%M+M)%M,i=Math.max(0,Math.min(C,t.s)),s=Math.max(0,Math.min(z,t.l)),n=e/M,o=i/C,a=s/z;if(0===i){const t=a*x;return{r:t,g:t,b:t}}const r=a<u?a*(1+o):a+o-a*o,l=2*a-r,c=1/3;return{r:Math.min(x,x*ci(l,r,n+c)),g:Math.min(x,x*ci(l,r,n)),b:Math.min(x,x*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:q(i,x),g:q(i,x),b:q(i,x)};const s=()=>Math.floor(q(i,256));return{b:s(),g:s(),r:s()}}function fi(e,i,s,n,o){const a=i?4:2,r=s??1;return Je(i?`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-hdr-${r.toString()}-${(n??D).toString()}-${o??t.HdrMode.standard}`:`rgb-${e.r.toFixed(a)}-${e.g.toFixed(a)}-${e.b.toFixed(a)}-sdr-${r.toString()}`,()=>i?function(e,i,s=400,n=t.HdrMode.standard){const o=s/203,a=function(e,i,s,n){const o=e.r/x,a=e.g/x,r=e.b/x;if(n!==t.HdrMode.natural&&n!==t.HdrMode.vivid&&n!==t.HdrMode.cinematic&&n!==t.HdrMode.dynamic)return{b:r,g:a,r:o};const l=Math.max(1,i),c=Qe*o+Ze*a+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,o){switch(n){case t.HdrMode.vivid:{const t=(e+i+s)/3;return{b:Y(Y(t+(s-t)*Xe,0,o)*Ye,0,o),g:Y(Y(t+(i-t)*Xe,0,o)*Ye,0,o),r:Y(Y(t+(e-t)*Xe,0,o)*Ye,0,o)}}case t.HdrMode.cinematic:{const t=1.05*e,n=.95*s,a=(t+i+n)/3;return{b:Y(a+1.1*(n-a),0,o),g:Y(a+1.1*(i-a),0,o),r:Y(a+1.1*(t-a),0,o)}}case t.HdrMode.dynamic:{const t=Qe*e+Ze*i+Ke*s,n=Math.min(1,2*t),a=1-n,r=(e+i+s)/3,l=Y(r+(e-r)*Xe,0,o)*Ye,c=Y(r+(i-r)*Xe,0,o)*Ye,d=Y(r+(s-r)*Xe,0,o)*Ye;return{b:Y(s*a+d*n,0,o),g:Y(i*a+c*n,0,o),r:Y(e*a+l*n,0,o)}}case t.HdrMode.standard:case t.HdrMode.natural:default:return{b:s,g:i,r:e}}}(Y(o*h,0,l),Y(a*h,0,l),Y(r*h,0,l),n,l)}(e,o,.18,n);return`color(display-p3 ${a.r.toString()} ${a.g.toString()} ${a.b.toString()} / ${(i??1).toString()})`}(e,s,n,o):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(e,s))}function gi(e,i,s,n,o){const a=i?4:2,r=s??1;return Je(i?`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-hdr-${r.toString()}-${(n??D).toString()}-${o??t.HdrMode.standard}`:`hsl-${e.h.toFixed(a)}-${e.s.toFixed(a)}-${e.l.toFixed(a)}-sdr-${r.toString()}`,()=>i?fi(hi(e),!0,s,n,o):`hsla(${e.h.toString()}, ${e.s.toString()}%, ${e.l.toString()}%, ${r.toString()})`)}function mi(t,e,i,s,n){let o=t,a=e;if("r"in o||(o=n?hi(t):di(t)),"r"in a||(a=n?hi(e):di(e)),n){const t={b:ei(o.b/x),g:ei(o.g/x),r:ei(o.r/x)},e={b:ei(a.b/x),g:ei(a.g/x),r:ei(a.r/x)},n=i+s;return{b:ii((t.b*i+e.b*s)/n)*x,g:ii((t.g*i+e.g*s)/n)*x,r:ii((t.r*i+e.r*s)/n)*x}}return{b:Q(o.b,a.b,i,s),g:Q(o.g,a.g,i,s),r:Q(o.r,a.r,i,s)}}function yi(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function vi(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:M},s:{enable:!1,value:t.s,min:0,max:C},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=K(i.speed)/h*s,e.decay=1-K(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=K(i.count),e.time=0,e.delayTime=K(i.delay)*p,i.sync||(e.velocity*=j(),e.value*=j()),e.initialValue=e.value,e.offset=et(i.offset)):e.velocity=0}function bi(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 o=e.offset?Z(e.offset):0,a=(e.velocity??0)*s.factor+3.6*o,r=e.decay??1,l=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,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=Y(e.value,c,l)}function Pi(t,e,i){if(!t)return;const{h:s,s:n,l:o}=t;bi(s,!1,e),bi(n,!0,e),bi(o,!0,e)}function xi(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const Mi=function(){const t=globalThis.tsParticles;return t?.pluginManager?t:new ie}();class Ci{background;brightness;colors;gravity;minHeight;rate;saturation;sounds;speed;splitCount;constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#FF0000","#FF2A00","#FF5500","#FF8000","#FFAA00","#FFD400","#FFFF00","#D4FF00","#AAFF00","#80FF00","#55FF00","#2AFF00","#00FF00","#00FF2A","#00FF55","#00FF80","#00FFAA","#00FFD4","#00FFFF","#00D4FF","#00AAFF","#0080FF","#0055FF","#002AFF","#0000FF","#2A00FF","#5500FF","#8000FF","#AA00FF","#D400FF","#FF00FF","#FF00D4","#FF00AA","#FF0080","#FF0055","#FF002A"],this.gravity=30,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:20,max:40},this.splitCount=100}load(t){N(t)||(void 0!==t.colors&&(U(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),ae(this,"background",t.background),re(this,"brightness",t.brightness),re(this,"gravity",t.gravity),re(this,"minHeight",t.minHeight),re(this,"rate",t.rate),re(this,"saturation",t.saturation),ae(this,"sounds",t.sounds),re(this,"speed",t.speed),re(this,"splitCount",t.splitCount))}}const zi=new Map;const ki=t=>{const e=t.data;return e?.particle?.options.move.gravity.enable??!1};async function Si(e,i,s,n){const o=zi.get(i);if(o instanceof Promise)return o;if(o){if(!o.destroyed)return o;zi.delete(i)}const a=(async()=>{const o=new Ci;o.load(s);const a=function(e,i){return{detectRetina:!0,background:{color:e.background},blend:{enable:!0,mode:"lighter"},fullScreen:{enable:!i},fpsLimit:60,emitters:{direction:t.MoveDirection.top,life:{count:0,duration:.1,delay:.1},rate:{delay:T(e.rate)?1/e.rate:{min:1/J(e.rate),max:1/tt(e.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},paint:{fill:{enable:!1},stroke:{color:{value:e.colors},width:2}},destroy:{mode:"split",bounds:{top:et(e.minHeight)},split:{count:1,factor:{value:.333333},rate:{value:e.splitCount},strokeColorOffset:{s:e.saturation,l:e.brightness},particles:{group:"split",number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:{min:2,max:4},sync:!0,startValue:t.StartValueType.max,destroy:t.DestroyType.min,count:1}},size:{value:{min:5,max:10}},life:{count:1,duration:{value:{min:.5,max:1}}},move:{decay:.05,enable:!0,gravity:{enable:!1},speed:{min:10,max:25},direction:"outside",outModes:t.OutMode.destroy}}}},life:{count:1},shape:{type:"line",options:{line:{cap:"round"}}},size:{value:{min:10,max:20}},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:et(e.gravity),enable:!0,inverse:!0,maxSpeed:150},speed:et(e.speed),outModes:{default:t.OutMode.destroy,top:t.OutMode.none}}},sounds:{enable:e.sounds,events:[{event:t.EventType.particleRemoved,filter:ki,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}}}(o,n),r=await e.load({id:i,element:n,options:a});if(!r)return void zi.delete(i);const{FireworksInstance:l}=await Promise.resolve().then(function(){return Gn}),c=new l(r,i);return zi.set(i,c),c})();return zi.set(i,a),a}class Oi{enable=!1;mode="destination-out";load(t){N(t)||(ae(this,"mode",t.mode),ae(this,"enable",t.enable))}}function Di(t){if(!t||"object"!=typeof t||!("blend"in t))return!1;const e=t.blend;return!!e&&"object"==typeof e&&"enable"in e&&!!e.enable}class Ii{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return $n});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){if(t?.blend?.enable||t?.particles?.blend?.enable||Object.values(t?.particles?.groups??{}).some(Di))return!0;const e=t?.emitters;let i=[];return Array.isArray(e)?i=e:e&&(i=[e]),i.some(t=>{if(!t||"object"!=typeof t||!("particles"in t))return!1;const e=t.particles;return Array.isArray(e)?e.some(Di):Di(e)})}}async function Fi(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ii)})}class Ei{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:v};const n=i.circleRange;e.arc(f.x,f.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=V(s)?{min:ot(s.min),max:ot(s.max)}:{min:0,max:ot(s)}}}async function Li(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new Ei))})}var Ri;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(Ri||(Ri={}));const Ti=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ai=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class _i{accepts(t){return t.startsWith("#")}handleColor(t){return this.#D(t.value)}handleRangeColor(t){return this.#D(t.value)}parseString(t){return this.#D(t)}#D(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(Ti,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=Ai.exec(e);return i?{a:i[Ri.a]?Number.parseInt(i[Ri.a],16)/255:1,b:Number.parseInt(i[Ri.b]??"0",16),g:Number.parseInt(i[Ri.g]??"0",16),r:Number.parseInt(i[Ri.r]??"0",16)}:void 0}}async function Bi(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new _i)})}var Vi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Vi||(Vi={}));const Ui=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Ni{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:K(e.h),l:K(e.l),s:K(e.s)})}parseString(t){if(!this.accepts(t))return;const e=Ui.exec(t);return e?ui({a:e.length>4?ut(e[Vi.a]):1,h:Number.parseInt(e[Vi.h]??"0",10),l:Number.parseInt(e[Vi.l]??"0",10),s:Number.parseInt(e[Vi.s]??"0",10)}):void 0}}async function Hi(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Ni)})}class Gi{id="move";#k;constructor(t){this.#k=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return qn});return new e(this.#k,t)}loadOptions(){}needsPlugin(){return!0}}async function $i(t){t.checkVersion("4.6.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 Gi(t.pluginManager))})}function ji(e,i){const s=e.value,n=e.animation,o={delayTime:K(n.delay)*p,enable:n.enable,value:K(e.value)*i,max:tt(s)*i,min:J(s)*i,loops:0,maxLoops:K(n.count),time:0};if(n.enable){switch(o.decay=1-K(n.decay),n.mode){case t.AnimationMode.increase:o.status=t.AnimationStatus.increasing;break;case t.AnimationMode.decrease:o.status=t.AnimationStatus.decreasing;break;case t.AnimationMode.random:o.status=j()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing}const e=n.mode===t.AnimationMode.auto;switch(n.startValue){case t.StartValueType.min:o.value=o.min,e&&(o.status=t.AnimationStatus.increasing);break;case t.StartValueType.max:o.value=o.max,e&&(o.status=t.AnimationStatus.decreasing);break;case t.StartValueType.random:default:o.value=Z(o),e&&(o.status=j()>=u?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function qi(e,i,s,n,o){if(e.destroyed||!i.enable||(i.maxLoops??0)>0&&(i.loops??0)>(i.maxLoops??0))return;const a=(i.velocity??0)*o.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+=o.value,i.time<d))){switch(i.status){case t.AnimationStatus.increasing:i.value+=a;break;case t.AnimationStatus.decreasing:i.value-=a}switch(i.velocity&&1!==c&&(i.velocity*=c),i.status){case t.AnimationStatus.increasing:i.value>=l&&(s?i.status=t.AnimationStatus.decreasing:i.value-=l,i.loops??=0,i.loops++);break;case t.AnimationStatus.decreasing:i.value<=r&&(s?i.status=t.AnimationStatus.increasing:i.value+=l,i.loops??=0,i.loops++)}!function(e,i,s,n,o){switch(i){case t.DestroyType.max:s>=o&&e.destroy();break;case t.DestroyType.min:s<=n&&e.destroy()}}(e,n,i.value,r,l),e.destroyed||(i.value=Y(i.value,r,l))}}class Wi extends fe{destroy=t.DestroyType.none;load(t){super.load(t),N(t)||ae(this,"destroy",t.destroy)}}class Xi extends Ie{animation=new Wi;value=1;load(t){if(N(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Yi{#z;constructor(t){this.#z=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=ji(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=K(i.speed)/h*this.#z.retina.reduceFactor,i.sync||(t.opacity.velocity*=j()))}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",Xi,...e)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&qi(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function Qi(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Yi(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 Ki{modes;#z;#I;constructor(e){this.#z=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#I=e.plugins.filter(t=>!!t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;for(const t of this.#I)if(t.particleBounce?.(e,s,i))return;const o=e.getPosition(),a=e.offset,r=e.getRadius(),l=zt(o,r),c=this.#z.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],o=e.particle.position,a=e.particle.velocity[i.axis];if(i.negative&&s[i.negativeEdge]<0?o[i.axis]=e.size+e.offset[i.axis]:!i.negative&&s[i.positiveEdge]>n&&(o[i.axis]=n-e.size-e.offset[i.axis]),!e.outOfCanvas||!(i.negative&&a<0||!i.negative&&a>0))return;e.particle.velocity[i.axis]*=-K(e.particle.options.bounce[i.bounce].value);const r=e.offset[i.axis]+e.size;o[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:a,outOfCanvas:d,size:r})}}class Ji{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 t=e.position.x-e.moveCenter.x,i=e.position.y-e.moveCenter.y,{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 ts{modes;#z;constructor(e){this.#z=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 o=e.options.move.gravity,a=this.#z,r=a.canvas.size,l=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+l&&i===t.OutModeDirection.bottom||o.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;Mt(e.position,a.canvas.size,f,l,i)||e.destroy()}}}const es=E.origin;class is{modes;#z;constructor(e){this.#z=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#z;if(e.outType===t.ParticleOutType.inside)this.#F(e,o);else{if(e.isInsideCanvasForOutMode(n,i))return;e.outType===t.ParticleOutType.outside?this.#E(e):this.#L(e,o,i)}}#F(t,e){const{x:i,y:s}=t.velocity;es.setTo(f),es.length=t.moveCenter.radius,es.angle=t.velocity.angle+Math.PI,es.addTo(t.moveCenter);const n=t.position.x-es.x,o=t.position.y-es.y;if(i<=0&&n>=0||s<=0&&o>=0||i>=0&&n<=0||s>=0&&o<=0)return;t.position.x=Math.floor(Z({min:0,max:e.canvas.size.width})),t.position.y=Math.floor(Z({min:0,max:e.canvas.size.height}));const a=t.position.x-t.moveCenter.x,r=t.position.y-t.moveCenter.y;t.direction=Math.atan2(-r,-a),t.velocity.angle=t.direction,t.justWarped=!0}#L(e,i,s){const n=e.options.move.warp,o=i.canvas.size,a=e.getRadius(),r={bottom:o.height+a+e.offset.y,left:-a-e.offset.x,right:o.width+a+e.offset.x,top:-a-e.offset.y},l=zt(e.position,a);s===t.OutModeDirection.right&&l.left>o.width+e.offset.x?(e.position.x=r.left,e.initialPosition.x=e.position.x,n||(e.position.y=j()*o.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=j()*o.height,e.initialPosition.y=e.position.y),e.justWarped=!0),s===t.OutModeDirection.bottom&&l.top>o.height+e.offset.y?(n||(e.position.x=j()*o.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=j()*o.width,e.initialPosition.x=e.position.x),e.position.y=r.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0)}#E(t){t.position.x=Math.floor(Z({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(Z({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const e=t.position.x-t.moveCenter.x,i=t.position.y-t.moveCenter.y;t.moveCenter.radius&&(t.direction=Math.atan2(i,e),t.velocity.angle=t.direction),t.justWarped=!0}}class ss{updaters;#z;constructor(t){this.#z=t,this.updaters=new Map}init(e){this.#R(e,t.OutMode.bounce,t=>new Ki(t)),this.#R(e,t.OutMode.out,t=>new is(t)),this.#R(e,t.OutMode.destroy,t=>new Ji(t)),this.#R(e,t.OutMode.none,t=>new ts(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#T(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#T(e,i,s.left??s.default,t.OutModeDirection.left),this.#T(e,i,s.right??s.default,t.OutModeDirection.right),this.#T(e,i,s.top??s.default,t.OutModeDirection.top)}#R(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.#z))}#T(t,e,i,s){for(const n of this.updaters.values())n.update(t,s,e,i)}}async function ns(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new ss(t)))})}class os{#z;#k;constructor(t,e){this.#z=e,this.#k=t}init(t){const e=this.#z,i=t.options,s=Ot(i.paint,t.id,i.reduceDuplicates);this.#A(s,t,e),this.#_(s,t,e)}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,o=!!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),a=!!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&&(o||a)}update(t,e){this.isEnabled(t)&&(Pi(t.fillColor,e,this.#z.hdr),Pi(t.strokeColor,e,this.#z.hdr))}#A(t,e,i){const s=t?.fill,n=t?.color,o=n??void 0;if(!s)return e.fillEnabled=!1,e.fillAnimation=void 0,e.fillColor=void 0,void(e.fillOpacity=1);const a=ve.create(void 0===o?void 0:ve.create(void 0,o),s.color);e.fillEnabled=s.enable,e.fillOpacity=K(s.opacity),e.fillAnimation=a.animation;const r=ai(this.#k,a);r&&(e.fillColor=vi(r,e.fillAnimation,i.retina.reduceFactor))}#_(t,e,i){const s=t?.stroke,n=t?.color,o=n??void 0;if(!s)return e.strokeAnimation=void 0,e.strokeColor=void 0,e.strokeOpacity=1,void(e.strokeWidth=0);const a=ve.create(void 0===o?void 0:ve.create(void 0,o),s.color);e.strokeWidth=K(s.width)*i.retina.pixelRatio,e.strokeOpacity=K(s.opacity??1),e.strokeAnimation=a.animation;const r=ai(this.#k,a)??e.getFillColor();r&&(e.strokeColor=vi(r,e.strokeAnimation,i.retina.reduceFactor))}}async function as(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new os(t.pluginManager,e)))})}var rs;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(rs||(rs={}));const ls=/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 cs{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:K(e.r),g:K(e.g),b:K(e.b)}}parseString(t){if(!this.accepts(t))return;const e=ls.exec(t);return e?{a:e.length>4?ut(e[rs.a]):1,b:parseInt(e[rs.b]??"0",10),g:parseInt(e[rs.g]??"0",10),r:parseInt(e[rs.r]??"0",10)}:void 0}}async function ds(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new cs)})}class hs extends fe{destroy=t.DestroyType.none;load(t){super.load(t),N(t)||ae(this,"destroy",t.destroy)}}class us extends Ie{animation=new hs;value=3;load(t){if(super.load(t),N(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ps{#z;constructor(t){this.#z=t}init(t){const e=this.#z,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*=j()))}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",us,...e)}preInit(t){const e=this.#z.retina.pixelRatio,i=t.options.size;i&&(t.size=ji(i,e),t.retina.sizeAnimationSpeed=K(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&qi(t,t.size,!0,t.options.size.animation.destroy,e)}}async function fs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new ps(t)))})}async function gs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{await Promise.all([Fi(t),Bi(t),Hi(t),ds(t),$i(t),Li(t),as(t),Qi(t),ns(t),fs(t)])})}class ms{bottom;left;right;top;load(t){N(t)||(re(this,"bottom",t.bottom),re(this,"left",t.left),re(this,"right",t.right),re(this,"top",t.top))}}var ys;!function(t){t.explode="explode",t.none="none",t.split="split"}(ys||(ys={}));class vs{maxSizeFactor=3;speed=2;load(t){N(t)||(ae(this,"maxSizeFactor",t.maxSizeFactor),ae(this,"speed",t.speed))}}class ws extends Oe{value=3}class bs extends Oe{value={min:4,max:9}}class Ps{count=1;factor=new ws;fillColor;fillColorOffset;particles;rate=new bs;sizeOffset=!0;strokeColor;strokeColorOffset;load(t){N(t)||(void 0!==t.fillColor&&(this.fillColor=ye.create(this.fillColor,t.fillColor)),void 0!==t.strokeColor&&(this.strokeColor=ye.create(this.strokeColor,t.strokeColor)),ae(this,"count",t.count),this.factor.load(t.factor),this.rate.load(t.rate),this.particles=St(t.particles,t=>kt({},t)),ae(this,"sizeOffset",t.sizeOffset),t.fillColorOffset&&(this.fillColorOffset=this.fillColorOffset??{},void 0!==t.fillColorOffset.h&&(this.fillColorOffset.h=t.fillColorOffset.h),void 0!==t.fillColorOffset.s&&(this.fillColorOffset.s=t.fillColorOffset.s),void 0!==t.fillColorOffset.l&&(this.fillColorOffset.l=t.fillColorOffset.l)),t.strokeColorOffset&&(this.strokeColorOffset=this.strokeColorOffset??{},void 0!==t.strokeColorOffset.h&&(this.strokeColorOffset.h=t.strokeColorOffset.h),void 0!==t.strokeColorOffset.s&&(this.strokeColorOffset.s=t.strokeColorOffset.s),void 0!==t.strokeColorOffset.l&&(this.strokeColorOffset.l=t.strokeColorOffset.l)))}}class xs{bounds=new ms;explode=new vs;mode=ys.none;split=new Ps;load(t){N(t)||(t.mode&&(this.mode=t.mode),t.bounds&&this.bounds.load(t.bounds),this.explode.load(t.explode),this.split.load(t.split))}}function Ms(t,e,i,s){return t&&s?function(t,e){const i=K(e.h??0),s=K(e.s??0),n=K(e.l??0),o=(t.h+i)%360,a=Math.max(0,Math.min(100,t.s+s)),r=Math.max(0,Math.min(100,t.l+n));return ve.create(void 0,{value:{hsl:{h:o<0?o+360:o,s:a,l:r}}})}(s,t):e?ve.create(void 0,e):i?ve.create(void 0,i):s?function(t){return ve.create(void 0,{value:{hsl:t}})}(s):void 0}function Cs(e,i,s,n){const o=s.options.destroy;if(!o)return;const a=o.split,r=je(e,i,s.options),l=Ot(a.fillColor),c=Ot(a.strokeColor),d=s.getFillColor(),h=s.getStrokeColor();r.move.load({center:{x:s.position.x,y:s.position.y,mode:t.PixelMode.precise}});const u=1/K(a.factor.value),p=r.size;p&&(T(p.value)?p.value*=u:(p.value.min*=u,p.value.max*=u)),r.load(n);const f=Ot(r.paint),g=f?.fill,m=f?.stroke,y=Ms(a.fillColorOffset,l,g?.color,d),v=Ms(a.strokeColorOffset,c,m?.color,h);y&&g&&(g.color=y),v&&m&&(m.color=v);const w=a.sizeOffset?et(-s.size.value,s.size.value):0,b={x:s.position.x+Z(w),y:s.position.y+Z(w)};return i.particles.addParticle(b,r,s.group,t=>!(t.size.value<.5)&&(t.velocity.length=Z(et(s.velocity.length,t.velocity.length)),t.splitCount=(s.splitCount??0)+1,t.unbreakable=!0,t.unbreakableUntil=performance.now()+500,!0))}class zs{#z;#k;constructor(t,e){this.#z=e,this.#k=t}init(t){const e=this.#z,i=t.options.destroy;if(!i)return;t.exploding=void 0,t.splitCount=0;const s=i.bounds;t.destroyBounds??={};const{bottom:n,left:o,right:a,top:r}=s,{destroyBounds:l}=t,c=e.canvas.size;n&&(l.bottom=K(n)*c.height/h),o&&(l.left=K(o)*c.width/h),a&&(l.right=K(a)*c.width/h),r&&(l.top=K(r)*c.height/h)}isEnabled(t){const e=t;return!e.destroyed||!!e.exploding}loadOptions(t,...e){de(t,"destroy",xs,...e)}particleDestroyed(t,e){if(e)return;const i=t.options.destroy;switch(i?.mode){case ys.split:!function(t,e,i){const s=i.options.destroy;if(!s)return;const n=s.split;if(n.count>=0){if(void 0===i.splitCount||i.splitCount>n.count)return;i.splitCount++}const o=K(n.rate.value),a=Ot(n.particles);for(let s=0;s<o;s++)Cs(t,e,i,a)}(this.#k,this.#z,t);break;case ys.explode:{if(t.exploding){t.destroyed=!1;break}const{explode:e}=i,s=t.size.value,n=s*e.maxSizeFactor,o=t.getOpacity();t.exploding={initialFillOpacity:o.fillOpacity,initialSize:s,initialStrokeOpacity:o.strokeOpacity,maxSize:n,progress:0,speed:Math.max(e.speed,.01)},t.fillOpacity=o.fillOpacity,t.strokeOpacity=o.strokeOpacity,t.destroyed=!1;break}}}update(t,e){if(t.exploding){const i=t.exploding,s=e.factor||1;i.progress=Math.min(1,i.progress+i.speed*s/60);const n=i.progress;return t.size.value=i.initialSize+(i.maxSize-i.initialSize)*n,t.fillOpacity=i.initialFillOpacity*(1-n),t.strokeOpacity=i.initialStrokeOpacity*(1-n),void(n>=1&&(t.exploding=void 0,t.destroy(!0)))}void 0!==t.unbreakableUntil&&performance.now()>=t.unbreakableUntil&&(t.unbreakable=!1,t.unbreakableUntil=void 0);const i=t.getPosition(),s=t.destroyBounds;s&&(void 0!==s.bottom&&i.y>=s.bottom||void 0!==s.left&&i.x<=s.left||void 0!==s.right&&i.x>=s.right||void 0!==s.top&&i.y<=s.top)&&t.destroy()}}async function ks(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("destroy",e=>Promise.resolve(new zs(t.pluginManager,e)))})}class Ss{count;delay;duration;wait=!1;load(t){N(t)||(ae(this,"count",t.count),re(this,"delay",t.delay),re(this,"duration",t.duration),ae(this,"wait",t.wait))}}class Os{delay=.1;quantity=1;load(t){N(t)||(re(this,"quantity",t.quantity),re(this,"delay",t.delay))}}class Ds{color=!1;opacity=!1;load(t){N(t)||(ae(this,"color",t.color),ae(this,"opacity",t.opacity))}}class Is{options={};replace=new Ds;type="square";load(t){N(t)||(void 0!==t.options&&(this.options=kt({},t.options??{})),this.replace.load(t.replace),ae(this,"type",t.type))}}class Fs{height=0;mode=t.PixelMode.percent;width=0;load(t){N(t)||(ae(this,"mode",t.mode),ae(this,"height",t.height),ae(this,"width",t.width))}}class Es{fill;stroke;load(t){N(t)||(t.fill&&(this.fill??=new Ce,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new Te,this.stroke.load(t.stroke)))}}class Ls{autoPlay=!0;direction;domId;draggable=!1;draw=!1;fill=!0;life=new Ss;name;particles;position;rate=new Os;shape=new Is;size;spawn=new Es;spawnFillColor;spawnStrokeColor;startCount=0;load(t){N(t)||(ae(this,"autoPlay",t.autoPlay),void 0!==t.size&&(this.size??=new Fs,this.size.load(t.size)),ae(this,"direction",t.direction),ae(this,"domId",t.domId),ae(this,"draggable",t.draggable),ae(this,"draw",t.draw),ae(this,"fill",t.fill),this.life.load(t.life),ae(this,"name",t.name),this.particles=St(t.particles,t=>kt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=et(t.position.x)),void 0!==t.position.y&&(this.position.y=et(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ve,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ve,this.spawnStrokeColor.load(t.spawnStrokeColor)),ae(this,"startCount",t.startCount))}}class Rs{id="emitters";#B;constructor(t){this.#B=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return Us});return new e(this.#B,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=St(i.emitters,t=>{const e=new Ls;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return U(e)&&!!e.length||void 0!==e}}const Ts="TSP-3101";const As=new WeakMap;class _s{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}draw(t){}resize(t,e){this.position=t,this.size=e}}var Bs;async function Vs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=As.get(e);return i||(i=Promise.resolve().then(function(){return Zn}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw As.delete(e),t}),As.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return Xn}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new Rs(e))})}!function(t){t.emitter="emitter"}(Bs||(Bs={}));var Us=Object.freeze({__proto__:null,EmittersPluginInstance:class{#z;#B;constructor(t,e){this.#B=t,this.#z=e,this.#B.initContainer(e)}draw(t,e){for(const e of this.#B.getArray(this.#z))e.draw(t)}async init(){const t=this.#z.actualOptions.emitters;if(U(t))for(const e of t)await this.#B.addEmitter(this.#z,e);else await this.#B.addEmitter(this.#z,t)}pause(){for(const t of this.#B.getArray(this.#z))t.pause()}play(){for(const t of this.#B.getArray(this.#z))t.play()}resize(){for(const t of this.#B.getArray(this.#z))t.resize()}stop(){this.#B.clear(this.#z)}update(t){this.#B.getArray(this.#z).forEach(e=>{e.update(t)})}}});var Ns;function Hs(t,e){return t+e*(j()-u)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(Ns||(Ns={}));class Gs extends _s{constructor(t,e,i,s){super(t,e,i,s)}draw(t){const e=this.position,i=this.size,s=i.width*u,n=i.height*u;t.rect(e.x-s,e.y-n,i.width,i.height)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:Hs(e.x,i.width),y:Hs(e.y,i.height)}};{const t=i.width*u,s=i.height*u,n=function(t){return B(Ns,Math.floor(j()*t),Ns.BottomLeft)}(4),o=2*(j()-u);switch(n){case Ns.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case Ns.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case Ns.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case Ns.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class $s{generate(t,e,i,s,n){return new Gs(e,i,s,n)}}async function js(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error(ft(Ts))}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new $s)})}class qs extends Oe{sync=!1;load(t){N(t)||(super.load(t),ae(this,"sync",t.sync))}}class Ws extends Oe{sync=!1;load(t){N(t)||(super.load(t),ae(this,"sync",t.sync))}}class Xs{count=0;delay=new qs;duration=new Ws;load(t){N(t)||(ae(this,"count",t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class Ys{#z;constructor(t){this.#z=t}init(t){const e=this.#z,i=t.options.life;if(!i)return;const s=i.delay.sync?1:j(),n=i.duration.sync?1:j();t.life={delay:e.retina.reduceFactor?K(i.delay.value)*s/e.retina.reduceFactor*p:0,delayTime:0,duration:e.retina.reduceFactor?K(i.duration.value)*n/e.retina.reduceFactor*p:0,time:0,count:i.count},t.life.duration<=0&&(t.life.duration=-1),t.life.count<=0&&(t.life.count=-1),t.spawning=t.life.delay>0}isEnabled(t){return!t.destroyed}loadOptions(t,...e){de(t,"life",Xs,...e)}update(t,e){this.isEnabled(t)&&t.life&&function(t,e,i){if(!t.life)return;const s=t.life;let n=!1;if(t.spawning){if(s.delayTime+=e.value,!(s.delayTime>=t.life.delay))return;n=!0,t.spawning=!1,s.delayTime=0,s.time=0}if(-1===s.duration)return;if(n?s.time=0:s.time+=e.value,s.time<s.duration)return;if(s.time=0,t.life.count>0&&t.life.count--,0===t.life.count)return void t.destroy();const o=et(0,i.width),a=et(0,i.height);t.position.x=Z(o),t.position.y=Z(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const r=t.options.life;r&&(s.delay=K(r.delay.value)*p,s.duration=K(r.duration.value)*p)}(t,e,this.#z.canvas.size)}}async function Qs(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new Ys(t)))})}class Zs{draw(t){!function(t){const{context:e,particle:i,radius:s}=t,n=i.shapeData;e.moveTo(-s,0),e.lineTo(s,0),e.lineCap=n?.cap??"butt"}(t)}getSidesCount(){return 1}}async function Ks(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["line"],()=>Promise.resolve(new Zs))})}class Js{decay=0;enable=!1;speed=0;sync=!1;load(t){N(t)||(ae(this,"enable",t.enable),re(this,"speed",t.speed),re(this,"decay",t.decay),ae(this,"sync",t.sync))}}class tn extends Oe{animation=new Js;direction=t.RotateDirection.clockwise;path=!1;load(t){N(t)||(super.load(t),ae(this,"direction",t.direction),this.animation.load(t.animation),ae(this,"path",t.path))}}class en{#z;constructor(t){this.#z=t}init(e){const i=e.options.rotate;if(!i)return;e.rotate={enable:i.animation.enable,value:ot(K(i.value)),min:0,max:v},e.pathRotation=i.path;let s=i.direction;if(s===t.RotateDirection.random){s=Math.floor(2*j())>0?t.RotateDirection.counterClockwise:t.RotateDirection.clockwise}switch(s){case t.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=t.AnimationStatus.decreasing;break;case t.RotateDirection.clockwise:e.rotate.status=t.AnimationStatus.increasing}const n=i.animation;n.enable&&(e.rotate.decay=1-K(n.decay),e.rotate.velocity=K(n.speed)/360*this.#z.retina.reduceFactor,n.sync||(e.rotate.velocity*=j())),e.rotation=e.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&(!t.destroyed&&!t.spawning&&(!!e.value||e.animation.enable||e.path))}loadOptions(t,...e){de(t,"rotate",tn,...e)}update(e,i){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&(qi(e,e.rotate,!1,t.DestroyType.none,i),e.rotation=e.rotate.value))}}async function sn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("rotate",t=>Promise.resolve(new en(t)))})}const nn="pointerdown",on="touchstart";class an{loop=!1;source="";load(t){N(t)||(V(t)?(ae(this,"loop",t.loop),void 0!==t.source&&(this.source=t.source)):this.source=t)}}class rn{duration=500;value=[];load(t){N(t)||(ae(this,"duration",t.duration),ae(this,"value",t.value))}}class ln{loop=!1;melodies=[];notes=[];load(t){N(t)||(ae(this,"loop",t.loop),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new ln;return e.load(t),e})),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new rn;return e.load(t),e})))}}class cn{audio;event=[];filter;melodies;notes=[];load(t){if(!N(t)&&(ae(this,"event",t.event),void 0!==t.audio&&(U(t.audio)?this.audio=t.audio.map(t=>{const e=new an;return e.load(t),e}):(this.audio=new an,this.audio.load(t.audio))),void 0!==t.notes&&(this.notes=t.notes.map(t=>{const e=new rn;return e.load(t),e})),void 0!==t.melodies&&(this.melodies=t.melodies.map(t=>{const e=new ln;return e.load(t),e})),t.filter))if(R(t.filter)){const e=globalThis[t.filter];A(e)&&(this.filter=e)}else this.filter=t.filter}}class dn{height=24;path;style="";svg;width=24;load(t){N(t)||(ae(this,"path",t.path),ae(this,"svg",t.svg),ae(this,"width",t.width),ae(this,"height",t.height))}}class hn{enable;mute;unmute;volumeDown;volumeUp;constructor(){this.mute=new dn,this.unmute=new dn,this.volumeDown=new dn,this.volumeUp=new dn,this.enable=!1,this.mute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M19.707,5.293c-0.391-0.391-1.023-0.391-1.414,0l-1.551,1.551c-0.345-0.688-0.987-1.02-1.604-1.02c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.237,0.754,2.302,1.826,2.76l-1.533,1.533c-0.391,0.391-0.391,1.023,0,1.414C5.488,19.902,5.744,20,6,20s0.512-0.098,0.707-0.293l2.527-2.527c0.697,0.174,1.416,0.455,1.875,0.762l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V9.414l2.707-2.707C20.098,6.316,20.098,5.684,19.707,5.293z M14.891,7.941c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8v1.293l-2,2V9.202L14.891,7.941z M7,12c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v2.439l-2.83,2.83C8.757,15.046,8.356,15,8,15c-0.552,0-1-0.448-1-1V12z M10.301,15.406L12,13.707v2.439C11.519,15.859,10.925,15.604,10.301,15.406z M14.994,18.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798v-4.091l2-2V18C15,18.046,14.998,18.086,14.994,18.12z"/>\n    </g>\n</svg>',this.unmute.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M17.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C12.357,8.561,10.904,9,10,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C18.035,20.176,19,19.495,19,18V8C19,6.505,18.035,5.824,17.138,5.824z M14,16.146C12.907,15.495,11.211,15,10,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146V16.146z M17,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L15,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C16.998,7.914,17,7.954,17,8V18z"/>\n    </g>\n</svg>',this.volumeDown.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M15.138,5.824c-0.449,0-0.905,0.152-1.356,0.453l-2.672,1.781C10.357,8.561,8.904,9,8,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C16.035,20.176,17,19.495,17,18V8C17,6.505,16.035,5.824,15.138,5.824z M8,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C10.907,15.495,9.211,15,8,15z M15,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L13,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C14.998,7.914,15,7.954,15,8V18z"/>\n        <path fill="#fff" d="M18.292,10.294c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C18.488,15.902,18.744,16,19,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708s-0.398-1.984-1.123-2.707C19.317,9.903,18.683,9.901,18.292,10.294z"/>\n    </g>\n</svg>',this.volumeUp.svg='<?xml version="1.0"?>\n<svg baseProfile="tiny" height="24px" version="1.2" viewBox="0 0 24 24" width="24px"\n    xml:space="preserve" xmlns="http://www.w3.org/2000/svg"\n    xmlns:xlink="http://www.w3.org/1999/xlink">\n    <g id="Layer_1">\n        <path fill="#fff" d="M16.706,10.292c-0.389-0.389-1.023-0.391-1.414,0.002c-0.39,0.391-0.39,1.023,0.002,1.414c0.345,0.345,0.535,0.803,0.535,1.291c0,0.489-0.19,0.948-0.536,1.294c-0.391,0.39-0.391,1.023,0,1.414C15.488,15.902,15.744,16,16,16s0.512-0.098,0.707-0.293c0.724-0.723,1.122-1.685,1.122-2.708S17.431,11.015,16.706,10.292z"/>\n        <path fill="#fff" d="M18.706,8.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c0.879,0.877,1.363,2.044,1.364,3.287c0.001,1.246-0.484,2.417-1.365,3.298c-0.391,0.391-0.391,1.023,0,1.414C17.488,17.902,17.744,18,18,18s0.512-0.098,0.707-0.293c1.259-1.259,1.952-2.933,1.951-4.713C20.657,11.217,19.964,9.547,18.706,8.292z"/>\n        <path fill="#fff" d="M20.706,6.292c-0.391-0.389-1.023-0.39-1.414,0.002c-0.39,0.391-0.39,1.024,0.002,1.414c1.412,1.409,2.191,3.285,2.192,5.284c0.002,2.002-0.777,3.885-2.193,5.301c-0.391,0.391-0.391,1.023,0,1.414C19.488,19.902,19.744,20,20,20s0.512-0.098,0.707-0.293c1.794-1.794,2.781-4.18,2.779-6.717C23.485,10.457,22.497,8.078,20.706,6.292z"/>\n        <path fill="#fff" d="M12.138,5.824c-0.449,0-0.905,0.152-1.356,0.453L8.109,8.059C7.357,8.561,5.904,9,5,9c-1.654,0-3,1.346-3,3v2c0,1.654,1.346,3,3,3c0.904,0,2.357,0.439,3.109,0.941l2.672,1.781c0.451,0.301,0.907,0.453,1.356,0.453C13.035,20.176,14,19.495,14,18V8C14,6.505,13.035,5.824,12.138,5.824z M5,15c-0.552,0-1-0.448-1-1v-2c0-0.552,0.448-1,1-1c1.211,0,2.907-0.495,4-1.146v6.293C7.907,15.495,6.211,15,5,15z M12,18c0,0.046-0.002,0.086-0.006,0.12c-0.03-0.016-0.065-0.036-0.104-0.062L10,16.798V9.202l1.891-1.261c0.038-0.025,0.073-0.046,0.104-0.062C11.998,7.914,12,7.954,12,8V18z"/>\n    </g>\n</svg>'}load(t){N(t)||(ae(this,"enable",t.enable),this.mute.load(t.mute),this.unmute.load(t.unmute),this.volumeDown.load(t.volumeDown),this.volumeUp.load(t.volumeUp))}}class un{max=100;min=0;step=10;value=100;load(t){N(t)||(V(t)?(ae(this,"max",t.max),ae(this,"min",t.min),ae(this,"step",t.step),void 0!==t.value&&(this.value=t.value)):this.value=t)}}class pn{autoPlay=!0;enable=!1;events=[];icons=new hn;volume=new un;load(t){N(t)||(ae(this,"autoPlay",t.autoPlay),ae(this,"enable",t.enable),void 0!==t.events&&(this.events=t.events.map(t=>{const e=new cn;return e.load(t),e})),this.icons.load(t.icons),void 0!==t.volume&&this.volume.load(t.volume))}}const fn=new Map;function gn(t){const e=/(([A-G]b?)(\d))|pause/i.exec(t);if(!e?.length)return;const i=e[2]??e[0],s=fn.get(i);return s?s[parseInt(e[3]??"0")]:void 0}fn.set("C",[16.35,32.7,65.41,130.81,261.63,523.25,1046.5,2093,4186.01]),fn.set("Db",[17.32,34.65,69.3,138.59,277.18,554.37,1108.73,2217.46,4434.92]),fn.set("D",[18.35,36.71,73.42,146.83,293.66,587.33,1174.66,2349.32,4698.63]),fn.set("Eb",[19.45,38.89,77.78,155.56,311.13,622.25,1244.51,2489.02,4978.03]),fn.set("E",[20.6,41.2,82.41,164.81,329.63,659.25,1318.51,2637.02,5274.04]),fn.set("F",[21.83,43.65,87.31,174.61,349.23,698.46,1396.91,2793.83,5587.65]),fn.set("Gb",[23.12,46.25,92.5,185,369.99,739.99,1479.98,2959.96,5919.91]),fn.set("G",[24.5,49,98,196,392,783.99,1567.98,3135.96,6271.93]),fn.set("Ab",[25.96,51.91,103.83,207.65,415.3,830.61,1661.22,3322.44,6644.88]),fn.set("A",[27.5,55,110,220,440,880,1760,3520,7040]),fn.set("Bb",[29.14,58.27,116.54,233.08,466.16,932.33,1864.66,3729.31,7458.62]),fn.set("B",[30.87,61.74,123.47,246.94,493.88,987.77,1975.53,3951.07,7902.13]),fn.set("pause",[0]);let mn=!0;const yn=()=>mn,vn=()=>{mn=!1},wn=()=>{removeEventListener(nn,wn),removeEventListener(on,wn),vn()};class bn{id="sounds";#o;constructor(t){this.#o=t;const e={capture:!0,once:!0};addEventListener(nn,wn,e),addEventListener(on,wn,e)}async getPlugin(t){const{SoundsPluginInstance:e}=await Promise.resolve().then(function(){return to});return new e(t,this.#o)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let s=e.sounds;void 0===s?.load&&(e.sounds=s=new pn),s.load(i?.sounds)}needsPlugin(t){return t?.sounds?.enable??!1}}async function Pn(t){t.checkVersion("4.6.0"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new bn(t))})}let xn=null;async function Mn(t){return xn||(xn=async function(t){t.checkVersion("4.6.0"),await t.pluginManager.register(async t=>{await Promise.all([gs(t),Ks(t),Fi(t),(async t=>{await Vs(t),await js(t)})(t),Pn(t),sn(t),ks(t),Qs(t),as(t)])})}(t),xn)}async function Cn(t,e){let i,s;return await Mn(Mi),R(t)?(i=t,s=e??{}):(i="fireworks",s=t??{}),Si(Mi,i,s)}Cn.create=async(t,e)=>{await Mn(Mi);return Si(Mi,t?.id??"fireworks",e??{},t??void 0)},Cn.init=async()=>{await Mn(Mi)},Cn.version="4.6.0",globalThis.fireworks=Cn;const zn=globalThis;zn.fireworks=Cn,zn.tsParticles=Mi;function kn(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class Sn{#V;#U;#N;#H;#G;#z;#$;#j;#q;#W;#X;#Y;#k;#Q;#Z;#K={};#J=[void 0,void 0];#tt={};constructor(t,e,i){this.#k=t,this.#z=e,this.#H=i,this.#$=null,this.#V=null,this.#U=new Set,this.#Z=[],this.#Q=[],this.#N=[],this.#G=[],this.#q=[],this.#W=[],this.#X=[],this.#Y={0:[],1:[],2:[],3:[],4:[],5:[],6:[],7:[]}}get settings(){return this.#j}canvasClear(){this.#z.actualOptions.clear&&this.draw(t=>{t.clearRect(f.x,f.y,this.#H.size.width,this.#H.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.#et(i))if(!e.has(t)&&(e.add(t),t.canvasClear?.()))return t;this.canvasClear()}destroy(){this.stop(),this.#V=null,this.#U.clear(),this.#Z=[],this.#Q=[],this.#N=[],this.#G=[],this.#q=[],this.#W=[],this.#X=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Y[e]=[])}draw(t){const e=this.#$;if(e)return t(e)}drawParticle(t,e){if(t.spawning||t.destroyed)return;const i=t.getRadius();if(i<=0)return;const s=t.getFillColor(),n=t.getStrokeColor();let[o,a]=this.#it(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#z,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:d,opacity:h,strokeOpacity:u}=t.getOpacity(),p=this.#tt,f=this.#K,g=o?gi(o,r.hdr,d*h,r.peakNits,r.hdrMode):void 0,m=a?gi(a,r.hdr,u*h,r.peakNits,r.hdrMode):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=m,this.draw(s=>{for(const i of this.#X)i.drawParticleSetup?.(s,t,e);this.#st(s,t,i,h,f,p),this.#nt({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:h,transform:p}),this.#ot(t);for(const i of this.#W)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#q)this.#at(i,s,t,e)})}drawParticles(e){const{particles:i,actualOptions:s}=this.#z;this.clear(),i.update(e),this.draw(n=>{const o=this.#H.size.width,a=this.#H.size.height;if(this.#V)try{n.drawImage(this.#V,f.x,f.y,o,a)}catch{this.#rt("background-element-draw-error","Error drawing background element onto canvas")}const r=s.background;if(r.draw)try{r.draw(n,e)}catch{this.#rt("background-draw-error","Error in background.draw callback")}for(const e of this.#et(t.DrawLayer.BackgroundMask))e.canvasPaint?.();for(const i of this.#et(t.DrawLayer.CanvasSetup))i.drawSettingsSetup?.(n,e);for(const i of this.#et(t.DrawLayer.PluginContent))i.draw?.(n,e);i.drawParticles(e);for(const i of this.#et(t.DrawLayer.CanvasCleanup))i.clearDraw?.(n,e),i.drawSettingsCleanup?.(n,e)})}init(){this.initUpdaters(),this.initPlugins(),this.#lt(),this.paint()}initPlugins(){this.#N=[],this.#G=[],this.#q=[],this.#X=[],this.#W=[];for(const e of Object.values(t.DrawLayer))"number"==typeof e&&(this.#Y[e]=[]);this.#ct()}initUpdaters(){this.#Z=[],this.#Q=[];for(const t of this.#z.particleUpdaters)t.afterDraw&&this.#Q.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#Z.push(t)}paint(){let e=!1;for(const i of this.#et(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(f.x,f.y,this.#H.size.width,this.#H.size.height)})}paintImage(t,e){this.draw(i=>{if(!t)return;const s=i.globalAlpha;i.globalAlpha=e,i.drawImage(t,f.x,f.y,this.#H.size.width,this.#H.size.height),i.globalAlpha=s})}setContext(t){this.#$=t,this.#$&&(this.#$.globalCompositeOperation=l)}setContextSettings(t){this.#j=t}stop(){this.draw(t=>{t.clearRect(f.x,f.y,this.#H.size.width,this.#H.size.height)})}updateBackgroundElement(){this.#lt()}#ot(t){for(const e of this.#Q)e.afterDraw?.(t)}#st(t,e,i,s,n,o){for(const a of this.#Z){if(a.getColorStyles){const{fill:o,stroke:r}=a.getColorStyles(e,t,i,s);o&&(n.fill=o),r&&(n.stroke=r)}if(a.getTransformValues){const t=a.getTransformValues(e);for(const e in t)kn(o,t,e)}a.beforeDraw?.(e)}}#dt(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}#ht(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}#nt(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,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),o.fill&&(i.fillStyle=o.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,o.stroke&&(i.strokeStyle=o.stroke);const m={context:i,particle:s,radius:a,drawRadius:1*a,opacity:r,delta:n,pixelRatio:e.retina.pixelRatio,fill:f,stroke:g>0,transformData:u,position:{...h},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(m);const y=s.effect?c.get(s.effect):void 0,v=s.shape?d.get(s.shape):void 0;this.#ht(y,m),this.#ut(v,m),this.#pt(v,m),this.#ft(v,m),this.#dt(y,m),i.resetTransform()}#at(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}#pt(t,e){if(!t)return;const{context:i,fill:s,particle:n,stroke:o}=e;n.shape&&(i.beginPath(),t.draw(e),n.shapeClose&&i.closePath(),s&&i.fill(),o&&i.stroke())}#ft(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}#ut(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}#et(t){return this.#Y[t]}#it(t){let e,i;for(const s of this.#G)if(!e&&s.particleFillColor&&(e=ai(this.#k,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=ai(this.#k,s.particleStrokeColor(t))),e&&i)break;return this.#J[0]=e,this.#J[1]=i,this.#J}#gt(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.#Y[t].push(e)}#ct(){for(const t of this.#z.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#G.push(t),t.drawParticle&&this.#q.push(t),t.drawParticleSetup&&this.#X.push(t),t.drawParticleCleanup&&this.#W.push(t),t.canvasClear&&this.#N.push(t),this.#gt(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}#lt(){const t=this.#z.actualOptions.background;if(this.#V=null,t.element)if("string"==typeof t.element){if("undefined"!=typeof document){let e;try{e=document.querySelector(t.element)}catch{return void this.#rt("background-element-invalid-selector",`Background element selector "${t.element}" is invalid`)}e&&this.#mt(e)?this.#V=e:e?this.#rt("background-element-not-supported",`Background element "${t.element}" is not a supported drawable element (canvas, video, or img)`):this.#rt("background-element-not-found",`Background element selector "${t.element}" not found`)}}else this.#mt(t.element)&&(this.#V=t.element)}#rt(t,e){this.#U.has(t)||(this.#U.add(t),n().warning(e))}}const On=new WeakMap;function Dn(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 In{domElement;render;renderCanvas;size;zoom=1;#z;#yt;#vt;#wt;#bt;#k;#Pt;#xt;#Mt;#Ct;constructor(t,e){this.#k=t,this.#z=e,this.render=new Sn(t,e,this),this.#Mt={height:0,width:0};const i=e.retina.pixelRatio,s=this.#Mt;this.size={height:s.height*i,width:s.width*i},this.#yt=!1,this.#xt=[],this.#Pt="none"}get#zt(){return this.#z.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#yt){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#kt();this.render.destroy(),this.#xt=[]}getZoomCenter(){const t=this.#z.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Ct?this.#Ct:{x:e*u/t,y:i*u/t}}init(){this.#St(t=>{t.disconnect()}),this.#wt=bt(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#Ot()}),this.resize(),this.#Dt(),this.#St(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.#It(),this.initBackground(),this.#Ft(),this.render.init()}initBackground(){const e=this.#z,i=e.actualOptions.background,s=this.domElement;if(!s)return;const n=s.style,o=ni(this.#k,i.color);if(o){const s=e.actualOptions.hdr;n.backgroundColor=fi(o,e.hdr,i.opacity,s.peakNits,B(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.#z.plugins)t.resize&&this.#xt.push(t)}loadCanvas(t){this.#yt&&this.domElement&&this.domElement.remove();const e=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=e,this.#yt=!!e&&"true"===e.dataset[a],this.renderCanvas=e?(t=>{const e=On.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError(ft(pt.offscreenCanvasUnsupported));try{const e=t.transferControlToOffscreen();return On.set(t,e),e}catch{throw new TypeError(ft(pt.offscreenCanvasTransferFailed))}})(e):t;const i=this.domElement;i&&(i.ariaHidden="true",this.#bt=It(i.style));const s=this.#Mt,n=this.renderCanvas;i?(s.height=i.offsetHeight,s.width=i.offsetWidth):(s.height=n.height,s.width=n.width);const o=this.#z.retina.pixelRatio,r=this.size;n.height=r.height=s.height*o,n.width=r.width=s.width*o}resize(){const t=this.domElement;if(!t)return!1;const e=this.#z,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#Mt,n={width:t.offsetWidth,height:t.offsetHeight},o=e.retina.pixelRatio,a={width:n.width*o,height:n.height*o};if(n.height===s.height&&n.width===s.width&&a.height===i.height&&a.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=a.width,i.height=l.height=a.height,this.#z.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#Pt=t,this.#Ot())}setZoom(t,e){this.zoom=t,this.#Ct=e}stop(){this.#St(t=>{t.disconnect()}),this.#wt=void 0,this.#Et(),this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#z,e=t.updateActualOptions();t.particles.setDensity(),this.#Lt(),e&&await t.refresh()}#Lt(){for(const t of this.#xt)t.resize?.()}#It(){const e=this.#z,i=e.actualOptions.hdr.enable&&wt("(color-gamut: p3)")?.matches&&wt("(dynamic-range: high)")?.matches;e.hdrMode=B(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)}}#Ft(){this.#Et();const t=wt("(color-gamut: p3)"),e=wt("(dynamic-range: high)"),i=()=>{this.#It(),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.#vt=s}#Dt(){const t=this.domElement,e=this.#z.actualOptions;if(t){this.#zt?this.#Rt():this.#kt();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")}}}#Et(){if(this.#vt){for(const{handler:t,mql:e}of this.#vt)e.removeEventListener("change",t);this.#vt=void 0}}#Ot(){const t=this.domElement;if(!t)return;this.#St(t=>{t.disconnect()}),this.#Dt(),this.initBackground();const e=this.#Pt;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#St(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})}#kt(){const t=this.domElement,e=this.#bt;t&&e&&Dn(t,e,!0)}#St(t){this.#wt&&t(this.#wt)}#Rt(){const t=this.domElement;t&&Dn(t,Lt(this.#z.actualOptions.fullScreen.zIndex),!0)}}class Fn{#z;#Tt;#At;#_t;constructor(t){this.#z=t,this.#Tt={visibilityChange:()=>{this.#Bt()},resize:()=>{this.#Vt()}}}addListeners(){this.#Ut(!0)}removeListeners(){void 0!==this.#_t&&(clearTimeout(this.#_t),this.#_t=void 0),this.#Ut(!1)}#Bt(){const t=this.#z;t.actualOptions.pauseOnBlur&&(vt().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))}#Vt(){this.#_t&&(clearTimeout(this.#_t),this.#_t=void 0);const t=async()=>{await this.#z.canvas.windowResize()};this.#_t=setTimeout(()=>{t()},this.#z.actualOptions.resize.delay*p)}#Ut(t){const e=this.#Tt;this.#Nt(t),"undefined"!=typeof document&&Rt(document,d,e.visibilityChange,t,!1)}#Nt(t){const e=this.#Tt,i=this.#z;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Rt(globalThis,c,e.resize,t);const s=i.canvas.domElement;this.#At&&!t?(s&&this.#At.unobserve(s),this.#At.disconnect(),this.#At=void 0):!this.#At&&t&&s&&(this.#At=new ResizeObserver(t=>{t.some(t=>t.target===s)&&this.#Vt()}),this.#At.observe(s))}}function En(t){if(!Pt(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 Ln(t,e){const i=t%e;return i<0?i+e:i}function Rn(t,e,i,s){const n=je(i,e,e.actualOptions.particles),o=n.reduceDuplicates;t.effect=Ot(n.effect.type,t.id,o),t.shape=Ot(n.shape.type,t.id,o);const a=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,o);i&&(t.effect=i)}a.load(s.effect)}if(s.shape){const e=s.shape.type;if(e&&e!==t.shape){const i=Ot(e,t.id,o);i&&(t.shape=i)}r.load(s.shape)}}if(t.effect===m){const i=[...e.effectDrawers.keys()];t.effect=i[Math.floor(j()*i.length)]}if(t.shape===m){const i=[...e.shapeDrawers.keys()];t.shape=i[Math.floor(j()*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,a,t.id,o):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,o):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 Tn{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;#Ht={fillOpacity:1,opacity:1,strokeOpacity:1};#Gt=F.origin;#$t={sin:0,cos:0};#jt={a:1,b:0,c:0,d:1};#z;#qt=[];#k;constructor(t,e){this.#k=t,this.#z=e}addModifier(t){this.#qt.push(t),this.#qt.sort((t,e)=>t.priority-e.priority)}clearModifiers(){this.#qt.length=0}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.clearModifiers();const i=this.#z,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.#z.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#z.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#Wt(this.#Xt(yi(this.fillColor),t=>t.fillColor))}getMass(){return this.getRadius()**2*Math.PI*u}getModifier(t){return this.#qt.find(e=>e.id===t)}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=K(this.opacity?.value??1),s=this.#Xt(void 0,t=>t.opacity)??i;return this.#Ht.fillOpacity=this.fillOpacity??1,this.#Ht.opacity=s*e,this.#Ht.strokeOpacity=this.strokeOpacity??1,this.#Ht}getPosition(){return this.#Gt.x=this.position.x+this.offset.x,this.#Gt.y=this.position.y+this.offset.y,this.#Gt.z=this.position.z,this.#Gt}getRadius(){return this.#Xt(this.size.value,t=>t.radius)}getRotateData(){const t=this.getAngle();return this.#$t.sin=Math.sin(t),this.#$t.cos=Math.cos(t),this.#$t}getStrokeColor(){return this.#Wt(this.#Xt(yi(this.strokeColor),t=>t.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#jt.a=e.cos*(t.a??g.a),this.#jt.b=i?e.sin*(t.b??1):t.b??g.b,this.#jt.c=i?-e.sin*(t.c??1):t.c??g.c,this.#jt.d=e.cos*(t.d??g.d),this.#jt}init(e,i,s,n){const o=this.#z;!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=Rn(this,o,this.#k,s),o.retina.initParticle(this),function(t,e){for(const i of t)i.preInit?.(e)}(o.particleUpdaters,this),this.#Yt(i),this.initialVelocity=this.#Qt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.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,o),this.spawning=!1,function(t,e){for(const i of t)i.init(e)}(o.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)}(o,this),function(t,e){for(const i of t.particleCreatedPlugins)i.particleCreated?.(e)}(o,this)}isInsideCanvas(t){return this.#Zt(t).inside}isInsideCanvasForOutMode(t,e){return this.#Zt(e,t).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=Ln(t,v);return e>=Math.PI*u&&e<3*Math.PI*u}if(this.roll.horizontal){const e=Ln(t+Math.PI*u,v);return e>=Math.PI&&e<2*Math.PI}if(this.roll.vertical){const e=Ln(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.#qt.findIndex(e=>e.id===t);e>=0&&this.#qt.splice(e,1)}reset(){for(const t of this.#z.particleUpdaters)t.reset?.(this)}#Xt(t,e){let i=t;for(const t of this.#qt)if(t.enabled){const s=e(t);void 0!==s&&(i=s)}return i}#Kt(t,e){let i=0,s=t?F.create(t.x,t.y,e):void 0;const n=this.#z,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size;for(;;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return F.create(i.x,i.y,e)}const t=ht({size:l,position:s}),c=F.create(t.x,t.y,e);this.#Jt(c,r,a.left??a.default),this.#Jt(c,r,a.right??a.default),this.#te(c,r,a.top??a.default),this.#te(c,r,a.bottom??a.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=rt(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=ot(K(e.angle.value)),n=ot(K(e.angle.offset)),o={left:n-s*u,right:n+s*u};return e.straight||(i.angle+=Z(et(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=j()),i}#Jt(e,i,s){En({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#z.canvas.size.width,setCb:t=>e.x+=t,radius:i})}#te(e,i,s){En({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#z.canvas.size.height,setCb:t=>e.y+=t,radius:i})}#ee(e,i){const s=this.getRadius(),n=this.#z.canvas.size,o=i===t.OutMode.bounce||i===t.OutMode.split,a=o?this.getPosition():this.position;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"}}#ie(t,e){return{canvasSize:this.#z.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()}}#Zt(e,i){const s=this.#ee(e,i),n=this.#z,o=this.shape?n.shapeDrawers.get(this.shape):void 0,a=this.effect?n.effectDrawers.get(this.effect):void 0;if(!o?.isInsideCanvas&&!a?.isInsideCanvas)return s;const r=this.#ie(e,i),l=o?.isInsideCanvas?this.#se(o.isInsideCanvas(r),"shape"):void 0,c=a?.isInsideCanvas?this.#se(a.isInsideCanvas(r),"effect"):void 0;if(l&&c){const e=Math.max(l.margin??0,c.margin??0);return{inside:i===t.OutMode.destroy||i===t.OutMode.out?l.inside||c.inside:l.inside&&c.inside,margin:e>0?e:void 0,reason:"combined"}}return l??c??s}#Wt(t){return t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?xi(t,this.roll.alter.type,this.roll.alter.value):t:t}#Yt(e){const i=this.#z,s=Math.floor(K(this.options.zIndex.value)),n=this.#Kt(e,Y(s,0,i.zLayers));if(!n)throw new Error(ft(pt.particlePositionNotFound));this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...Dt(this.options.move.center,o),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=E.origin}#se(t,e){return"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}}class An{#ne=new Map;#oe;#ae=[];#re;#le;#ce=[];#de;constructor(t){this.#oe=t,this.#re=0,this.#de=0}get cellSize(){return this.#oe}set cellSize(t){this.#le=t}clear(){this.#ne.clear();const t=this.#le;t&&(this.#oe=t),this.#le=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#he(e,i);this.#ne.has(s)||this.#ne.set(s,[]),this.#ne.get(s)?.push(t)}query(t,e,i=[]){const s=this.#ue(t);if(!s||!this.#ne.size)return i;const n=Math.floor(s.minX/this.#oe),o=Math.floor(s.maxX/this.#oe),a=Math.floor(s.minY/this.#oe),r=Math.floor(s.maxY/this.#oe);if(!Number.isSafeInteger(n)||!Number.isSafeInteger(o)||!Number.isSafeInteger(a)||!Number.isSafeInteger(r)||n>o||a>r)return i;if(!e&&(o-n+1)*(r-a+1)>Math.max(64,16*this.#ne.size)){const e=[];for(const t of this.#ne.keys()){const i=t.indexOf("_"),s=Number(t.slice(0,i)),l=Number(t.slice(i+1));s>=n&&s<=o&&l>=a&&l<=r&&e.push({x:s,y:l})}e.sort((t,e)=>t.x===e.x?t.y-e.y:t.x-e.x);for(const{x:s,y:n}of e)this.#pe(s,n,t,void 0,i);return i}for(let s=n;s<=o;s++)for(let n=a;n<=r;n++)this.#pe(s,n,t,e,i);return i}queryCircle(t,e,i,s=[]){const n=this.#fe(t.x,t.y,e);try{return this.query(n,i,s)}finally{this.#re--}}queryRectangle(t,e,i,s=[]){const n=this.#ge(t.x,t.y,e.width,e.height);try{return this.query(n,i,s)}finally{this.#de--}}#fe(t,e,i){const s=this.#re++;let n=this.#ae[s];return n||(n=new ne(t,e,i),this.#ae[s]=n),n.reset(t,e,i)}#ge(t,e,i,s){const n=this.#de++;let o=this.#ce[n];return o||(o=new oe(t,e,i,s),this.#ce[n]=o),o.reset(t,e,i,s)}#he(t,e){return`${Math.floor(t/this.#oe)}_${Math.floor(e/this.#oe)}`}#ue(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 oe){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}#pe(t,e,i,s,n){const o=this.#ne.get(`${t}_${e}`);if(o)for(const t of o)s&&!s(t)||i.contains(t.getPosition())&&n.push(t)}}class _n{checkParticlePositionPlugins;#me;#z;#ye;#ve;#we;#be;#Pe;#xe;#Me;#k;#Ce;#ze;#ke;#Se;#Oe;#De;constructor(t,e){this.#k=t,this.#z=e,this.#be=0,this.#me=[],this.#Ce=[],this.#we=0,this.#ve=new Map,this.#Pe=new Map,this.#De=this.#Ie(this.#z.zLayers),this.#ye=new An(100),this.checkParticlePositionPlugins=[],this.#xe=[],this.#Me=[],this.#ke=[],this.#ze=[],this.#Oe=[]}get count(){return this.#me.length}get grid(){return this.#ye}addParticle(e,i,s,o){if(!this.#Fe(s,this.count))try{const n=this.#Ce.pop()??new Tn(this.#k,this.#z);n.init(this.#be,e,i,s);let a=!0;return o&&(a=o(n)),a?(this.#me.push(n),this.#Ee(n),this.#be++,this.#z.dispatchEvent(t.EventType.particleAdded,{particle:n}),n):void this.#Ce.push(n)}catch(t){n().warning(`error adding particle: ${t}`)}}clear(){this.#me=[],this.#Pe.clear(),this.#Le(this.#z.zLayers)}destroy(){this.#me=[],this.#Ce.length=0,this.#Pe.clear(),this.#De=[],this.checkParticlePositionPlugins=[],this.#xe=[],this.#Me=[],this.#ke=[],this.#ze=[],this.#Oe=[]}drawParticles(t){for(let e=this.#De.length-1;e>=0;e--){const i=this.#De[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#me.filter(t)}find(t){return this.#me.find(t)}get(t){return this.#me[t]}async init(){const t=this.#z;this.checkParticlePositionPlugins=[],this.#Oe=[],this.#Me=[],this.#ke=[],this.#xe=[],this.#ze=[],this.#Pe.clear(),this.#Le(t.zLayers),this.#ye=new An(100*t.retina.pixelRatio),this.#Re(t.actualOptions.particles);const e=t.actualOptions.particles.groups;for(const t in e){const i=e[t];i&&this.#Re(je(this.#k,this.#z,i),t,i)}await this.#Te()}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.#z.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#me.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s,n=!0){if(t<0||t>this.count)return;let o=0;for(let a=t;o<e&&a<this.count;a++)this.#Ae(a,i,s,n)&&(a--,o++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#z.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#z.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=je(this.#k,this.#z,s);this.#_e(n,i,t)}this.#_e(t.particles,i)}setResizeFactor(t){this.#Se=t}update(t){this.#ye.clear();for(const e of this.#Oe)e.update?.(t);const e=this.#Be(t);for(const e of this.#ke)e.postUpdate?.(t);if(this.#Ve(t,e),e.size)for(const t of e)this.remove(t,t.group);this.#Se=void 0}#Ue(...t){this.#Ce.push(...t)}#_e(e,i,s,n){const o=e.number;if(!o.density.enable)return void this.#Re(e,s,n);const a=this.#Ne(o.density),r=o.value,l=o.limit.value>0?o.limit.value:r,c=Math.round(Math.min(r,l)*a+i),d=this.#He(s);void 0===s?this.#we=o.limit.value*a:this.#ve.set(s,{limit:o.limit.value*a,mode:B(t.LimitMode,o.limit.mode,t.LimitMode.delete)}),d<c?this.push(Math.abs(c-d),void 0,e,s):d>c&&this.removeQuantity(d-c,s)}#Re(e,i,s){if(void 0===i){this.#we=e.number.limit.value;const t=this.#z.actualOptions.particles.groups;for(const e of this.#ve.keys())e in t||this.#ve.delete(e)}else{const n=s?.number?.limit?.value??e.number.limit.value;n>0?this.#ve.set(i,{limit:n,mode:B(t.LimitMode,s?.number?.limit?.mode??e.number.limit.mode,t.LimitMode.delete)}):this.#ve.delete(i)}}#Fe(e,i){const s=this.#we,n=this.#z.actualOptions.particles.number.limit.mode;if(s>0&&n===t.LimitMode.wait&&i>=s)return!0;const o=void 0===e?void 0:this.#ve.get(e);if(o&&o.limit>0&&o.mode===t.LimitMode.wait){if(this.#He(e)>=o.limit)return!0}if(o&&o.limit>0&&o.mode===t.LimitMode.delete){const t=this.#He(e)+1-o.limit;t>0&&this.removeQuantity(t,e)}if(s>0&&n===t.LimitMode.delete){const t=this.count+1-s;t>0&&this.#Ge(t)}return!1}#He(t){let e=0;for(const i of this.#me)i.group===t&&e++;return e}#Ie(t){const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])}#$e(t){const e=this.#De.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)}#Ne(t){const e=this.#z;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;if(!Number.isFinite(i.width)||!Number.isFinite(i.height)||i.width<=0||i.height<=0||!Number.isFinite(t.width)||!Number.isFinite(t.height)||t.width<=0||t.height<=0||!Number.isFinite(s)||s<=0)return 1;const n=i.width*i.height/(t.height*t.width*s**2);return Number.isFinite(n)&&n>=0?n:1}async#je(){const t=this.#z;await t.initDrawersAndUpdaters(),t.canvas.render.initUpdaters();for(const e of t.effectDrawers.values())await(e.init?.(t));for(const e of t.shapeDrawers.values())await(e.init?.(t))}async#Te(){await this.#qe(),await this.#je();let t=!1;const e=this.#z;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#qe(){const t=this.#z;for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#Oe.push(e),e.particleUpdate&&this.#Me.push(e),e.postUpdate&&this.#ke.push(e),e.particleReset&&this.#xe.push(e),e.postParticleUpdate&&this.#ze.push(e)}#Ee(t){const e=this.#$e(t.position.z),i=this.#De[e];i&&(i.push(t),this.#Pe.set(t.id,e))}#Ge(t){this.removeAt(0,t,void 0,void 0,!1)}#Ae(e,i,s,n=!0){const o=this.#me[e];return!!o&&((!n||o.group===i)&&(this.#me.splice(e,1),this.#We(o),o.destroy(s),this.#z.dispatchEvent(t.EventType.particleRemoved,{particle:o}),this.#Ue(o),!0))}#We(t){const e=this.#Pe.get(t.id)??this.#$e(t.position.z),i=this.#De[e];if(!i)return void this.#Pe.delete(t.id);const s=i.findIndex(e=>e.id===t.id);s>=0&&i.splice(s,1),this.#Pe.delete(t.id)}#Le(t){const e=Math.max(Math.floor(t),1);if(this.#De.length===e)for(const t of this.#De)t.length=0;else this.#De=this.#Ie(e)}#Xe(t){const e=this.#$e(t.position.z),i=this.#Pe.get(t.id);if(void 0===i)return void this.#Ee(t);if(i===e)return;const s=this.#De[i];if(s){const e=s.findIndex(e=>e.id===t.id);e>=0&&s.splice(e,1)}const n=this.#De[e];if(n){if(n.push(t),n.length>=2){const e=n[n.length-2];e&&t.id<e.id&&n.sort((t,e)=>t.id-e.id)}this.#Pe.set(t.id,e)}else this.#Pe.set(t.id,e)}#Be(t){const e=new Set,i=this.#Se;for(const s of this.#me){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.#xe)t.particleReset?.(s);for(const e of this.#Me){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.#ye.insert(s)}return e}#Ve(t,e){for(const i of this.#me)if(i.destroyed)e.add(i);else{for(const e of this.#z.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#ze)e.postParticleUpdate?.(i,t);this.#Xe(i)}}}class Bn{pixelRatio;reduceFactor;#z;constructor(t){this.#z=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#z,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,o=t.retina;o.maxSpeed=K(s.gravity.maxSpeed)*i,o.moveDrift=K(s.drift)*i,o.moveSpeed=K(s.speed)*i;const a=o.maxDistance;a.horizontal=void 0===n.horizontal?void 0:n.horizontal*i,a.vertical=void 0===n.vertical?void 0:n.vertical*i}}function Vn(t){return!t.destroyed}function Un(t,e,...i){const s=new qe(t,e);return ue(s,...i),s}const Nn=Object.freeze([]);var Hn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;hdrMode;id;pageHidden;particles;particleUpdaters;peakNits;retina;shapeDrawers;started;zLayers;#Ye;#Qe;#Ze;#Ke={value:0,factor:0};#Je;#ti;#ei;#ii;#si;#ni;#oi;#ai;#ri;#li;#ci=Nn;#di=Nn;#hi=Nn;#ui;#k;#p=Nn;#pi;#fi;#gi;#mi=0;#yi;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#k=s,this.#Je=i,this.#ri=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.hdrMode=t.HdrMode.standard,this.peakNits=400,this.#pi=!1,this.#Ye=0,this.#ei=0,this.#ai=0,this.#si=!0,this.started=!1,this.destroyed=!1,this.#ui=!0,this.#oi=0,this.zLayers=100,this.pageHidden=!1,this.#fi=a,this.#ni=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new Bn(this),this.canvas=new In(this.#k,this),this.particles=new _n(this.#k,this),this.#li=Un(this.#k,this),this.actualOptions=Un(this.#k,this),this.#ii=new Fn(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#ui&&!this.pageHidden&&Vn(this)}get options(){return this.#li}get particleCreatedPlugins(){return this.#ci}get particleDestroyedPlugins(){return this.#di}get particlePositionPlugins(){return this.#hi}get plugins(){return this.#p}get sourceOptions(){return this.#fi}addLifeTime(t){this.#ai+=t}alive(){return!this.#ei||this.#ai<=this.#ei}destroy(e=!0){if(Vn(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.#p=Nn,this.destroyed=!0,this.#ri(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#Je(t,{container:this,data:e})}draw(t){if(!Vn(this))return;if(void 0!==this.#ti){if(!t)return;X(this.#ti),this.#ti=void 0}let e=t;this.#ti=W(t=>{this.#ti=void 0,e&&(this.#oi=void 0,e=!1),this.#vi(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(!Vn(this))return;const e=this.#mi,i=new Map;for(const t of this.#k.plugins){const s=await t.getPlugin(this);if(e!==this.#mi||this.destroyed)return;if(s.preInit&&(await s.preInit(),e!==this.#mi))return;i.set(t,s)}if(await this.initDrawersAndUpdaters(),e!==this.#mi)return;this.#li=Un(this.#k,this,this.#ni,this.sourceOptions),this.actualOptions=Un(this.#k,this,this.#li),this.#Te(i),this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:s,duration:n,fpsLimit:o,smooth:a,zLayers:r}=this.actualOptions,l=this.actualOptions.hdr;this.hdrMode=B(t.HdrMode,l.mode,t.HdrMode.standard),this.peakNits=l.peakNits,this.zLayers=r,this.#ei=K(n)*p,this.#Ye=K(s)*p,this.#ai=0,this.fpsLimit=o>0?o:120,this.#pi=a;for(const t of this.plugins)if(await(t.init?.()),e!==this.#mi)return;if(await this.particles.init(),e===this.#mi){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.#k;this.effectDrawers=await At(this,t.initializers.effects),this.shapeDrawers=await At(this,t.initializers.shapes),this.particleUpdaters=await Tt(this,t.initializers.updaters)}pause(){if(Vn(this)&&(void 0!==this.#ti&&(X(this.#ti),this.#ti=void 0),!this.#ui)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#ui=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!Vn(this))return;const i=this.#ui||e;if(!this.#si||this.actualOptions.autoPlay){if(this.#ui&&(this.#ui=!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(Vn(this))return this.stop(),this.start()}async reset(t){if(Vn(this))return this.#ni=t,this.#fi=t,this.#li=Un(this.#k,this,this.#ni,this.sourceOptions),this.actualOptions=Un(this.#k,this,this.#li),this.refresh()}async start(){if(!Vn(this)||this.started)return;if(this.#yi)return this.#yi;const e=++this.#mi;let i;const s=new Promise(t=>{i=t});return this.#gi=i,this.#yi=(async()=>{try{if(await Promise.race([this.init(),s]),e!==this.#mi)return;if(this.started=!0,await Promise.race([new Promise(t=>{this.#Qe=t,this.#Ze=setTimeout(()=>{this.#Ze=void 0,this.#Qe=void 0,t()},this.#Ye)}),s]),e!==this.#mi||this.destroyed)return;this.#ii.addListeners();const i=async()=>{for(const t of this.plugins){if(e!==this.#mi)return;await(t.start?.())}};if(await Promise.race([i(),s]),e!==this.#mi)return;this.dispatchEvent(t.EventType.containerStarted),this.play()}catch(t){throw e!==this.#mi||this.destroyed||this.stop(),t}finally{e===this.#mi&&(this.#yi=void 0,this.#gi=void 0)}})(),this.#yi}stop(){if(Vn(this)&&(this.#mi++,this.#gi?.(),this.#gi=void 0,this.#yi=void 0,this.started)){void 0!==this.#Ze&&(clearTimeout(this.#Ze),this.#Ze=void 0,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.#ci=Nn,this.#di=Nn,this.#hi=Nn,this.#fi=this.#li,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return this.canvas.render.updateBackgroundElement(),t}#Te(t){const e=[],i=[],s=[],n=[];for(const[o,a]of t)o.needsPlugin(this.actualOptions)&&(e.push(a),a.particleCreated&&i.push(a),a.particleDestroyed&&s.push(a),a.particlePosition&&n.push(a));this.#p=Object.freeze(e),this.#ci=Object.freeze(i),this.#di=Object.freeze(s),this.#hi=Object.freeze(n)}#vi(t){try{if(!this.#pi&&void 0!==this.#oi&&t<this.#oi+p/this.fpsLimit)return void this.draw(!1);if(this.#oi??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/p}(this.#Ke,t-this.#oi,this.fpsLimit,this.#pi),this.addLifeTime(this.#Ke.value),this.#oi=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 Gn=Object.freeze({__proto__:null,FireworksInstance:class{#z;#wi;constructor(t,e){this.#z=t,this.#wi=e}get destroyed(){return this.#z.destroyed}destroy(){var t,e;this.#z.destroy(),t=this.#wi,e=this,zi.get(t)===e&&zi.delete(t)}pause(){this.#z.pause()}play(){this.#z.play()}stop(){this.#z.stop()}}});var $n=Object.freeze({__proto__:null,BlendPluginInstance:class{layer=t.DrawLayer.CanvasSetup;#z;#bi;constructor(t){this.#z=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.#bi&&(t.globalCompositeOperation=this.#bi)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#z.actualOptions.blend;this.#bi=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function jn(t,e,i,s,n,o,a){!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 o=t.pathGenerator?.generate(t,e);o&&t.velocity.addTo(o);s.clamp&&(t.velocity.x=Y(t.velocity.x,-1,1),t.velocity.y=Y(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1,c=t.velocity.x,d=t.velocity.y,h=a.factor||1,u=t.moveDecay??1,p=u<0?u:u**h,f=n&&i?n/(60*i):0,g=r?.enable&&i?l*r.acceleration/(60*i):0,m=t=>u<=0||1===u?t*h:t*(1-p)/-Math.log(u);u>0&&t.velocity.multTo(p),t.velocity.x+=m(f),t.velocity.y+=m(g),u<=0&&t.velocity.multTo(p);const y=t.velocity.mult(i);let v=!1;r?.enable&&s>0&&(!r.inverse&&y.y>=0&&y.y>=s||r.inverse&&y.y<=0&&y.y<=-s)&&(y.y=l*s,v=!0,i&&(t.velocity.y=y.y/i));const w=u>0&&u<1;if(w){const e=-Math.log(u),s=(1-p)/e,n=(h-s)/e;y.x=(c*s+f*n)*i,y.y=v?t.velocity.y*i*h:(d*s+g*n)*i}const b=t.options.zIndex,P=(1-t.zIndexFactor)**b.velocityRate;y.multTo(P),y.multTo(o),w||y.multTo(h);const{position:x}=t;x.addTo(y),e.vibrate&&(x.x+=Math.sin(x.x*Math.cos(x.y))*o,x.y+=Math.cos(x.y*Math.sin(x.x))*o)}var qn=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#z;#k;constructor(t,e){this.#k=t,this.#z=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-K(i.decay),e.pathDelay=K(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:K(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},o={x:.01*n.x*e.canvas.size.width,y:.01*n.y*e.canvas.size.height},a=st(i.getPosition(),o),r=K(s.acceleration);i.retina.spinAcceleration=r*e.retina.pixelRatio,i.spin={center:o,direction:i.velocity.x>=0?t.RotateDirection.clockwise:t.RotateDirection.counterClockwise,angle:j()*v,radius:a,acceleration:i.retina.spinAcceleration}}(this.#z,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.#z,o=function(t){const e=t.getModifier("slow");return e?.enabled?e.speedFactor??1:1}(e),a=n.retina.reduceFactor,r=e.retina.moveSpeed,l=e.retina.moveDrift,c=e.size.max,d=r*(s.size?e.getRadius()/c:1)*o*u,h=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,a={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*a.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*a.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*(i.factor||1),a):jn(e,s,d,h,l,a,i),function(t){const e=t.initialPosition,i=e.x-t.position.x,s=e.y-t.position.y,n=Math.abs(i),o=Math.abs(s),{maxDistance:a}=t.retina,r=a.horizontal,l=a.vertical;if(!r&&!l)return;if((r&&n>=r||l&&o>=l)&&!t.misplaced)t.misplaced=!!r&&n>r||!!l&&o>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||o<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*=-j()),l&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-j())}}(e)}preInit(){return this.#Pi()}redrawInit(){return this.#Pi()}update(){for(const t of this.pathGenerators.values())t.update()}async#Pi(){const t=this.#k;if(t.initializers.pathGenerators){this.availablePathGenerators=await At(this.#z,t.initializers.pathGenerators),this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});const Wn=new Map;var Xn=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||Wn.set(t,e)}getShapeGenerator(t){return Wn.get(t)}getSupportedShapeGenerators(){return Wn.keys()}}});var Yn,Qn,Zn=Object.freeze({__proto__:null,EmittersInstancesManager:class{#xi;#k;constructor(t){this.#xi=new Map,this.#k=t}async addEmitter(t,e,i){return this.addEmitters(t,[{options:e,position:i}]).then(t=>t[0])}async addEmitters(t,e){const{EmitterInstance:i}=await Promise.resolve().then(function(){return so}),s=[];for(const{options:n,position:o}of e){const e=new Ls;e.load(n);const a=new i(this.#k,t,e=>{this.removeEmitter(t,e)},e,o);await a.init(),this.getArray(t).push(a),s.push(a)}return s}clear(t){this.initContainer(t),this.#xi.set(t,[])}getArray(t){this.initContainer(t);let e=this.#xi.get(t);return e||(e=[],this.#xi.set(t,e)),e}initContainer(t){this.#xi.has(t)||(this.#xi.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||T(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.addEmitters=async e=>this.addEmitters(t,e),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});!function(t){t.mute="soundsMuted",t.unmute="soundsUnmuted"}(Yn||(Yn={})),function(t){t.Block="block",t.None="none"}(Qn||(Qn={}));function Kn(t){const e=vt().createElement("img"),{clickCb:i,container:s,display:n,iconOptions:o,margin:a,options:r,pos:l,rightOffsets:c}=t,{width:d,path:h,style:u,svg:p}=o;!function(t,e,i,s,n,o,a,r){t.style.userSelect="none",t.style.position="absolute",t.style.top=`${(e+a).toString()}px`,t.style.left=`${(i-a-o).toString()}px`,t.style.display=s,t.style.zIndex=(n+1).toString(),t.style.cssText+=r}(e,l.top+a,l.right-(a*(c.length+1)+d+c.reduce((t,e)=>t+e,0)),n,r.fullScreen.zIndex+1,d,a,u),e.src=h??(p?`data:image/svg+xml;base64,${btoa(p)}`:"");return(s.canvas.domElement?.parentNode??vt().body).append(e),e.addEventListener("click",()=>{i()}),e}function Jn(t){t&&t.remove()}var to=Object.freeze({__proto__:null,SoundsPluginInstance:class{#Mi;#Ci;#z;#o;#zi;#ki;#Si;#Oi;#Di;#Ii;constructor(t,e){this.#z=t,this.#o=e,this.#Oi=0,this.#Ci=[],this.#Mi=new Map}async init(){const t=this.#z.actualOptions.sounds;if(!t?.enable)return;if(t.autoPlay&&yn()){const t=()=>{removeEventListener(nn,t),removeEventListener(on,t),vn(),this.unmute()},e={capture:!0,once:!0};addEventListener(nn,t,e),addEventListener(on,t,e)}this.#Oi=t.volume.value;const e=t.events;this.#Mi=new Map;for(const t of e){if(!t.audio)continue;const e=St(t.audio,async t=>{const e=await fetch(t.source);if(!e.ok)return;const i=await e.arrayBuffer(),s=this.#Fi(),n=await s.decodeAudioData(i);this.#Mi.set(t.source,n)});e instanceof Promise?await e:await Promise.allSettled(e)}}async mute(){this.#z.muted||await this.toggleMute()}async start(){const t=this.#z,e=t.actualOptions,i=e.sounds;if(!i?.enable||!t.canvas.domElement)return;t.muted=!0;const s=t.canvas.domElement,n={top:s.offsetTop,right:s.offsetLeft+s.offsetWidth},{mute:o,unmute:a,volumeDown:r,volumeUp:l}=i.icons,c=async()=>{await this.toggleMute()},d=i.icons.enable?Qn.Block:Qn.None;this.#ki=Kn({container:t,options:e,pos:n,display:d,iconOptions:o,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Si=Kn({container:t,options:e,pos:n,display:Qn.None,iconOptions:a,margin:10,rightOffsets:[r.width,l.width],clickCb:c}),this.#Di=Kn({container:t,options:e,pos:n,display:d,iconOptions:r,margin:10,rightOffsets:[l.width],clickCb:async()=>{await this.volumeDown()}}),this.#Ii=Kn({container:t,options:e,pos:n,display:d,iconOptions:l,margin:10,rightOffsets:[],clickCb:async()=>{await this.volumeUp()}}),!yn()&&i.autoPlay&&await this.unmute()}stop(){this.#z.muted=!0,(async()=>{await this.#Ei(),Jn(this.#ki),Jn(this.#Si),Jn(this.#Di),Jn(this.#Ii)})()}async toggleMute(){const t=this.#z;t.muted=!t.muted,this.#Li(),await this.#Ri()}async unmute(){this.#z.muted&&await this.toggleMute()}async volumeDown(){const t=this.#z,e=t.actualOptions.sounds;e?.enable&&(t.muted&&(this.#Oi=0),this.#Oi-=e.volume.step,await this.#Ti())}async volumeUp(){const t=this.#z.actualOptions.sounds;t?.enable&&(this.#Oi+=t.volume.step,await this.#Ti())}#Ai(t){const e=t.createBufferSource();return this.#Ci.push(e),e}#_i(t){const e=t.createOscillator();return this.#Ci.push(e),e}#Fi(){const t=this.#z;return t.audioContext??=new AudioContext,t.audioContext}#Bi(){const t=this.#z,e=t.actualOptions.sounds;if(e?.enable&&t.canvas.domElement)for(const t of e.events){const e=i=>{i&&(async()=>{const s=t.filter&&!t.filter(i);if(this.#z!==i.container)return;if(this.#z.muted||this.#z.destroyed)return void St(t.event,t=>{this.#o.removeEventListener(t,e)});if(s)return;if(t.audio){const e=Ot(t.audio);if(!e)return;this.#Vi(e)}else if(t.melodies){const e=xt(t.melodies);if(!e)return;e.melodies.length?await Promise.allSettled(e.melodies.map(t=>this.#Ui(t.notes,0,e.loop))):await this.#Ui(e.notes,0,e.loop)}else if(t.notes){const e=xt(t.notes);if(!e)return;await this.#Ui([e],0,!1)}})()};St(t.event,t=>{this.#o.addEventListener(t,e)})}}async#Ei(){const t=this.#z,e=this.#Fi();for(const t of this.#Ci)this.#Ni(t);this.#zi&&this.#zi.disconnect(),await e.close(),t.audioContext=void 0,this.#z.dispatchEvent(Yn.mute)}#Vi(t){const e=this.#Mi.get(t.source);if(!e)return;const i=this.#z.audioContext;if(!i)return;const s=this.#Ai(i);s.loop=t.loop,s.buffer=e,s.connect(this.#zi??i.destination),s.start()}async#Hi(t,e){if(!this.#zi||this.#z.muted)return;const i=this.#Fi(),s=this.#_i(i);return s.connect(this.#zi),s.type="sine",s.frequency.value=t,s.start(),new Promise(t=>{setTimeout(()=>{this.#Ni(s),t()},e)})}#Gi(){if(this.#z.muted)return;const t=this.#Fi(),e=t.createGain();e.connect(t.destination),e.gain.value=0;const i=t.createOscillator();i.connect(e),i.type="sine",i.frequency.value=1,i.start(),setTimeout(()=>{i.stop(),i.disconnect(),e.disconnect()})}async#Ui(t,e,i){if(this.#z.muted)return;const s=t[e];if(!s)return;const n=St(s.value,async(i,s)=>this.#$i(t,e,s));await(U(n)?Promise.allSettled(n):n);let o=e+1;i&&o>=t.length&&(o%=t.length),await this.#Ui(t,o,i)}async#$i(t,e,i){const s=t[e];if(!s)return;const o=Ot(s.value,i,!0);if(o)try{const t=gn(o);if(!T(t))return;await this.#Hi(t,s.duration)}catch(t){n().error(t)}}#Ni(t){t.stop(),t.disconnect();this.#Ci.splice(this.#Ci.indexOf(t),1)}#ji(){const t=this.#z.actualOptions.sounds;if(!t)return;const e=this.#Fi(),i=e.createGain();i.connect(e.destination),i.gain.value=t.volume.value/h,this.#zi=i,this.#Bi(),this.#z.dispatchEvent(Yn.unmute)}#Li(){const t=this.#z,e=t.actualOptions.sounds;if(!e?.enable||!e.icons.enable)return;const i=this.#ki,s=this.#Si;i&&(i.style.display=t.muted?"block":"none"),s&&(s.style.display=t.muted?"none":"block")}async#Ri(){const t=this.#z,e=this.#Fi();t.muted?(await e.suspend(),await this.#Ei()):(await e.resume(),this.#ji(),this.#Gi())}async#Ti(){const t=this.#z,e=t.actualOptions.sounds;if(!e?.enable)return;Y(this.#Oi,e.volume.min,e.volume.max);let i=!1;this.#Oi<=0&&!t.muted?(this.#Oi=0,t.muted=!0,i=!0):this.#Oi>0&&t.muted&&(t.muted=!1,i=!0),i&&(this.#Li(),await this.#Ri()),this.#zi?.gain&&(this.#zi.gain.value=this.#Oi/h)}}});function eo(t,e,i,s){(t.paint??=new Ae).fill={color:ve.create(void 0,{value:e}),enable:s,opacity:i}}function io(t,e,i,s){(t.paint??=new Ae).stroke={color:ve.create(void 0,{value:e}),opacity:i,width:s}}var so=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#z;#qi;#Wi;#Xi;#ei;#Yi;#Qi;#Zi;#Ki;#Ji;#wt;#ts;#ui;#k;#es=!1;#is;#At;#ss;#ns;#os;#as;constructor(e,i,s,n,o){this.#k=e,this.#z=i,this.#is=s,this.#qi=0,this.#Wi=0,this.#Xi=0,this.#Ki=o,n instanceof Ls?this.options=n:(this.options=new Ls,this.options.load(n)),this.#os=i.retina.reduceFactor?K(this.options.life.delay??0)*p/i.retina.reduceFactor:1/0,this.position=this.#Ki??this.#Kt(),this.name=this.options.name,this.fill=this.options.fill,this.#Qi=!this.options.life.wait,this.#as=!1;const a=kt({},this.options.particles);a.move??={},a.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=ai(this.#k,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=ai(this.#k,this.options.spawn.stroke.color));const r=this.options.spawn.fill,l=this.options.spawn.stroke;if(this.spawnFillOpacity=void 0===r?.opacity?1:K(r.opacity),this.spawnStrokeOpacity=void 0===l?.opacity?1:K(l.opacity),this.spawnStrokeWidth=void 0===l?.width?1:K(l.width),this.#ui=!this.options.autoPlay,this.#ts=a,this.#ns=this.#rs(),this.size=this.#ns.mode===t.PixelMode.percent?{width:this.#ns.width/h*this.#z.canvas.size.width,height:this.#ns.height/h*this.#z.canvas.size.height}:{width:this.#ns.width,height:this.#ns.height},this.#Ji=this.options.life.count??-1,this.#Zi=this.#Ji<=0,this.options.domId){const t=vt().getElementById(this.options.domId);t&&(this.#wt=new MutationObserver(()=>{this.resize()}),this.#At=new ResizeObserver(()=>{this.resize()}),this.#wt.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#At.observe(t))}const c=this.options.shape,d=this.#k.emitterShapeManager?.getShapeGenerator(c.type);d&&(this.#ss=d.generate(this.#z,this.position,this.size,this.fill,c.options)),this.#z.dispatchEvent("emitterCreated",{emitter:this}),this.play()}draw(t){if(!this.options.draw||!this.#ss)return;const e=this.#z,i=this.options.spawn.fill?.enable??!0;t.save(),t.beginPath(),i&&(t.fillStyle=this.spawnFillColor?gi(this.spawnFillColor,e.hdr,this.spawnFillOpacity??1,e.peakNits,e.hdrMode):fi({r:0,g:0,b:0},e.hdr,1,e.peakNits,e.hdrMode)),this.spawnStrokeColor&&(t.strokeStyle=gi(this.spawnStrokeColor,e.hdr,this.spawnStrokeOpacity??1,e.peakNits,e.hdrMode),t.lineWidth=this.spawnStrokeWidth??1),this.#ss.draw?.(t),i&&t.fill(),this.spawnStrokeColor&&t.stroke(),t.restore()}externalPause(){this.#ui=!0,this.pause()}externalPlay(){this.#ui=!1,this.play()}async init(){await(this.#ss?.init())}pause(){this.#ui||(this.#Yi=void 0)}play(){if(this.#ui)return;if(!(this.#Ji>0||this.#Zi)&&this.options.life.count||!(this.#Qi||this.#Xi>=(this.#os??0)))return;const t=this.#z;if(void 0===this.#Yi){const e=K(this.options.rate.delay);this.#Yi=t.retina.reduceFactor?e*p/t.retina.reduceFactor:1/0}(this.#Ji>0||this.#Zi)&&this.#ls()}resize(){const e=this.#z;if(!this.#es){const t=this.#Ki;this.position=t&&Mt(t,e.canvas.size,E.origin)?t:this.#Kt()}this.#ns=this.#rs(),this.size=this.#ns.mode===t.PixelMode.percent?{width:this.#ns.width/h*e.canvas.size.width,height:this.#ns.height/h*e.canvas.size.height}:{width:this.#ns.width,height:this.#ns.height},this.#ss?.resize(this.position,this.size)}setPosition(t){this.#es=!0,this.position={...t},this.#ss?.resize(this.position,this.size)}update(t){if(this.#ui)return;const e=this.#z;this.#Qi&&(this.#Qi=!1,this.#Xi=this.#os??0,this.#Wi=this.#Yi??0),this.#as||(this.#as=!0,this.#cs(this.options.startCount)),void 0!==this.#ei&&(this.#qi+=t.value,this.#qi>=this.#ei&&(this.pause(),void 0!==this.#os&&(this.#os=void 0),this.#Zi||this.#Ji--,this.#Ji>0||this.#Zi?(this.#es||(this.position=this.#Kt(),this.#ss?.resize(this.position,this.size)),this.#os=e.retina.reduceFactor?K(this.options.life.delay??0)*p/e.retina.reduceFactor:1/0):this.#ds(),this.#qi-=this.#ei,this.#ei=void 0)),void 0!==this.#os&&(this.#Xi+=t.value,this.#Xi>=this.#os&&(this.#z.dispatchEvent("emitterPlay"),this.play(),this.#Xi-=this.#os,this.#os=void 0)),void 0!==this.#Yi&&(this.#Wi+=t.value,this.#Wi>=this.#Yi&&(this.#hs(),this.#Wi-=this.#Yi))}#Kt(){const t=this.#z;if(this.options.domId){const e=vt().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*u)*s,y:(i.y+i.height*u)*s}}}return dt({size:t.canvas.size,position:this.options.position})}#rs(){const e=this.#z;if(this.options.domId){const i=vt().getElementById(this.options.domId);if(i){const s=i.getBoundingClientRect();return{width:s.width*e.retina.pixelRatio,height:s.height*e.retina.pixelRatio,mode:t.PixelMode.precise}}}return this.options.size??(()=>{const e=new Fs;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#ds(){this.#wt?.disconnect(),this.#wt=void 0,this.#At?.disconnect(),this.#At=void 0,this.#is(this),this.#z.dispatchEvent("emitterDestroyed",{emitter:this})}#hs(){if(this.#ui)return;const t=K(this.options.rate.quantity);this.#cs(t)}#cs(t){const e=Ot(this.#ts)??{},i=this.options.spawn.fill?.color?.animation,s=this.options.spawn.fill?.enable??!!this.options.spawn.fill?.color,n=void 0===this.options.spawn.fill?.opacity?1:K(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:K(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:K(this.options.spawn.stroke.width),l=this.#z.retina.reduceFactor,c=!!i,d=!!o,h=!!this.#ss,u=c||d,p=u||h,f=u?{h:M,s:C,l:z}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?kt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#us(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#us(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#us(i.l,this.spawnFillColor.l,f.l)),eo(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this.#us(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#us(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#us(o.l,this.spawnStrokeColor.l,f.l)),io(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#ss){const e=this.#ss.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&eo(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#z.particles.addParticle(l,t)}}#ls(){if(this.#ui)return;const t=void 0!==this.options.life.duration?K(this.options.life.duration):void 0;(this.#Ji>0||this.#Zi)&&void 0!==t&&t>0&&(this.#ei=t*p)}#us(t,e,i,s=1){const n=this.#z;if(!t.enable)return e;const o=Z(t.offset),a=K(this.options.rate.delay),r=n.retina.reduceFactor?a*p/n.retina.reduceFactor:1/0;return(e+K(t.speed)*n.fpsLimit/r+o*s)%i}}});t.AnimatableColor=ve,t.AnimationOptions=pe,t.AnimationValueWithRandom=De,t.Background=we,t.BaseRange=se,t.Circle=ne,t.ColorAnimation=ge,t.ErrorCodes=pt,t.Fill=Ce,t.FullScreen=be,t.HDROptions=Pe,t.HslAnimation=me,t.Move=Re,t.MoveAngle=ze,t.MoveCenter=ke,t.MoveGravity=Se,t.MovePath=Fe,t.OptionLoader=he,t.Options=qe,t.OptionsColor=ye,t.OutModes=Ee,t.Paint=Ae,t.ParticlesBounce=Be,t.ParticlesBounceFactor=_e,t.ParticlesDensity=Ve,t.ParticlesNumber=Ne,t.ParticlesNumberLimit=Ue,t.ParticlesOptions=$e,t.RangedAnimationOptions=fe,t.RangedAnimationValueWithRandom=Ie,t.Rectangle=oe,t.ResizeEvent=xe,t.Shape=He,t.Spin=Le,t.Stroke=Te,t.ValueWithRandom=Oe,t.Vector=E,t.Vector3d=F,t.ZIndex=Ge,t.addErrorMessages=function(t){},t.alterHsl=xi,t.animate=W,t.areBoundsInside=Ct,t.calcExactPositionOrRandomFromSize=ht,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=ct,t.calcPositionOrRandomFromSizeRanged=dt,t.calculateBounds=zt,t.cancelAnimation=X,t.canvasFirstIndex=0,t.canvasTag=P,t.checkDistance=nt,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],a=o.x-n.x,r=o.y-n.y;if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,d=e.mass,h=t.velocity.rotate(l),u=e.velocity.rotate(l),p=lt(h,u,c,d),f=lt(u,h,c,d),g=p.rotate(-l),m=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=m.x*e.factor.x,e.velocity.y=m.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:E.create(K(t.options.bounce.horizontal.value),K(t.options.bounce.vertical.value))}},t.clamp=Y,t.cloneStyle=It,t.collisionVelocity=lt,t.colorMix=mi,t.colorToRgb=oi,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=g,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=ot,t.deleteCount=1,t.double=2,t.doublePI=v,t.empty=0,t.executeOnSingleOrMultiple=St,t.fireworks=Cn,t.fullPercent=r,t.generatedAttribute=a,t.generatedFalse=b,t.generatedTrue=w,t.getCanvasFromContainer=Bt,t.getDataFromUrl=_t,t.getDistance=st,t.getDistanceSq=it,t.getDistances=function(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}},t.getDomContainer=Vt,t.getErrorMessage=ft,t.getFullScreenStyle=Lt,t.getHslAnimationFromHsl=vi,t.getHslFromAnimation=yi,t.getItemMapFromInitializer=At,t.getItemsFromInitializer=Tt,t.getLinkColor=function(t,e,i,s){if(i===m)return pi();if(i!==y)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return mi(i,n,t.getRadius(),e.getRadius(),s);{const t=i??n;if(t)return di(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=R(e)?e:e.value;return n===m?s?ni(t,{value:n}):i?m:y:n===y?y:ni(t,{value:n})},t.getLogger=n,t.getParticleBaseVelocity=rt,t.getParticleDirectionAngle=at,t.getPosition=Dt,t.getRandom=j,t.getRandomFn=function(){return G},t.getRandomInRange=q,t.getRandomRgbColor=pi,t.getRangeMax=tt,t.getRangeMin=J,t.getRangeValue=K,t.getStyleFromHsl=gi,t.getStyleFromRgb=fi,t.hMax=M,t.hMin=0,t.hPhase=60,t.half=u,t.hslToRgb=di,t.hslToRgbFloat=hi,t.hslaToRgba=ui,t.hypot=function(t,e){return Math.sqrt(t*t+e*e)},t.identity=1,t.inverseFactorNumerator=1,t.isArray=U,t.isBoolean=L,t.isEnumValue=_,t.isFunction=A,t.isInArray=Pt,t.isNull=N,t.isNumber=T,t.isObject=V,t.isPointInside=Mt,t.isString=R,t.itemFromArray=xt,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,o=Object.hasOwn(n,s)?n[s]:{};n[s]=kt(o,i)}},t.loadLazyProperty=ce,t.loadMinIndex=0,t.loadNestedProperty=le,t.loadOptionProperty=de,t.loadOptions=ue,t.loadParticlesOptions=je,t.loadProperty=ae,t.loadRandomFactor=O,t.loadRangeProperty=re,t.manageListener=Rt,t.maxNits=D,t.midColorValue=y,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=Q,t.none=0,t.one=1,t.originPoint=f,t.parseAlpha=ut,t.percentDenominator=h,t.phaseNumerator=1,t.quarter=k,t.randomColorValue=m,t.randomInRangeValue=Z,t.rangeColorToHsl=ai,t.rangeColorToRgb=ni,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=c,t.rgbMax=x,t.rgbToHsl=ri,t.sMax=C,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=vt,t.safeMatchMedia=wt,t.safeMutationObserver=bt,t.setAnimationFunctions=function(t,e){$.nextFrame=t,$.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){G=t},t.setRangeValue=et,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=B,t.triple=3,t.tryCountIncrement=1,t.tsParticles=Mi,t.updateColor=Pi,t.updateColorValue=bi,t.visibilityChangeEvent=d,t.zIndexFactorOffset=1}(t.__tsParticlesInternals.bundles.fireworks=t.__tsParticlesInternals.bundles.fireworks||{})}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:self),Object.assign(globalThis.window||globalThis,{fireworks:(globalThis.__tsParticlesInternals.bundles.fireworks||{}).fireworks});