@tsparticles/ribbons 4.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +83 -0
- package/browser/IRibbonsOptions.js +1 -0
- package/browser/RibbonsOptions.js +138 -0
- package/browser/RibbonsParams.js +1 -0
- package/browser/browser.js +4 -0
- package/browser/bundle.js +5 -0
- package/browser/index.js +1 -0
- package/browser/index.lazy.js +1 -0
- package/browser/package.json +1 -0
- package/browser/ribbons.js +79 -0
- package/browser/ribbons.lazy.js +80 -0
- package/browser/types.js +1 -0
- package/browser/utils.js +195 -0
- package/cjs/IRibbonsOptions.js +1 -0
- package/cjs/RibbonsOptions.js +138 -0
- package/cjs/RibbonsParams.js +1 -0
- package/cjs/browser.js +4 -0
- package/cjs/bundle.js +5 -0
- package/cjs/index.js +1 -0
- package/cjs/index.lazy.js +1 -0
- package/cjs/package.json +1 -0
- package/cjs/ribbons.js +79 -0
- package/cjs/ribbons.lazy.js +80 -0
- package/cjs/types.js +1 -0
- package/cjs/utils.js +195 -0
- package/esm/IRibbonsOptions.js +1 -0
- package/esm/RibbonsOptions.js +138 -0
- package/esm/RibbonsParams.js +1 -0
- package/esm/browser.js +4 -0
- package/esm/bundle.js +5 -0
- package/esm/index.js +1 -0
- package/esm/index.lazy.js +1 -0
- package/esm/package.json +1 -0
- package/esm/ribbons.js +79 -0
- package/esm/ribbons.lazy.js +80 -0
- package/esm/types.js +1 -0
- package/esm/utils.js +195 -0
- package/package.json +88 -0
- package/report.html +4950 -0
- package/tsparticles.ribbons.bundle.js +8433 -0
- package/tsparticles.ribbons.bundle.min.js +1 -0
- package/tsparticles.ribbons.js +424 -0
- package/tsparticles.ribbons.min.js +1 -0
- package/types/IRibbonsOptions.d.ts +17 -0
- package/types/RibbonsOptions.d.ts +22 -0
- package/types/RibbonsParams.d.ts +7 -0
- package/types/browser.d.ts +1 -0
- package/types/bundle.d.ts +2 -0
- package/types/index.d.ts +5 -0
- package/types/index.lazy.d.ts +5 -0
- package/types/ribbons.d.ts +16 -0
- package/types/ribbons.lazy.d.ts +16 -0
- package/types/types.d.ts +4 -0
- package/types/utils.d.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.ribbons=t.__tsParticlesInternals.bundles.ribbons||{}))}(this,function(t){"use strict";const e="generated",i="source-over",s="resize",n="visibilitychange",o=100,a=.5,r=1e3,l={x:0,y:0,z:0},c={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",f="false",g="canvas",y=255,m=360,v=100,b=100,w=.25,P=.75;var x;function M(t){return"z"in t?t.z:l.z}t.MoveDirection=void 0,(x=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",x.bottomLeft="bottom-left",x.bottomRight="bottom-right",x.left="left",x.none="none",x.right="right",x.top="top",x.topLeft="top-left",x.topRight="top-right",x.outside="outside",x.inside="inside";class z{x;y;z;constructor(t=l.x,e=l.y,i=l.z){this.x=t,this.y=e,this.z=i}static get origin(){return z.create(l.x,l.y,l.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return z.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new z(t,e??l.y,i??l.z):new z(t.x,t.y,M(t))}add(t){return z.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return z.clone(this)}div(t){return z.create(this.x/t,this.y/t,this.z/t)}divTo(t){this.x/=t,this.y/=t,this.z/=t}getLengthSq(){return this.x**2+this.y**2}mult(t){return z.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return z.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),l.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return z.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class S extends z{constructor(t=l.x,e=l.y){super(t,e,l.z)}static get origin(){return S.create(l.x,l.y)}static clone(t){return S.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new S(t,e??l.y):new S(t.x,t.y)}}function O(t){return"boolean"==typeof t}function C(t){return"string"==typeof t}function I(t){return"number"==typeof t}function D(t){return"object"==typeof t&&null!==t}function k(t){return Array.isArray(t)}function T(t){return null==t}const _=Math.PI/180;let R=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function F(){return V(R(),0,1-Number.EPSILON)}function A(t,e){return F()*(e-t)+t}function L(t){return E.nextFrame(t)}function B(t){E.cancel(t)}function V(t,e,i){return Math.min(Math.max(t,e),i)}function U(t,e,i,s){return Math.floor((t*i+e*s)/(i+s))}function N(t){const e=H(t);let i=q(t);return e===i&&(i=0),A(i,e)}function G(t){return I(t)?t:N(t)}function q(t){return I(t)?t:t.min}function H(t){return I(t)?t:t.max}function $(t,e){if(t===e||void 0===e&&I(t))return t;const i=q(t),s=H(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(s,e)}:$(i,s)}function W(t,e){const i=t.x-e.x,s=t.y-e.y;return{dx:i,dy:s,distance:Math.hypot(i,s)}}function j(t,e){const i=t.x-e.x,s=t.y-e.y;return i*i+s*s}function Q(t,e){return Math.sqrt(j(t,e))}function Y(t,e,i){return j(t,e)<=i*i}function X(t){return t*_}function Z(e,i,s){if(I(e))return X(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*w;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*w;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*P;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*P;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 F()*u}}function J(t){const e=S.origin;return e.length=1,e.angle=t,e}function K(t,e,i,s){return S.create(t.x*(i-s)/(i+s)+2*e.x*s/(i+s),t.y)}function tt(t){return{x:(t.position?.x??F()*o)*t.size.width/o,y:(t.position?.y??F()*o)*t.size.height/o}}function et(t){const e={x:void 0!==t.position?.x?G(t.position.x):void 0,y:void 0!==t.position?.y?G(t.position.y):void 0};return tt({size:t.size,position:e})}function it(t){const{position:e,size:i}=t;return{x:e?.x??F()*i.width,y:e?.y??F()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var nt,ot,at,rt,lt,ct;t.AnimationMode=void 0,(nt=t.AnimationMode||(t.AnimationMode={})).auto="auto",nt.increase="increase",nt.decrease="decrease",nt.random="random",t.AnimationStatus=void 0,(ot=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",ot.decreasing="decreasing",t.DestroyType=void 0,(at=t.DestroyType||(t.DestroyType={})).none="none",at.max="max",at.min="min",t.OutModeDirection=void 0,(rt=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",rt.left="left",rt.right="right",rt.top="top",t.PixelMode=void 0,(lt=t.PixelMode||(t.PixelMode={})).precise="precise",lt.percent="percent",t.StartValueType=void 0,(ct=t.StartValueType||(t.StartValueType={})).max="max",ct.min="min",ct.random="random";function ht(t,e){const i=new Map,s=e?.maxSize,n=e?.ttlMs,o=e?.keyFn,a=(t,e=new WeakSet)=>{if(null===t)return"null";const i=typeof t;if("undefined"===i)return"undefined";if("number"===i||"boolean"===i||"string"===i)return JSON.stringify(t);if("function"===i)try{return t.toString()}catch{return'"[Function]"'}if("symbol"===i)try{return t.toString()}catch{return'"[Symbol]"'}if(Array.isArray(t))return`[${t.map(t=>a(t,e)).join(",")}]`;if(e.has(t))return'"[Circular]"';e.add(t);return`{${Object.keys(t).sort().map(i=>`${JSON.stringify(i)}:${a(t[i],e)}`).join(",")}}`},r=t=>o?o(t):(t=>a(t))(t);return(...e)=>{const o=r(e),a=Date.now(),l=i.get(o);if(void 0!==l){if(!(n&&a-l.ts>n))return i.delete(o),i.set(o,{value:l.value,ts:l.ts}),l.value;i.delete(o)}const c=t(...e);return i.set(o,{value:c,ts:a}),(()=>{if("number"==typeof s&&s>=0)for(;i.size>s;){const t=i.keys().next().value;if(void 0===t)break;i.delete(t)}})(),c}}function dt(){return"undefined"!=typeof matchMedia}function ut(){return globalThis.document}function pt(t){if(dt())return matchMedia(t)}function ft(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function gt(t,e){return t===e||k(e)&&e.includes(t)}function yt(t){return Math.floor(F()*t.length)}function mt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:yt(t)]}function vt(t,e,i,s,n){return bt(wt(t,s??0),e,i,n)}function bt(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 wt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function Pt(t,...e){for(const i of e){if(T(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),s=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const n=i,o=t;for(const t of e)if(!s.has(t)&&t in n){const e=n[t];void 0!==e&&(o[t]=e)}continue}for(const n of e){if(s.has(n))continue;const e=t,o=i[n];e[n]=Array.isArray(o)?o.map(t=>Pt(void 0,t)):Pt(e[n],o)}}return t}function xt(t,e){return k(t)?t.map((t,i)=>e(t,i)):e(t,0)}function Mt(t,e,i){return k(t)?mt(t,e,i):t}function zt(e,i){const s=e.value,n=e.animation,o={delayTime:G(n.delay)*r,enable:n.enable,value:G(e.value)*i,max:H(s)*i,min:q(s)*i,loops:0,maxLoops:G(n.count),time:0};if(n.enable){switch(o.decay=1-G(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=F()>=a?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=N(o),e&&(o.status=F()>=a?t.AnimationStatus.increasing:t.AnimationStatus.decreasing)}}return o.initialValue=o.value,o}function St(e,i){if(!(e.mode===t.PixelMode.percent)){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}function Ot(t,e){return St(t,e)}function Ct(t,e){return St(t,e)}function It(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;if(i.time??=0,(i.delayTime??0)>0&&i.time<(i.delayTime??0)&&(i.time+=o.value),!((i.delayTime??0)>0&&i.time<(i.delayTime??0))){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=V(i.value,r,l))}}function Dt(t){const e=ut().createElement("div").style;for(const i in t){const s=t[i];if(!(i in t)||T(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}const kt=ht(function(t){const e=ut().createElement("div").style,i={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(10),"z-index":t.toString(10),top:"0",left:"0","pointer-events":"none"};for(const t in i){const s=i[t];void 0!==s&&e.setProperty(t,s)}return e});function Tt(t,e,i,s,n){if(s){let s={passive:!0};O(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 _t(t,e,i,s=!1){let n=e.get(t);return n&&!s||(n=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,n)),n}async function Rt(t,e,i,s=!1){let n=e.get(t);if(!n||s){const s=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));n=new Map(s),e.set(t,n)}return n}class Et{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const s=i.length,n=i.indexOf(e);n<0||(1===s?this.#e.delete(t):i.splice(n,1))}}var Ft;t.EventType=void 0,(Ft=t.EventType||(t.EventType={})).configAdded="configAdded",Ft.containerInit="containerInit",Ft.particlesSetup="particlesSetup",Ft.containerStarted="containerStarted",Ft.containerStopped="containerStopped",Ft.containerDestroyed="containerDestroyed",Ft.containerPaused="containerPaused",Ft.containerPlay="containerPlay",Ft.containerBuilt="containerBuilt",Ft.particleAdded="particleAdded",Ft.particleDestroyed="particleDestroyed",Ft.particleRemoved="particleRemoved";class At{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#s=new Map;#n;#o=new Set;#a=!1;#r=!1;#l=new Set;constructor(t){this.#n=t}get configs(){const t={};for(const[e,i]of this.#s)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#s.set(i,e),this.#n.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Rt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Rt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return _t(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#l);try{for(const t of this.#i)await this.#c(t,this.#o,this.#i)}finally{this.#l.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const s=this.updaters.get(t);s&&s.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#c(e,this.#o,this.#i):this.#l.add(e)}async#c(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#n))}}const Lt=t=>(...e)=>{t(...e)},Bt={debug:Lt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Lt(console.info),log:Lt(console.log),trace:Lt(console.trace),verbose:Lt(console.log),warning:Lt(console.warn)};function Vt(){return Bt}const Ut="100%";class Nt{pluginManager=new At(this);#h=[];#d=new Et;#a=!1;get items(){return this.#h}get version(){return"4.0.5"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:s}=await Promise.resolve().then(function(){return nn}),n=t.id??i?.id??`tsparticles${Math.floor(1e4*F()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=Mt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(Vt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,l=Mt(r,o),{items:c}=this,h=c.findIndex(t=>t.id.description===n),d=new s({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:n,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:l});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),c.splice(h,e,d)}else c.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=ut();let s;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===g)s=t,s.dataset[e]??=f,s.dataset[e]===p&&(s.style.width||=Ut,s.style.height||=Ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none"));else{const n=t.getElementsByTagName(g).item(0);n?(s=n,s.dataset[e]=f):(s=i.createElement(g),s.dataset[e]=p,t.appendChild(s)),s.style.width||=Ut,s.style.height||=Ut,s.style.pointerEvents="none",s.style.setProperty("pointer-events","none")}return s})(((t,i)=>{const s=ut();let n=i??s.getElementById(t);return n||(n=s.createElement("canvas"),n.id=t,n.dataset[e]=p,s.body.append(n),n)})(n,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Gt,qt,Ht,$t,Wt,jt,Qt,Yt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Gt||(Gt={}));class Xt{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 Zt extends Xt{radius;constructor(t,e,i){super(t,e,Gt.circle),this.radius=i}contains(t){return Y(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,s=this.radius,n=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Zt||t.type===Gt.circle){return s+t.radius>Math.hypot(n,o)}if(t instanceof Jt||t.type===Gt.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(n-i,2)+Math.pow(o-a,2)<=s**2||n<=s+i&&o<=s+a||n<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Jt extends Xt{size;constructor(t,e,i,s){super(t,e,Gt.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 Zt)return t.intersects(this);if(!(t instanceof Jt))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}}t.RotateDirection=void 0,(qt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",qt.counterClockwise="counter-clockwise",qt.random="random",t.LimitMode=void 0,(Ht=t.LimitMode||(t.LimitMode={})).delete="delete",Ht.wait="wait",t.OutMode=void 0,($t=t.OutMode||(t.OutMode={})).bounce="bounce",$t.none="none",$t.out="out",$t.destroy="destroy",$t.split="split",t.AlterType=void 0,(Wt=t.AlterType||(t.AlterType={})).darken="darken",Wt.enlighten="enlighten",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,(Qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",Qt.inside="inside",Qt.outside="outside",t.EasingType=void 0,(Yt=t.EasingType||(t.EasingType={})).easeInBack="ease-in-back",Yt.easeInBounce="ease-in-bounce",Yt.easeInCirc="ease-in-circ",Yt.easeInCubic="ease-in-cubic",Yt.easeInElastic="ease-in-elastic",Yt.easeInExpo="ease-in-expo",Yt.easeInGaussian="ease-in-gaussian",Yt.easeInLinear="ease-in-linear",Yt.easeInQuad="ease-in-quad",Yt.easeInQuart="ease-in-quart",Yt.easeInQuint="ease-in-quint",Yt.easeInSigmoid="ease-in-sigmoid",Yt.easeInSine="ease-in-sine",Yt.easeInSmoothstep="ease-in-smoothstep",Yt.easeOutBack="ease-out-back",Yt.easeOutBounce="ease-out-bounce",Yt.easeOutCirc="ease-out-circ",Yt.easeOutCubic="ease-out-cubic",Yt.easeOutElastic="ease-out-elastic",Yt.easeOutExpo="ease-out-expo",Yt.easeOutGaussian="ease-out-gaussian",Yt.easeOutLinear="ease-out-linear",Yt.easeOutQuad="ease-out-quad",Yt.easeOutQuart="ease-out-quart",Yt.easeOutQuint="ease-out-quint",Yt.easeOutSigmoid="ease-out-sigmoid",Yt.easeOutSine="ease-out-sine",Yt.easeOutSmoothstep="ease-out-smoothstep",Yt.easeInOutBack="ease-in-out-back",Yt.easeInOutBounce="ease-in-out-bounce",Yt.easeInOutCirc="ease-in-out-circ",Yt.easeInOutCubic="ease-in-out-cubic",Yt.easeInOutElastic="ease-in-out-elastic",Yt.easeInOutExpo="ease-in-out-expo",Yt.easeInOutGaussian="ease-in-out-gaussian",Yt.easeInOutLinear="ease-in-out-linear",Yt.easeInOutQuad="ease-in-out-quad",Yt.easeInOutQuart="ease-in-out-quart",Yt.easeInOutQuint="ease-in-out-quint",Yt.easeInOutSigmoid="ease-in-out-sigmoid",Yt.easeInOutSine="ease-in-out-sine",Yt.easeInOutSmoothstep="ease-in-out-smoothstep";class Kt{count;decay;delay;enable;speed;sync;constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.delay=0,this.sync=!1}load(t){T(t)||(void 0!==t.count&&(this.count=$(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=$(t.speed)),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.sync&&(this.sync=t.sync))}}class te extends Kt{mode;startValue;constructor(){super(),this.mode=t.AnimationMode.auto,this.startValue=t.StartValueType.random}load(t){super.load(t),T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class ee extends Kt{max;min;offset;constructor(t,e){super(),this.min=t,this.max=e,this.offset=0,this.sync=!0}load(t){super.load(t),T(t)||(void 0!==t.max&&(this.max=t.max),void 0!==t.min&&(this.min=t.min),void 0!==t.offset&&(this.offset=$(t.offset)))}}class ie{h=new ee(0,m);l=new ee(0,b);s=new ee(0,v);load(t){T(t)||(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class se{value;constructor(){this.value=""}static create(t,e){const i=new se;return i.load(t),void 0!==e&&(C(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){T(t)||T(t.value)||(this.value=t.value)}}class ne extends se{animation;constructor(){super(),this.animation=new ie}static create(t,e){const i=new ne;return i.load(t),void 0!==e&&(C(e)||k(e)?i.load({value:e}):i.load(e)),i}load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class oe{color;image;opacity;position;repeat;size;constructor(){this.color=new se,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=se.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image),void 0!==t.position&&(this.position=t.position),void 0!==t.repeat&&(this.repeat=t.repeat),void 0!==t.size&&(this.size=t.size),void 0!==t.opacity&&(this.opacity=t.opacity))}}class ae{enable;zIndex;constructor(){this.enable=!0,this.zIndex=0}load(t){T(t)||(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class re{delay;enable;constructor(){this.delay=.5,this.enable=!0}load(t){T(t)||(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class le{close;options;type;constructor(){this.close=!0,this.options={},this.type=[]}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class ce{color;enable;opacity;constructor(){this.enable=!0,this.opacity=1}load(t){T(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class he{offset;value;constructor(){this.offset=0,this.value=90}load(t){T(t)||(void 0!==t.offset&&(this.offset=$(t.offset)),void 0!==t.value&&(this.value=$(t.value)))}}class de{mode;radius;x;y;constructor(){this.x=50,this.y=50,this.mode=t.PixelMode.percent,this.radius=0}load(t){T(t)||(void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.radius&&(this.radius=t.radius))}}class ue{acceleration;enable;inverse;maxSpeed;constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=$(t.maxSpeed)))}}class pe{value;constructor(){this.value=0}load(t){T(t)||T(t.value)||(this.value=$(t.value))}}class fe extends pe{animation=new Kt;load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class ge extends fe{animation;constructor(){super(),this.animation=new te}load(t){super.load(t)}}class ye{clamp;delay;enable;generator;options;constructor(){this.clamp=!0,this.delay=new pe,this.enable=!1,this.options={}}load(t){T(t)||(void 0!==t.clamp&&(this.clamp=t.clamp),this.delay.load(t.delay),void 0!==t.enable&&(this.enable=t.enable),this.generator=t.generator,t.options&&(this.options=Pt(this.options,t.options)))}}class me{bottom;default;left;right;top;constructor(){this.default=t.OutMode.out}load(t){T(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 ve{acceleration;enable;position;constructor(){this.acceleration=0,this.enable=!1}load(t){T(t)||(void 0!==t.acceleration&&(this.acceleration=$(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),t.position&&(this.position=Pt({},t.position)))}}class be{angle;center;decay;direction;distance;drift;enable;gravity;outModes;path;random;size;speed;spin;straight;vibrate;warp;constructor(){this.angle=new he,this.center=new de,this.decay=0,this.distance={},this.direction=t.MoveDirection.none,this.drift=0,this.enable=!1,this.gravity=new ue,this.path=new ye,this.outModes=new me,this.random=!1,this.size=!1,this.speed=2,this.spin=new ve,this.straight=!1,this.vibrate=!1,this.warp=!1}load(t){if(T(t))return;this.angle.load(I(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),void 0!==t.decay&&(this.decay=$(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance=I(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),void 0!==t.drift&&(this.drift=$(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=$(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class we{color;opacity;width;constructor(){this.width=0}load(t){T(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.width&&(this.width=$(t.width)),void 0!==t.opacity&&(this.opacity=$(t.opacity)))}}class Pe{color;fill;stroke;load(t){T(t)||(void 0!==t.color&&(this.color=ne.create(this.color,t.color)),void 0!==t.fill&&(this.fill??=new ce,this.fill.load(t.fill)),void 0!==t.stroke&&(this.stroke??=new we,this.stroke.load(t.stroke)))}}class xe extends pe{constructor(){super(),this.value=1}}class Me{horizontal;vertical;constructor(){this.horizontal=new xe,this.vertical=new xe}load(t){T(t)||(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class ze{enable;height;width;constructor(){this.enable=!1,this.width=1920,this.height=1080}load(t){if(T(t))return;void 0!==t.enable&&(this.enable=t.enable);const e=t.width;void 0!==e&&(this.width=e);const i=t.height;void 0!==i&&(this.height=i)}}class Se{mode;value;constructor(){this.mode=t.LimitMode.delete,this.value=0}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class Oe{density;limit;value;constructor(){this.density=new ze,this.limit=new Se,this.value=0}load(t){T(t)||(this.density.load(t.density),this.limit.load(t.limit),void 0!==t.value&&(this.value=t.value))}}class Ce{close;options;type;constructor(){this.close=!0,this.options={},this.type="circle"}load(t){if(T(t))return;const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=Pt(this.options[t]??{},i))}void 0!==t.close&&(this.close=t.close),void 0!==t.type&&(this.type=t.type)}}class Ie extends pe{opacityRate;sizeRate;velocityRate;constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(t),T(t)||(void 0!==t.opacityRate&&(this.opacityRate=t.opacityRate),void 0!==t.sizeRate&&(this.sizeRate=t.sizeRate),void 0!==t.velocityRate&&(this.velocityRate=t.velocityRate))}}class De{bounce;effect;groups;move;number;paint;palette;reduceDuplicates;shape;zIndex;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.bounce=new Me,this.effect=new le,this.groups={},this.move=new be,this.number=new Oe,this.paint=new Pe,this.paint.color=new ne,this.paint.color.value="#fff",this.paint.fill=new ce,this.paint.fill.enable=!0,this.reduceDuplicates=!1,this.shape=new Ce,this.zIndex=new Ie}load(t){if(T(t))return;if(t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=Pt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(k(e)?this.paint=xt(e,t=>{const e=new Pe;return e.load(t),e}):k(this.paint)?(this.paint=new Pe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#f=t=>{const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,s=(k(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 ke(t,...e){for(const i of e)t.load(i)}function Te(t,e,...i){const s=new De(t,e);return ke(s,...i),s}class _e{autoPlay;background;clear;defaultThemes;delay;detectRetina;duration;fpsLimit;fullScreen;hdr;key;name;palette;particles;pauseOnBlur;pauseOnOutsideViewport;preset;resize;smooth;style;zLayers;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.autoPlay=!0,this.background=new oe,this.clear=!0,this.defaultThemes={},this.delay=0,this.fullScreen=new ae,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.hdr=!0,this.particles=Te(this.#p,this.#u),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.resize=new re,this.smooth=!1,this.style={},this.zLayers=100}load(t){if(T(t))return;void 0!==t.preset&&(this.preset=t.preset,xt(this.preset,t=>{this.#g(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#f(this.palette)),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.clear&&(this.clear=t.clear),void 0!==t.key&&(this.key=t.key),void 0!==t.name&&(this.name=t.name),void 0!==t.delay&&(this.delay=$(t.delay));const e=t.detectRetina;void 0!==e&&(this.detectRetina=e),void 0!==t.duration&&(this.duration=$(t.duration));const i=t.fpsLimit;void 0!==i&&(this.fpsLimit=i),void 0!==t.hdr&&(this.hdr=t.hdr),void 0!==t.pauseOnBlur&&(this.pauseOnBlur=t.pauseOnBlur),void 0!==t.pauseOnOutsideViewport&&(this.pauseOnOutsideViewport=t.pauseOnOutsideViewport),void 0!==t.zLayers&&(this.zLayers=t.zLayers),this.background.load(t.background);const s=t.fullScreen;O(s)?this.fullScreen.enable=s:this.fullScreen.load(s),this.particles.load(t.particles),this.resize.load(t.resize),this.style=Pt(this.style,t.style),void 0!==t.smooth&&(this.smooth=t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#f=t=>{const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})};#g=t=>{this.load(this.#p.getPreset(t))}}function Re(t,e,i){t.fillStyle=i??"rgba(0,0,0,0)",t.fillRect(l.x,l.y,e.width,e.height)}function Ee(t,e,i,s){if(!i)return;const n=t.globalAlpha;t.globalAlpha=s,t.drawImage(i,l.x,l.y,e.width,e.height),t.globalAlpha=n}function Fe(t,e){t.clearRect(l.x,l.y,e.width,e.height)}function Ae(t){const{container:e,context:i,particle:s,delta:n,colorStyles:o,radius:a,opacity:r,transform:l}=t,{effectDrawers:c,shapeDrawers:h}=e,d=s.getPosition(),u=s.getTransformData(l),p={x:d.x,y:d.y};i.setTransform(u.a,u.b,u.c,u.d,d.x,d.y),o.fill&&(i.fillStyle=o.fill);const f=!!s.fillEnabled,g=s.strokeWidth??0;i.lineWidth=g,o.stroke&&(i.strokeStyle=o.stroke);const y={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:{...d},drawPosition:p,drawScale:1};for(const t of e.plugins)t.drawParticleTransform?.(y);const m=s.effect?c.get(s.effect):void 0,v=s.shape?h.get(s.shape):void 0;Be(m,y),Ne(v,y),Ve(v,y),Ue(v,y),Le(m,y),i.resetTransform()}function Le(t,e){if(!t?.drawAfter)return;const{particle:i}=e;i.effect&&t.drawAfter(e)}function Be(t,e){if(!t?.drawBefore)return;const{particle:i}=e;i.effect&&t.drawBefore(e)}function Ve(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())}function Ue(t,e){if(!t?.afterDraw)return;const{particle:i}=e;i.shape&&t.afterDraw(e)}function Ne(t,e){if(!t?.beforeDraw)return;const{particle:i}=e;i.shape&&t.beforeDraw(e)}function Ge(t,e,i,s){e.drawParticle&&e.drawParticle(t,i,s)}const qe=new Map;function He(t,e){let i=qe.get(t);if(!i){if(i=e(),qe.size>=1e3){[...qe.keys()].slice(0,500).forEach(t=>qe.delete(t))}qe.set(t,i)}return i}function $e(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function We(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return je(t,n.value,i,s);if(k(n.value)){const e=mt(n.value,i,s);if(!e)return;return We(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(n);if(t)return t}}function je(t,e,i,s=!0){if(!e)return;const n=C(e)?{value:e}:e;if(C(n.value))return n.value===h?Ke():Xe(t,n.value);if(k(n.value)){const e=mt(n.value,i,s);if(!e)return;return je(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(n);if(t)return t}}function Qe(t,e,i,s=!0){const n=We(t,e,i,s);return n?Ye(n):void 0}function Ye(t){const e=t.r/y,i=t.g/y,s=t.b/y,n=Math.max(e,i,s),o=Math.min(e,i,s),r={h:0,l:(n+o)*a,s:0};return n!==o&&(r.s=r.l<a?(n-o)/(n+o):(n-o)/(2-n-o),r.h=e===n?(i-s)/(n-o):i===n?2+(s-e)/(n-o):4+(e-i)/(n-o)),r.l*=b,r.s*=v,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function Xe(t,e){return $e(t,e)}function Ze(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(v,t.s)),s=Math.max(0,Math.min(b,t.l)),n=e/m,o=i/v,r=s/b;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const l=(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},c=r<a?r*(1+o):r+o-r*o,h=2*r-c,d=1/3,u=Math.min(y,y*l(h,c,n+d)),p=Math.min(y,y*l(h,c,n)),f=Math.min(y,y*l(h,c,n-d));return{r:Math.round(u),g:Math.round(p),b:Math.round(f)}}function Je(t){const e=Ze(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ke(t){const e=t??0,i=()=>Math.floor(A(e,256));return{b:i(),g:i(),r:i()}}function ti(t,e,i){const s=i??1;return He(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?ei(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ei(t,e){return`color(display-p3 ${(t.r/y).toString()} ${(t.g/y).toString()} ${(t.b/y).toString()} / ${(e??1).toString()})`}function ii(t,e,i){const s=i??1;return He(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e){return ei(Ze(t),e)}(t,i):function(t,e){return`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${(e??1).toString()})`}(t,i))}function si(t,e,i,s){let n=t,o=e;return"r"in n||(n=Ze(t)),"r"in o||(o=Ze(e)),{b:U(n.b,o.b,i,s),g:U(n.g,o.g,i,s),r:U(n.r,o.r,i,s)}}function ni(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function oi(t,e,i){const s={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:v},l:{enable:!1,value:t.l,min:0,max:b}};return e&&(ai(s.h,e.h,i),ai(s.s,e.s,i),ai(s.l,e.l,i)),s}function ai(e,i,s){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=G(i.speed)/o*s,e.decay=1-G(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=G(i.count),e.time=0,e.delayTime=G(i.delay)*r,i.sync||(e.velocity*=F(),e.value*=F()),e.initialValue=e.value,e.offset=$(i.offset)):e.velocity=0}function ri(e,i,s){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 n=e.offset?N(e.offset):0,o=(e.velocity??0)*s.factor+3.6*n,a=e.decay??1,r=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==a&&(e.velocity*=a),e.value=V(e.value,l,r)}function li(t,e){if(!t)return;const{h:i,s:s,l:n}=t;ri(i,!1,e),ri(s,!0,e),ri(n,!0,e)}function ci(e,i,s){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*s}}const hi=new Nt;class di{enable;mode;constructor(){this.mode="destination-out",this.enable=!1}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.enable&&(this.enable=t.enable))}}class ui{id="blend";async getPlugin(t){const{BlendPluginInstance:e}=await Promise.resolve().then(function(){return on});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 di),s.load(i?.blend)}loadParticlesOptions(t,e,i){e.blend??=new di,e.blend.load(i?.blend)}needsPlugin(t){return!!t?.blend?.enable||!!t?.particles?.blend?.enable}}async function pi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new ui)})}class fi{draw(t){!function(t){const{context:e,particle:i,radius:s}=t;i.circleRange??={min:0,max:u};const n=i.circleRange;e.arc(l.x,l.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=D(s)?{min:X(s.min),max:X(s.max)}:{min:0,max:X(s)}}}async function gi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["circle"],()=>Promise.resolve(new fi))})}var yi;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=4]="a"}(yi||(yi={}));const mi=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,vi=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;class bi{accepts(t){return t.startsWith("#")}handleColor(t){return this.#y(t.value)}handleRangeColor(t){return this.#y(t.value)}parseString(t){return this.#y(t)}#y(t){if("string"!=typeof t||!this.accepts(t))return;const e=t.replace(mi,(t,e,i,s,n)=>e+e+i+i+s+s+(void 0===n?"":n+n)),i=vi.exec(e);return i?{a:i[yi.a]?Number.parseInt(i[yi.a],16)/255:1,b:Number.parseInt(i[yi.b]??"0",16),g:Number.parseInt(i[yi.g]??"0",16),r:Number.parseInt(i[yi.r]??"0",16)}:void 0}}async function wi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hex",new bi)})}var Pi;!function(t){t[t.h=1]="h",t[t.s=2]="s",t[t.l=3]="l",t[t.a=5]="a"}(Pi||(Pi={}));const xi=/hsla?\(\s*(\d+)\s*[\s,]\s*(\d+)%\s*[\s,]\s*(\d+)%\s*([\s,]\s*(0|1|0?\.\d+|(\d{1,3})%)\s*)?\)/i;class Mi{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 Ze(e)}handleRangeColor(t){const e=t.value.hsl??t.value;if("h"in e&&"s"in e&&"l"in e)return Ze({h:G(e.h),l:G(e.l),s:G(e.s)})}parseString(t){if(!this.accepts(t))return;const e=xi.exec(t);return e?Je({a:e.length>4?st(e[Pi.a]):1,h:Number.parseInt(e[Pi.h]??"0",10),l:Number.parseInt(e[Pi.l]??"0",10),s:Number.parseInt(e[Pi.s]??"0",10)}):void 0}}async function zi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("hsl",new Mi)})}class Si{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return rn});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function Oi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Rt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new Si(t.pluginManager))})}class Ci extends te{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=2}load(t){super.load(t),T(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class Ii extends ge{animation;constructor(){super(),this.animation=new Ci,this.value=1}load(t){if(T(t))return;super.load(t);const e=t.animation;void 0!==e&&this.animation.load(e)}}class Di{#u;constructor(t){this.#u=t}init(t){const e=t.options.opacity;if(!e)return;t.opacity=zt(e,1);const i=e.animation;i.enable&&(t.opacity.velocity=G(i.speed)/o*this.#u.retina.reduceFactor,i.sync||(t.opacity.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((t.opacity.maxLoops??0)<=0||(t.opacity.maxLoops??0)>0&&(t.opacity.loops??0)<(t.opacity.maxLoops??0))}loadOptions(t,...e){t.opacity??=new Ii;for(const i of e)t.opacity.load(i?.opacity)}reset(t){t.opacity&&(t.opacity.time=0,t.opacity.loops=0)}update(t,e){this.isEnabled(t)&&t.opacity&&t.options.opacity&&It(t,t.opacity,!0,t.options.opacity.animation.destroy,e)}}async function ki(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("opacity",t=>Promise.resolve(new Di(t)))})}class Ti{modes;#u;#m;constructor(e){this.#u=e,this.modes=[t.OutMode.bounce,t.OutMode.split],this.#m=e.plugins.filter(t=>void 0!==t.particleBounce)}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#u;let a=!1;for(const t of this.#m)if(a=t.particleBounce?.(e,s,i)??!1,a)break;if(a)return;const r=e.getPosition(),l=e.offset,c=e.getRadius(),h=wt(r,c),d=o.canvas.size,u=!e.isInsideCanvasForOutMode(n,i);!function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.left&&e.direction!==t.OutModeDirection.right)return;e.bounds.right<0&&e.direction===t.OutModeDirection.left?e.particle.position.x=e.size+e.offset.x:e.bounds.left>e.canvasSize.width&&e.direction===t.OutModeDirection.right&&(e.particle.position.x=e.canvasSize.width-e.size-e.offset.x);const i=e.particle.velocity.x;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.right&&i>0||e.direction===t.OutModeDirection.left&&i<0)){const t=G(e.particle.options.bounce.horizontal.value);e.particle.velocity.x*=-t,s=!0}if(!s)return;const n=e.offset.x+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.right?e.particle.position.x=e.canvasSize.width-n:e.outOfCanvas&&e.direction===t.OutModeDirection.left&&(e.particle.position.x=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c}),function(e){if(e.outMode!==t.OutMode.bounce&&e.outMode!==t.OutMode.split||e.direction!==t.OutModeDirection.bottom&&e.direction!==t.OutModeDirection.top)return;e.bounds.bottom<0&&e.direction===t.OutModeDirection.top?e.particle.position.y=e.size+e.offset.y:e.bounds.top>e.canvasSize.height&&e.direction===t.OutModeDirection.bottom&&(e.particle.position.y=e.canvasSize.height-e.size-e.offset.y);const i=e.particle.velocity.y;let s=!1;if(e.outOfCanvas&&(e.direction===t.OutModeDirection.bottom&&i>0||e.direction===t.OutModeDirection.top&&i<0)){const t=G(e.particle.options.bounce.vertical.value);e.particle.velocity.y*=-t,s=!0}if(!s)return;const n=e.offset.y+e.size;e.outOfCanvas&&e.direction===t.OutModeDirection.bottom?e.particle.position.y=e.canvasSize.height-n:e.outOfCanvas&&e.direction===t.OutModeDirection.top&&(e.particle.position.y=n),e.outMode===t.OutMode.split&&e.particle.destroy()}({particle:e,outMode:n,direction:i,bounds:h,canvasSize:d,offset:l,outOfCanvas:u,size:c})}}class _i{modes;constructor(e){this.modes=[t.OutMode.destroy]}update(e,i,s,n){if(this.modes.includes(n)){switch(e.outType){case t.ParticleOutType.normal:case t.ParticleOutType.outside:if(e.isInsideCanvasForOutMode(n,i))return;break;case t.ParticleOutType.inside:{const{dx:t,dy:i}=W(e.position,e.moveCenter),{x:s,y:n}=e.velocity;if(s<0&&t>e.moveCenter.radius||n<0&&i>e.moveCenter.radius||s>=0&&t<-e.moveCenter.radius||n>=0&&i<-e.moveCenter.radius)return;break}}e.destroy(!0)}}}class Ri{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.none]}update(e,i,s,n){if(!this.modes.includes(n))return;if((e.options.move.distance.horizontal&&(i===t.OutModeDirection.left||i===t.OutModeDirection.right))??(e.options.move.distance.vertical&&(i===t.OutModeDirection.top||i===t.OutModeDirection.bottom)))return;const o=e.options.move.gravity,a=this.#u,r=a.canvas.size,c=e.getRadius();if(o.enable){const s=e.position;(!o.inverse&&s.y>r.height+c&&i===t.OutModeDirection.bottom||o.inverse&&s.y<-c&&i===t.OutModeDirection.top)&&e.destroy()}else{if(e.velocity.y>0&&e.position.y<=r.height+c||e.velocity.y<0&&e.position.y>=-c||e.velocity.x>0&&e.position.x<=r.width+c||e.velocity.x<0&&e.position.x>=-c)return;vt(e.position,a.canvas.size,l,c,i)||e.destroy()}}}const Ei=S.origin;class Fi{modes;#u;constructor(e){this.#u=e,this.modes=[t.OutMode.out]}update(e,i,s,n){if(!this.modes.includes(n))return;const o=this.#u;switch(e.outType){case t.ParticleOutType.inside:{const{x:t,y:i}=e.velocity;Ei.setTo(l),Ei.length=e.moveCenter.radius,Ei.angle=e.velocity.angle+Math.PI,Ei.addTo(e.moveCenter);const{dx:s,dy:n}=W(e.position,Ei);if(t<=0&&s>=0||i<=0&&n>=0||t>=0&&s<=0||i>=0&&n<=0)return;e.position.x=Math.floor(N({min:0,max:o.canvas.size.width})),e.position.y=Math.floor(N({min:0,max:o.canvas.size.height}));const{dx:a,dy:r}=W(e.position,e.moveCenter);e.direction=Math.atan2(-r,-a),e.velocity.angle=e.direction,e.justWarped=!0;break}default:if(e.isInsideCanvasForOutMode(n,i))return;switch(e.outType){case t.ParticleOutType.outside:{e.position.x=Math.floor(N({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.x,e.position.y=Math.floor(N({min:-e.moveCenter.radius,max:e.moveCenter.radius}))+e.moveCenter.y;const{dx:t,dy:i}=W(e.position,e.moveCenter);e.moveCenter.radius&&(e.direction=Math.atan2(i,t),e.velocity.angle=e.direction),e.justWarped=!0;break}case t.ParticleOutType.normal:{const s=e.options.move.warp,n=o.canvas.size,a={bottom:n.height+e.getRadius()+e.offset.y,left:-e.getRadius()-e.offset.x,right:n.width+e.getRadius()+e.offset.x,top:-e.getRadius()-e.offset.y},r=e.getRadius(),l=wt(e.position,r);i===t.OutModeDirection.right&&l.left>n.width+e.offset.x?(e.position.x=a.left,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0):i===t.OutModeDirection.left&&l.right<-e.offset.x&&(e.position.x=a.right,e.initialPosition.x=e.position.x,s||(e.position.y=F()*n.height,e.initialPosition.y=e.position.y),e.justWarped=!0),i===t.OutModeDirection.bottom&&l.top>n.height+e.offset.y?(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.top,e.initialPosition.y=e.position.y,e.justWarped=!0):i===t.OutModeDirection.top&&l.bottom<-e.offset.y&&(s||(e.position.x=F()*n.width,e.initialPosition.x=e.position.x),e.position.y=a.bottom,e.initialPosition.y=e.position.y,e.justWarped=!0);break}}}}}class Ai{updaters;#u;constructor(t){this.#u=t,this.updaters=new Map}init(e){this.#v(e,t.OutMode.bounce,t=>new Ti(t)),this.#v(e,t.OutMode.out,t=>new Fi(t)),this.#v(e,t.OutMode.destroy,t=>new _i(t)),this.#v(e,t.OutMode.none,t=>new Ri(t))}isEnabled(t){return!t.destroyed&&!t.spawning}update(e,i){const s=e.options.move.outModes;e.justWarped=!1,this.#b(e,i,s.bottom??s.default,t.OutModeDirection.bottom),this.#b(e,i,s.left??s.default,t.OutModeDirection.left),this.#b(e,i,s.right??s.default,t.OutModeDirection.right),this.#b(e,i,s.top??s.default,t.OutModeDirection.top)}#v=(t,e,i)=>{const s=t.options.move.outModes;!this.updaters.has(e)&&((t,e)=>t.default===e||t.bottom===e||t.left===e||t.right===e||t.top===e)(s,e)&&this.updaters.set(e,i(this.#u))};#b=(t,e,i,s)=>{for(const n of this.updaters.values())n.update(t,s,e,i)}}async function Li(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("outModes",t=>Promise.resolve(new Ai(t)))})}class Bi{#u;#p;constructor(t,e){this.#u=e,this.#p=t}init(t){const e=this.#u,i=t.options,s=Mt(i.paint,t.id,i.reduceDuplicates),n=s?.color,o=n??void 0,a=s?.fill,r=s?.stroke;if(a){const i=ne.create(void 0===o?void 0:ne.create(void 0,o),a.color);t.fillEnabled=a.enable,t.fillOpacity=G(a.opacity),t.fillAnimation=i.animation;const s=Qe(this.#p,i);s&&(t.fillColor=oi(s,t.fillAnimation,e.retina.reduceFactor))}else t.fillEnabled=!1,t.fillAnimation=void 0,t.fillColor=void 0,t.fillOpacity=1;if(r){const i=ne.create(void 0===o?void 0:ne.create(void 0,o),r.color);t.strokeWidth=G(r.width)*e.retina.pixelRatio,t.strokeOpacity=G(r.opacity??1),t.strokeAnimation=i.animation;const s=Qe(this.#p,i)??t.getFillColor();s&&(t.strokeColor=oi(s,t.strokeAnimation,e.retina.reduceFactor))}else t.strokeAnimation=void 0,t.strokeColor=void 0,t.strokeOpacity=1,t.strokeWidth=0}isEnabled(t){const{fillAnimation:e,fillColor:i,strokeAnimation:s,strokeColor:n}=t,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)&&(li(t.fillColor,e),li(t.strokeColor,e))}}async function Vi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("paint",e=>Promise.resolve(new Bi(t.pluginManager,e)))})}var Ui;!function(t){t[t.r=1]="r",t[t.g=2]="g",t[t.b=3]="b",t[t.a=5]="a"}(Ui||(Ui={}));const Ni=/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 Gi{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:G(e.r),g:G(e.g),b:G(e.b)}}parseString(t){if(!this.accepts(t))return;const e=Ni.exec(t);return e?{a:e.length>4?st(e[Ui.a]):1,b:parseInt(e[Ui.b]??"0",10),g:parseInt(e[Ui.g]??"0",10),r:parseInt(e[Ui.r]??"0",10)}:void 0}}async function qi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addColorManager("rgb",new Gi)})}class Hi extends te{destroy;constructor(){super(),this.destroy=t.DestroyType.none,this.speed=5}load(t){super.load(t),T(t)||void 0!==t.destroy&&(this.destroy=t.destroy)}}class $i extends ge{animation;constructor(){super(),this.animation=new Hi,this.value=3}load(t){if(super.load(t),T(t))return;const e=t.animation;void 0!==e&&this.animation.load(e)}}class Wi{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.size;if(!i)return;const s=i.animation;s.enable&&(t.size.velocity=t.retina.sizeAnimationSpeed/o*e.retina.reduceFactor,s.sync||(t.size.velocity*=F()))}isEnabled(t){return!t.destroyed&&!t.spawning&&t.size.enable&&((t.size.maxLoops??0)<=0||(t.size.maxLoops??0)>0&&(t.size.loops??0)<(t.size.maxLoops??0))}loadOptions(t,...e){t.size??=new $i;for(const i of e)t.size.load(i?.size)}preInit(t){const e=this.#u.retina.pixelRatio,i=t.options.size;i&&(t.size=zt(i,e),t.retina.sizeAnimationSpeed=G(i.animation.speed)*e)}reset(t){t.size.time=0,t.size.loops=0}update(t,e){this.isEnabled(t)&&t.options.size&&It(t,t.size,!0,t.options.size.animation.destroy,e)}}async function ji(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("size",t=>Promise.resolve(new Wi(t)))})}async function Qi(t){t.checkVersion("4.0.5"),await t.pluginManager.register(async t=>{await Promise.all([pi(t),wi(t),zi(t),qi(t),Oi(t),gi(t),Vi(t),ki(t),Li(t),ji(t)])})}class Yi{count;delay;duration;wait;constructor(){this.wait=!1}load(t){T(t)||(void 0!==t.count&&(this.count=t.count),void 0!==t.delay&&(this.delay=$(t.delay)),void 0!==t.duration&&(this.duration=$(t.duration)),void 0!==t.wait&&(this.wait=t.wait))}}class Xi{delay;quantity;constructor(){this.quantity=1,this.delay=.1}load(t){T(t)||(void 0!==t.quantity&&(this.quantity=$(t.quantity)),void 0!==t.delay&&(this.delay=$(t.delay)))}}class Zi{color;opacity;constructor(){this.color=!1,this.opacity=!1}load(t){T(t)||(void 0!==t.color&&(this.color=t.color),void 0!==t.opacity&&(this.opacity=t.opacity))}}class Ji{options;replace;type;constructor(){this.options={},this.replace=new Zi,this.type="square"}load(t){T(t)||(void 0!==t.options&&(this.options=Pt({},t.options??{})),this.replace.load(t.replace),void 0!==t.type&&(this.type=t.type))}}class Ki{height;mode;width;constructor(){this.mode=t.PixelMode.percent,this.height=0,this.width=0}load(t){T(t)||(void 0!==t.mode&&(this.mode=t.mode),void 0!==t.height&&(this.height=t.height),void 0!==t.width&&(this.width=t.width))}}class ts{fill;stroke;load(t){T(t)||(t.fill&&(this.fill??=new ce,this.fill.load(t.fill)),t.stroke&&(this.stroke??=new we,this.stroke.load(t.stroke)))}}class es{autoPlay;direction;domId;fill;life;name;particles;position;rate;shape;size;spawn;spawnFillColor;spawnStrokeColor;startCount;constructor(){this.autoPlay=!0,this.fill=!0,this.life=new Yi,this.rate=new Xi,this.shape=new Ji,this.spawn=new ts,this.startCount=0}load(t){T(t)||(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(this.size??=new Ki,this.size.load(t.size)),void 0!==t.direction&&(this.direction=t.direction),this.domId=t.domId,void 0!==t.fill&&(this.fill=t.fill),this.life.load(t.life),this.name=t.name,this.particles=xt(t.particles,t=>Pt({},t)),this.rate.load(t.rate),this.shape.load(t.shape),this.spawn.load(t.spawn),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=$(t.position.x)),void 0!==t.position.y&&(this.position.y=$(t.position.y))),void 0!==t.spawnFillColor&&(this.spawnFillColor??=new ne,this.spawnFillColor.load(t.spawnFillColor)),void 0!==t.spawnStrokeColor&&(this.spawnStrokeColor??=new ne,this.spawnStrokeColor.load(t.spawnStrokeColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class is{id="emitters";#w;constructor(t){this.#w=t}async getPlugin(t){const{EmittersPluginInstance:e}=await Promise.resolve().then(function(){return ln});return new e(this.#w,t)}loadOptions(t,e,i){(this.needsPlugin(e)||this.needsPlugin(i))&&i?.emitters&&(e.emitters=xt(i.emitters,t=>{const e=new es;return e.load(t),e}))}needsPlugin(t){if(!t)return!1;const e=t.emitters;return k(e)&&!!e.length||void 0!==e}}const ss=new WeakMap;class ns{fill;options;position;size;constructor(t,e,i,s){this.position=t,this.size=e,this.fill=i,this.options=s}resize(t,e){this.position=t,this.size=e}}var os;async function as(t){t.checkVersion("4.0.5"),await t.pluginManager.register(async t=>{const e=await function(t){const e=t.pluginManager;let i=ss.get(e);return i||(i=Promise.resolve().then(function(){return dn}).then(({EmittersInstancesManager:t})=>new t(e)).catch(t=>{throw ss.delete(e),t}),ss.set(e,i)),i}(t);await async function(t){const{ShapeManager:e}=await Promise.resolve().then(function(){return hn}),i=t.pluginManager;i.emitterShapeManager??=new e,i.addEmitterShapeGenerator??=(t,e)=>{i.emitterShapeManager?.addShapeGenerator(t,e)}}(t),t.pluginManager.addPlugin(new is(e))})}!function(t){t.emitter="emitter"}(os||(os={}));var rs;function ls(t,e){return t+e*(F()-a)}!function(t){t[t.TopLeft=0]="TopLeft",t[t.TopRight=1]="TopRight",t[t.BottomRight=2]="BottomRight",t[t.BottomLeft=3]="BottomLeft"}(rs||(rs={}));class cs extends ns{constructor(t,e,i,s){super(t,e,i,s)}async init(){}randomPosition(){const t=this.fill,e=this.position,i=this.size;if(t)return{position:{x:ls(e.x,i.width),y:ls(e.y,i.height)}};{const t=i.width*a,s=i.height*a,n=function(t){return Math.floor(F()*t)}(4),o=2*(F()-a);switch(n){case rs.TopLeft:return{position:{x:e.x+o*t,y:e.y-s}};case rs.TopRight:return{position:{x:e.x-t,y:e.y+o*s}};case rs.BottomRight:return{position:{x:e.x+o*t,y:e.y+s}};case rs.BottomLeft:default:return{position:{x:e.x+t,y:e.y+o*s}}}}}}class hs{generate(t,e,i,s,n){return new cs(e,i,s,n)}}async function ds(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{!function(t){if(!t.pluginManager.addEmitterShapeGenerator)throw new Error("tsParticles Emitters Plugin is not loaded")}(t),t.pluginManager.addEmitterShapeGenerator?.("square",new hs)})}class us extends pe{sync;constructor(){super(),this.sync=!1}load(t){T(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class ps extends pe{sync;constructor(){super(),this.sync=!1}load(t){T(t)||(super.load(t),void 0!==t.sync&&(this.sync=t.sync))}}class fs{count;delay;duration;constructor(){this.count=0,this.delay=new us,this.duration=new ps}load(t){T(t)||(void 0!==t.count&&(this.count=t.count),this.delay.load(t.delay),this.duration.load(t.duration))}}class gs{#u;constructor(t){this.#u=t}init(t){const e=this.#u,i=t.options.life;if(!i)return;const s=i.delay.sync?1:F(),n=i.duration.sync?1:F();t.life={delay:e.retina.reduceFactor?G(i.delay.value)*s/e.retina.reduceFactor*r:0,delayTime:0,duration:e.retina.reduceFactor?G(i.duration.value)*n/e.retina.reduceFactor*r: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){t.life??=new fs;for(const i of e)t.life.load(i?.life)}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=$(0,i.width),a=$(0,i.width);t.position.x=N(o),t.position.y=N(a),t.spawning=!0,s.delayTime=0,s.time=0,t.reset();const l=t.options.life;l&&(s.delay=G(l.delay.value)*r,s.duration=G(l.duration.value)*r)}(t,e,this.#u.canvas.size)}}async function ys(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addParticleUpdater("life",t=>Promise.resolve(new gs(t)))})}class ms{factor;value;constructor(){this.factor=4,this.value=!0}load(t){T(t)||(void 0!==t.factor&&(this.factor=t.factor),void 0!==t.value&&(this.value=t.value))}}class vs{disable;reduce;constructor(){this.disable=!0,this.reduce=new ms}load(t){T(t)||(void 0!==t.disable&&(this.disable=t.disable),this.reduce.load(t.reduce))}}class bs{id="motion";async getPlugin(t){const{MotionPluginInstance:e}=await Promise.resolve().then(function(){return un});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin())return;let s=e.motion;s?.load||(e.motion=s=new vs),s.load(i?.motion)}needsPlugin(){return!0}}async function ws(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new bs)})}const Ps=.5;function xs(t){return t.ribbonParticleDist??8}function Ms(t){return t.ribbonOscillationSpeed??3}function zs(t){return t.ribbonOscillationDistance??40}function Ss(t){const e=t.shapeData,i=Math.max(4,Math.round(G(e?.count??30))),s=G(e?.particleDist??8),n=G(e?.mass??1),o=G(e?.drag??.05),a=G(e?.velocityInherit??5),r=G(e?.oscillationSpeed??3),l=G(e?.oscillationDistance??40),c=G(e?.angle??45),h=Math.PI/180*c,d=S.create(t.position.x,t.position.y);if(!t.ribbonBounds)return;t.ribbonParticleDist=s,t.ribbonMass=n,t.ribbonDrag=o,t.ribbonVelocityInherit=a,t.ribbonOscillationSpeed=r,t.ribbonOscillationDistance=l,t.ribbonTime=100*F(),t.ribbonOffsets=S.create(Math.cos(h),Math.sin(h)),t.ribbonHead=d,t.ribbonPreviousHead=S.create(d.x,d.y),t.ribbonPreviousPosition=S.create(t.position.x,t.position.y);const u=t.velocity.angle+Math.PI,p=s*Ps;t.ribbonPoints=new Array(i);for(let e=0;e<i;e++){const i=e*s,n=(F()-Ps)*p,o=u+Math.PI*Ps;t.ribbonPoints[e]={force:S.origin,position:S.create(d.x+Math.cos(u)*i+Math.cos(o)*n,d.y+Math.sin(u)*i+Math.sin(o)*n),velocity:S.origin}}}function Os(t){const e=t.ribbonPoints,i=t.ribbonBounds,s=i?.x??0,n=i?.y??0,o=S.create(F()*s,-F()*n);if(i)if(e?.length){t.position.x=o.x,t.position.y=o.y,t.ribbonHead=S.create(o.x,o.y),t.ribbonPreviousHead=S.create(o.x,o.y),t.ribbonPreviousPosition=S.create(o.x,o.y),t.ribbonTime=100*F();for(let i=0;i<e.length;i++){const s=e[i];s&&(s.position=S.create(o.x,o.y-i*xs(t)),s.force=S.origin,s.velocity=S.origin)}}else Ss(t)}function Cs(t,e,i){const s=t.ribbonPoints?.[e];s&&s.force.addTo(i)}function Is(t,e,i){const s=t.ribbonPoints?.[e];if(!s)return;const n=function(t){return t.ribbonMass??1}(t),o=function(t){return t.ribbonDrag??.05}(t),a=S.create(s.force.x,s.force.y),r=s.velocity.length,l=S.create(s.velocity.x,s.velocity.y);l.multTo(o*n*r),a.subFrom(l);const c=a.div(n);s.position.addTo(s.velocity.mult(i)),s.velocity.addTo(c.mult(i)),s.force=S.origin}function Ds(t){const{particle:e,delta:i}=t,s=e.ribbonPoints,n=e.ribbonOffsets,o=e.ribbonBounds;if(!s?.length||!n||!o)return;const a=Math.min(.02,Math.max(i.value/1e3,1e-6)),r=function(t){return t.ribbonHead??=S.create(t.position.x,t.position.y),t.ribbonHead}(e),l=function(t){return t.ribbonPreviousHead??=S.create(t.position.x,t.position.y),t.ribbonPreviousHead}(e),c=function(t){return t.ribbonVelocityInherit??5}(e),h=e.options.move.enable;if(e.ribbonTime=(e.ribbonTime??0)+a*Ms(e),h?(r.x=e.position.x+Math.cos(e.ribbonTime)*zs(e)/Ms(e),r.y=e.position.y):r.x+=Math.cos(e.ribbonTime)*zs(e)*a,e.justWarped){const t=e.velocity.angle+Math.PI,i=xs(e),n=s[0];n&&(n.position=S.create(r.x,r.y),n.velocity=S.origin,n.force=S.origin);for(let e=1;e<s.length;e++){const n=s[e];if(!n)continue;const o=e*i;n.position=S.create(r.x+Math.cos(t)*o,r.y+Math.sin(t)*o),n.velocity=S.origin,n.force=S.origin}}const d=xs(e);if(!Number.isFinite(r.x)||!Number.isFinite(r.y))return void Os(e);const u=s[0];if(!u)return;u.position=S.create(r.x,r.y);const p=l.x-r.x,f=l.y-r.y,g=Math.sqrt(p*p+f*f),y=Math.min(g/a*c,800);e.ribbonPreviousHead=S.create(r.x,r.y),e.ribbonPreviousPosition=S.create(e.position.x,e.position.y);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=n.position.sub(i.position).copy();o.normalize(),o.multTo(y),Cs(e,t,o)}for(let t=1;t<s.length;t++)Is(e,t,a);for(let t=1;t<s.length;t++){const i=s[t],n=s[t-1];if(!i||!n)continue;const o=i.position.sub(n.position).copy();if(o.normalize(),o.multTo(d),i.position=n.position.add(o),!(Number.isFinite(i.position.x)&&Number.isFinite(i.position.y)&&Number.isFinite(i.velocity.x)&&Number.isFinite(i.velocity.y)))return void Os(e)}}function ks(t,e,i,s,n,o){return(t-i)*(o-s)-(e-s)*(n-i)}function Ts(t,e){return S.create((t.x+e.x)*Ps,(t.y+e.y)*Ps)}function _s(t,e){t.beginPath(),t.moveTo(e.a.x,e.a.y),t.lineTo(e.b.x,e.b.y),t.lineTo(e.c.x,e.c.y),e.d&&t.lineTo(e.d.x,e.d.y),t.closePath(),e.stroke&&t.stroke(),e.fill&&t.fill()}function Rs(t,e,i){!function(t,e,i){t.ribbonBounds=S.create(e,i)}(t,e,i),t.ribbonPoints?.length||Ss(t)}function Es(t){return Math.max(4,Math.round(G(t.shapeData?.count??30)))}function Fs(e,i,s,n,o,a){const{canvasSize:r,direction:l}=e;return l===t.OutModeDirection.bottom?n<=r.height+a:l===t.OutModeDirection.left?s>=-a:l===t.OutModeDirection.right?i<=r.width+a:l===t.OutModeDirection.top?o>=-a:s>=-a&&o>=-a&&i<=r.width+a&&n<=r.height+a}class As{#P;constructor(t){this.#P=t}draw(e){const i=function(t){const e=t,i=e._container?.canvas?.size,s=i?.width,n=i?.height;if(void 0!==s&&void 0!==n)return{height:n,width:s}}(e.particle);i&&Rs(e.particle,i.width,i.height),e.particle.ribbonPoints&&e.particle.ribbonPoints.length!==Es(e.particle)&&Ss(e.particle),Ds(e),function(e,i){const{context:s,particle:n,radius:o}=e,a=n.ribbonPoints,r=n.ribbonOffsets,l=n.ribbonBounds,c=e.fill,h=e.stroke;if(!a||!r||!l||a.length<4||!c&&!h)return;const d=r.mult(o),u=n.position,p="string"==typeof s.fillStyle?s.fillStyle:"",f="string"==typeof s.strokeStyle?s.strokeStyle:"",g=n.shapeData;let y=h?f:p;if(g?.backColor)y=g.backColor;else if(g?.darken?.enable){const e=ni(n.fillColor);e&&(y=ii(ci(e,t.AlterType.darken,G(g.darken.value)),i))}else if(g?.enlighten?.enable){const e=ni(n.fillColor);e&&(y=ii(ci(e,t.AlterType.enlighten,G(g.enlighten.value)),i))}s.lineWidth=1,s.lineJoin="round",s.lineCap="round";for(let t=0;t<a.length-1;t++){const e=a[t],i=a[t+1];if(!e||!i)continue;const n=e.position.add(d),o=i.position.add(d),r=e.position.sub(u),f=i.position.sub(u),g=n.sub(u),m=o.sub(u),v=Math.min(e.position.y,i.position.y,n.y,o.y),b=Math.max(e.position.y,i.position.y,n.y,o.y),w=ks(e.position.x,e.position.y,i.position.x,i.position.y,o.x,o.y)<0?p:y;v>l.y+d.length||b<-d.length||(s.fillStyle=w,h&&(s.strokeStyle=w),0===t?(_s(s,{a:r,b:f,c:Ts(f,m),fill:c,stroke:h}),_s(s,{a:m,b:g,c:Ts(f,m),fill:c,stroke:h})):t===a.length-2?(_s(s,{a:r,b:f,c:Ts(r,g),fill:c,stroke:h}),_s(s,{a:m,b:g,c:Ts(r,g),fill:c,stroke:h})):_s(s,{a:r,b:f,c:m,d:g,fill:c,stroke:h}))}s.fillStyle=p,h&&(s.strokeStyle=f),s.beginPath()}(e,this.#P)}getSidesCount(t){const e=t.ribbonPoints?.length;return e?Math.max(12,2*e):12}isInsideCanvas(e){const{outMode:i,particle:s,radius:n}=e,o=s.ribbonPoints,a=s.ribbonOffsets,r=s.position,l=i===t.OutMode.destroy||i===t.OutMode.out,c=(a?.length??0)*n,h=Math.max(n,c);if(!l)return Fs(e,r.x-h,r.x+h,r.y-h,r.y+h,0);if(!o?.length||!a)return Fs(e,r.x-h,r.x+h,r.y-h,r.y+h,0);let d=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.POSITIVE_INFINITY,f=Number.NEGATIVE_INFINITY;for(const t of o){const e=t.position.x,i=t.position.y,s=e+a.x*n,o=i+a.y*n;d=Math.min(d,e,s),u=Math.max(u,e,s),p=Math.min(p,i,o),f=Math.max(f,i,o)}if(!(Number.isFinite(d)&&Number.isFinite(p)&&Number.isFinite(u)&&Number.isFinite(f)))return!1;const g=s.ribbonOscillationSpeed&&s.ribbonOscillationDistance?s.ribbonOscillationDistance/s.ribbonOscillationSpeed:0;return Fs(e,d,u,p,f,Math.max(h,s.ribbonParticleDist??0)+g)}loadShape(t){if(!t.shapeData)return;const e=Es(t);t.ribbonPoints?.length&&t.ribbonPoints.length===e||Ss(t)}particleDestroy(t){delete t.ribbonPoints,delete t.ribbonHead,delete t.ribbonPreviousHead,delete t.ribbonPreviousPosition,delete t.ribbonTime,delete t.ribbonOffsets,delete t.ribbonParticleDist,delete t.ribbonMass,delete t.ribbonDrag,delete t.ribbonVelocityInherit,delete t.ribbonOscillationSpeed,delete t.ribbonOscillationDistance}particleInit(t,e){Rs(e,t.canvas.size.width,t.canvas.size.height)}}async function Ls(t){t.checkVersion("4.0.5"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["ribbon"],t=>Promise.resolve(new As(t.hdr)))})}class Bs{angle;colors;count;disableForReducedMotion;drift;emitterSize;position;ribbonOptions;scalar;spread;ticks;zIndex;constructor(){this.angle=90,this.count=5,this.spread=0,this.drift=0,this.emitterSize={width:100,height:0},this.ticks=200,this.position={x:50,y:0},this.colors=["#FF0055","#00D1FF","#FFD23F","#61FF7E","#B284FF"],this.ribbonOptions={angle:45,darken:{enable:!0,value:30},count:60,drag:.02,mass:1,oscillationDistance:{min:100,max:140},oscillationSpeed:{min:3,max:5},particleDist:8,velocityInherit:{min:4,max:6}},this.scalar=1,this.zIndex=100,this.disableForReducedMotion=!0}get origin(){return{x:this.position.x/o,y:this.position.y/o}}set origin(t){this.position.x=t.x*o,this.position.y=t.y*o}get particleCount(){return this.count}set particleCount(t){this.count=t}load(t){if(T(t))return;void 0!==t.angle&&(this.angle=t.angle);const e=t.count??t.particleCount;void 0!==e&&(this.count=e),void 0!==t.spread&&(this.spread=t.spread),void 0!==t.drift&&(this.drift=t.drift),void 0!==t.ticks&&(this.ticks=t.ticks),t.emitterSize&&(void 0!==t.emitterSize.width&&(this.emitterSize.width=t.emitterSize.width),void 0!==t.emitterSize.height&&(this.emitterSize.height=t.emitterSize.height));const i=t.origin;i&&!t.position&&(t.position={x:void 0===i.x?void 0:i.x*o,y:void 0===i.y?void 0:i.y*o});const s=t.position;s&&(void 0!==s.x&&(this.position.x=s.x),void 0!==s.y&&(this.position.y=s.y)),void 0!==t.colors&&(k(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.ribbonOptions&&(this.ribbonOptions=Pt({},t.ribbonOptions)),void 0!==t.scalar&&(this.scalar=t.scalar),void 0!==t.zIndex&&(this.zIndex=t.zIndex),void 0!==t.disableForReducedMotion&&(this.disableForReducedMotion=t.disableForReducedMotion)}}const Vs=new Map;async function Us(t,e){const i=new Bs;i.load(e.options);let s=Vs.get(e.id);s instanceof Promise&&(await s,s=Vs.get(e.id));const n=s;if(n&&!n.destroyed){const t=n;if("addEmitter"in t)return await async function(t,e){await(t.addEmitter?.({startCount:e.count,position:{x:e.position.x,y:0},shape:{type:"square"},size:{width:e.emitterSize.width,height:e.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1},particles:{paint:{fill:{color:{value:e.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:e.ribbonOptions}},life:{count:1},size:{value:8*e.scalar},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}}}))}(t,i),n}const o=(async()=>{const s=function(t,e){return{fullScreen:{enable:!e.canvas,zIndex:t.zIndex},fpsLimit:120,particles:{number:{value:0},paint:{fill:{color:{value:t.colors},enable:!0}},shape:{type:"ribbon",options:{ribbon:t.ribbonOptions}},size:{value:8*t.scalar},links:{enable:!1},life:{count:1},move:{direction:"bottom",enable:!0,outModes:{top:"none",default:"destroy"},speed:{min:4,max:6}},roll:{enable:!1},rotate:{value:0,move:!1,animation:{enable:!1}},tilt:{enable:!1},wobble:{enable:!1}},motion:{disable:t.disableForReducedMotion},emitters:{name:"ribbons",startCount:t.count,position:{x:t.position.x,y:0},shape:{type:"square"},size:{width:t.emitterSize.width,height:t.emitterSize.height},rate:{delay:0,quantity:0},life:{duration:.1,count:1}}}}(i,e),n=await t.load({id:e.id,element:e.canvas,options:s});return Vs.set(e.id,n),n})();return Vs.set(e.id,o),o}let Ns=null;async function Gs(t){return Ns||(Ns=async function(t){t.checkVersion("4.0.5"),await t.pluginManager.register(async t=>{await Promise.all([Qi(t),ws(t),(async t=>{await as(t),await ds(t)})(t),Ls(t),ys(t)])})}(t),Ns)}async function qs(t,e){let i,s;return await Gs(hi),C(t)?(s=t,i=e??{}):(s="ribbons",i=t??{}),Us(hi,{id:s,options:i})}qs.create=async(t,e={})=>{await Gs(hi);const i=t?.getAttribute("id")??"ribbons";return t?.setAttribute("id",i),await Us(hi,{id:i,canvas:t??void 0,options:e}),async(s,n)=>{let o,a;return C(s)?(a=s,o=n??e):(a=i,o=s??{}),Us(hi,{id:a,canvas:t??void 0,options:o})}},qs.init=async()=>{await Gs(hi)},qs.version="4.0.5",globalThis.ribbons=qs;globalThis.ribbons=qs;function Hs(t,e,i){const s=e[i];void 0!==s&&(t[i]=(t[i]??1)*s)}class $s{#x;#M;#z;#S;#O;#u;#C;#I;#D;#k;#T;#_;#R;#E;#p;#F;#A;#L={};#B=[void 0,void 0];#V={};constructor(t,e,i){this.#p=t,this.#u=e,this.#M=i,this.#C=null,this.#A=[],this.#F=[],this.#O=[],this.#x=[],this.#z=[],this.#S=[],this.#D=[],this.#k=[],this.#T=[],this.#_=[],this.#E=[],this.#R=[]}get settings(){return this.#I}canvasClear(){this.#u.actualOptions.clear&&this.draw(t=>{Fe(t,this.#M.size)})}clear(){let t=!1;for(const e of this.#x)if(t=e.canvasClear?.()??!1,t)break;t||this.canvasClear()}destroy(){this.stop(),this.#A=[],this.#F=[],this.#O=[],this.#x=[],this.#z=[],this.#S=[],this.#D=[],this.#k=[],this.#T=[],this.#_=[],this.#E=[],this.#R=[]}draw(t){const e=this.#C;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.#U(t);if(o??=s,a??=n,!o&&!a)return;const r=this.#u,l=t.options.zIndex,c=1-t.zIndexFactor,{fillOpacity:h,opacity:d,strokeOpacity:u}=t.getOpacity(),p=this.#V,f=this.#L,g=o?ii(o,r.hdr,h*d):void 0,y=a?ii(a,r.hdr,u*d):g;p.a=p.b=p.c=p.d=void 0,f.fill=g,f.stroke=y,this.draw(s=>{for(const i of this.#T)i.drawParticleSetup?.(s,t,e);this.#N(s,t,i,d,f,p),Ae({container:r,context:s,particle:t,delta:e,colorStyles:f,radius:i*c**l.sizeRate,opacity:d,transform:p}),this.#G(t);for(const i of this.#k)i.drawParticleCleanup?.(s,t,e)})}drawParticlePlugins(t,e){this.draw(i=>{for(const s of this.#D)Ge(i,s,t,e)})}drawParticles(t){const{particles:e}=this.#u;this.clear(),e.update(t),this.draw(i=>{for(const e of this.#E)e.drawSettingsSetup?.(i,t);for(const e of this.#_)e.draw?.(i,t);e.drawParticles(t);for(const e of this.#S)e.clearDraw?.(i,t);for(const e of this.#R)e.drawSettingsCleanup?.(i,t)})}init(){this.initUpdaters(),this.initPlugins(),this.paint()}initPlugins(){this.#O=[],this.#x=[],this.#z=[],this.#S=[],this.#D=[],this.#T=[],this.#k=[],this.#_=[],this.#E=[],this.#R=[];for(const t of this.#u.plugins)(t.particleFillColor??t.particleStrokeColor)&&this.#O.push(t),t.canvasClear&&this.#x.push(t),t.canvasPaint&&this.#z.push(t),t.drawParticle&&this.#D.push(t),t.drawParticleSetup&&this.#T.push(t),t.drawParticleCleanup&&this.#k.push(t),t.draw&&this.#_.push(t),t.drawSettingsSetup&&this.#E.push(t),t.drawSettingsCleanup&&this.#R.push(t),t.clearDraw&&this.#S.push(t)}initUpdaters(){this.#A=[],this.#F=[];for(const t of this.#u.particleUpdaters)t.afterDraw&&this.#F.push(t),(t.getColorStyles??t.getTransformValues??t.beforeDraw)&&this.#A.push(t)}paint(){let t=!1;for(const e of this.#z)if(t=e.canvasPaint?.()??!1,t)break;t||this.paintBase()}paintBase(t){this.draw(e=>{Re(e,this.#M.size,t)})}paintImage(t,e){this.draw(i=>{Ee(i,this.#M.size,t,e)})}setContext(t){this.#C=t,this.#C&&(this.#C.globalCompositeOperation=i)}setContextSettings(t){this.#I=t}stop(){this.draw(t=>{Fe(t,this.#M.size)})}#G=t=>{for(const e of this.#F)e.afterDraw?.(t)};#N=(t,e,i,s,n,o)=>{for(const a of this.#A){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)Hs(o,t,e)}a.beforeDraw?.(e)}};#U=t=>{let e,i;for(const s of this.#O)if(!e&&s.particleFillColor&&(e=Qe(this.#p,s.particleFillColor(t))),!i&&s.particleStrokeColor&&(i=Qe(this.#p,s.particleStrokeColor(t))),e&&i)break;return this.#B[0]=e,this.#B[1]=i,this.#B}}const Ws=new WeakMap;function js(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 Qs{domElement;render;renderCanvas;size;zoom=1;#u;#q;#H;#$;#p;#W;#j;#Q;#Y;constructor(t,e){this.#p=t,this.#u=e,this.render=new $s(t,e,this),this.#Q={height:0,width:0};const i=e.retina.pixelRatio,s=this.#Q;this.size={height:s.height*i,width:s.width*i},this.#q=!1,this.#j=[],this.#W="none"}get#X(){return this.#u.actualOptions.fullScreen.enable}destroy(){if(this.stop(),this.#q){const t=this.domElement;t?.remove(),this.domElement=void 0,this.renderCanvas=void 0}else this.#Z();this.render.destroy(),this.#j=[]}getZoomCenter(){const t=this.#u.retina.pixelRatio,{width:e,height:i}=this.size;return this.#Y?this.#Y:{x:e*a/t,y:i*a/t}}init(){this.#J(t=>{t.disconnect()}),this.#H=ft(t=>{for(const e of t)"attributes"===e.type&&"style"===e.attributeName&&this.#K()}),this.resize(),this.#tt(),this.initBackground(),this.#J(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})}),this.initPlugins(),this.render.init()}initBackground(){const t=this.#u,e=t.actualOptions.background,i=this.domElement;if(!i)return;const s=i.style,n=We(this.#p,e.color);s.backgroundColor=n?ti(n,t.hdr,e.opacity):"",s.backgroundImage=e.image||"",s.backgroundPosition=e.position||"",s.backgroundRepeat=e.repeat||"",s.backgroundSize=e.size||""}initPlugins(){this.#j=[];for(const t of this.#u.plugins)t.resize&&this.#j.push(t)}loadCanvas(t){this.#q&&this.domElement&&this.domElement.remove();const i=this.#u,s=(t=>"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)(t)?t:void 0;this.domElement=s,this.#q=!!s&&"true"===s.dataset[e],this.renderCanvas=s?(t=>{const e=Ws.get(t);if(e)return e;if("function"!=typeof t.transferControlToOffscreen)throw new TypeError("OffscreenCanvas is required but not supported by this browser");try{const e=t.transferControlToOffscreen();return Ws.set(t,e),e}catch{throw new TypeError("OffscreenCanvas transfer failed")}})(s):t;const n=this.domElement;n&&(n.ariaHidden="true",this.#$=Dt(n.style));const o=this.#Q,a=this.renderCanvas;n?(o.height=n.offsetHeight,o.width=n.offsetWidth):(o.height=a.height,o.width=a.width);const r=this.#u.retina.pixelRatio,l=this.size;a.height=l.height=o.height*r,a.width=l.width=o.width*r;const c=pt("(color-gamut: p3)");this.render.setContextSettings({alpha:!0,colorSpace:c?.matches&&i.hdr?"display-p3":"srgb",desynchronized:!0,willReadFrequently:!1}),this.render.setContext(a.getContext("2d",this.render.settings)),this.#J(t=>{t.disconnect()}),i.retina.init(),this.initBackground(),this.#J(t=>{const e=this.domElement;e&&e instanceof Node&&t.observe(e,{attributes:!0})})}resize(){const t=this.domElement;if(!t)return!1;const e=this.#u,i=this.renderCanvas;if(void 0===i)return!1;const s=e.canvas.#Q,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.#u.started&&e.particles.setResizeFactor({width:s.width/r.width,height:s.height/r.height}),!0}setPointerEvents(t){this.domElement&&(this.#W=t,this.#K())}setZoom(t,e){this.zoom=t,this.#Y=e}stop(){this.#J(t=>{t.disconnect()}),this.#H=void 0,this.render.stop()}async windowResize(){if(!this.domElement||!this.resize())return;const t=this.#u,e=t.updateActualOptions();t.particles.setDensity(),this.#et(),e&&await t.refresh()}#et=()=>{for(const t of this.#j)t.resize?.()};#tt=()=>{const t=this.domElement,e=this.#u.actualOptions;if(t){this.#X?this.#it():this.#Z();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")}}};#K=()=>{const t=this.domElement;if(!t)return;this.#J(t=>{t.disconnect()}),this.#tt(),this.initBackground();const e=this.#W;t.style.pointerEvents=e,t.style.setProperty("pointer-events",e),this.#J(e=>{t instanceof Node&&e.observe(t,{attributes:!0})})};#Z=()=>{const t=this.domElement,e=this.#$;t&&e&&js(t,e,!0)};#J=t=>{this.#H&&t(this.#H)};#it=()=>{const t=this.domElement;t&&js(t,kt(this.#u.actualOptions.fullScreen.zIndex),!0)}}class Ys{#u;#st;#nt;#ot;constructor(t){this.#u=t,this.#st={visibilityChange:()=>{this.#at()},resize:()=>{this.#rt()}}}addListeners(){this.#lt(!0)}removeListeners(){this.#lt(!1)}#at=()=>{const t=this.#u;t.actualOptions.pauseOnBlur&&(ut().hidden?(t.pageHidden=!0,t.pause()):(t.pageHidden=!1,t.animationStatus?t.play(!0):t.draw(!0)))};#rt=()=>{this.#ot&&(clearTimeout(this.#ot),this.#ot=void 0);const t=async()=>{const t=this.#u.canvas;await t.windowResize()};this.#ot=setTimeout(()=>{t()},this.#u.actualOptions.resize.delay*r)};#lt=t=>{const e=this.#st;this.#ct(t),Tt(document,n,e.visibilityChange,t,!1)};#ct=t=>{const e=this.#st,i=this.#u;if(!i.actualOptions.resize.enable)return;if("undefined"==typeof ResizeObserver)return void Tt(globalThis,s,e.resize,t);const n=i.canvas.domElement;this.#nt&&!t?(n&&this.#nt.unobserve(n),this.#nt.disconnect(),this.#nt=void 0):!this.#nt&&t&&n&&(this.#nt=new ResizeObserver(t=>{t.find(t=>t.target===n)&&this.#rt()}),this.#nt.observe(n))}}function Xs(t){if(!gt(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)}class Zs{backColor;bubble;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;slow;spawning;strokeColor;strokeOpacity;strokeWidth;unbreakable;velocity;zIndexFactor;#ht={fillOpacity:1,opacity:1,strokeOpacity:1};#dt=z.origin;#ut={sin:0,cos:0};#pt={a:1,b:0,c:0,d:1};#u;#p;constructor(t,e){this.#p=t,this.#u=e}destroy(e){if(this.unbreakable||this.destroyed)return;this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;const i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0;s?.particleDestroy?.(this);for(const t of i.particleDestroyedPlugins)t.particleDestroyed?.(this,e);for(const t of i.particleUpdaters)t.particleDestroyed?.(this,e);this.#u.dispatchEvent(t.EventType.particleDestroyed,{particle:this})}draw(t){const e=this.#u.canvas.render;e.drawParticlePlugins(this,t),e.drawParticle(this,t)}getAngle(){return this.rotation+(this.pathRotation?this.velocity.angle:0)}getFillColor(){return this.#ft(this.bubble.color??ni(this.fillColor))}getMass(){return this.getRadius()**2*Math.PI*a}getOpacity(){const t=this.options.zIndex,e=(1-this.zIndexFactor)**t.opacityRate,i=this.bubble.opacity??G(this.opacity?.value??1),s=this.fillOpacity??1,n=this.strokeOpacity??1;return this.#ht.fillOpacity=i*s*e,this.#ht.opacity=i*e,this.#ht.strokeOpacity=i*n*e,this.#ht}getPosition(){return this.#dt.x=this.position.x+this.offset.x,this.#dt.y=this.position.y+this.offset.y,this.#dt.z=this.position.z,this.#dt}getRadius(){return this.bubble.radius??this.size.value}getRotateData(){const t=this.getAngle();return this.#ut.sin=Math.sin(t),this.#ut.cos=Math.cos(t),this.#ut}getStrokeColor(){return this.#ft(this.bubble.color??ni(this.strokeColor))}getTransformData(t){const e=this.getRotateData(),i=this.isRotating;return this.#pt.a=e.cos*(t.a??c.a),this.#pt.b=i?e.sin*(t.b??1):t.b??c.b,this.#pt.c=i?-e.sin*(t.c??1):t.c??c.c,this.#pt.d=e.cos*(t.d??c.d),this.#pt}init(e,i,s,n){const o=this.#u;this.id=e,this.group=n,this.justWarped=!1,this.effectClose=!0,this.shapeClose=!0,this.pathRotation=!1,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.isRotating=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{},maxSpeed:0,moveDrift:0,moveSpeed:0,sizeAnimationSpeed:0},this.size={value:1,max:1,min:1,enable:!1},this.outType=t.ParticleOutType.normal,this.ignoresResizeRatio=!0;const a=o.actualOptions,r=Te(this.#p,o,a.particles),l=r.reduceDuplicates,c=r.effect.type,d=r.shape.type;this.effect=Mt(c,this.id,l),this.shape=Mt(d,this.id,l);const u=r.effect,p=r.shape;if(s){if(s.effect?.type&&s.effect.type!==this.effect){const t=Mt(s.effect.type,this.id,l);t&&(this.effect=t,u.load(s.effect))}if(s.shape?.type&&s.shape.type!==this.shape){const t=Mt(s.shape.type,this.id,l);t&&(this.shape=t,p.load(s.shape))}}if(this.effect===h){const t=[...this.#u.effectDrawers.keys()];this.effect=t[Math.floor(F()*t.length)]}if(this.shape===h){const t=[...this.#u.shapeDrawers.keys()];this.shape=t[Math.floor(F()*t.length)]}this.effectData=this.effect?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.effect,u,this.id,l):void 0,this.shapeData=this.shape?function(t,e,i,s){const n=e.options[t];return Pt({close:e.close},Mt(n,i,s))}(this.shape,p,this.id,l):void 0,r.load(s);const f=this.effectData,g=this.shapeData;f&&r.load(f.particles),g&&r.load(g.particles),this.effectClose=f?.close??r.effect.close,this.shapeClose=g?.close??r.shape.close,this.options=r,o.retina.initParticle(this);for(const t of o.particleUpdaters)t.preInit?.(this);let y,m;this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this.#gt(i),this.initialVelocity=this.#yt(),this.velocity=this.initialVelocity.copy(),this.zIndexFactor=this.position.z/o.zLayers,this.sides=24,this.effect&&(y=o.effectDrawers.get(this.effect)),y?.loadEffect&&y.loadEffect(this),this.shape&&(m=o.shapeDrawers.get(this.shape)),m?.loadShape&&m.loadShape(this);const v=m?.getSidesCount;v&&(this.sides=v(this)),this.spawning=!1;for(const t of o.particleUpdaters)t.init(this);y?.particleInit?.(o,this),m?.particleInit?.(o,this);for(const t of o.particleCreatedPlugins)t.particleCreated?.(this)}isInsideCanvas(t){return this.#mt({direction:t}).inside}isInsideCanvasForOutMode(t,e){return this.#mt({direction:e,outMode:t}).inside}isShowingBack(){if(!this.roll)return!1;const t=this.roll.angle;if(this.roll.horizontal&&this.roll.vertical){const e=t%u,i=e<0?e+u:e;return i>=Math.PI*a&&i<3*Math.PI*a}if(this.roll.horizontal){const e=(t+Math.PI*a)%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}if(this.roll.vertical){const e=t%(2*Math.PI),i=e<0?e+2*Math.PI:e;return i>=Math.PI&&i<2*Math.PI}return!1}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){for(const t of this.#u.particleUpdaters)t.reset?.(this)}#vt=(t,e)=>{let i=0,s=t?z.create(t.x,t.y,e):void 0;const n=this.#u,o=n.particlePositionPlugins,a=this.options.move.outModes,r=this.getRadius(),l=n.canvas.size,c=new AbortController,{signal:h}=c;for(;!h.aborted;){for(const t of o){const i=t.particlePosition?.(s,this);if(i)return z.create(i.x,i.y,e)}const t=it({size:l,position:s}),c=z.create(t.x,t.y,e);this.#bt(c,r,a.left??a.default),this.#bt(c,r,a.right??a.default),this.#wt(c,r,a.top??a.default),this.#wt(c,r,a.bottom??a.default);let h=!0;for(const t of n.particles.checkParticlePositionPlugins)if(h=t.checkParticlePosition?.(this,c,i)??!0,!h)break;if(h)return c;i+=1,s=void 0}return s};#yt=()=>{const e=this.options.move,i=J(this.direction).copy();if(e.direction===t.MoveDirection.inside||e.direction===t.MoveDirection.outside)return i;const s=X(G(e.angle.value)),n=X(G(e.angle.offset)),o={left:n-s*a,right:n+s*a};return e.straight||(i.angle+=N($(o.left,o.right))),e.random&&"number"==typeof e.speed&&(i.length*=F()),i};#bt=(e,i,s)=>{Xs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.x,maxCoord:this.#u.canvas.size.width,setCb:t=>e.x+=t,radius:i})};#wt=(e,i,s)=>{Xs({outMode:s,checkModes:[t.OutMode.bounce],coord:e.y,maxCoord:this.#u.canvas.size.height,setCb:t=>e.y+=t,radius:i})};#Pt=(e,i)=>{const s=this.getRadius(),n=this.#u.canvas.size,o=this.position,a=i===t.OutMode.bounce;return e===t.OutModeDirection.bottom?{inside:a?o.y+s<n.height:o.y-s<n.height,reason:"default"}:e===t.OutModeDirection.left?{inside:a?o.x-s>0:o.x+s>0,reason:"default"}:e===t.OutModeDirection.right?{inside:a?o.x+s<n.width:o.x-s<n.width,reason:"default"}:e===t.OutModeDirection.top?{inside:a?o.y-s>0:o.y+s>0,reason:"default"}:{inside:o.x>=-s&&o.y>=-s&&o.y<=n.height+s&&o.x<=n.width+s,reason:"default"}};#xt=(t,e)=>({canvasSize:this.#u.canvas.size,direction:t,outMode:e,particle:this,radius:this.getRadius()});#mt=t=>{const e=this.#Pt(t.direction,t.outMode),i=this.#u,s=this.shape?i.shapeDrawers.get(this.shape):void 0,n=this.effect?i.effectDrawers.get(this.effect):void 0,o=s?.isInsideCanvas,a=n?.isInsideCanvas;if(!o&&!a)return e;const r=this.#xt(t.direction,t.outMode),l=o?this.#Mt(o(r),"shape"):void 0,c=a?this.#Mt(a(r),"effect"):void 0;if(l&&c){const t=Math.max(l.margin??0,c.margin??0);return{inside:l.inside&&c.inside,margin:t>0?t:void 0,reason:"combined"}}return l??c??e};#ft=t=>t&&this.roll&&(this.backColor||this.roll.alter)&&this.isShowingBack()?this.backColor?this.backColor:this.roll.alter?ci(t,this.roll.alter.type,this.roll.alter.value):t:t;#gt=e=>{const i=this.#u,s=Math.floor(G(this.options.zIndex.value)),n=this.#vt(e,V(s,0,i.zLayers));if(!n)throw new Error("a valid position cannot be found for particle");this.position=n,this.initialPosition=this.position.copy();const o=i.canvas.size;switch(this.moveCenter={...Ot(this.options.move.center,o),radius:this.options.move.center.radius,mode:this.options.move.center.mode},this.direction=Z(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=S.origin};#Mt=(t,e)=>"boolean"==typeof t?{inside:t,reason:e}:{inside:t.inside,margin:t.margin,reason:t.reason??e}}class Js{#zt;#St=new Map;#Ot=[];#Ct;#It;#Dt=[];#kt;constructor(t){this.#zt=t,this.#Ct=0,this.#kt=0}clear(){this.#St.clear();const t=this.#It;t&&(this.#zt=t),this.#It=void 0}insert(t){const{x:e,y:i}=t.getPosition(),s=this.#Tt(e,i);this.#St.has(s)||this.#St.set(s,[]),this.#St.get(s)?.push(t)}query(t,e,i=[]){const s=this.#_t(t);if(!s)return i;const n=Math.floor(s.minX/this.#zt),o=Math.floor(s.maxX/this.#zt),a=Math.floor(s.minY/this.#zt),r=Math.floor(s.maxY/this.#zt);for(let s=n;s<=o;s++)for(let n=a;n<=r;n++){const o=`${s}_${n}`,a=this.#St.get(o);if(a)for(const s of a)e&&!e(s)||t.contains(s.getPosition())&&i.push(s)}return i}queryCircle(t,e,i,s=[]){const n=this.#Rt(t.x,t.y,e),o=this.query(n,i,s);return this.#Et(),o}queryRectangle(t,e,i,s=[]){const n=this.#Ft(t.x,t.y,e.width,e.height),o=this.query(n,i,s);return this.#Et(),o}setCellSize(t){this.#It=t}#Rt(t,e,i){return(this.#Ot[this.#Ct++]??=new Zt(t,e,i)).reset(t,e,i)}#Ft(t,e,i,s){return(this.#Dt[this.#kt++]??=new Jt(t,e,i,s)).reset(t,e,i,s)}#Tt(t,e){return`${Math.floor(t/this.#zt)}_${Math.floor(e/this.#zt)}`}#_t(t){if(t instanceof Zt){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 Jt){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}#Et(){this.#Ct=0,this.#kt=0}}class Ks{checkParticlePositionPlugins;grid;#At;#u;#Lt;#Bt;#Vt;#Ut;#Nt;#Gt;#p;#qt;#Ht;#$t;#Wt;#jt;#Qt;constructor(t,e){this.#p=t,this.#u=e,this.#Vt=0,this.#At=[],this.#qt=[],this.#Bt=0,this.#Lt=new Map,this.#Ut=new Map,this.#Qt=this.#Yt(this.#u.zLayers),this.grid=new Js(100),this.checkParticlePositionPlugins=[],this.#Nt=[],this.#Gt=[],this.#$t=[],this.#Ht=[],this.#jt=[]}get count(){return this.#At.length}addParticle(e,i,s,n){const o=this.#u.actualOptions.particles.number.limit.mode,a=void 0===s?this.#Bt:this.#Lt.get(s)??this.#Bt,r=this.count;if(a>0)switch(o){case t.LimitMode.delete:{const t=r+1-a;t>0&&this.removeQuantity(t);break}case t.LimitMode.wait:if(r>=a)return}try{const o=this.#qt.pop()??new Zs(this.#p,this.#u);o.init(this.#Vt,e,i,s);let a=!0;return n&&(a=n(o)),a?(this.#At.push(o),this.#Xt(o),this.#Vt++,this.#u.dispatchEvent(t.EventType.particleAdded,{particle:o}),o):void this.#qt.push(o)}catch(t){Vt().warning(`error adding particle: ${t}`)}}clear(){this.#At=[],this.#Ut.clear(),this.#Zt(this.#u.zLayers)}destroy(){this.#At=[],this.#qt.length=0,this.#Ut.clear(),this.#Qt=[],this.checkParticlePositionPlugins=[],this.#Nt=[],this.#Gt=[],this.#$t=[],this.#Ht=[],this.#jt=[]}drawParticles(t){for(let e=this.#Qt.length-1;e>=0;e--){const i=this.#Qt[e];if(i)for(const e of i)e.draw(t)}}filter(t){return this.#At.filter(t)}find(t){return this.#At.find(t)}get(t){return this.#At[t]}async init(){const t=this.#u,e=t.actualOptions;this.checkParticlePositionPlugins=[],this.#jt=[],this.#Gt=[],this.#$t=[],this.#Nt=[],this.#Ht=[],this.#Ut.clear(),this.#Zt(t.zLayers),this.grid=new Js(100*t.retina.pixelRatio);for(const e of t.plugins)e.redrawInit&&await e.redrawInit(),e.checkParticlePosition&&this.checkParticlePositionPlugins.push(e),e.update&&this.#jt.push(e),e.particleUpdate&&this.#Gt.push(e),e.postUpdate&&this.#$t.push(e),e.particleReset&&this.#Nt.push(e),e.postParticleUpdate&&this.#Ht.push(e);await this.#u.initDrawersAndUpdaters();for(const e of this.#u.effectDrawers.values())await(e.init?.(t));for(const e of this.#u.shapeDrawers.values())await(e.init?.(t));let i=!1;for(const e of t.plugins)if(i=e.particlesInitialization?.()??i,i)break;if(!i){const t=e.particles,i=t.groups;for(const e in i){const s=i[e];if(s)for(let i=this.count,n=0;n<s.number.value&&i<t.number.value;i++,n++)this.addParticle(void 0,s,e)}for(let e=this.count;e<t.number.value;e++)this.addParticle()}}push(t,e,i,s){for(let n=0;n<t;n++)this.addParticle(e,i,s)}async redraw(){this.clear(),await this.init(),this.#u.canvas.render.drawParticles({value:0,factor:0})}remove(t,e,i){this.removeAt(this.#At.indexOf(t),void 0,e,i)}removeAt(t,e=1,i,s){if(t<0||t>this.count)return;let n=0;for(let o=t;n<e&&o<this.count;o++)this.#Jt(o,i,s)&&(o--,n++)}removeQuantity(t,e){this.removeAt(0,t,e)}setDensity(){const t=this.#u.actualOptions,e=t.particles.groups;let i=0;for(const t of this.#u.plugins)t.particlesDensityCount&&(i+=t.particlesDensityCount());for(const t in e){const s=e[t];if(!s)continue;const n=Te(this.#p,this.#u,s);this.#Kt(n,i,t)}this.#Kt(t.particles,i)}setResizeFactor(t){this.#Wt=t}update(t){this.grid.clear();for(const e of this.#jt)e.update?.(t);const e=this.#te(t);for(const e of this.#$t)e.postUpdate?.(t);if(this.#ee(t,e),e.size)for(const t of e)this.remove(t);this.#Wt=void 0}#ie=(...t)=>{this.#qt.push(...t)};#Kt=(t,e,i,s)=>{const n=t.number;if(!n.density.enable)return void(void 0===i?this.#Bt=n.limit.value:(s?.number.limit.value??n.limit.value)&&this.#Lt.set(i,s?.number.limit.value??n.limit.value));const o=this.#se(n.density),a=n.value,r=n.limit.value>0?n.limit.value:a,l=Math.min(a,r)*o+e,c=Math.min(this.count,this.filter(t=>t.group===i).length);void 0===i?this.#Bt=n.limit.value*o:this.#Lt.set(i,n.limit.value*o),c<l?this.push(Math.abs(l-c),void 0,t,i):c>l&&this.removeQuantity(c-l,i)};#Yt=t=>{const e=Math.max(Math.floor(t),1);return Array.from({length:e},()=>[])};#ne=t=>{const e=this.#Qt.length-1;return e<=0?0:Math.min(Math.max(Math.floor(t),0),e)};#oe=(t,e)=>{let i=0,s=t.length;for(;i<s;){const n=Math.floor((i+s)/2),o=t[n];o?o.id<e?i=n+1:s=n:s=n}return i};#se=t=>{const e=this.#u;if(!t.enable)return 1;const i=e.canvas.size,s=e.retina.pixelRatio;return i.width&&i.height?i.width*i.height/(t.height*t.width*s**2):1};#Xt=t=>{const e=this.#ne(t.position.z),i=this.#Qt[e];i&&(i.splice(this.#oe(i,t.id),0,t),this.#Ut.set(t.id,e))};#Jt=(e,i,s)=>{const n=this.#At[e];return!!n&&(n.group===i&&(this.#At.splice(e,1),this.#ae(n),n.destroy(s),this.#u.dispatchEvent(t.EventType.particleRemoved,{particle:n}),this.#ie(n),!0))};#ae=t=>{const e=this.#Ut.get(t.id)??this.#ne(t.position.z),i=this.#Qt[e];if(!i)return void this.#Ut.delete(t.id);const s=this.#oe(i,t.id);i[s]?.id===t.id?(i.splice(s,1),this.#Ut.delete(t.id)):this.#Ut.delete(t.id)};#Zt=t=>{const e=Math.max(Math.floor(t),1);if(this.#Qt.length===e)for(const t of this.#Qt)t.length=0;else this.#Qt=this.#Yt(e)};#re=t=>{const e=this.#ne(t.position.z),i=this.#Ut.get(t.id);if(void 0===i)return void this.#Xt(t);if(i===e)return;const s=this.#Qt[i];if(s){const e=this.#oe(s,t.id);s[e]?.id===t.id&&s.splice(e,1)}const n=this.#Qt[e];n?(n.splice(this.#oe(n,t.id),0,t),this.#Ut.set(t.id,e)):this.#Ut.set(t.id,e)};#te=t=>{const e=new Set,i=this.#Wt;for(const s of this.#At){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.#Nt)t.particleReset?.(s);for(const e of this.#Gt){if(s.destroyed)break;e.particleUpdate?.(s,t)}s.destroyed?e.add(s):this.grid.insert(s)}return e};#ee=(t,e)=>{for(const i of this.#At)if(i.destroyed)e.add(i);else{for(const e of this.#u.particleUpdaters)e.update(i,t);if(!i.spawning)for(const e of this.#Ht)e.postParticleUpdate?.(i,t);this.#re(i)}}}class tn{pixelRatio;reduceFactor;#u;constructor(t){this.#u=t,this.pixelRatio=1,this.reduceFactor=1}init(){const t=this.#u,e=t.actualOptions;this.pixelRatio=e.detectRetina?devicePixelRatio:1,this.reduceFactor=1;const i=this.pixelRatio,s=t.canvas,n=s.domElement;n&&(s.size.width=n.offsetWidth*i,s.size.height=n.offsetHeight*i)}initParticle(t){const e=t.options,i=this.pixelRatio,s=e.move,n=s.distance,o=t.retina;o.maxSpeed=G(s.gravity.maxSpeed)*i,o.moveDrift=G(s.drift)*i,o.moveSpeed=G(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 en(t){return!t.destroyed}function sn(t,e,...i){const s=new _e(t,e);return ke(s,...i),s}var nn=Object.freeze({__proto__:null,Container:class{actualOptions;canvas;destroyed;effectDrawers;fpsLimit;hdr;id;pageHidden;particleCreatedPlugins;particleDestroyedPlugins;particlePositionPlugins;particleUpdaters;particles;plugins;retina;shapeDrawers;started;zLayers;#le;#ce;#he={value:0,factor:0};#de;#ue;#pe;#fe;#ge;#ye;#me;#ve;#be;#we;#Pe;#p;#xe;#Me;constructor(e){const{dispatchCallback:i,pluginManager:s,id:n,onDestroy:o,sourceOptions:a}=e;this.#p=s,this.#de=i,this.#be=o,this.id=Symbol(n),this.fpsLimit=120,this.hdr=!1,this.#xe=!1,this.#le=0,this.#pe=0,this.#ve=0,this.#ge=!0,this.started=!1,this.destroyed=!1,this.#Pe=!0,this.#me=0,this.zLayers=100,this.pageHidden=!1,this.#Me=a,this.#ye=a,this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.retina=new tn(this),this.canvas=new Qs(this.#p,this),this.particles=new Ks(this.#p,this),this.plugins=[],this.particleDestroyedPlugins=[],this.particleCreatedPlugins=[],this.particlePositionPlugins=[],this.#we=sn(this.#p,this),this.actualOptions=sn(this.#p,this),this.#fe=new Ys(this),this.dispatchEvent(t.EventType.containerBuilt)}get animationStatus(){return!this.#Pe&&!this.pageHidden&&en(this)}get options(){return this.#we}get sourceOptions(){return this.#Me}addLifeTime(t){this.#ve+=t}alive(){return!this.#pe||this.#ve<=this.#pe}destroy(e=!0){if(en(this)){this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.effectDrawers)t.destroy?.(this);for(const[,t]of this.shapeDrawers)t.destroy?.(this);for(const t of this.plugins)t.destroy?.();this.effectDrawers=new Map,this.shapeDrawers=new Map,this.particleUpdaters=[],this.plugins.length=0,this.#p.clearPlugins(this),this.destroyed=!0,this.#be(e),this.dispatchEvent(t.EventType.containerDestroyed)}}dispatchEvent(t,e){this.#de(t,{container:this,data:e})}draw(t){if(!en(this))return;let e=t;this.#ue=L(t=>{e&&(this.#me=void 0,e=!1),this.#ze(t)})}async export(t,e={}){for(const i of this.plugins){if(!i.export)continue;const s=await i.export(t,e);if(s.supported)return s.blob}Vt().error(`Export plugin with type ${t} not found`)}async init(){if(!en(this))return;const e=new Map;for(const t of this.#p.plugins){const i=await t.getPlugin(this);i.preInit&&await i.preInit(),e.set(t,i)}await this.initDrawersAndUpdaters(),this.#we=sn(this.#p,this,this.#ye,this.sourceOptions),this.actualOptions=sn(this.#p,this,this.#we),this.plugins.length=0,this.particleDestroyedPlugins.length=0,this.particleCreatedPlugins.length=0,this.particlePositionPlugins.length=0;for(const[t,i]of e)t.needsPlugin(this.actualOptions)&&(this.plugins.push(i),i.particleCreated&&this.particleCreatedPlugins.push(i),i.particleDestroyed&&this.particleDestroyedPlugins.push(i),i.particlePosition&&this.particlePositionPlugins.push(i));this.retina.init(),this.canvas.init(),this.updateActualOptions(),this.canvas.initBackground(),this.canvas.resize();const{delay:i,duration:s,fpsLimit:n,hdr:o,smooth:a,zLayers:l}=this.actualOptions;this.hdr=o,this.zLayers=l,this.#pe=G(s)*r,this.#le=G(i)*r,this.#ve=0,this.fpsLimit=n>0?n:120,this.#xe=a;for(const t of this.plugins)await(t.init?.());await this.particles.init(),this.dispatchEvent(t.EventType.containerInit),this.particles.setDensity();for(const t of this.plugins)t.particlesSetup?.();this.dispatchEvent(t.EventType.particlesSetup)}async initDrawersAndUpdaters(){const t=this.#p;this.effectDrawers=await t.getEffectDrawers(this,!0),this.shapeDrawers=await t.getShapeDrawers(this,!0),this.particleUpdaters=await t.getUpdaters(this,!0)}pause(){if(en(this)&&(void 0!==this.#ue&&(B(this.#ue),this.#ue=void 0),!this.#Pe)){for(const t of this.plugins)t.pause?.();this.pageHidden||(this.#Pe=!0),this.dispatchEvent(t.EventType.containerPaused)}}play(e){if(!en(this))return;const i=this.#Pe||e;if(!this.#ge||this.actualOptions.autoPlay){if(this.#Pe&&(this.#Pe=!1),i)for(const t of this.plugins)t.play&&t.play();this.dispatchEvent(t.EventType.containerPlay),this.draw(i??!1)}else this.#ge=!1}async refresh(){if(en(this))return this.stop(),this.start()}async reset(t){if(en(this))return this.#ye=t,this.#Me=t,this.#we=sn(this.#p,this,this.#ye,this.sourceOptions),this.actualOptions=sn(this.#p,this,this.#we),this.refresh()}async start(){en(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise(e=>{const i=async()=>{this.#fe.addListeners();for(const t of this.plugins)await(t.start?.());this.dispatchEvent(t.EventType.containerStarted),this.play(),e()};this.#ce=setTimeout(()=>{i()},this.#le)}))}stop(){if(en(this)&&this.started){this.#ce&&(clearTimeout(this.#ce),this.#ce=void 0),this.#ge=!0,this.started=!1,this.#fe.removeListeners(),this.pause(),this.particles.clear(),this.canvas.stop();for(const t of this.plugins)t.stop?.();this.particleCreatedPlugins.length=0,this.particleDestroyedPlugins.length=0,this.particlePositionPlugins.length=0,this.#Me=this.#we,this.dispatchEvent(t.EventType.containerStopped)}}updateActualOptions(){let t=!1;for(const e of this.plugins)e.updateActualOptions&&(t=e.updateActualOptions()||t);return t}#ze=t=>{try{if(!this.#xe&&void 0!==this.#me&&t<this.#me+r/this.fpsLimit)return void this.draw(!1);if(this.#me??=t,function(t,e,i=60,s=!1){t.value=e,t.factor=s?60/i:60*e/r}(this.#he,t-this.#me,this.fpsLimit,this.#xe),this.addLifeTime(this.#he.value),this.#me=t,this.#he.value>r)return void this.draw(!1);if(this.canvas.render.drawParticles(this.#he),!this.alive())return void this.destroy();this.animationStatus&&this.draw(!1)}catch(t){Vt().error("error in animation loop",t)}}}});var on=Object.freeze({__proto__:null,BlendPluginInstance:class{#u;#Se;constructor(t){this.#u=t}drawParticleCleanup(t,e){e.options.blend?.enable&&(t.globalCompositeOperation=e.originalBlendMode??i,e.originalBlendMode=void 0)}drawParticleSetup(t,e){e.options.blend?.enable&&(e.originalBlendMode=t.globalCompositeOperation,t.globalCompositeOperation=e.options.blend.mode)}drawSettingsCleanup(t){this.#Se&&(t.globalCompositeOperation=this.#Se)}drawSettingsSetup(t){const e=t.globalCompositeOperation,i=this.#u.actualOptions.blend;this.#Se=e,t.globalCompositeOperation=i?.enable?i.mode:e}}});function an(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=V(t.velocity.x,-1,1),t.velocity.y=V(t.velocity.y,-1,1));t.lastPathTime-=n}(t,a);const r=t.gravity,l=r?.enable&&r.inverse?-1:1;n&&i&&(t.velocity.x+=n*a.factor/(60*i)),r?.enable&&i&&(t.velocity.y+=l*(r.acceleration*a.factor)/(60*i));const c=t.moveDecay;t.velocity.multTo(c??1);const h=t.velocity.mult(i);r?.enable&&s>0&&(!r.inverse&&h.y>=0&&h.y>=s||r.inverse&&h.y<=0&&h.y<=-s)&&(h.y=l*s,i&&(t.velocity.y=h.y/i));const d=t.options.zIndex,u=(1-t.zIndexFactor)**d.velocityRate;h.multTo(u),h.multTo(o);const{position:p}=t;p.addTo(h),e.vibrate&&(p.x+=Math.sin(p.x*Math.cos(p.y))*o,p.y+=Math.cos(p.y*Math.sin(p.x))*o)}var rn=Object.freeze({__proto__:null,MovePluginInstance:class{availablePathGenerators;pathGenerators;#u;#p;constructor(t,e){this.#p=t,this.#u=e,this.availablePathGenerators=new Map,this.pathGenerators=new Map}destroy(){this.availablePathGenerators=new Map,this.pathGenerators=new Map}isEnabled(t){return!t.destroyed&&t.options.move.enable}particleCreated(e){const i=e.options.move,s=i.gravity,n=i.path;if(e.moveDecay=1-G(i.decay),e.pathDelay=G(n.delay.value)*r,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:G(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=Q(i.getPosition(),o),r=G(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:F()*u,radius:a,acceleration:i.retina.spinAcceleration}}(this.#u,e)}particleDestroyed(t){const e=t.pathGenerator;e?.reset(t)}particleUpdate(e,i){const s=e.options.move;if(!s.enable)return;const n=this.#u,o=function(t){return t.slow.inRange?t.slow.factor:1}(e),r=n.retina.reduceFactor,l=e.retina.moveSpeed,c=e.retina.moveDrift,h=e.size.max,d=l*(s.size?e.getRadius()/h:1)*o*(i.factor||1)*a,u=e.retina.maxSpeed;s.spin.enable?function(e,i,s,n){if(!i.spin)return;const o=i.spin.direction===t.RotateDirection.clockwise,r={x:o?Math.cos:Math.sin,y:o?Math.sin:Math.cos};i.position.x=i.spin.center.x+i.spin.radius*r.x(i.spin.angle)*n,i.position.y=i.spin.center.y+i.spin.radius*r.y(i.spin.angle)*n,i.spin.radius+=i.spin.acceleration*n;const l=Math.max(e.canvas.size.width,e.canvas.size.height),c=l*a;i.spin.radius>c?(i.spin.radius=c,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/l)}(n,e,d,r):an(e,s,d,u,c,r,i),function(t){const e=t.initialPosition,{dx:i,dy:s}=W(e,t.position),n=Math.abs(i),o=Math.abs(s),{maxDistance:r}=t.retina,l=r.horizontal,c=r.vertical;if(!l&&!c)return;if((l&&n>=l||c&&o>=c)&&!t.misplaced)t.misplaced=!!l&&n>l||!!c&&o>c,l&&(t.velocity.x=t.velocity.y*a-t.velocity.x),c&&(t.velocity.y=t.velocity.x*a-t.velocity.y);else if((!l||n<l)&&(!c||o<c)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const i=t.position,s=t.velocity;l&&(i.x<e.x&&s.x<0||i.x>e.x&&s.x>0)&&(s.x*=-F()),c&&(i.y<e.y&&s.y<0||i.y>e.y&&s.y>0)&&(s.y*=-F())}}(e)}preInit(){return this.#Oe()}redrawInit(){return this.#Oe()}update(){for(const t of this.pathGenerators.values())t.update()}async#Oe(){const t=await(this.#p.getPathGenerators?.(this.#u,!0));if(t){this.availablePathGenerators=t,this.pathGenerators=new Map;for(const t of this.pathGenerators.values())t.init()}}}});var ln=Object.freeze({__proto__:null,EmittersPluginInstance:class{#u;#w;constructor(t,e){this.#w=t,this.#u=e,this.#w.initContainer(e)}async init(){const t=this.#u.actualOptions.emitters;if(k(t))for(const e of t)await this.#w.addEmitter(this.#u,e);else await this.#w.addEmitter(this.#u,t)}pause(){for(const t of this.#w.getArray(this.#u))t.pause()}play(){for(const t of this.#w.getArray(this.#u))t.play()}resize(){for(const t of this.#w.getArray(this.#u))t.resize()}stop(){this.#w.clear(this.#u)}update(t){this.#w.getArray(this.#u).forEach(e=>{e.update(t)})}}});const cn=new Map;var hn=Object.freeze({__proto__:null,ShapeManager:class{addShapeGenerator(t,e){this.getShapeGenerator(t)||cn.set(t,e)}getShapeGenerator(t){return cn.get(t)}getSupportedShapeGenerators(){return cn.keys()}}});var dn=Object.freeze({__proto__:null,EmittersInstancesManager:class{#Ce;#p;constructor(t){this.#Ce=new Map,this.#p=t}async addEmitter(t,e,i){const s=new es;s.load(e);const{EmitterInstance:n}=await Promise.resolve().then(function(){return gn}),o=new n(this.#p,t,e=>{this.removeEmitter(t,e)},s,i);return await o.init(),this.getArray(t).push(o),o}clear(t){this.initContainer(t),this.#Ce.set(t,[])}getArray(t){this.initContainer(t);let e=this.#Ce.get(t);return e||(e=[],this.#Ce.set(t,e)),e}initContainer(t){this.#Ce.has(t)||(this.#Ce.set(t,[]),t.getEmitter=e=>{const i=this.getArray(t);return void 0===e||I(e)?i[e??0]:i.find(t=>t.name===e)},t.addEmitter=async(e,i)=>this.addEmitter(t,e,i),t.removeEmitter=e=>{const i=t.getEmitter?.(e);i&&this.removeEmitter(t,i)},t.playEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPlay()},t.pauseEmitter=e=>{const i=t.getEmitter?.(e);i&&i.externalPause()})}removeEmitter(t,e){const i=this.getArray(t).indexOf(e);i>=0&&this.getArray(t).splice(i,1)}}});var un=Object.freeze({__proto__:null,MotionPluginInstance:class{#u;constructor(t){this.#u=t}async init(){const t=this.#u,e=t.actualOptions.motion;if(!e||!e.disable&&!e.reduce.value)return void(t.retina.reduceFactor=1);const i=pt("(prefers-reduced-motion: reduce)");if(!i)return void(t.retina.reduceFactor=1);this.#Ie(i);i.addEventListener("change",()=>{(async()=>{this.#Ie(i);try{await t.refresh()}catch{}})()}),await Promise.resolve()}#Ie=t=>{const e=this.#u,i=e.actualOptions.motion;i&&(t.matches?i.disable?e.retina.reduceFactor=0:e.retina.reduceFactor=i.reduce.value?1/i.reduce.factor:1:e.retina.reduceFactor=1)}}});function pn(t,e,i,s){(t.paint??=new Pe).fill={color:ne.create(void 0,{value:e}),enable:s,opacity:i}}function fn(t,e,i,s){(t.paint??=new Pe).stroke={color:ne.create(void 0,{value:e}),opacity:i,width:s}}var gn=Object.freeze({__proto__:null,EmitterInstance:class{fill;name;options;position;size;spawnFillColor;spawnFillEnabled;spawnFillOpacity;spawnStrokeColor;spawnStrokeOpacity;spawnStrokeWidth;#u;#De;#ke;#Te;#pe;#_e;#Re;#Ee;#Fe;#Ae;#H;#Le;#Pe;#p;#Be;#nt;#Ve;#Ue;#Ne;#Ge;constructor(t,e,i,s,n){this.#p=t,this.#u=e,this.#Be=i,this.#De=0,this.#ke=0,this.#Te=0,this.#Fe=n,s instanceof es?this.options=s:(this.options=new es,this.options.load(s)),this.#Ne=e.retina.reduceFactor?G(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0,this.position=this.#Fe??this.#vt(),this.name=this.options.name,this.fill=this.options.fill,this.#Re=!this.options.life.wait,this.#Ge=!1;const o=Pt({},this.options.particles);if(o.move??={},o.move.direction??=this.options.direction,this.options.spawn.fill?.color&&(this.spawnFillColor=Qe(this.#p,this.options.spawn.fill.color)),this.options.spawn.stroke?.color&&(this.spawnStrokeColor=Qe(this.#p,this.options.spawn.stroke.color)),this.#Pe=!this.options.autoPlay,this.#Le=o,this.#Ue=this.#qe(),this.size=Ct(this.#Ue,this.#u.canvas.size),this.#Ae=this.options.life.count??-1,this.#Ee=this.#Ae<=0,this.options.domId){const t=ut().getElementById(this.options.domId);t&&(this.#H=new MutationObserver(()=>{this.resize()}),this.#nt=new ResizeObserver(()=>{this.resize()}),this.#H.observe(t,{attributes:!0,attributeFilter:["style","width","height"]}),this.#nt.observe(t))}const a=this.options.shape,l=this.#p.emitterShapeManager?.getShapeGenerator(a.type);l&&(this.#Ve=l.generate(this.#u,this.position,this.size,this.fill,a.options)),this.#u.dispatchEvent("emitterCreated",{emitter:this}),this.play()}externalPause(){this.#Pe=!0,this.pause()}externalPlay(){this.#Pe=!1,this.play()}async init(){await(this.#Ve?.init())}pause(){this.#Pe||(this.#_e=void 0)}play(){if(this.#Pe)return;if(!(this.#Ae>0||this.#Ee)&&this.options.life.count||!(this.#Re||this.#Te>=(this.#Ne??0)))return;const t=this.#u;if(void 0===this.#_e){const e=G(this.options.rate.delay);this.#_e=t.retina.reduceFactor?e*r/t.retina.reduceFactor:1/0}(this.#Ae>0||this.#Ee)&&this.#He()}resize(){const t=this.#Fe,e=this.#u;this.position=t&&vt(t,e.canvas.size,S.origin)?t:this.#vt(),this.#Ue=this.#qe(),this.size=Ct(this.#Ue,e.canvas.size),this.#Ve?.resize(this.position,this.size)}update(t){if(this.#Pe)return;const e=this.#u;this.#Re&&(this.#Re=!1,this.#Te=this.#Ne??0,this.#ke=this.#_e??0),this.#Ge||(this.#Ge=!0,this.#$e(this.options.startCount)),void 0!==this.#pe&&(this.#De+=t.value,this.#De>=this.#pe&&(this.pause(),void 0!==this.#Ne&&(this.#Ne=void 0),this.#Ee||this.#Ae--,this.#Ae>0||this.#Ee?(this.position=this.#vt(),this.#Ve?.resize(this.position,this.size),this.#Ne=e.retina.reduceFactor?G(this.options.life.delay??0)*r/e.retina.reduceFactor:1/0):this.#We(),this.#De-=this.#pe,this.#pe=void 0)),void 0!==this.#Ne&&(this.#Te+=t.value,this.#Te>=this.#Ne&&(this.#u.dispatchEvent("emitterPlay"),this.play(),this.#Te-=this.#Ne,this.#Ne=void 0)),void 0!==this.#_e&&(this.#ke+=t.value,this.#ke>=this.#_e&&(this.#je(),this.#ke-=this.#_e))}#vt(){const t=this.#u;if(this.options.domId){const e=ut().getElementById(this.options.domId);if(e){const i=e.getBoundingClientRect(),s=t.retina.pixelRatio;return{x:(i.x+i.width*a)*s,y:(i.y+i.height*a)*s}}}return et({size:t.canvas.size,position:this.options.position})}#qe(){const e=this.#u;if(this.options.domId){const i=ut().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 Ki;return e.load({height:0,mode:t.PixelMode.percent,width:0}),e})()}#We=()=>{this.#H?.disconnect(),this.#H=void 0,this.#nt?.disconnect(),this.#nt=void 0,this.#Be(this),this.#u.dispatchEvent("emitterDestroyed",{emitter:this})};#je(){if(this.#Pe)return;const t=G(this.options.rate.quantity);this.#$e(t)}#$e(t){const e=Mt(this.#Le)??{},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:G(this.options.spawn.fill.opacity),o=this.options.spawn.stroke?.color?.animation,a=void 0===this.options.spawn.stroke?.opacity?1:G(this.options.spawn.stroke.opacity),r=void 0===this.options.spawn.stroke?.width?1:G(this.options.spawn.stroke.width),l=this.#u.retina.reduceFactor,c=!!i,h=!!o,d=!!this.#Ve,u=c||h,p=u||d,f=u?{h:m,s:v,l:b}:null,g=this.options.shape;for(let c=0;c<t*l;c++){const t=p?Pt({},e):e;this.spawnFillOpacity=n,this.spawnFillEnabled=s,this.spawnStrokeOpacity=a,this.spawnStrokeWidth=r,this.spawnFillColor&&(i&&f&&(this.spawnFillColor.h=this.#Qe(i.h,this.spawnFillColor.h,f.h,3.6),this.spawnFillColor.s=this.#Qe(i.s,this.spawnFillColor.s,f.s),this.spawnFillColor.l=this.#Qe(i.l,this.spawnFillColor.l,f.l)),pn(t,this.spawnFillColor,this.spawnFillOpacity,this.spawnFillEnabled)),this.spawnStrokeColor&&(o&&f&&(this.spawnStrokeColor.h=this.#Qe(o.h,this.spawnStrokeColor.h,f.h,3.6),this.spawnStrokeColor.s=this.#Qe(o.s,this.spawnStrokeColor.s,f.s),this.spawnStrokeColor.l=this.#Qe(o.l,this.spawnStrokeColor.l,f.l)),fn(t,this.spawnStrokeColor,this.spawnStrokeOpacity,this.spawnStrokeWidth));let l=this.position;if(this.#Ve){const e=this.#Ve.randomPosition();if(e){l=e.position;const i=g.replace;i.color&&e.color&&pn(t,e.color,i.opacity?e.opacity??1:1,!0)}else l=null}l&&this.#u.particles.addParticle(l,t)}}#He=()=>{if(this.#Pe)return;const t=void 0!==this.options.life.duration?G(this.options.life.duration):void 0;(this.#Ae>0||this.#Ee)&&void 0!==t&&t>0&&(this.#pe=t*r)};#Qe=(t,e,i,s=1)=>{const n=this.#u;if(!t.enable)return e;const o=N(t.offset),a=G(this.options.rate.delay),l=n.retina.reduceFactor?a*r/n.retina.reduceFactor:1/0;return(e+G(t.speed)*n.fpsLimit/l+o*s)%i}}});t.AnimatableColor=ne,t.AnimationOptions=Kt,t.AnimationValueWithRandom=fe,t.Background=oe,t.BaseRange=Xt,t.Circle=Zt,t.ColorAnimation=ee,t.Fill=ce,t.FullScreen=ae,t.HslAnimation=ie,t.Move=be,t.MoveAngle=he,t.MoveCenter=de,t.MoveGravity=ue,t.MovePath=ye,t.Options=_e,t.OptionsColor=se,t.OutModes=me,t.Paint=Pe,t.ParticlesBounce=Me,t.ParticlesBounceFactor=xe,t.ParticlesDensity=ze,t.ParticlesNumber=Oe,t.ParticlesNumberLimit=Se,t.ParticlesOptions=De,t.RangedAnimationOptions=te,t.RangedAnimationValueWithRandom=ge,t.Rectangle=Jt,t.ResizeEvent=re,t.Shape=Ce,t.Spin=ve,t.Stroke=we,t.ValueWithRandom=pe,t.Vector=S,t.Vector3d=z,t.ZIndex=Ie,t.alterHsl=ci,t.animate=L,t.areBoundsInside=bt,t.arrayRandomIndex=yt,t.calcExactPositionOrRandomFromSize=it,t.calcExactPositionOrRandomFromSizeRanged=function(t){const e={x:void 0!==t.position?.x?G(t.position.x):void 0,y:void 0!==t.position?.y?G(t.position.y):void 0};return it({size:t.size,position:e})},t.calcPositionFromSize=function(t){return void 0!==t.position?.x&&void 0!==t.position.y?{x:t.position.x*t.size.width/o,y:t.position.y*t.size.height/o}:void 0},t.calcPositionOrRandomFromSize=tt,t.calcPositionOrRandomFromSizeRanged=et,t.calculateBounds=wt,t.cancelAnimation=B,t.canvasFirstIndex=0,t.canvasTag=g,t.checkDistance=Y,t.circleBounce=function(t,e){const{x:i,y:s}=t.velocity.sub(e.velocity),[n,o]=[t.position,e.position],{dx:a,dy:r}=W(o,n);if(i*a+s*r<0)return;const l=-Math.atan2(r,a),c=t.mass,h=e.mass,d=t.velocity.rotate(l),u=e.velocity.rotate(l),p=K(d,u,c,h),f=K(u,d,c,h),g=p.rotate(-l),y=f.rotate(-l);t.velocity.x=g.x*t.factor.x,t.velocity.y=g.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y},t.circleBounceDataFromParticle=function(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:S.create(G(t.options.bounce.horizontal.value),G(t.options.bounce.vertical.value))}},t.clamp=V,t.clear=Fe,t.cloneStyle=Dt,t.collisionVelocity=K,t.colorMix=si,t.colorToHsl=function(t,e,i,s=!0){const n=je(t,e,i,s);return n?Ye(n):void 0},t.colorToRgb=je,t.countOffset=1,t.decayOffset=1,t.deepExtend=Pt,t.defaultAlpha=1,t.defaultAngle=0,t.defaultCompositeValue=i,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=c,t.defaultTransformValue=1,t.defaultVelocity=0,t.defaultZoom=1,t.degToRad=X,t.deleteCount=1,t.double=2,t.doublePI=u,t.drawAfterEffect=Le,t.drawBeforeEffect=Be,t.drawParticle=Ae,t.drawParticlePlugin=Ge,t.drawShape=Ve,t.drawShapeAfterDraw=Ue,t.drawShapeBeforeDraw=Ne,t.empty=0,t.executeOnSingleOrMultiple=xt,t.findItemFromSingleOrMultiple=function(t,e){return k(t)?t.find((t,i)=>e(t,i)):e(t,0)?t:void 0},t.generatedAttribute=e,t.generatedFalse=f,t.generatedTrue=p,t.getDistance=Q,t.getDistanceSq=j,t.getDistances=W,t.getFullScreenStyle=kt,t.getHslAnimationFromHsl=oi,t.getHslFromAnimation=ni,t.getItemMapFromInitializer=Rt,t.getItemsFromInitializer=_t,t.getLinkColor=function(t,e,i){if(i===h)return Ke();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),s=e?.getFillColor()??e?.getStrokeColor();if(i&&s&&e)return si(i,s,t.getRadius(),e.getRadius());{const t=i??s;if(t)return Ze(t)}}},t.getLinkRandomColor=function(t,e,i,s){const n=C(e)?e:e.value;return n===h?s?We(t,{value:n}):i?h:d:n===d?d:We(t,{value:n})},t.getLogger=Vt,t.getParticleBaseVelocity=J,t.getParticleDirectionAngle=Z,t.getPosition=Ot,t.getRandom=F,t.getRandomInRange=A,t.getRandomRgbColor=Ke,t.getRangeMax=H,t.getRangeMin=q,t.getRangeValue=G,t.getSize=Ct,t.getStyleFromHsl=ii,t.getStyleFromRgb=ti,t.hMax=m,t.hMin=0,t.hPhase=60,t.half=a,t.hasMatchMedia=dt,t.hslToRgb=Ze,t.hslaToRgba=Je,t.identity=1,t.initParticleNumericAnimationValue=zt,t.inverseFactorNumerator=1,t.isArray=k,t.isBoolean=O,t.isFunction=function(t){return"function"==typeof t},t.isInArray=gt,t.isNull=T,t.isNumber=I,t.isObject=D,t.isPointInside=vt,t.isString=C,t.itemFromArray=mt,t.itemFromSingleOrMultiple=Mt,t.lFactor=1,t.lMax=b,t.lMin=0,t.lengthOffset=1,t.loadMinIndex=0,t.loadOptions=ke,t.loadParticlesOptions=Te,t.loadRandomFactor=1e4,t.manageListener=Tt,t.memoize=ht,t.midColorValue=d,t.millisecondsToSeconds=r,t.minCount=0,t.minFpsLimit=0,t.minIndex=0,t.minLimit=0,t.minStrokeWidth=0,t.minVelocity=0,t.minZ=0,t.minimumSize=0,t.mix=U,t.none=0,t.one=1,t.originPoint=l,t.paintBase=Re,t.paintImage=Ee,t.parseAlpha=st,t.percentDenominator=o,t.phaseNumerator=1,t.quarter=w,t.randomColorValue=h,t.randomInRangeValue=N,t.rangeColorToHsl=Qe,t.rangeColorToRgb=We,t.removeDeleteCount=1,t.removeMinIndex=0,t.resizeEvent=s,t.rgbMax=y,t.rgbToHsl=Ye,t.ribbons=qs,t.sMax=v,t.sMin=0,t.sNormalizedOffset=1,t.safeDocument=ut,t.safeIntersectionObserver=function(t){if("undefined"!=typeof IntersectionObserver)return new IntersectionObserver(t)},t.safeMatchMedia=pt,t.safeMutationObserver=ft,t.setAnimationFunctions=function(t,e){E.nextFrame=t,E.cancel=e},t.setLogger=function(t){t.debug&&(Bt.debug=Lt(t.debug)),t.error&&(Bt.error=Lt(t.error)),t.info&&(Bt.info=Lt(t.info)),t.log&&(Bt.log=Lt(t.log)),t.trace&&(Bt.trace=Lt(t.trace)),t.verbose&&(Bt.verbose=Lt(t.verbose)),t.warning&&(Bt.warning=Lt(t.warning))},t.setRandom=function(t=Math.random){R=t},t.setRangeValue=$,t.sextuple=6,t.spatialHashGridCellSize=100,t.squareExp=2,t.stringToAlpha=function(t,e){return $e(t,e)?.a},t.stringToRgb=Xe,t.threeQuarter=P,t.triple=3,t.tryCountIncrement=1,t.tsParticles=hi,t.updateAnimation=It,t.updateColor=li,t.updateColorValue=ri,t.visibilityChangeEvent=n,t.zIndexFactorOffset=1}),Object.assign(globalThis.window||globalThis,{loadMinIndex:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadMinIndex,loadOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadOptions,loadParticlesOptions:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadParticlesOptions,loadRandomFactor:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).loadRandomFactor,tsParticles:(globalThis.__tsParticlesInternals.bundles.ribbons||{}).tsParticles}),globalThis.__tsParticlesInternals=globalThis.__tsParticlesInternals||{},globalThis.__tsParticlesInternals.engine&&globalThis.__tsParticlesInternals.engine.tsParticles||(globalThis.__tsParticlesInternals.engine=globalThis.__tsParticlesInternals.bundles.ribbons||{}),delete(globalThis.window||globalThis).tsparticlesInternalExports;
|