@tsparticles/preset-bubbles 3.0.0-alpha.1
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 +200 -0
- package/browser/bundle.js +6 -0
- package/browser/index.js +18 -0
- package/browser/options.js +51 -0
- package/cjs/bundle.js +19 -0
- package/cjs/index.js +33 -0
- package/cjs/options.js +54 -0
- package/esm/bundle.js +6 -0
- package/esm/index.js +18 -0
- package/esm/options.js +51 -0
- package/package.json +98 -0
- package/report.html +39 -0
- package/tsparticles.preset.bubbles.bundle.js +6985 -0
- package/tsparticles.preset.bubbles.bundle.min.js +2 -0
- package/tsparticles.preset.bubbles.bundle.min.js.LICENSE.txt +8 -0
- package/tsparticles.preset.bubbles.js +230 -0
- package/tsparticles.preset.bubbles.min.js +2 -0
- package/tsparticles.preset.bubbles.min.js.LICENSE.txt +8 -0
- package/types/bundle.d.ts +3 -0
- package/types/index.d.ts +2 -0
- package/types/options.d.ts +2 -0
- package/umd/bundle.js +20 -0
- package/umd/index.js +32 -0
- package/umd/options.js +64 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see tsparticles.preset.bubbles.bundle.min.js.LICENSE.txt */
|
|
2
|
+
!function(t,i){if("object"==typeof exports&&"object"==typeof module)module.exports=i();else if("function"==typeof define&&define.amd)define([],i);else{var e=i();for(var s in e)("object"==typeof exports?exports:t)[s]=e[s]}}(this,(()=>(()=>{"use strict";var t={d:(i,e)=>{for(var s in e)t.o(e,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:e[s]})},o:(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},i={};t.r(i),t.d(i,{loadBubblesPreset:()=>Yi,tsParticles:()=>xi});class e{constructor(t,i,e){if("number"!=typeof t&&t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}else{if(void 0===t||void 0===i)throw new Error("tsParticles - Vector3d not initialized correctly");this.x=t,this.y=i,this.z=null!=e?e:0}}static get origin(){return e.create(0,0,0)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.updateFromAngle(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.updateFromAngle(this.angle,t)}static clone(t){return e.create(t.x,t.y,t.z)}static create(t,i,s){return new e(t,i,s)}add(t){return e.create(this.x+t.x,this.y+t.y,this.z+t.z)}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=t.z}copy(){return e.clone(this)}distanceTo(t){return this.sub(t).length}distanceToSq(t){return this.sub(t).getLengthSq()}div(t){return e.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 e.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}rotate(t){return e.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),0)}setTo(t){this.x=t.x,this.y=t.y;const i=t;this.z=i.z?i.z:0}sub(t){return e.create(this.x-t.x,this.y-t.y,this.z-t.z)}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=t.z}updateFromAngle(t,i){this.x=Math.cos(t)*i,this.y=Math.sin(t)*i}}class s extends e{constructor(t,i){super(t,i,0)}static get origin(){return s.create(0,0)}static clone(t){return s.create(t.x,t.y)}static create(t,i){return new s(t,i)}}let o=Math.random;new Map;function n(){return a(o(),0,1-1e-16)}function a(t,i,e){return Math.min(Math.max(t,i),e)}function r(t){const i=c(t);let e=h(t);return i===e&&(e=0),n()*(i-e)+e}function l(t){return"number"==typeof t?t:r(t)}function h(t){return"number"==typeof t?t:t.min}function c(t){return"number"==typeof t?t:t.max}function d(t,i){if(t===i||void 0===i&&"number"==typeof t)return t;const e=h(t),s=c(t);return void 0!==i?{min:Math.min(e,i),max:Math.max(s,i)}:d(e,s)}function u(t){const i=t.random,{enable:e,minimumValue:s}="boolean"==typeof i?{enable:i,minimumValue:0}:i;return l(e?d(t.value,s):t.value)}function p(t,i){const e=t.x-i.x,s=t.y-i.y;return{dx:e,dy:s,distance:Math.sqrt(e**2+s**2)}}function v(t,i){return p(t,i).distance}function f(t){var i,e;const s={x:void 0!==(null===(i=t.position)||void 0===i?void 0:i.x)?l(t.position.x):void 0,y:void 0!==(null===(e=t.position)||void 0===e?void 0:e.y)?l(t.position.y):void 0};return function(t){var i,e,s,o;return{x:(null!==(e=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==e?e:100*n())*t.size.width/100,y:(null!==(o=null===(s=t.position)||void 0===s?void 0:s.y)&&void 0!==o?o:100*n())*t.size.height/100}}({size:t.size,position:s})}function m(t){var i,e,s,o;return{x:null!==(e=null===(i=t.position)||void 0===i?void 0:i.x)&&void 0!==e?e:n()*t.size.width,y:null!==(o=null===(s=t.position)||void 0===s?void 0:s.y)&&void 0!==o?o:n()*t.size.height}}function y(t){return t?t.endsWith("%")?parseFloat(t)/100:parseFloat(t):1}function g(){return"undefined"==typeof window||!window||void 0===window.document||!window.document}function w(t){if(!g()&&"undefined"!=typeof matchMedia)return matchMedia(t)}function b(t,i){return t===i||i instanceof Array&&i.indexOf(t)>-1}function _(t){return Math.floor(n()*t.length)}function x(t,i,e=!0){return t[void 0!==i&&e?i%t.length:_(t)]}function z(t,i,e,s,o){return function(t,i,e,s){let o=!0;s&&"bottom"!==s||(o=t.top<i.height+e.x);!o||s&&"left"!==s||(o=t.right>e.x);!o||s&&"right"!==s||(o=t.left<i.width+e.y);!o||s&&"top"!==s||(o=t.bottom>e.y);return o}(P(t,null!=s?s:0),i,e,o)}function P(t,i){return{bottom:t.y+i,left:t.x-i,right:t.x+i,top:t.y-i}}function M(t,...i){for(const e of i){if(null==e)continue;if("object"!=typeof e){t=e;continue}const i=Array.isArray(e);!i||"object"==typeof t&&t&&Array.isArray(t)?i||"object"==typeof t&&t&&!Array.isArray(t)||(t={}):t=[];for(const i in e){if("__proto__"===i)continue;const s=e[i],o="object"==typeof s,n=t;n[i]=o&&Array.isArray(s)?s.map((t=>M(n[i],t))):M(n[i],s)}}return t}function C(t,i){return t instanceof Array?t.map(((t,e)=>i(t,e))):i(t,0)}function k(t,i,e){return t instanceof Array?x(t,i,e):t}function S(t,i){const e=t.value,s=t.animation,o={enable:t.animation.enable,value:l(t.value)*i,max:c(e)*i,min:h(e)*i,loops:0,maxLoops:l(t.animation.count)};if(s.enable){o.decay=1-l(s.decay);let t=!1;switch(s.mode){case"increase":o.status="increasing";break;case"decrease":o.status="decreasing";break;case"random":o.status=n()>=.5?"increasing":"decreasing";break;case"auto":t=!0}switch(s.startValue){case"min":o.value=o.min,t&&(o.status="increasing");break;case"random":o.value=r(o),t&&(o.status=n()>=.5?"increasing":"decreasing");break;default:o.value=o.max,t&&(o.status="decreasing")}}return o.initialValue=o.value,o}const O="random",D=new Map;function I(t){D.set(t.key,t)}function E(t,i,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(i-t)*e:e<.5?i:e<2/3?t+(i-t)*(2/3-e)*6:t}function R(t){for(const[,i]of D)if(t.startsWith(i.stringPrefix))return i.parseString(t);const i=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,((t,i,e,s,o)=>i+i+e+e+s+s+(void 0!==o?o+o:""))),e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(i);return e?{a:void 0!==e[4]?parseInt(e[4],16)/255:1,b:parseInt(e[3],16),g:parseInt(e[2],16),r:parseInt(e[1],16)}:void 0}function T(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return L(s.value,i,e);if(s.value instanceof Array)return T({value:x(s.value,i,e)});for(const[,t]of D){const i=t.handleRangeColor(s);if(i)return i}}function L(t,i,e=!0){if(!t)return;const s="string"==typeof t?{value:t}:t;if("string"==typeof s.value)return s.value===O?q():function(t){return R(t)}(s.value);if(s.value instanceof Array)return L({value:x(s.value,i,e)});for(const[,t]of D){const i=t.handleColor(s);if(i)return i}}function A(t,i,e=!0){const s=T(t,i,e);return s?F(s):void 0}function F(t){const i=t.r/255,e=t.g/255,s=t.b/255,o=Math.max(i,e,s),n=Math.min(i,e,s),a={h:0,l:(o+n)/2,s:0};return o!==n&&(a.s=a.l<.5?(o-n)/(o+n):(o-n)/(2-o-n),a.h=i===o?(e-s)/(o-n):a.h=e===o?2+(s-i)/(o-n):4+(i-e)/(o-n)),a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360),a.h>=360&&(a.h-=360),a}function V(t){const i={b:0,g:0,r:0},e={h:t.h/360,l:t.l/100,s:t.s/100};if(e.s){const t=e.l<.5?e.l*(1+e.s):e.l+e.s-e.l*e.s,s=2*e.l-t;i.r=E(s,t,e.h+1/3),i.g=E(s,t,e.h),i.b=E(s,t,e.h-1/3)}else i.b=e.l,i.g=e.l,i.r=e.l;return i.r=Math.floor(255*i.r),i.g=Math.floor(255*i.g),i.b=Math.floor(255*i.b),i}function q(t){const i=null!=t?t:0;return{b:Math.floor(r(d(i,256))),g:Math.floor(r(d(i,256))),r:Math.floor(r(d(i,256)))}}function W(t,i){return`rgba(${t.r}, ${t.g}, ${t.b}, ${null!=i?i:1})`}function U(t,i){return`hsla(${t.h}, ${t.s}%, ${t.l}%, ${null!=i?i:1})`}function B(t){return void 0!==t?{h:t.h.value,s:t.s.value,l:t.l.value}:void 0}function H(t,i,e){t.enable=i.enable,t.enable?(t.velocity=l(i.speed)/100*e,t.decay=1-l(i.decay),t.status="increasing",t.loops=0,t.maxLoops=l(i.count),i.sync||(t.velocity*=n(),t.value*=n()),t.initialValue=t.value):t.velocity=0}function j(t,i,e){t.fillStyle=null!=e?e:"rgba(0,0,0,0)",t.fillRect(0,0,i.width,i.height)}function G(t,i,e,s){e.backgroundMask.enable&&s?(X(t,i),j(t,i,s)):j(t,i)}function X(t,i){t.clearRect(0,0,i.width,i.height)}const Y="generated",$="touchend",N="pointermove",Z="pointerleave";function Q(t,i,e){var s;const o=i[e];void 0!==o&&(t[e]=(null!==(s=t[e])&&void 0!==s?s:1)*o)}class J{constructor(t){this.container=t,this.size={height:0,width:0},this._context=null,this._generated=!1,this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[],this._mutationObserver=g()||"undefined"==typeof MutationObserver?void 0:new MutationObserver((t=>{for(const i of t)"attributes"===i.type&&"style"===i.attributeName&&this._repairStyle()}))}get _fullScreen(){return this.container.actualOptions.fullScreen.enable}clear(){this.draw((t=>{!function(t,i,e,s,o){if(e.backgroundMask.enable)G(t,i,e,o);else{const o=e.particles.move.trail;o.enable&&o.length>0&&s?s.color?j(t,i,W(s.color,s.opacity)):s.image&&function(t,i,e,s){e&&(t.globalAlpha=s,t.drawImage(e,0,0,i.width,i.height),t.globalAlpha=1)}(t,i,s.image,s.opacity):X(t,i)}}(t,this.size,this.container.actualOptions,this._trailFill,this._coverColorStyle)}))}destroy(){var t,i;null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._generated?null===(i=this.element)||void 0===i||i.remove():this._resetOriginalStyle(),this.draw((t=>{X(t,this.size)})),this._preDrawUpdaters=[],this._postDrawUpdaters=[],this._resizePlugins=[],this._colorPlugins=[]}draw(t){if(this._context)return t(this._context)}drawParticle(t,i){var e;if(t.spawning||t.destroyed)return;const s=t.getRadius();if(s<=0)return;const o=t.getFillColor(),n=null!==(e=t.getStrokeColor())&&void 0!==e?e:o;let[a,r]=this._getPluginParticleColors(t);a||(a=o),r||(r=n),(a||r)&&this.draw((e=>{var o,n,l,h;const c=this.container.actualOptions,d=t.options.zIndex,u=(1-t.zIndexFactor)**d.opacityRate,p=null!==(l=null!==(o=t.bubble.opacity)&&void 0!==o?o:null===(n=t.opacity)||void 0===n?void 0:n.value)&&void 0!==l?l:1,v=p*u,f=(null!==(h=t.strokeOpacity)&&void 0!==h?h:p)*u,m={},y={fill:a?U(a,v):void 0};y.stroke=r?U(r,f):y.fill,this._applyPreDrawUpdaters(e,t,s,v,y,m),function(t){var i,e,s,o,n;const{container:a,context:r,particle:l,delta:h,colorStyles:c,backgroundMask:d,composite:u,radius:p,opacity:v,shadow:f,transform:m}=t,y=l.getPosition(),g=l.rotation+(l.pathRotation?l.velocity.angle:0),w=Math.sin(g),b=Math.cos(g),_={a:b*(null!==(i=m.a)&&void 0!==i?i:1),b:w*(null!==(e=m.b)&&void 0!==e?e:1),c:-w*(null!==(s=m.c)&&void 0!==s?s:1),d:b*(null!==(o=m.d)&&void 0!==o?o:1)};r.setTransform(_.a,_.b,_.c,_.d,y.x,y.y),r.beginPath(),d&&(r.globalCompositeOperation=u);const x=l.shadowColor;f.enable&&x&&(r.shadowBlur=f.blur,r.shadowColor=W(x),r.shadowOffsetX=f.offset.x,r.shadowOffsetY=f.offset.y),c.fill&&(r.fillStyle=c.fill);const z=null!==(n=l.strokeWidth)&&void 0!==n?n:0;r.lineWidth=z,c.stroke&&(r.strokeStyle=c.stroke),function(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);a&&a.draw(i,e,s,o,n,t.retina.pixelRatio)}(a,r,l,p,v,h),z>0&&r.stroke(),l.close&&r.closePath(),l.fill&&r.fill(),function(t,i,e,s,o,n){if(!e.shape)return;const a=t.drawers.get(e.shape);(null==a?void 0:a.afterEffect)&&a.afterEffect(i,e,s,o,n,t.retina.pixelRatio)}(a,r,l,p,v,h),r.globalCompositeOperation="source-over",r.setTransform(1,0,0,1,0,0)}({container:this.container,context:e,particle:t,delta:i,colorStyles:y,backgroundMask:c.backgroundMask.enable,composite:c.backgroundMask.composite,radius:s*(1-t.zIndexFactor)**d.sizeRate,opacity:v,shadow:t.options.shadow,transform:m}),this._applyPostDrawUpdaters(t)}))}drawParticlePlugin(t,i,e){this.draw((s=>{!function(t,i,e,s){i.drawParticle&&i.drawParticle(t,e,s)}(s,t,i,e)}))}drawPlugin(t,i){this.draw((e=>{!function(t,i,e){i.draw&&i.draw(t,e)}(e,t,i)}))}async init(){var t;this._resize(),this._initStyle(),this._initCover();try{await this._initTrail()}catch(t){console.error(t)}this._initBackground(),this.element&&(null===(t=this._mutationObserver)||void 0===t||t.observe(this.element,{attributes:!0})),this._initUpdaters(),this._initPlugins(),this._paint(),this.container.updateActualOptions(),this._resize(),this._initBackground()}loadCanvas(t){var i,e;this._generated&&(null===(i=this.element)||void 0===i||i.remove()),this._generated=t.dataset&&Y in t.dataset?"true"===t.dataset[Y]:this._generated,this.element=t,this.element.ariaHidden="true",this._originalStyle=M({},this.element.style),this.size.height=t.offsetHeight,this.size.width=t.offsetWidth,this._context=function(t){const i=t.getContext("2d");if(!i)throw new Error("Error tsParticles - No canvas context found");return i}(t),null===(e=this._mutationObserver)||void 0===e||e.observe(this.element,{attributes:!0}),this.container.retina.init(),this._initBackground()}async windowResize(){if(!this.element)return;this._resize();const t=this.container,i=t.updateActualOptions();t.particles.setDensity(),this._applyResizePlugins(),i&&await t.refresh()}_applyPostDrawUpdaters(t){var i;for(const e of this._postDrawUpdaters)null===(i=e.afterDraw)||void 0===i||i.call(e,t)}_applyPreDrawUpdaters(t,i,e,s,o,n){var a;for(const r of this._preDrawUpdaters){if(r.getColorStyles){const{fill:n,stroke:a}=r.getColorStyles(i,t,e,s);n&&(o.fill=n),a&&(o.stroke=a)}if(r.getTransformValues){const t=r.getTransformValues(i);for(const i in t)Q(n,t,i)}null===(a=r.beforeDraw)||void 0===a||a.call(r,i)}}_applyResizePlugins(){for(const t of this._resizePlugins)t.resize&&t.resize()}_getPluginParticleColors(t){let i,e;for(const s of this._colorPlugins)if(!i&&s.particleFillColor&&(i=A(s.particleFillColor(t))),!e&&s.particleStrokeColor&&(e=A(s.particleStrokeColor(t))),i&&e)break;return[i,e]}_initBackground(){const t=this.container.actualOptions.background,i=this.element,e=null==i?void 0:i.style;if(e){if(t.color){const i=T(t.color);e.backgroundColor=i?W(i,t.opacity):""}else e.backgroundColor="";e.backgroundImage=t.image||"",e.backgroundPosition=t.position||"",e.backgroundRepeat=t.repeat||"",e.backgroundSize=t.size||""}}_initCover(){const t=this.container.actualOptions.backgroundMask.cover,i=T(t.color);if(i){const e={r:i.r,g:i.g,b:i.b,a:t.opacity};this._coverColorStyle=W(e,e.a)}}_initPlugins(){this._resizePlugins=[];for(const[,t]of this.container.plugins)t.resize&&this._resizePlugins.push(t),(t.particleFillColor||t.particleStrokeColor)&&this._colorPlugins.push(t)}_initStyle(){const t=this.element,i=this.container.actualOptions;if(t){this._fullScreen?(this._originalStyle=M({},t.style),this._setFullScreenStyle()):this._resetOriginalStyle();for(const e in i.style){if(!e||!i.style)continue;const s=i.style[e];s&&t.style.setProperty(e,s,"important")}}}async _initTrail(){const t=this.container.actualOptions,i=t.particles.move.trail,e=i.fill;if(i.enable)if(e.color){const i=T(e.color);if(!i)return;const s=t.particles.move.trail;this._trailFill={color:Object.assign({},i),opacity:1/s.length}}else await new Promise(((t,s)=>{if(!e.image)return;const o=document.createElement("img");o.addEventListener("load",(()=>{this._trailFill={image:o,opacity:1/i.length},t()})),o.addEventListener("error",(t=>{s(t.error)})),o.src=e.image}))}_initUpdaters(){this._preDrawUpdaters=[],this._postDrawUpdaters=[];for(const t of this.container.particles.updaters)t.afterDraw&&this._postDrawUpdaters.push(t),(t.getColorStyles||t.getTransformValues||t.beforeDraw)&&this._preDrawUpdaters.push(t)}_paint(){this.draw((t=>{G(t,this.size,this.container.actualOptions,this._coverColorStyle)}))}_repairStyle(){var t,i;const e=this.element;e&&(null===(t=this._mutationObserver)||void 0===t||t.disconnect(),this._initStyle(),this._initBackground(),null===(i=this._mutationObserver)||void 0===i||i.observe(e,{attributes:!0}))}_resetOriginalStyle(){const t=this.element,i=this._originalStyle;t&&i&&(t.style.position=i.position,t.style.zIndex=i.zIndex,t.style.top=i.top,t.style.left=i.left,t.style.width=i.width,t.style.height=i.height)}_resize(){if(!this.element)return;const t=this.container,i=t.retina.pixelRatio,e=t.canvas.size,s=this.element.offsetWidth*i,o=this.element.offsetHeight*i;if(o===e.height&&s===e.width&&o===this.element.height&&s===this.element.width)return;const n=Object.assign({},e);this.element.width=e.width=this.element.offsetWidth*i,this.element.height=e.height=this.element.offsetHeight*i,this.container.started&&(this.resizeFactor={width:e.width/n.width,height:e.height/n.height})}_setFullScreenStyle(){const t=this.element;if(!t)return;const i="important";t.style.setProperty("position","fixed",i),t.style.setProperty("z-index",this.container.actualOptions.fullScreen.zIndex.toString(10),i),t.style.setProperty("top","0",i),t.style.setProperty("left","0",i),t.style.setProperty("width","100%",i),t.style.setProperty("height","100%",i)}}function K(t,i,e,s,o){if(s){let s={passive:!0};"boolean"==typeof o?s.capture=o:void 0!==o&&(s=o),t.addEventListener(i,e,s)}else{const s=o;t.removeEventListener(i,e,s)}}class tt{constructor(t){this.container=t,this.canPush=!0,this.handlers={mouseMove:t=>this._mouseTouchMove(t),touchStart:t=>this._mouseTouchMove(t),touchMove:t=>this._mouseTouchMove(t),touchEnd:()=>this._mouseTouchFinish(),mouseLeave:()=>this._mouseTouchFinish(),touchCancel:()=>this._mouseTouchFinish(),touchEndClick:t=>this._mouseTouchClick(t),mouseUp:t=>this._mouseTouchClick(t),mouseDown:()=>this._mouseDown(),visibilityChange:()=>this._handleVisibilityChange(),themeChange:t=>this._handleThemeChange(t),oldThemeChange:t=>this._handleThemeChange(t),resize:()=>this._handleWindowResize()}}addListeners(){this._manageListeners(!0)}removeListeners(){this._manageListeners(!1)}_doMouseTouchClick(t){const i=this.container,e=i.actualOptions;if(this.canPush){const t=i.interactivity.mouse,s=t.position;if(!s)return;t.clickPosition=Object.assign({},s),t.clickTime=(new Date).getTime();C(e.interactivity.events.onClick.mode,(t=>this._handleClickMode(t)))}"touchend"===t.type&&setTimeout((()=>this._mouseTouchFinish()),500)}_handleClickMode(t){this.container.handleClickMode(t)}_handleThemeChange(t){const i=t,e=this.container,s=e.options,o=s.defaultThemes,n=i.matches?o.dark:o.light,a=s.themes.find((t=>t.name===n));a&&a.default.auto&&e.loadTheme(n)}_handleVisibilityChange(){const t=this.container,i=t.actualOptions;this._mouseTouchFinish(),i.pauseOnBlur&&(t.pageHidden=(null===document||void 0===document?void 0:document.hidden)||!1,t.pageHidden?t.pause():t.getAnimationStatus()?t.play(!0):t.draw(!0))}_handleWindowResize(){this.resizeTimeout&&(clearTimeout(this.resizeTimeout),delete this.resizeTimeout),this.resizeTimeout=setTimeout((async()=>{var t;return null===(t=this.container.canvas)||void 0===t?void 0:t.windowResize()}),1e3*this.container.actualOptions.interactivity.events.resize.delay)}_manageInteractivityEvents(t){var i;const e=this.handlers,s=this.container,o=s.actualOptions,n=o.interactivity.detectsOn;let a=Z;if("window"===n)s.interactivity.element=window,a="pointerout";else if("parent"===n&&s.canvas.element){const t=s.canvas.element;s.interactivity.element=null!==(i=t.parentElement)&&void 0!==i?i:t.parentNode}else s.interactivity.element=s.canvas.element;const r=s.interactivity.element;if(!r)return;const l=r;(o.interactivity.events.onHover.enable||o.interactivity.events.onClick.enable)&&(K(r,N,e.mouseMove,t),K(r,"touchstart",e.touchStart,t),K(r,"touchmove",e.touchMove,t),o.interactivity.events.onClick.enable?(K(r,$,e.touchEndClick,t),K(r,"pointerup",e.mouseUp,t),K(r,"pointerdown",e.mouseDown,t)):K(r,$,e.touchEnd,t),K(r,a,e.mouseLeave,t),K(r,"touchcancel",e.touchCancel,t)),s.canvas.element&&(s.canvas.element.style.pointerEvents=l===s.canvas.element?"initial":"none")}_manageListeners(t){this._manageMediaEvents(t),this._manageInteractivityEvents(t),this._manageResizeEvent(t),this._manageVisibilityEvent(t)}_manageMediaEvents(t){const i=this.handlers,e=w("(prefers-color-scheme: dark)");e&&(void 0===e.addEventListener?void 0!==e.addListener&&(t?e.addListener(i.oldThemeChange):e.removeListener(i.oldThemeChange)):K(e,"change",i.themeChange,t))}_manageResizeEvent(t){const i=this.handlers,e=this.container;e.actualOptions.interactivity.events.resize&&("undefined"!=typeof ResizeObserver?this.resizeObserver&&!t?(e.canvas.element&&this.resizeObserver.unobserve(e.canvas.element),this.resizeObserver.disconnect(),delete this.resizeObserver):!this.resizeObserver&&t&&e.canvas.element&&(this.resizeObserver=new ResizeObserver((t=>{t.find((t=>t.target===e.canvas.element))&&this._handleWindowResize()})),this.resizeObserver.observe(e.canvas.element)):K(window,"resize",i.resize,t))}_manageVisibilityEvent(t){document&&K(document,"visibilitychange",this.handlers.visibilityChange,t)}_mouseDown(){const t=this.container.interactivity;if(t){const i=t.mouse;i.clicking=!0,i.downPosition=i.position}}_mouseTouchClick(t){const i=this.container,e=i.actualOptions,s=i.interactivity.mouse;s.inside=!0;let o=!1;const n=s.position;if(n&&e.interactivity.events.onClick.enable){for(const[,t]of i.plugins)if(t.clickPositionValid&&(o=t.clickPositionValid(n),o))break;o||this._doMouseTouchClick(t),s.clicking=!1}}_mouseTouchFinish(){const t=this.container.interactivity;if(!t)return;const i=t.mouse;delete i.position,delete i.clickPosition,delete i.downPosition,t.status=Z,i.inside=!1,i.clicking=!1}_mouseTouchMove(t){var i,e,s,o,n,a,r;const l=this.container,h=l.actualOptions;if(!(null===(i=l.interactivity)||void 0===i?void 0:i.element))return;let c;l.interactivity.mouse.inside=!0;const d=l.canvas.element;if(t.type.startsWith("pointer")){this.canPush=!0;const i=t;if(l.interactivity.element===window){if(d){const t=d.getBoundingClientRect();c={x:i.clientX-t.left,y:i.clientY-t.top}}}else if("parent"===h.interactivity.detectsOn){const t=i.target,o=i.currentTarget,n=l.canvas.element;if(t&&o&&n){const e=t.getBoundingClientRect(),s=o.getBoundingClientRect(),a=n.getBoundingClientRect();c={x:i.offsetX+2*e.left-(s.left+a.left),y:i.offsetY+2*e.top-(s.top+a.top)}}else c={x:null!==(e=i.offsetX)&&void 0!==e?e:i.clientX,y:null!==(s=i.offsetY)&&void 0!==s?s:i.clientY}}else i.target===l.canvas.element&&(c={x:null!==(o=i.offsetX)&&void 0!==o?o:i.clientX,y:null!==(n=i.offsetY)&&void 0!==n?n:i.clientY})}else{this.canPush="touchmove"!==t.type;const i=t,e=i.touches[i.touches.length-1],s=null==d?void 0:d.getBoundingClientRect();c={x:e.clientX-(null!==(a=null==s?void 0:s.left)&&void 0!==a?a:0),y:e.clientY-(null!==(r=null==s?void 0:s.top)&&void 0!==r?r:0)}}const u=l.retina.pixelRatio;c&&(c.x*=u,c.y*=u),l.interactivity.mouse.position=c,l.interactivity.status=N}}class it{constructor(t){this.container=t}async nextFrame(t){var i;try{const e=this.container;if(!e.smooth&&void 0!==e.lastFrameTime&&t<e.lastFrameTime+1e3/e.fpsLimit)return void e.draw(!1);null!==(i=e.lastFrameTime)&&void 0!==i||(e.lastFrameTime=t);const s=function(t,i=60,e=!1){return{value:t,factor:e?60/i:60*t/1e3}}(t-e.lastFrameTime,e.fpsLimit,e.smooth);if(e.lifeTime+=s.value,e.lastFrameTime=t,s.value>1e3)return void e.draw(!1);if(await e.particles.draw(s),e.duration>0&&e.lifeTime>e.duration)return void e.destroy();e.getAnimationStatus()&&e.draw(!1)}catch(t){console.error("tsParticles error in animation loop",t)}}}class et{constructor(){this.value=""}static create(t,i){const e=new et;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){void 0!==(null==t?void 0:t.value)&&(this.value=t.value)}}class st{constructor(){this.color=new et,this.color.value="",this.image="",this.position="",this.repeat="",this.size="",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=et.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 ot{constructor(){this.color=new et,this.color.value="#fff",this.opacity=1}load(t){t&&(void 0!==t.color&&(this.color=et.create(this.color,t.color)),void 0!==t.opacity&&(this.opacity=t.opacity))}}class nt{constructor(){this.composite="destination-out",this.cover=new ot,this.enable=!1}load(t){if(t){if(void 0!==t.composite&&(this.composite=t.composite),void 0!==t.cover){const i=t.cover,e="string"==typeof t.cover?{color:t.cover}:t.cover;this.cover.load(void 0!==i.color?i:{color:e})}void 0!==t.enable&&(this.enable=t.enable)}}}class at{constructor(){this.enable=!0,this.zIndex=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.zIndex&&(this.zIndex=t.zIndex))}}class rt{constructor(){this.enable=!1,this.mode=[]}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode))}}class lt{constructor(){this.selectors=[],this.enable=!1,this.mode=[],this.type="circle"}get el(){return this.elementId}set el(t){this.elementId=t}get elementId(){return this.ids}set elementId(t){this.ids=t}get ids(){return C(this.selectors,(t=>t.replace("#","")))}set ids(t){this.selectors=C(t,(t=>`#${t}`))}load(t){var i,e;if(!t)return;const s=null!==(e=null!==(i=t.ids)&&void 0!==i?i:t.elementId)&&void 0!==e?e:t.el;void 0!==s&&(this.ids=s),void 0!==t.selectors&&(this.selectors=t.selectors),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.type&&(this.type=t.type)}}class ht{constructor(){this.enable=!1,this.force=2,this.smooth=10}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.force&&(this.force=t.force),void 0!==t.smooth&&(this.smooth=t.smooth))}}class ct{constructor(){this.enable=!1,this.mode=[],this.parallax=new ht}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.parallax.load(t.parallax))}}class dt{constructor(){this.delay=.5,this.enable=!0}load(t){void 0!==t&&(void 0!==t.delay&&(this.delay=t.delay),void 0!==t.enable&&(this.enable=t.enable))}}class ut{constructor(){this.onClick=new rt,this.onDiv=new lt,this.onHover=new ct,this.resize=new dt}get onclick(){return this.onClick}set onclick(t){this.onClick=t}get ondiv(){return this.onDiv}set ondiv(t){this.onDiv=t}get onhover(){return this.onHover}set onhover(t){this.onHover=t}load(t){var i,e,s;if(!t)return;this.onClick.load(null!==(i=t.onClick)&&void 0!==i?i:t.onclick);const o=null!==(e=t.onDiv)&&void 0!==e?e:t.ondiv;void 0!==o&&(this.onDiv=C(o,(t=>{const i=new lt;return i.load(t),i}))),this.onHover.load(null!==(s=t.onHover)&&void 0!==s?s:t.onhover),"boolean"==typeof t.resize?this.resize.enable=t.resize:this.resize.load(t.resize)}}class pt{constructor(t,i){this._engine=t,this._container=i}load(t){if(t&&this._container){const i=this._engine.plugins.interactors.get(this._container);if(i)for(const e of i)e.loadModeOptions&&e.loadModeOptions(this,t)}}}class vt{constructor(t,i){this.detectsOn="window",this.events=new ut,this.modes=new pt(t,i)}get detect_on(){return this.detectsOn}set detect_on(t){this.detectsOn=t}load(t){var i;if(!t)return;const e=null!==(i=t.detectsOn)&&void 0!==i?i:t.detect_on;void 0!==e&&(this.detectsOn=e),this.events.load(t.events),this.modes.load(t.modes)}}class ft{load(t){var i,e,s;t&&(void 0!==t.position&&(this.position={x:null!==(i=t.position.x)&&void 0!==i?i:50,y:null!==(e=t.position.y)&&void 0!==e?e:50,mode:null!==(s=t.position.mode)&&void 0!==s?s:"percent"}),void 0!==t.options&&(this.options=M({},t.options)))}}class mt{constructor(){this.maxWidth=1/0,this.options={},this.mode="canvas"}load(t){t&&(void 0!==t.maxWidth&&(this.maxWidth=t.maxWidth),void 0!==t.mode&&("screen"===t.mode?this.mode="screen":this.mode="canvas"),void 0!==t.options&&(this.options=M({},t.options)))}}class yt{constructor(){this.auto=!1,this.mode="any",this.value=!1}load(t){t&&(void 0!==t.auto&&(this.auto=t.auto),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.value&&(this.value=t.value))}}class gt{constructor(){this.name="",this.default=new yt}load(t){t&&(void 0!==t.name&&(this.name=t.name),this.default.load(t.default),void 0!==t.options&&(this.options=M({},t.options)))}}class wt{constructor(){this.count=0,this.enable=!1,this.offset=0,this.speed=1,this.decay=0,this.sync=!0}load(t){t&&(void 0!==t.count&&(this.count=d(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(this.offset=d(t.offset)),void 0!==t.speed&&(this.speed=d(t.speed)),void 0!==t.decay&&(this.decay=d(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class bt{constructor(){this.h=new wt,this.s=new wt,this.l=new wt}load(t){t&&(this.h.load(t.h),this.s.load(t.s),this.l.load(t.l))}}class _t extends et{constructor(){super(),this.animation=new bt}static create(t,i){const e=new _t;return e.load(t),void 0!==i&&("string"==typeof i||i instanceof Array?e.load({value:i}):e.load(i)),e}load(t){if(super.load(t),!t)return;const i=t.animation;void 0!==i&&(void 0!==i.enable?this.animation.h.load(i):this.animation.load(t.animation))}}class xt{constructor(){this.speed=2}load(t){t&&void 0!==t.speed&&(this.speed=t.speed)}}class zt{constructor(){this.enable=!0,this.retries=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.retries&&(this.retries=t.retries))}}class Pt{constructor(){this.count=0,this.enable=!1,this.speed=1,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.count&&(this.count=d(t.count)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=d(t.speed)),void 0!==t.decay&&(this.decay=d(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class Mt extends Pt{constructor(){super(),this.mode="auto",this.startValue="random"}load(t){super.load(t),t&&(void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue),void 0!==t.mode&&(this.mode=t.mode),void 0!==t.startValue&&(this.startValue=t.startValue))}}class Ct{constructor(){this.enable=!1,this.minimumValue=0}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.minimumValue&&(this.minimumValue=t.minimumValue))}}class kt{constructor(){this.random=new Ct,this.value=0}load(t){t&&("boolean"==typeof t.random?this.random.enable=t.random:this.random.load(t.random),void 0!==t.value&&(this.value=d(t.value,this.random.enable?this.random.minimumValue:void 0)))}}class St extends kt{constructor(){super(),this.animation=new Pt}get anim(){return this.animation}set anim(t){this.animation=t}load(t){var i;if(super.load(t),!t)return;const e=null!==(i=t.animation)&&void 0!==i?i:t.anim;void 0!==e&&this.animation.load(e)}}class Ot extends St{constructor(){super(),this.animation=new Mt}load(t){super.load(t),t&&void 0!==t.animation&&(this.value=d(this.value,this.animation.enable?this.animation.minimumValue:void 0))}}class Dt extends kt{constructor(){super(),this.random.minimumValue=.1,this.value=1}}class It{constructor(){this.horizontal=new Dt,this.vertical=new Dt}load(t){t&&(this.horizontal.load(t.horizontal),this.vertical.load(t.vertical))}}class Et{constructor(){this.absorb=new xt,this.bounce=new It,this.enable=!1,this.mode="bounce",this.overlap=new zt}load(t){t&&(this.absorb.load(t.absorb),this.bounce.load(t.bounce),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.mode&&(this.mode=t.mode),this.overlap.load(t.overlap))}}class Rt{constructor(){this.offset=0,this.value=90}load(t){t&&(void 0!==t.offset&&(this.offset=d(t.offset)),void 0!==t.value&&(this.value=d(t.value)))}}class Tt{constructor(){this.distance=200,this.enable=!1,this.rotate={x:3e3,y:3e3}}get rotateX(){return this.rotate.x}set rotateX(t){this.rotate.x=t}get rotateY(){return this.rotate.y}set rotateY(t){this.rotate.y=t}load(t){var i,e,s,o;if(!t)return;void 0!==t.distance&&(this.distance=d(t.distance)),void 0!==t.enable&&(this.enable=t.enable);const n=null!==(e=null===(i=t.rotate)||void 0===i?void 0:i.x)&&void 0!==e?e:t.rotateX;void 0!==n&&(this.rotate.x=n);const a=null!==(o=null===(s=t.rotate)||void 0===s?void 0:s.y)&&void 0!==o?o:t.rotateY;void 0!==a&&(this.rotate.y=a)}}class Lt{constructor(){this.x=50,this.y=50,this.mode="percent",this.radius=0}load(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 At{constructor(){this.acceleration=9.81,this.enable=!1,this.inverse=!1,this.maxSpeed=50}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=d(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.inverse&&(this.inverse=t.inverse),void 0!==t.maxSpeed&&(this.maxSpeed=d(t.maxSpeed)))}}class Ft{constructor(){this.clamp=!0,this.delay=new kt,this.enable=!1,this.options={}}load(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=M(this.options,t.options)))}}class Vt{load(t){t&&(void 0!==t.color&&(this.color=et.create(this.color,t.color)),void 0!==t.image&&(this.image=t.image))}}class qt{constructor(){this.enable=!1,this.length=10,this.fill=new Vt}get fillColor(){return this.fill.color}set fillColor(t){this.fill.load({color:t})}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0===t.fill&&void 0===t.fillColor||this.fill.load(t.fill||{color:t.fillColor}),void 0!==t.length&&(this.length=t.length))}}class Wt{constructor(){this.default="out"}load(t){var i,e,s,o;t&&(void 0!==t.default&&(this.default=t.default),this.bottom=null!==(i=t.bottom)&&void 0!==i?i:t.default,this.left=null!==(e=t.left)&&void 0!==e?e:t.default,this.right=null!==(s=t.right)&&void 0!==s?s:t.default,this.top=null!==(o=t.top)&&void 0!==o?o:t.default)}}class Ut{constructor(){this.acceleration=0,this.enable=!1}load(t){t&&(void 0!==t.acceleration&&(this.acceleration=d(t.acceleration)),void 0!==t.enable&&(this.enable=t.enable),this.position=t.position?M({},t.position):void 0)}}class Bt{constructor(){this.angle=new Rt,this.attract=new Tt,this.center=new Lt,this.decay=0,this.distance={},this.direction="none",this.drift=0,this.enable=!1,this.gravity=new At,this.path=new Ft,this.outModes=new Wt,this.random=!1,this.size=!1,this.speed=2,this.spin=new Ut,this.straight=!1,this.trail=new qt,this.vibrate=!1,this.warp=!1}get bounce(){return this.collisions}set bounce(t){this.collisions=t}get collisions(){return!1}set collisions(t){}get noise(){return this.path}set noise(t){this.path=t}get outMode(){return this.outModes.default}set outMode(t){this.outModes.default=t}get out_mode(){return this.outMode}set out_mode(t){this.outMode=t}load(t){var i,e,s;if(!t)return;this.angle.load("number"==typeof t.angle?{value:t.angle}:t.angle),this.attract.load(t.attract),this.center.load(t.center),void 0!==t.decay&&(this.decay=d(t.decay)),void 0!==t.direction&&(this.direction=t.direction),void 0!==t.distance&&(this.distance="number"==typeof t.distance?{horizontal:t.distance,vertical:t.distance}:Object.assign({},t.distance)),void 0!==t.drift&&(this.drift=d(t.drift)),void 0!==t.enable&&(this.enable=t.enable),this.gravity.load(t.gravity);const o=null!==(e=null!==(i=t.outModes)&&void 0!==i?i:t.outMode)&&void 0!==e?e:t.out_mode;void 0!==o&&("object"==typeof o?this.outModes.load(o):this.outModes.load({default:o})),this.path.load(null!==(s=t.path)&&void 0!==s?s:t.noise),void 0!==t.random&&(this.random=t.random),void 0!==t.size&&(this.size=t.size),void 0!==t.speed&&(this.speed=d(t.speed)),this.spin.load(t.spin),void 0!==t.straight&&(this.straight=t.straight),this.trail.load(t.trail),void 0!==t.vibrate&&(this.vibrate=t.vibrate),void 0!==t.warp&&(this.warp=t.warp)}}class Ht extends Mt{constructor(){super(),this.destroy="none",this.speed=2}get opacity_min(){return this.minimumValue}set opacity_min(t){this.minimumValue=t}load(t){void 0!==(null==t?void 0:t.opacity_min)&&void 0===t.minimumValue&&(t.minimumValue=t.opacity_min),super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class jt extends Ot{constructor(){super(),this.animation=new Ht,this.random.minimumValue=.1,this.value=1}get anim(){return this.animation}set anim(t){this.animation=t}}class Gt{constructor(){this.enable=!1,this.width=1920,this.height=1080}get area(){return this.width}set area(t){this.width=t}get factor(){return this.height}set factor(t){this.height=t}get value_area(){return this.area}set value_area(t){this.area=t}load(t){var i,e,s;if(!t)return;void 0!==t.enable&&(this.enable=t.enable);const o=null!==(e=null!==(i=t.width)&&void 0!==i?i:t.area)&&void 0!==e?e:t.value_area;void 0!==o&&(this.width=o);const n=null!==(s=t.height)&&void 0!==s?s:t.factor;void 0!==n&&(this.height=n)}}class Xt{constructor(){this.density=new Gt,this.limit=0,this.value=100}get max(){return this.limit}set max(t){this.limit=t}load(t){var i;if(!t)return;this.density.load(t.density);const e=null!==(i=t.limit)&&void 0!==i?i:t.max;void 0!==e&&(this.limit=e),void 0!==t.value&&(this.value=t.value)}}class Yt{constructor(){this.blur=0,this.color=new et,this.enable=!1,this.offset={x:0,y:0},this.color.value="#000"}load(t){t&&(void 0!==t.blur&&(this.blur=t.blur),this.color=et.create(this.color,t.color),void 0!==t.enable&&(this.enable=t.enable),void 0!==t.offset&&(void 0!==t.offset.x&&(this.offset.x=t.offset.x),void 0!==t.offset.y&&(this.offset.y=t.offset.y)))}}class $t{constructor(){this.options={},this.type="circle",this.close=!0,this.fill=!0}load(t){var i;if(!t)return;void 0!==t.close&&(this.close=t.close),void 0!==t.fill&&(this.fill=t.fill);const e=t.options;if(void 0!==e)for(const t in e){const s=e[t];s&&(this.options[t]=M(null!==(i=this.options[t])&&void 0!==i?i:{},s))}void 0!==t.type&&(this.type=t.type)}}class Nt extends Mt{constructor(){super(),this.destroy="none",this.speed=5}get size_min(){return this.minimumValue}set size_min(t){this.minimumValue=t}load(t){void 0!==(null==t?void 0:t.size_min)&&void 0===t.minimumValue&&(t.minimumValue=t.size_min),super.load(t),t&&void 0!==t.destroy&&(this.destroy=t.destroy)}}class Zt extends Ot{constructor(){super(),this.animation=new Nt,this.random.minimumValue=1,this.value=3}get anim(){return this.animation}set anim(t){this.animation=t}}class Qt{constructor(){this.width=0}load(t){t&&(void 0!==t.color&&(this.color=_t.create(this.color,t.color)),void 0!==t.width&&(this.width=d(t.width)),void 0!==t.opacity&&(this.opacity=d(t.opacity)))}}class Jt extends kt{constructor(){super(),this.opacityRate=1,this.sizeRate=1,this.velocityRate=1}load(t){super.load(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 Kt{constructor(t,i){this._engine=t,this._container=i,this.bounce=new It,this.collisions=new Et,this.color=new _t,this.color.value="#fff",this.groups={},this.move=new Bt,this.number=new Xt,this.opacity=new jt,this.reduceDuplicates=!1,this.shadow=new Yt,this.shape=new $t,this.size=new Zt,this.stroke=new Qt,this.zIndex=new Jt}load(t){var i,e,s,o;if(!t)return;if(this.bounce.load(t.bounce),this.color.load(_t.create(this.color,t.color)),void 0!==t.groups)for(const e in t.groups){const s=t.groups[e];void 0!==s&&(this.groups[e]=M(null!==(i=this.groups[e])&&void 0!==i?i:{},s))}this.move.load(t.move),this.number.load(t.number),this.opacity.load(t.opacity),void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.shape.load(t.shape),this.size.load(t.size),this.shadow.load(t.shadow),this.zIndex.load(t.zIndex);const n=null!==(s=null===(e=t.move)||void 0===e?void 0:e.collisions)&&void 0!==s?s:null===(o=t.move)||void 0===o?void 0:o.bounce;void 0!==n&&(this.collisions.enable=n),this.collisions.load(t.collisions),void 0!==t.interactivity&&(this.interactivity=M({},t.interactivity));const a=t.stroke;if(a&&(this.stroke=C(a,(t=>{const i=new Qt;return i.load(t),i}))),this._container){const i=this._engine.plugins.updaters.get(this._container);if(i)for(const e of i)e.loadOptions&&e.loadOptions(this,t);const e=this._engine.plugins.interactors.get(this._container);if(e)for(const i of e)i.loadParticlesOptions&&i.loadParticlesOptions(this,t)}}}function ti(t,...i){for(const e of i)t.load(e)}function ii(t,i,...e){const s=new Kt(t,i);return ti(s,...e),s}class ei{constructor(t,i){this._engine=t,this._container=i,this.autoPlay=!0,this.background=new st,this.backgroundMask=new nt,this.defaultThemes={},this.delay=0,this.fullScreen=new at,this.detectRetina=!0,this.duration=0,this.fpsLimit=120,this.interactivity=new vt(t,i),this.manualParticles=[],this.name="default",this.particles=ii(this._engine,this._container),this.pauseOnBlur=!0,this.pauseOnOutsideViewport=!0,this.responsive=[],this.smooth=!1,this.style={},this.themes=[],this.zLayers=100}get backgroundMode(){return this.fullScreen}set backgroundMode(t){this.fullScreen.load(t)}get fps_limit(){return this.fpsLimit}set fps_limit(t){this.fpsLimit=t}get retina_detect(){return this.detectRetina}set retina_detect(t){this.detectRetina=t}load(t){var i,e,s,o,n;if(!t)return;void 0!==t.preset&&C(t.preset,(t=>this._importPreset(t))),void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.delay&&(this.delay=d(t.delay));const a=null!==(i=t.detectRetina)&&void 0!==i?i:t.retina_detect;void 0!==a&&(this.detectRetina=a),void 0!==t.duration&&(this.duration=d(t.duration));const r=null!==(e=t.fpsLimit)&&void 0!==e?e:t.fps_limit;void 0!==r&&(this.fpsLimit=r),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 l=null!==(s=t.fullScreen)&&void 0!==s?s:t.backgroundMode;"boolean"==typeof l?this.fullScreen.enable=l:this.fullScreen.load(l),this.backgroundMask.load(t.backgroundMask),this.interactivity.load(t.interactivity),void 0!==t.manualParticles&&(this.manualParticles=t.manualParticles.map((t=>{const i=new ft;return i.load(t),i}))),this.particles.load(t.particles),this.style=M(this.style,t.style),this._engine.plugins.loadOptions(this,t),void 0!==t.smooth&&(this.smooth=t.smooth);const h=this._engine.plugins.interactors.get(this._container);if(h)for(const i of h)i.loadOptions&&i.loadOptions(this,t);if(void 0!==t.responsive)for(const i of t.responsive){const t=new mt;t.load(i),this.responsive.push(t)}if(this.responsive.sort(((t,i)=>t.maxWidth-i.maxWidth)),void 0!==t.themes)for(const i of t.themes){const t=this.themes.find((t=>t.name===i.name));if(t)t.load(i);else{const t=new gt;t.load(i),this.themes.push(t)}}this.defaultThemes.dark=null===(o=this._findDefaultTheme("dark"))||void 0===o?void 0:o.name,this.defaultThemes.light=null===(n=this._findDefaultTheme("light"))||void 0===n?void 0:n.name}setResponsive(t,i,e){this.load(e);const s=this.responsive.find((e=>"screen"===e.mode&&screen?e.maxWidth>screen.availWidth:e.maxWidth*i>t));return this.load(null==s?void 0:s.options),null==s?void 0:s.maxWidth}setTheme(t){if(t){const i=this.themes.find((i=>i.name===t));i&&this.load(i.options)}else{const t=w("(prefers-color-scheme: dark)"),i=t&&t.matches,e=this._findDefaultTheme(i?"dark":"light");e&&this.load(e.options)}}_findDefaultTheme(t){var i;return null!==(i=this.themes.find((i=>i.default.value&&i.default.mode===t)))&&void 0!==i?i:this.themes.find((t=>t.default.value&&"any"===t.default.mode))}_importPreset(t){this.load(this._engine.plugins.getPreset(t))}}class si{constructor(t,i){this.container=i,this._engine=t,this._interactors=this._engine.plugins.getInteractors(this.container,!0),this._externalInteractors=[],this._particleInteractors=[]}async externalInteract(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.interact(t)}handleClickMode(t){for(const i of this._externalInteractors)i.handleClickMode&&i.handleClickMode(t)}init(){this._externalInteractors=[],this._particleInteractors=[];for(const t of this._interactors){switch(t.type){case"external":this._externalInteractors.push(t);break;case"particles":this._particleInteractors.push(t)}t.init()}}async particlesInteract(t,i){for(const e of this._externalInteractors)e.clear(t,i);for(const e of this._particleInteractors)e.isEnabled(t)&&await e.interact(t,i)}async reset(t){for(const i of this._externalInteractors)i.isEnabled()&&await i.reset(t);for(const i of this._particleInteractors)i.isEnabled(t)&&await i.reset(t)}}const oi=t=>{b(t.outMode,t.checkModes)&&(t.coord>t.maxCoord-2*t.radius?t.setCb(-t.radius):t.coord<2*t.radius&&t.setCb(t.radius))};class ni{constructor(t,i,e,s,o,n){this.container=e,this._engine=t,this.init(i,s,o,n)}destroy(t){var i;if(!this.unbreakable&&!this.destroyed){this.destroyed=!0,this.bubble.inRange=!1,this.slow.inRange=!1;for(const[,i]of this.container.plugins)i.particleDestroyed&&i.particleDestroyed(this,t);for(const i of this.container.particles.updaters)i.particleDestroyed&&i.particleDestroyed(this,t);null===(i=this.pathGenerator)||void 0===i||i.reset(this)}}draw(t){const i=this.container;for(const[,e]of i.plugins)i.canvas.drawParticlePlugin(e,this,t);i.canvas.drawParticle(this,t)}getFillColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:B(this.color))}getMass(){return this.getRadius()**2*Math.PI/2}getPosition(){return{x:this.position.x+this.offset.x,y:this.position.y+this.offset.y,z:this.position.z}}getRadius(){var t;return null!==(t=this.bubble.radius)&&void 0!==t?t:this.size.value}getStrokeColor(){var t;return this._getRollColor(null!==(t=this.bubble.color)&&void 0!==t?t:B(this.strokeColor))}init(t,i,e,s){var o,n,a,r,h,c,d;const p=this.container,v=this._engine;this.id=t,this.group=s,this.fill=!0,this.pathRotation=!1,this.close=!0,this.lastPathTime=0,this.destroyed=!1,this.unbreakable=!1,this.rotation=0,this.misplaced=!1,this.retina={maxDistance:{}},this.outType="normal",this.ignoresResizeRatio=!0;const f=p.retina.pixelRatio,m=p.actualOptions,y=ii(this._engine,p,m.particles),g=y.shape.type,{reduceDuplicates:w}=y;this.shape=k(g,this.id,w);const b=y.shape;if(e&&e.shape&&e.shape.type){const t=k(e.shape.type,this.id,w);t&&(this.shape=t,b.load(e.shape))}this.shapeData=this._loadShapeData(b,w),y.load(e),y.load(null===(o=this.shapeData)||void 0===o?void 0:o.particles),this.interactivity=new vt(v,p),this.interactivity.load(p.actualOptions.interactivity),this.interactivity.load(y.interactivity),this.fill=null!==(a=null===(n=this.shapeData)||void 0===n?void 0:n.fill)&&void 0!==a?a:this.fill,this.close=null!==(h=null===(r=this.shapeData)||void 0===r?void 0:r.close)&&void 0!==h?h:this.close,this.options=y;const _=this.options.move.path;this.pathDelay=1e3*u(_.delay),_.generator&&(this.pathGenerator=this._engine.plugins.getPathGenerator(_.generator),this.pathGenerator&&p.addPath(_.generator,this.pathGenerator)&&this.pathGenerator.init(p)),p.retina.initParticle(this),this.size=S(this.options.size,f),this.bubble={inRange:!1},this.slow={inRange:!1,factor:1},this._initPosition(i),this.initialVelocity=this._calculateVelocity(),this.velocity=this.initialVelocity.copy(),this.moveDecay=1-l(this.options.move.decay);const x=p.particles;x.needsSort=x.needsSort||x.lastZIndex<this.position.z,x.lastZIndex=this.position.z,this.zIndexFactor=this.position.z/p.zLayers,this.sides=24;let z=p.drawers.get(this.shape);z||(z=this._engine.plugins.getShapeDrawer(this.shape),z&&p.drawers.set(this.shape,z)),(null==z?void 0:z.loadShape)&&(null==z||z.loadShape(this));const P=null==z?void 0:z.getSidesCount;P&&(this.sides=P(this)),this.spawning=!1,this.shadowColor=T(this.options.shadow.color);for(const t of p.particles.updaters)t.init(this);for(const t of p.particles.movers)null===(c=t.init)||void 0===c||c.call(t,this);(null==z?void 0:z.particleInit)&&z.particleInit(p,this);for(const[,t]of p.plugins)null===(d=t.particleCreated)||void 0===d||d.call(t,this)}isInsideCanvas(){const t=this.getRadius(),i=this.container.canvas.size;return this.position.x>=-t&&this.position.y>=-t&&this.position.y<=i.height+t&&this.position.x<=i.width+t}isVisible(){return!this.destroyed&&!this.spawning&&this.isInsideCanvas()}reset(){var t;for(const i of this.container.particles.updaters)null===(t=i.reset)||void 0===t||t.call(i,this)}_calcPosition(t,i,s,o=0){var n,a,r,l;for(const[,o]of t.plugins){const t=void 0!==o.particlePosition?o.particlePosition(i,this):void 0;if(void 0!==t)return e.create(t.x,t.y,s)}const h=m({size:t.canvas.size,position:i}),c=e.create(h.x,h.y,s),d=this.getRadius(),u=this.options.move.outModes,p=i=>{oi({outMode:i,checkModes:["bounce","bounce-horizontal"],coord:c.x,maxCoord:t.canvas.size.width,setCb:t=>c.x+=t,radius:d})},v=i=>{oi({outMode:i,checkModes:["bounce","bounce-vertical"],coord:c.y,maxCoord:t.canvas.size.height,setCb:t=>c.y+=t,radius:d})};return p(null!==(n=u.left)&&void 0!==n?n:u.default),p(null!==(a=u.right)&&void 0!==a?a:u.default),v(null!==(r=u.top)&&void 0!==r?r:u.default),v(null!==(l=u.bottom)&&void 0!==l?l:u.default),this._checkOverlap(c,o)?this._calcPosition(t,void 0,s,o+1):c}_calculateVelocity(){const t=function(t){const i=s.origin;return i.length=1,i.angle=t,i}(this.direction).copy(),i=this.options.move;if("inside"===i.direction||"outside"===i.direction)return t;const e=Math.PI/180*l(i.angle.value),o=Math.PI/180*l(i.angle.offset),a={left:o-e/2,right:o+e/2};return i.straight||(t.angle+=r(d(a.left,a.right))),i.random&&"number"==typeof i.speed&&(t.length*=n()),t}_checkOverlap(t,i=0){const e=this.options.collisions,s=this.getRadius();if(!e.enable)return!1;const o=e.overlap;if(o.enable)return!1;const n=o.retries;if(n>=0&&i>n)throw new Error("Particle is overlapping and can't be placed");let a=!1;for(const i of this.container.particles.array)if(v(t,i.position)<s+i.getRadius()){a=!0;break}return a}_getRollColor(t){var i;if(!t||!this.roll||!this.backColor&&!this.roll.alter)return t;const e=this.roll.horizontal&&this.roll.vertical?2:1,s=this.roll.horizontal?Math.PI/2:0;return Math.floor(((null!==(i=this.roll.angle)&&void 0!==i?i:0)+s)/(Math.PI/e))%2?this.backColor?this.backColor:this.roll.alter?function(t,i,e){return{h:t.h,s:t.s,l:t.l+("darken"===i?-1:1)*e}}(t,this.roll.alter.type,this.roll.alter.value):t:t}_initPosition(t){var i,e;const o=this.container,r=l(this.options.zIndex.value);this.position=this._calcPosition(o,t,a(r,0,o.zLayers)),this.initialPosition=this.position.copy();const h=o.canvas.size,c=Object.assign({},this.options.move.center),d="percent"===c.mode;switch(this.moveCenter={x:c.x*(d?h.width/100:1),y:c.y*(d?h.height/100:1),radius:null!==(i=this.options.move.center.radius)&&void 0!==i?i:0,mode:null!==(e=this.options.move.center.mode)&&void 0!==e?e:"percent"},this.direction=function(t,i,e){if("number"==typeof t)return t*Math.PI/180;switch(t){case"top":return-Math.PI/2;case"top-right":return-Math.PI/4;case"right":return 0;case"bottom-right":return Math.PI/4;case"bottom":return Math.PI/2;case"bottom-left":return 3*Math.PI/4;case"left":return Math.PI;case"top-left":return-3*Math.PI/4;case"inside":return Math.atan2(e.y-i.y,e.x-i.x);case"outside":return Math.atan2(i.y-e.y,i.x-e.x);default:return n()*Math.PI*2}}(this.options.move.direction,this.position,this.moveCenter),this.options.move.direction){case"inside":this.outType="inside";break;case"outside":this.outType="outside"}this.offset=s.origin}_loadShapeData(t,i){const e=t.options[this.shape];if(e)return M({close:t.close,fill:t.fill},k(e,this.id,i))}}class ai{constructor(t,i){this.position=t,this.particle=i}}class ri{constructor(t,i){this.position={x:t,y:i}}}class li extends ri{constructor(t,i,e){super(t,i),this.radius=e}contains(t){return v(t,this.position)<=this.radius}intersects(t){const i=t,e=t,s=this.position,o=t.position,n=Math.abs(o.x-s.x),a=Math.abs(o.y-s.y),r=this.radius;if(void 0!==e.radius){return r+e.radius>Math.sqrt(n**2+a**2)}if(void 0!==i.size){const t=i.size.width,e=i.size.height;return Math.pow(n-t,2)+Math.pow(a-e,2)<=r**2||n<=r+t&&a<=r+e||n<=t||a<=e}return!1}}class hi extends ri{constructor(t,i,e,s){super(t,i),this.size={height:s,width:e}}contains(t){const i=this.size.width,e=this.size.height,s=this.position;return t.x>=s.x&&t.x<=s.x+i&&t.y>=s.y&&t.y<=s.y+e}intersects(t){t instanceof li&&t.intersects(this);const i=this.size.width,e=this.size.height,s=this.position,o=t.position,n=t instanceof hi?t.size:{width:0,height:0},a=n.width,r=n.height;return o.x<s.x+i&&o.x+a>s.x&&o.y<s.y+e&&o.y+r>s.y}}class ci{constructor(t,i){this.rectangle=t,this.capacity=i,this._points=[],this._divided=!1}insert(t){var i,e,s,o,n;return!!this.rectangle.contains(t.position)&&(this._points.length<this.capacity?(this._points.push(t),!0):(this._divided||this.subdivide(),null!==(n=(null===(i=this._NE)||void 0===i?void 0:i.insert(t))||(null===(e=this._NW)||void 0===e?void 0:e.insert(t))||(null===(s=this._SE)||void 0===s?void 0:s.insert(t))||(null===(o=this._SW)||void 0===o?void 0:o.insert(t)))&&void 0!==n&&n))}query(t,i,e){var s,o,n,a;const r=null!=e?e:[];if(!t.intersects(this.rectangle))return[];for(const e of this._points)!t.contains(e.position)&&v(t.position,e.position)>e.particle.getRadius()&&(!i||i(e.particle))||r.push(e.particle);return this._divided&&(null===(s=this._NE)||void 0===s||s.query(t,i,r),null===(o=this._NW)||void 0===o||o.query(t,i,r),null===(n=this._SE)||void 0===n||n.query(t,i,r),null===(a=this._SW)||void 0===a||a.query(t,i,r)),r}queryCircle(t,i,e){return this.query(new li(t.x,t.y,i),e)}queryRectangle(t,i,e){return this.query(new hi(t.x,t.y,i.width,i.height),e)}subdivide(){const t=this.rectangle.position.x,i=this.rectangle.position.y,e=this.rectangle.size.width,s=this.rectangle.size.height,o=this.capacity;this._NE=new ci(new hi(t,i,e/2,s/2),o),this._NW=new ci(new hi(t+e/2,i,e/2,s/2),o),this._SE=new ci(new hi(t,i+s/2,e/2,s/2),o),this._SW=new ci(new hi(t+e/2,i+s/2,e/2,s/2),o),this._divided=!0}}class di{constructor(t,i){this.container=i,this._engine=t,this.nextId=0,this.array=[],this.zArray=[],this.pool=[],this.limit=0,this.needsSort=!1,this.lastZIndex=0,this.interactionManager=new si(this._engine,i);const e=this.container.canvas.size;this.quadTree=new ci(new hi(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),this.movers=this._engine.plugins.getMovers(i,!0),this.updaters=this._engine.plugins.getUpdaters(i,!0)}get count(){return this.array.length}addManualParticles(){const t=this.container,i=t.actualOptions;for(const s of i.manualParticles)this.addParticle(s.position?"precise"===s.position.mode?s.position:(e={size:t.canvas.size,position:s.position}).position&&void 0!==e.position.x&&void 0!==e.position.y?{x:e.position.x*e.size.width/100,y:e.position.y*e.size.height/100}:void 0:void 0,s.options);var e}addParticle(t,i,e,s){const o=this.container.actualOptions.particles.number.limit;if(o>0){const t=this.count+1-o;t>0&&this.removeQuantity(t)}return this._pushParticle(t,i,e,s)}clear(){this.array=[],this.zArray=[]}destroy(){this.array=[],this.zArray=[],this.movers=[],this.updaters=[]}async draw(t){const i=this.container,e=this.container.canvas.size;this.quadTree=new ci(new hi(-e.width/4,-e.height/4,3*e.width/2,3*e.height/2),4),i.canvas.clear(),await this.update(t),this.needsSort&&(this.zArray.sort(((t,i)=>i.position.z-t.position.z||t.id-i.id)),this.lastZIndex=this.zArray[this.zArray.length-1].position.z,this.needsSort=!1);for(const[,e]of i.plugins)i.canvas.drawPlugin(e,t);for(const i of this.zArray)i.draw(t)}handleClickMode(t){this.interactionManager.handleClickMode(t)}init(){var t;const i=this.container,e=i.actualOptions;this.lastZIndex=0,this.needsSort=!1;let s=!1;this.updaters=this._engine.plugins.getUpdaters(i,!0),this.interactionManager.init();for(const[,t]of i.plugins)if(void 0!==t.particlesInitialization&&(s=t.particlesInitialization()),s)break;this.interactionManager.init();for(const[,t]of i.pathGenerators)t.init(i);if(this.addManualParticles(),!s){for(const i in e.particles.groups){const s=e.particles.groups[i];for(let o=this.count,n=0;n<(null===(t=s.number)||void 0===t?void 0:t.value)&&o<e.particles.number.value;o++,n++)this.addParticle(void 0,s,i)}for(let t=this.count;t<e.particles.number.value;t++)this.addParticle()}}push(t,i,e,s){this.pushing=!0;for(let o=0;o<t;o++)this.addParticle(null==i?void 0:i.position,e,s);this.pushing=!1}async redraw(){this.clear(),this.init(),await this.draw({value:0,factor:0})}remove(t,i,e){this.removeAt(this.array.indexOf(t),void 0,i,e)}removeAt(t,i=1,e,s){if(t<0||t>this.count)return;let o=0;for(let n=t;o<i&&n<this.count;n++)this._removeParticle(n--,e,s)&&o++}removeQuantity(t,i){this.removeAt(0,t,i)}setDensity(){const t=this.container.actualOptions;for(const i in t.particles.groups)this._applyDensity(t.particles.groups[i],0,i);this._applyDensity(t.particles,t.manualParticles.length)}async update(t){var i,e;const s=this.container,o=[];for(const[,t]of s.pathGenerators)t.update();for(const[,e]of s.plugins)null===(i=e.update)||void 0===i||i.call(e,t);for(const i of this.array){const n=s.canvas.resizeFactor;n&&!i.ignoresResizeRatio&&(i.position.x*=n.width,i.position.y*=n.height,i.initialPosition.x*=n.width,i.initialPosition.y*=n.height),i.ignoresResizeRatio=!1,await this.interactionManager.reset(i);for(const[,s]of this.container.plugins){if(i.destroyed)break;null===(e=s.particleUpdate)||void 0===e||e.call(s,i,t)}for(const e of this.movers)e.isEnabled(i)&&e.move(i,t);i.destroyed?o.push(i):this.quadTree.insert(new ai(i.getPosition(),i))}for(const t of o)this.remove(t);await this.interactionManager.externalInteract(t);for(const i of this.array){for(const e of this.updaters)e.update(i,t);i.destroyed||i.spawning||await this.interactionManager.particlesInteract(i,t)}delete s.canvas.resizeFactor}_applyDensity(t,i,e){var s;if(!(null===(s=t.number.density)||void 0===s?void 0:s.enable))return;const o=t.number,n=this._initDensityFactor(o.density),a=o.value,r=o.limit>0?o.limit:a,l=Math.min(a,r)*n+i,h=Math.min(this.count,this.array.filter((t=>t.group===e)).length);this.limit=o.limit*n,h<l?this.push(Math.abs(l-h),void 0,t,e):h>l&&this.removeQuantity(h-l,e)}_initDensityFactor(t){const i=this.container;if(!i.canvas.element||!t.enable)return 1;const e=i.canvas.element,s=i.retina.pixelRatio;return e.width*e.height/(t.factor*s**2*t.area)}_pushParticle(t,i,e,s){try{let o=this.pool.pop();o?o.init(this.nextId,t,i,e):o=new ni(this._engine,this.nextId,this.container,t,i,e);let n=!0;if(s&&(n=s(o)),!n)return;return this.array.push(o),this.zArray.push(o),this.nextId++,this._engine.dispatchEvent("particleAdded",{container:this.container,data:{particle:o}}),o}catch(t){return void console.warn(`error adding particle: ${t}`)}}_removeParticle(t,i,e){const s=this.array[t];if(!s||s.group!==i)return!1;s.destroy(e),this.array.splice(t,1);const o=this.zArray.indexOf(s);return this.zArray.splice(o,1),this.pool.push(s),this._engine.dispatchEvent("particleRemoved",{container:this.container,data:{particle:s}}),!0}}class ui{constructor(t){this.container=t}init(){const t=this.container,i=t.actualOptions;this.pixelRatio=!i.detectRetina||g()?1:window.devicePixelRatio,this.reduceFactor=1;const e=this.pixelRatio;if(t.canvas.element){const i=t.canvas.element;t.canvas.size.width=i.offsetWidth*e,t.canvas.size.height=i.offsetHeight*e}const s=i.particles;this.attractDistance=l(s.move.attract.distance)*e,this.sizeAnimationSpeed=l(s.size.animation.speed)*e,this.maxSpeed=l(s.move.gravity.maxSpeed)*e}initParticle(t){const i=t.options,e=this.pixelRatio,s=i.move.distance,o=t.retina;o.attractDistance=l(i.move.attract.distance)*e,o.moveDrift=l(i.move.drift)*e,o.moveSpeed=l(i.move.speed)*e,o.sizeAnimationSpeed=l(i.size.animation.speed)*e;const n=o.maxDistance;n.horizontal=void 0!==s.horizontal?s.horizontal*e:void 0,n.vertical=void 0!==s.vertical?s.vertical*e:void 0,o.maxSpeed=l(i.move.gravity.maxSpeed)*e}}function pi(t){return t&&!t.destroyed}function vi(t,i,...e){const s=new ei(t,i);return ti(s,...e),s}const fi={generate:t=>{const i=t.velocity.copy();return i.angle+=i.length*Math.PI/180,i},init:()=>{},update:()=>{},reset:()=>{}};class mi{constructor(t,i,e){this.id=i,this._engine=t,this.fpsLimit=120,this.smooth=!1,this._delay=0,this.duration=0,this.lifeTime=0,this._firstStart=!0,this.started=!1,this.destroyed=!1,this._paused=!0,this.lastFrameTime=0,this.zLayers=100,this.pageHidden=!1,this._sourceOptions=e,this._initialSourceOptions=e,this.retina=new ui(this),this.canvas=new J(this),this.particles=new di(this._engine,this),this.frameManager=new it(this),this.pathGenerators=new Map,this.interactivity={mouse:{clicking:!1,inside:!1}},this.plugins=new Map,this.drawers=new Map,this._options=vi(this._engine,this),this.actualOptions=vi(this._engine,this),this._eventListeners=new tt(this),"undefined"!=typeof IntersectionObserver&&IntersectionObserver&&(this._intersectionObserver=new IntersectionObserver((t=>this._intersectionManager(t)))),this._engine.dispatchEvent("containerBuilt",{container:this})}get options(){return this._options}get sourceOptions(){return this._sourceOptions}addClickHandler(t){if(!pi(this))return;const i=this.interactivity.element;if(!i)return;const e=(i,e,s)=>{if(!pi(this))return;const o=this.retina.pixelRatio,n={x:e.x*o,y:e.y*o},a=this.particles.quadTree.queryCircle(n,s*o);t(i,a)};let s=!1,o=!1;i.addEventListener("click",(t=>{if(!pi(this))return;const i=t,s={x:i.offsetX||i.clientX,y:i.offsetY||i.clientY};e(t,s,1)})),i.addEventListener("touchstart",(()=>{pi(this)&&(s=!0,o=!1)})),i.addEventListener("touchmove",(()=>{pi(this)&&(o=!0)})),i.addEventListener("touchend",(t=>{if(pi(this)){if(s&&!o){const i=t;let s=i.touches[i.touches.length-1];if(!s&&(s=i.changedTouches[i.changedTouches.length-1],!s))return;const o=this.canvas.element,n=o?o.getBoundingClientRect():void 0,a={x:s.clientX-(n?n.left:0),y:s.clientY-(n?n.top:0)};e(t,a,Math.max(s.radiusX,s.radiusY))}s=!1,o=!1}})),i.addEventListener("touchcancel",(()=>{pi(this)&&(s=!1,o=!1)}))}addPath(t,i,e=!1){return!(!pi(this)||!e&&this.pathGenerators.has(t))&&(this.pathGenerators.set(t,null!=i?i:fi),!0)}destroy(){if(!pi(this))return;this.stop(),this.particles.destroy(),this.canvas.destroy();for(const[,t]of this.drawers)t.destroy&&t.destroy(this);for(const t of this.drawers.keys())this.drawers.delete(t);this._engine.plugins.destroy(this),this.destroyed=!0;const t=this._engine.dom(),i=t.findIndex((t=>t===this));i>=0&&t.splice(i,1),this._engine.dispatchEvent("containerDestroyed",{container:this})}draw(t){if(!pi(this))return;let i=t;this._drawAnimationFrame=(g()?t=>setTimeout(t):t=>(requestAnimationFrame||setTimeout)(t))((async t=>{i&&(this.lastFrameTime=void 0,i=!1),await this.frameManager.nextFrame(t)}))}exportConfiguration(){return JSON.stringify(this.actualOptions,((t,i)=>{if("_engine"!==t&&"_container"!==t)return i}),2)}exportImage(t,i,e){const s=this.canvas.element;s&&s.toBlob(t,null!=i?i:"image/png",e)}exportImg(t){this.exportImage(t)}getAnimationStatus(){return!this._paused&&!this.pageHidden&&pi(this)}handleClickMode(t){if(pi(this)){this.particles.handleClickMode(t);for(const[,i]of this.plugins)i.handleClickMode&&i.handleClickMode(t)}}async init(){if(!pi(this))return;const t=this._engine.plugins.getSupportedShapes();for(const i of t){const t=this._engine.plugins.getShapeDrawer(i);t&&this.drawers.set(i,t)}this._options=vi(this._engine,this,this._initialSourceOptions,this.sourceOptions),this.actualOptions=vi(this._engine,this,this._options);const i=this._engine.plugins.getAvailablePlugins(this);for(const[t,e]of i)this.plugins.set(t,e);this.retina.init(),await this.canvas.init(),this.zLayers=this.actualOptions.zLayers,this.duration=1e3*l(this.actualOptions.duration),this._delay=1e3*l(this.actualOptions.delay),this.lifeTime=0,this.fpsLimit=this.actualOptions.fpsLimit>0?this.actualOptions.fpsLimit:120,this.smooth=this.actualOptions.smooth;for(const[,t]of this.drawers)t.init&&await t.init(this);for(const[,t]of this.plugins)t.init&&await t.init();this._engine.dispatchEvent("containerInit",{container:this}),this.particles.init(),this.particles.setDensity();for(const[,t]of this.plugins)t.particlesSetup&&t.particlesSetup();this._engine.dispatchEvent("particlesSetup",{container:this})}async loadTheme(t){pi(this)&&(this._currentTheme=t,await this.refresh())}pause(){if(pi(this)&&(void 0!==this._drawAnimationFrame&&((g()?t=>clearTimeout(t):t=>(cancelAnimationFrame||clearTimeout)(t))(this._drawAnimationFrame),delete this._drawAnimationFrame),!this._paused)){for(const[,t]of this.plugins)t.pause&&t.pause();this.pageHidden||(this._paused=!0),this._engine.dispatchEvent("containerPaused",{container:this})}}play(t){if(!pi(this))return;const i=this._paused||t;if(!this._firstStart||this.actualOptions.autoPlay){if(this._paused&&(this._paused=!1),i)for(const[,t]of this.plugins)t.play&&t.play();this._engine.dispatchEvent("containerPlay",{container:this}),this.draw(i||!1)}else this._firstStart=!1}async refresh(){if(pi(this))return this.stop(),this.start()}async reset(){if(pi(this))return this._options=vi(this._engine,this),this.refresh()}setNoise(t,i,e){pi(this)&&this.setPath(t,i,e)}setPath(t,i,e){if(!t||!pi(this))return;const s=Object.assign({},fi);if("function"==typeof t)s.generate=t,i&&(s.init=i),e&&(s.update=e);else{const i=s;s.generate=t.generate||i.generate,s.init=t.init||i.init,s.update=t.update||i.update}this.addPath("default",s,!0)}async start(){pi(this)&&!this.started&&(await this.init(),this.started=!0,await new Promise((t=>{this._delayTimeout=setTimeout((async()=>{this._eventListeners.addListeners(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.observe(this.interactivity.element);for(const[,t]of this.plugins)t.start&&await t.start();this._engine.dispatchEvent("containerStarted",{container:this}),this.play(),t()}),this._delay)})))}stop(){if(pi(this)&&this.started){this._delayTimeout&&(clearTimeout(this._delayTimeout),delete this._delayTimeout),this._firstStart=!0,this.started=!1,this._eventListeners.removeListeners(),this.pause(),this.particles.clear(),this.canvas.clear(),this.interactivity.element instanceof HTMLElement&&this._intersectionObserver&&this._intersectionObserver.unobserve(this.interactivity.element);for(const[,t]of this.plugins)t.stop&&t.stop();for(const t of this.plugins.keys())this.plugins.delete(t);this._sourceOptions=this._options,this._engine.dispatchEvent("containerStopped",{container:this})}}updateActualOptions(){this.actualOptions.responsive=[];const t=this.actualOptions.setResponsive(this.canvas.size.width,this.retina.pixelRatio,this._options);return this.actualOptions.setTheme(this._currentTheme),this.responsiveMaxWidth!==t&&(this.responsiveMaxWidth=t,!0)}_intersectionManager(t){if(pi(this)&&this.actualOptions.pauseOnOutsideViewport)for(const i of t)i.target===this.interactivity.element&&(i.isIntersecting?this.play:this.pause)()}}class yi{constructor(){this._listeners=new Map}addEventListener(t,i){var e;this.removeEventListener(t,i),this._listeners.get(t)||this._listeners.set(t,[]),null===(e=this._listeners.get(t))||void 0===e||e.push(i)}dispatchEvent(t,i){var e;null===(e=this._listeners.get(t))||void 0===e||e.forEach((t=>t(i)))}hasEventListener(t){return!!this._listeners.get(t)}removeAllEventListeners(t){t?this._listeners.delete(t):this._listeners=new Map}removeEventListener(t,i){const e=this._listeners.get(t);if(!e)return;const s=e.length,o=e.indexOf(i);o<0||(1===s?this._listeners.delete(t):e.splice(o,1))}}function gi(t,i,e,s=!1){let o=i.get(t);return o&&!s||(o=[...e.values()].map((i=>i(t))),i.set(t,o)),o}class wi{constructor(t){this._engine=t,this.plugins=[],this._initializers={interactors:new Map,movers:new Map,updaters:new Map},this.interactors=new Map,this.movers=new Map,this.updaters=new Map,this.presets=new Map,this.drawers=new Map,this.pathGenerators=new Map}addInteractor(t,i){this._initializers.interactors.set(t,i)}addParticleMover(t,i){this._initializers.movers.set(t,i)}addParticleUpdater(t,i){this._initializers.updaters.set(t,i)}addPathGenerator(t,i){this.getPathGenerator(t)||this.pathGenerators.set(t,i)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,i,e=!1){!e&&this.getPreset(t)||this.presets.set(t,i)}addShapeDrawer(t,i){C(t,(t=>{this.getShapeDrawer(t)||this.drawers.set(t,i)}))}destroy(t){this.updaters.delete(t),this.movers.delete(t),this.interactors.delete(t)}getAvailablePlugins(t){const i=new Map;for(const e of this.plugins)e.needsPlugin(t.actualOptions)&&i.set(e.id,e.getPlugin(t));return i}getInteractors(t,i=!1){return gi(t,this.interactors,this._initializers.interactors,i)}getMovers(t,i=!1){return gi(t,this.movers,this._initializers.movers,i)}getPathGenerator(t){return this.pathGenerators.get(t)}getPlugin(t){return this.plugins.find((i=>i.id===t))}getPreset(t){return this.presets.get(t)}getShapeDrawer(t){return this.drawers.get(t)}getSupportedShapes(){return this.drawers.keys()}getUpdaters(t,i=!1){return gi(t,this.updaters,this._initializers.updaters,i)}loadOptions(t,i){for(const e of this.plugins)e.loadOptions(t,i)}loadParticlesOptions(t,i,...e){const s=this.updaters.get(t);if(s)for(const t of s)t.loadOptions&&t.loadOptions(i,...e)}}const bi=new class{constructor(){this.key="rgb",this.stringPrefix="rgb"}handleColor(t){var i;const e=null!==(i=t.value.rgb)&&void 0!==i?i:t.value;if(void 0!==e.r)return e}handleRangeColor(t){var i;const e=null!==(i=t.value.rgb)&&void 0!==i?i:t.value;if(void 0!==e.r)return{r:l(e.r),g:l(e.g),b:l(e.b)}}parseString(t){if(!t.startsWith(this.stringPrefix))return;const i=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?{a:i.length>4?y(i[5]):1,b:parseInt(i[3],10),g:parseInt(i[2],10),r:parseInt(i[1],10)}:void 0}},_i=new class{constructor(){this.key="hsl",this.stringPrefix="hsl"}handleColor(t){var i;const e=null!==(i=t.value.hsl)&&void 0!==i?i:t.value;if(void 0!==e.h&&void 0!==e.s&&void 0!==e.l)return V(e)}handleRangeColor(t){var i;const e=null!==(i=t.value.hsl)&&void 0!==i?i:t.value;if(void 0!==e.h&&void 0!==e.l)return V({h:l(e.h),l:l(e.l),s:l(e.s)})}parseString(t){if(!t.startsWith("hsl"))return;const i=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.%]+)\s*)?\)/i.exec(t);return i?function(t){const i=V(t);return{a:t.a,b:i.b,g:i.g,r:i.r}}({a:i.length>4?y(i[5]):1,h:parseInt(i[1],10),l:parseInt(i[3],10),s:parseInt(i[2],10)}):void 0}};I(bi),I(_i);const xi=new class{constructor(){this._configs=new Map,this._domArray=[],this._eventDispatcher=new yi,this.plugins=new wi(this)}get configs(){const t={};for(const[i,e]of this._configs)t[i]=e;return t}addConfig(t,i){var e;"string"==typeof t?i&&(i.name=t,this._configs.set(t,i)):this._configs.set(null!==(e=t.name)&&void 0!==e?e:"default",t)}addEventListener(t,i){this._eventDispatcher.addEventListener(t,i)}async addInteractor(t,i){this.plugins.addInteractor(t,i),await this.refresh()}async addMover(t,i){this.plugins.addParticleMover(t,i),await this.refresh()}async addParticleUpdater(t,i){this.plugins.addParticleUpdater(t,i),await this.refresh()}async addPathGenerator(t,i){this.plugins.addPathGenerator(t,i),await this.refresh()}async addPlugin(t){this.plugins.addPlugin(t),await this.refresh()}async addPreset(t,i,e=!1){this.plugins.addPreset(t,i,e),await this.refresh()}async addShape(t,i,e,s,o){let n;n="function"==typeof i?{afterEffect:s,destroy:o,draw:i,init:e}:i,this.plugins.addShapeDrawer(t,n),await this.refresh()}dispatchEvent(t,i){this._eventDispatcher.dispatchEvent(t,i)}dom(){return this._domArray}domItem(t){const i=this.dom(),e=i[t];if(e&&!e.destroyed)return e;i.splice(t,1)}async load(t){var i,e,s;const o=null!==(i=t.id)&&void 0!==i?i:`tsparticles${Math.floor(1e4*n())}`,{index:a,url:r}=t,l=r?await async function(t){const i=k(t.url,t.index);if(!i)return t.fallback;const e=await fetch(i);return e.ok?e.json():(console.error(`tsParticles - Error ${e.status} while retrieving config file`),t.fallback)}({fallback:t.options,index:a,url:r}):t.options;let h=null!==(e=t.element)&&void 0!==e?e:document.getElementById(o);h||(h=document.createElement("div"),h.id=o,null===(s=document.querySelector("body"))||void 0===s||s.append(h));const c=k(l,a),d=this.dom(),u=d.findIndex((t=>t.id===o));if(u>=0){const t=this.domItem(u);t&&!t.destroyed&&(t.destroy(),d.splice(u,1))}let p;if("canvas"===h.tagName.toLowerCase())p=h,p.dataset[Y]="false";else{const t=h.getElementsByTagName("canvas");t.length?(p=t[0],p.dataset[Y]="false"):(p=document.createElement("canvas"),p.dataset[Y]="true",h.appendChild(p))}p.style.width||(p.style.width="100%"),p.style.height||(p.style.height="100%");const v=new mi(this,o,c);return u>=0?d.splice(u,0,v):d.push(v),v.canvas.loadCanvas(p),await v.start(),v}async refresh(){for(const t of this.dom())await t.refresh()}removeEventListener(t,i){this._eventDispatcher.removeEventListener(t,i)}setOnClickHandler(t){const i=this.dom();if(!i.length)throw new Error("Can only set click handlers after calling tsParticles.load()");for(const e of i)e.addClickHandler(t)}};class zi{init(t){var i;const e=t.container,s=t.options,o=s.move.gravity,n=s.move.spin;if(t.gravity={enable:o.enable,acceleration:l(o.acceleration),inverse:o.inverse},n.enable){const s=null!==(i=n.position)&&void 0!==i?i:{x:50,y:50},o={x:s.x/100*e.canvas.size.width,y:s.y/100*e.canvas.size.height},a=v(t.getPosition(),o),r=l(n.acceleration);t.retina.spinAcceleration=r*e.retina.pixelRatio,t.spin={center:o,direction:t.velocity.x>=0?"clockwise":"counter-clockwise",angle:t.velocity.angle,radius:a,acceleration:t.retina.spinAcceleration}}}isEnabled(t){return!t.destroyed&&t.options.move.enable}move(t,i){var e,s,o,r,h;const d=t.options,u=d.move;if(!u.enable)return;const v=t.container,f=function(t){return t.slow.inRange?t.slow.factor:1}(t),m=(null!==(e=(r=t.retina).moveSpeed)&&void 0!==e?e:r.moveSpeed=l(u.speed)*v.retina.pixelRatio)*v.retina.reduceFactor,y=null!==(s=(h=t.retina).moveDrift)&&void 0!==s?s:h.moveDrift=l(t.options.move.drift)*v.retina.pixelRatio,g=c(d.size.value)*v.retina.pixelRatio,w=m*((u.size?t.getRadius()/g:1)*f*(i.factor||1))/2;if(u.spin.enable)!function(t,i){const e=t.container;if(!t.spin)return;const s={x:"clockwise"===t.spin.direction?Math.cos:Math.sin,y:"clockwise"===t.spin.direction?Math.sin:Math.cos};t.position.x=t.spin.center.x+t.spin.radius*s.x(t.spin.angle),t.position.y=t.spin.center.y+t.spin.radius*s.y(t.spin.angle),t.spin.radius+=t.spin.acceleration;const o=Math.max(e.canvas.size.width,e.canvas.size.height);t.spin.radius>o/2?(t.spin.radius=o/2,t.spin.acceleration*=-1):t.spin.radius<0&&(t.spin.radius=0,t.spin.acceleration*=-1),t.spin.angle+=i/100*(1-t.spin.radius/o)}(t,w);else{!function(t,i){var e;const s=t.options.move.path;if(!s.enable)return;if(t.lastPathTime<=t.pathDelay)return void(t.lastPathTime+=i.value);const o=null===(e=t.pathGenerator)||void 0===e?void 0:e.generate(t);o&&t.velocity.addTo(o),s.clamp&&(t.velocity.x=a(t.velocity.x,-1,1),t.velocity.y=a(t.velocity.y,-1,1)),t.lastPathTime-=t.pathDelay}(t,i);const e=t.gravity,s=(null==e?void 0:e.enable)&&e.inverse?-1:1;(null==e?void 0:e.enable)&&w&&(t.velocity.y+=s*(e.acceleration*i.factor)/(60*w)),y&&w&&(t.velocity.x+=y*i.factor/(60*w));const n=t.moveDecay;1!=n&&t.velocity.multTo(n);const r=t.velocity.mult(w),l=null!==(o=t.retina.maxSpeed)&&void 0!==o?o:v.retina.maxSpeed;(null==e?void 0:e.enable)&&l>0&&(!e.inverse&&r.y>=0&&r.y>=l||e.inverse&&r.y<=0&&r.y<=-l)&&(r.y=s*l,w&&(t.velocity.y=r.y/w));const h=t.options.zIndex,c=(1-t.zIndexFactor)**h.velocityRate;1!=c&&r.multTo(c),t.position.addTo(r),u.vibrate&&(t.position.x+=Math.sin(t.position.x*Math.cos(t.position.y)),t.position.y+=Math.cos(t.position.y*Math.sin(t.position.x)))}!function(t){const i=t.initialPosition,{dx:e,dy:s}=p(i,t.position),o=Math.abs(e),a=Math.abs(s),r=t.retina.maxDistance.horizontal,l=t.retina.maxDistance.vertical;if(r||l)if((r&&o>=r||l&&a>=l)&&!t.misplaced)t.misplaced=!!r&&o>r||!!l&&a>l,r&&(t.velocity.x=t.velocity.y/2-t.velocity.x),l&&(t.velocity.y=t.velocity.x/2-t.velocity.y);else if((!r||o<r)&&(!l||a<l)&&t.misplaced)t.misplaced=!1;else if(t.misplaced){const e=t.position,s=t.velocity;r&&(e.x<i.x&&s.x<0||e.x>i.x&&s.x>0)&&(s.x*=-n()),l&&(e.y<i.y&&s.y<0||e.y>i.y&&s.y>0)&&(s.y*=-n())}}(t)}}class Pi{draw(t,i,e){i.circleRange||(i.circleRange={min:0,max:2*Math.PI});const s=i.circleRange;t.arc(0,0,e,s.min,s.max,!1)}getSidesCount(){return 12}particleInit(t,i){var e;const s=i.shapeData,o=null!==(e=null==s?void 0:s.angle)&&void 0!==e?e:{max:360,min:0};i.circleRange="object"!=typeof o?{min:0,max:o*Math.PI/180}:{min:o.min*Math.PI/180,max:o.max*Math.PI/180}}}function Mi(t,i,e,s,o){var n,a;const l=i;if(!l||!e.enable||void 0!==l.loops&&void 0!==l.maxLoops&&l.maxLoops>0&&l.loops>=l.maxLoops)return;const h=r(e.offset),c=(null!==(n=i.velocity)&&void 0!==n?n:0)*t.factor+3.6*h,d=null!==(a=i.decay)&&void 0!==a?a:1;o&&"increasing"!==l.status?(l.value-=c,l.value<0&&(l.loops||(l.loops=0),l.loops++,l.status="increasing",l.value+=l.value)):(l.value+=c,l.value>s&&(l.loops||(l.loops=0),l.loops++,o&&(l.status="decreasing",l.value-=l.value%s))),l.velocity&&1!==d&&(l.velocity*=d),l.value>s&&(l.value%=s)}class Ci{constructor(t){this.container=t}init(t){const i=A(t.options.color,t.id,t.options.reduceDuplicates);i&&(t.color=function(t,i,e){const s={h:{enable:!1,value:t.h},s:{enable:!1,value:t.s},l:{enable:!1,value:t.l}};return i&&(H(s.h,i.h,e),H(s.s,i.s,e),H(s.l,i.l,e)),s}(i,t.options.color.animation,this.container.retina.reduceFactor))}isEnabled(t){var i,e,s;const o=t.options.color.animation;return!t.destroyed&&!t.spawning&&(void 0!==(null===(i=t.color)||void 0===i?void 0:i.h.value)&&o.h.enable||void 0!==(null===(e=t.color)||void 0===e?void 0:e.s.value)&&o.s.enable||void 0!==(null===(s=t.color)||void 0===s?void 0:s.l.value)&&o.l.enable)}update(t,i){!function(t,i){var e,s,o;const n=t.options.color.animation,a=null===(e=t.color)||void 0===e?void 0:e.h,r=null===(s=t.color)||void 0===s?void 0:s.s,l=null===(o=t.color)||void 0===o?void 0:o.l;a&&Mi(i,a,n.h,360,!1),r&&Mi(i,r,n.s,100,!0),l&&Mi(i,l,n.l,100,!0)}(t,i)}}class ki{randomPosition(t,i,e){const[s,o]=[i.width/2,i.height/2],a=((t,i)=>{const e=n()/4,s=Math.atan(i/t*Math.tan(2*Math.PI*e)),o=n();return o<.25?s:o<.5?Math.PI-s:o<.75?Math.PI+s:-s})(s,o),r=(d=a,(h=s)*(c=o)/Math.sqrt((c*Math.cos(d))**2+(h*Math.sin(d))**2)),l=e?r*Math.sqrt(n()):r;var h,c,d;return{x:t.x+l*Math.cos(a),y:t.y+l*Math.sin(a)}}}class Si{constructor(){this.wait=!1}load(t){void 0!==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 Oi{constructor(){this.quantity=1,this.delay=.1}load(t){void 0!==t&&(void 0!==t.quantity&&(this.quantity=d(t.quantity)),void 0!==t.delay&&(this.delay=d(t.delay)))}}class Di{constructor(){this.mode="percent",this.height=0,this.width=0}load(t){void 0!==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 Ii{constructor(){this.autoPlay=!0,this.fill=!0,this.life=new Si,this.rate=new Oi,this.shape="square",this.startCount=0}load(t){void 0!==t&&(void 0!==t.autoPlay&&(this.autoPlay=t.autoPlay),void 0!==t.size&&(void 0===this.size&&(this.size=new Di),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=C(t.particles,(t=>M({},t))),this.rate.load(t.rate),void 0!==t.shape&&(this.shape=t.shape),void 0!==t.position&&(this.position={},void 0!==t.position.x&&(this.position.x=d(t.position.x)),void 0!==t.position.y&&(this.position.y=d(t.position.y))),void 0!==t.spawnColor&&(void 0===this.spawnColor&&(this.spawnColor=new _t),this.spawnColor.load(t.spawnColor)),void 0!==t.startCount&&(this.startCount=t.startCount))}}class Ei{constructor(t,i,e,s,o){var n,a,r,l,h,c,d,u;this.emitters=i,this.container=e,this._engine=t,this._currentDuration=0,this._currentEmitDelay=0,this._currentSpawnDelay=0,this._initialPosition=o,s instanceof Ii?this.options=s:(this.options=new Ii,this.options.load(s)),this._spawnDelay=1e3*(null!==(n=this.options.life.delay)&&void 0!==n?n:0)/this.container.retina.reduceFactor,this.position=null!==(a=this._initialPosition)&&void 0!==a?a:this.calcPosition(),this.name=this.options.name,this._shape=null===(r=this._engine.emitterShapeManager)||void 0===r?void 0:r.getShape(this.options.shape),this.fill=this.options.fill,this._firstSpawn=!this.options.life.wait,this._startParticlesAdded=!1;let p=M({},this.options.particles);null!=p||(p={}),null!==(l=p.move)&&void 0!==l||(p.move={}),null!==(h=(u=p.move).direction)&&void 0!==h||(u.direction=this.options.direction),this.options.spawnColor&&(this.spawnColor=A(this.options.spawnColor)),this._paused=!this.options.autoPlay,this._particlesOptions=p,this.size=null!==(c=this.options.size)&&void 0!==c?c:(()=>{const t=new Di;return t.load({height:0,mode:"percent",width:0}),t})(),this._lifeCount=null!==(d=this.options.life.count)&&void 0!==d?d:-1,this._immortal=this._lifeCount<=0,this._engine.dispatchEvent("emitterCreated",{container:e,data:{emitter:this}}),this.play()}externalPause(){this._paused=!0,this.pause()}externalPlay(){this._paused=!1,this.play()}getPosition(){if(this.options.domId){const t=this.container,i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{x:(e.x+e.width/2)*t.retina.pixelRatio,y:(e.y+e.height/2)*t.retina.pixelRatio}}}return this.position}getSize(){const t=this.container;if(this.options.domId){const i=document.getElementById(this.options.domId);if(i){const e=i.getBoundingClientRect();return{width:e.width*t.retina.pixelRatio,height:e.height*t.retina.pixelRatio}}}return{width:"percent"===this.size.mode?t.canvas.size.width*this.size.width/100:this.size.width,height:"percent"===this.size.mode?t.canvas.size.height*this.size.height/100:this.size.height}}pause(){this._paused||delete this._emitDelay}play(){var t;if(!this._paused&&this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal||!this.options.life.count)&&(this._firstSpawn||this._currentSpawnDelay>=(null!==(t=this._spawnDelay)&&void 0!==t?t:0))){if(void 0===this._emitDelay){const t=l(this.options.rate.delay);this._emitDelay=1e3*t/this.container.retina.reduceFactor}(this._lifeCount>0||this._immortal)&&this.prepareToDie()}}resize(){const t=this._initialPosition;this.position=t&&z(t,this.container.canvas.size,s.origin)?t:this.calcPosition()}update(t){var i,e,s;this._paused||(this._firstSpawn&&(this._firstSpawn=!1,this._currentSpawnDelay=null!==(i=this._spawnDelay)&&void 0!==i?i:0,this._currentEmitDelay=null!==(e=this._emitDelay)&&void 0!==e?e:0),this._startParticlesAdded||(this._startParticlesAdded=!0,this.emitParticles(this.options.startCount)),void 0!==this._duration&&(this._currentDuration+=t.value,this._currentDuration>=this._duration&&(this.pause(),void 0!==this._spawnDelay&&delete this._spawnDelay,this._immortal||this._lifeCount--,this._lifeCount>0||this._immortal?(this.position=this.calcPosition(),this._spawnDelay=1e3*(null!==(s=this.options.life.delay)&&void 0!==s?s:0)/this.container.retina.reduceFactor):this.destroy(),this._currentDuration-=this._duration,delete this._duration)),void 0!==this._spawnDelay&&(this._currentSpawnDelay+=t.value,this._currentSpawnDelay>=this._spawnDelay&&(this._engine.dispatchEvent("emitterPlay",{container:this.container}),this.play(),this._currentSpawnDelay-=this._currentSpawnDelay,delete this._spawnDelay)),void 0!==this._emitDelay&&(this._currentEmitDelay+=t.value,this._currentEmitDelay>=this._emitDelay&&(this.emit(),this._currentEmitDelay-=this._emitDelay)))}calcPosition(){return f({size:this.container.canvas.size,position:this.options.position})}destroy(){this.emitters.removeEmitter(this),this._engine.dispatchEvent("emitterDestroyed",{container:this.container,data:{emitter:this}})}emit(){if(this._paused)return;const t=l(this.options.rate.quantity);this.emitParticles(t)}emitParticles(t){var i,e,s;const o=this.getPosition(),n=this.getSize(),a=k(this._particlesOptions);for(let r=0;r<t;r++){const t=M({},a);if(this.spawnColor){const e=null===(i=this.options.spawnColor)||void 0===i?void 0:i.animation;e&&(this.spawnColor.h=this.setColorAnimation(e.h,this.spawnColor.h,360),this.spawnColor.s=this.setColorAnimation(e.s,this.spawnColor.s,100),this.spawnColor.l=this.setColorAnimation(e.l,this.spawnColor.l,100)),t.color?t.color.value=this.spawnColor:t.color={value:this.spawnColor}}if(!o)return;const r=null!==(s=null===(e=this._shape)||void 0===e?void 0:e.randomPosition(o,n,this.fill))&&void 0!==s?s:o;this.container.particles.addParticle(r,t)}}prepareToDie(){var t;if(this._paused)return;const i=null===(t=this.options.life)||void 0===t?void 0:t.duration;this.container.retina.reduceFactor&&(this._lifeCount>0||this._immortal)&&void 0!==i&&i>0&&(this._duration=1e3*i)}setColorAnimation(t,i,e){var s;const o=this.container;if(!t.enable)return i;const n=r(t.offset),a=1e3*l(this.options.rate.delay)/o.retina.reduceFactor;return(i+l(null!==(s=t.speed)&&void 0!==s?s:0)*o.fpsLimit/a+3.6*n)%e}}class Ri{constructor(t,i){this.container=i,this._engine=t,this.array=[],this.emitters=[],this.interactivityEmitters={random:{count:1,enable:!1},value:[]},i.getEmitter=t=>void 0===t||"number"==typeof t?this.array[t||0]:this.array.find((i=>i.name===t)),i.addEmitter=(t,i)=>this.addEmitter(t,i),i.removeEmitter=t=>{const e=i.getEmitter(t);e&&this.removeEmitter(e)},i.playEmitter=t=>{const e=i.getEmitter(t);e&&e.externalPlay()},i.pauseEmitter=t=>{const e=i.getEmitter(t);e&&e.externalPause()}}addEmitter(t,i){const e=new Ii;e.load(t);const s=new Ei(this._engine,this,this.container,e,i);return this.array.push(s),s}handleClickMode(t){const i=this.emitters,e=this.interactivityEmitters;if("emitter"===t){let t;if(e&&e.value instanceof Array)if(e.value.length>0&&e.random.enable){t=[];const i=[];for(let s=0;s<e.random.count;s++){const o=_(e.value);i.includes(o)&&i.length<e.value.length?s--:(i.push(o),t.push(x(e.value,o)))}}else t=e.value;else t=null==e?void 0:e.value;const s=null!=t?t:i,o=this.container.interactivity.mouse.clickPosition;C(s,(t=>{this.addEmitter(t,o)}))}}async init(){if(this.emitters=this.container.actualOptions.emitters,this.interactivityEmitters=this.container.actualOptions.interactivity.modes.emitters,this.emitters instanceof Array)for(const t of this.emitters)this.addEmitter(t);else this.addEmitter(this.emitters)}pause(){for(const t of this.array)t.pause()}play(){for(const t of this.array)t.play()}removeEmitter(t){const i=this.array.indexOf(t);i>=0&&this.array.splice(i,1)}resize(){for(const t of this.array)t.resize()}stop(){this.array=[]}update(t){for(const i of this.array)i.update(t)}}const Ti=new Map;class Li{constructor(t){this._engine=t}addShape(t,i){this.getShape(t)||Ti.set(t,i)}getShape(t){return Ti.get(t)}getSupportedShapes(){return Ti.keys()}}function Ai(t,i){return t+i*(n()-.5)}class Fi{randomPosition(t,i,e){if(e)return{x:Ai(t.x,i.width),y:Ai(t.y,i.height)};{const e=i.width/2,s=i.height/2,o=Math.floor(4*n()),a=2*(n()-.5);switch(o){case 0:return{x:t.x+a*e,y:t.y-s};case 1:return{x:t.x-e,y:t.y+a*s};case 2:return{x:t.x+a*e,y:t.y+s};default:return{x:t.x+e,y:t.y+a*s}}}}}class Vi{constructor(t){this._engine=t,this.id="emitters"}getPlugin(t){return new Ri(this._engine,t)}loadOptions(t,i){var e,s,o,n,a,r;if(!this.needsPlugin(t)&&!this.needsPlugin(i))return;(null==i?void 0:i.emitters)&&(t.emitters=C(i.emitters,(t=>{const i=new Ii;return i.load(t),i})));const l=null===(s=null===(e=null==i?void 0:i.interactivity)||void 0===e?void 0:e.modes)||void 0===s?void 0:s.emitters;if(l)if(l instanceof Array)t.interactivity.modes.emitters={random:{count:1,enable:!0},value:l.map((t=>{const i=new Ii;return i.load(t),i}))};else{const i=l;if(void 0!==i.value)if(i.value instanceof Array)t.interactivity.modes.emitters={random:{count:null!==(o=i.random.count)&&void 0!==o?o:1,enable:null!==(n=i.random.enable)&&void 0!==n&&n},value:i.value.map((t=>{const i=new Ii;return i.load(t),i}))};else{const e=new Ii;e.load(i.value),t.interactivity.modes.emitters={random:{count:null!==(a=i.random.count)&&void 0!==a?a:1,enable:null!==(r=i.random.enable)&&void 0!==r&&r},value:e}}else{(t.interactivity.modes.emitters={random:{count:1,enable:!1},value:new Ii}).value.load(l)}}}needsPlugin(t){var i,e,s;if(!t)return!1;const o=t.emitters;return o instanceof Array&&!!o.length||void 0!==o||!!(null===(s=null===(e=null===(i=t.interactivity)||void 0===i?void 0:i.events)||void 0===e?void 0:e.onClick)||void 0===s?void 0:s.mode)&&b("emitter",t.interactivity.events.onClick.mode)}}class qi{constructor(t){this.container=t}init(t){const i=t.options.opacity;t.opacity=S(i,1);const e=i.animation;e.enable&&(t.opacity.velocity=l(e.speed)/100*this.container.retina.reduceFactor,e.sync||(t.opacity.velocity*=n()))}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&!!t.opacity&&t.opacity.enable&&((null!==(i=t.opacity.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.opacity.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.opacity.loops)&&void 0!==s?s:0)<(null!==(o=t.opacity.maxLoops)&&void 0!==o?o:0))}reset(t){t.opacity&&(t.opacity.loops=0)}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,r,l;if(!t.opacity)return;const h=t.opacity.min,c=t.opacity.max,d=null!==(e=t.opacity.decay)&&void 0!==e?e:1;if(!(t.destroyed||!t.opacity.enable||(null!==(s=t.opacity.maxLoops)&&void 0!==s?s:0)>0&&(null!==(o=t.opacity.loops)&&void 0!==o?o:0)>(null!==(n=t.opacity.maxLoops)&&void 0!==n?n:0))){switch(t.opacity.status){case"increasing":t.opacity.value>=c?(t.opacity.status="decreasing",t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value+=(null!==(r=t.opacity.velocity)&&void 0!==r?r:0)*i.factor;break;case"decreasing":t.opacity.value<=h?(t.opacity.status="increasing",t.opacity.loops||(t.opacity.loops=0),t.opacity.loops++):t.opacity.value-=(null!==(l=t.opacity.velocity)&&void 0!==l?l:0)*i.factor}t.opacity.velocity&&1!==t.opacity.decay&&(t.opacity.velocity*=d),function(t,i,e,s){switch(t.options.opacity.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.opacity.value,h,c),t.destroyed||(t.opacity.value=a(t.opacity.value,h,c))}}(t,i)}}class Wi{constructor(t){this.container=t,this.modes=["bounce","bounce-vertical","bounce-horizontal","bounceVertical","bounceHorizontal","split"]}update(t,i,e,s){if(!this.modes.includes(s))return;const o=this.container;let n=!1;for(const[,s]of o.plugins)if(void 0!==s.particleBounce&&(n=s.particleBounce(t,e,i)),n)break;if(n)return;const a=t.getPosition(),r=t.offset,l=t.getRadius(),h=P(a,l),c=o.canvas.size;!function(t){if("bounce"!==t.outMode&&"bounce-horizontal"!==t.outMode&&"bounceHorizontal"!==t.outMode&&"split"!==t.outMode)return;t.bounds.right<0?t.particle.position.x=t.size+t.offset.x:t.bounds.left>t.canvasSize.width&&(t.particle.position.x=t.canvasSize.width-t.size-t.offset.x);const i=t.particle.velocity.x;let e=!1;if("right"===t.direction&&t.bounds.right>=t.canvasSize.width&&i>0||"left"===t.direction&&t.bounds.left<=0&&i<0){const i=u(t.particle.options.bounce.horizontal);t.particle.velocity.x*=-i,e=!0}if(!e)return;const s=t.offset.x+t.size;t.bounds.right>=t.canvasSize.width?t.particle.position.x=t.canvasSize.width-s:t.bounds.left<=0&&(t.particle.position.x=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:h,canvasSize:c,offset:r,size:l}),function(t){if("bounce"!==t.outMode&&"bounce-vertical"!==t.outMode&&"bounceVertical"!==t.outMode&&"split"!==t.outMode)return;t.bounds.bottom<0?t.particle.position.y=t.size+t.offset.y:t.bounds.top>t.canvasSize.height&&(t.particle.position.y=t.canvasSize.height-t.size-t.offset.y);const i=t.particle.velocity.y;let e=!1;if("bottom"===t.direction&&t.bounds.bottom>=t.canvasSize.height&&i>0||"top"===t.direction&&t.bounds.top<=0&&i<0){const i=u(t.particle.options.bounce.vertical);t.particle.velocity.y*=-i,e=!0}if(!e)return;const s=t.offset.y+t.size;t.bounds.bottom>=t.canvasSize.height?t.particle.position.y=t.canvasSize.height-s:t.bounds.top<=0&&(t.particle.position.y=s),"split"===t.outMode&&t.particle.destroy()}({particle:t,outMode:s,direction:i,bounds:h,canvasSize:c,offset:r,size:l})}}class Ui{constructor(t){this.container=t,this.modes=["destroy"]}update(t,i,e,o){if(!this.modes.includes(o))return;const n=this.container;switch(t.outType){case"normal":case"outside":if(z(t.position,n.canvas.size,s.origin,t.getRadius(),i))return;break;case"inside":{const{dx:i,dy:e}=p(t.position,t.moveCenter),{x:s,y:o}=t.velocity;if(s<0&&i>t.moveCenter.radius||o<0&&e>t.moveCenter.radius||s>=0&&i<-t.moveCenter.radius||o>=0&&e<-t.moveCenter.radius)return;break}}n.particles.remove(t,void 0,!0)}}class Bi{constructor(t){this.container=t,this.modes=["none"]}update(t,i,e,o){if(!this.modes.includes(o))return;if(t.options.move.distance.horizontal&&("left"===i||"right"===i)||t.options.move.distance.vertical&&("top"===i||"bottom"===i))return;const n=t.options.move.gravity,a=this.container,r=a.canvas.size,l=t.getRadius();if(n.enable){const e=t.position;(!n.inverse&&e.y>r.height+l&&"bottom"===i||n.inverse&&e.y<-l&&"top"===i)&&a.particles.remove(t)}else{if(t.velocity.y>0&&t.position.y<=r.height+l||t.velocity.y<0&&t.position.y>=-l||t.velocity.x>0&&t.position.x<=r.width+l||t.velocity.x<0&&t.position.x>=-l)return;z(t.position,a.canvas.size,s.origin,l,i)||a.particles.remove(t)}}}class Hi{constructor(t){this.container=t,this.modes=["out"]}update(t,i,e,o){if(!this.modes.includes(o))return;const a=this.container;switch(t.outType){case"inside":{const{x:i,y:e}=t.velocity,o=s.origin;o.length=t.moveCenter.radius,o.angle=t.velocity.angle+Math.PI,o.addTo(s.create(t.moveCenter));const{dx:n,dy:l}=p(t.position,o);if(i<=0&&n>=0||e<=0&&l>=0||i>=0&&n<=0||e>=0&&l<=0)return;t.position.x=Math.floor(r({min:0,max:a.canvas.size.width})),t.position.y=Math.floor(r({min:0,max:a.canvas.size.height}));const{dx:h,dy:c}=p(t.position,t.moveCenter);t.direction=Math.atan2(-c,-h),t.velocity.angle=t.direction;break}default:if(z(t.position,a.canvas.size,s.origin,t.getRadius(),i))return;switch(t.outType){case"outside":{t.position.x=Math.floor(r({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.x,t.position.y=Math.floor(r({min:-t.moveCenter.radius,max:t.moveCenter.radius}))+t.moveCenter.y;const{dx:i,dy:e}=p(t.position,t.moveCenter);t.moveCenter.radius&&(t.direction=Math.atan2(e,i),t.velocity.angle=t.direction);break}case"normal":{const e=t.options.move.warp,s=a.canvas.size,o={bottom:s.height+t.getRadius()+t.offset.y,left:-t.getRadius()-t.offset.x,right:s.width+t.getRadius()+t.offset.x,top:-t.getRadius()-t.offset.y},r=t.getRadius(),l=P(t.position,r);"right"===i&&l.left>s.width+t.offset.x?(t.position.x=o.left,t.initialPosition.x=t.position.x,e||(t.position.y=n()*s.height,t.initialPosition.y=t.position.y)):"left"===i&&l.right<-t.offset.x&&(t.position.x=o.right,t.initialPosition.x=t.position.x,e||(t.position.y=n()*s.height,t.initialPosition.y=t.position.y)),"bottom"===i&&l.top>s.height+t.offset.y?(e||(t.position.x=n()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.top,t.initialPosition.y=t.position.y):"top"===i&&l.bottom<-t.offset.y&&(e||(t.position.x=n()*s.width,t.initialPosition.x=t.position.x),t.position.y=o.bottom,t.initialPosition.y=t.position.y);break}}}}}class ji{constructor(t){this.container=t,this.updaters=[new Wi(t),new Ui(t),new Hi(t),new Bi(t)]}init(){}isEnabled(t){return!t.destroyed&&!t.spawning}update(t,i){var e,s,o,n;const a=t.options.move.outModes;this.updateOutMode(t,i,null!==(e=a.bottom)&&void 0!==e?e:a.default,"bottom"),this.updateOutMode(t,i,null!==(s=a.left)&&void 0!==s?s:a.default,"left"),this.updateOutMode(t,i,null!==(o=a.right)&&void 0!==o?o:a.default,"right"),this.updateOutMode(t,i,null!==(n=a.top)&&void 0!==n?n:a.default,"top")}updateOutMode(t,i,e,s){for(const o of this.updaters)o.update(t,s,i,e)}}class Gi{init(t){var i;const e=t.container,s=t.options.size.animation;s.enable&&(t.size.velocity=(null!==(i=t.retina.sizeAnimationSpeed)&&void 0!==i?i:e.retina.sizeAnimationSpeed)/100*e.retina.reduceFactor,s.sync||(t.size.velocity*=n()))}isEnabled(t){var i,e,s,o;return!t.destroyed&&!t.spawning&&t.size.enable&&((null!==(i=t.size.maxLoops)&&void 0!==i?i:0)<=0||(null!==(e=t.size.maxLoops)&&void 0!==e?e:0)>0&&(null!==(s=t.size.loops)&&void 0!==s?s:0)<(null!==(o=t.size.maxLoops)&&void 0!==o?o:0))}reset(t){t.size.loops=0}update(t,i){this.isEnabled(t)&&function(t,i){var e,s,o,n,r;const l=(null!==(e=t.size.velocity)&&void 0!==e?e:0)*i.factor,h=t.size.min,c=t.size.max,d=null!==(s=t.size.decay)&&void 0!==s?s:1;if(!(t.destroyed||!t.size.enable||(null!==(o=t.size.maxLoops)&&void 0!==o?o:0)>0&&(null!==(n=t.size.loops)&&void 0!==n?n:0)>(null!==(r=t.size.maxLoops)&&void 0!==r?r:0))){switch(t.size.status){case"increasing":t.size.value>=c?(t.size.status="decreasing",t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value+=l;break;case"decreasing":t.size.value<=h?(t.size.status="increasing",t.size.loops||(t.size.loops=0),t.size.loops++):t.size.value-=l}t.size.velocity&&1!==d&&(t.size.velocity*=d),function(t,i,e,s){switch(t.options.size.animation.destroy){case"max":i>=s&&t.destroy();break;case"min":i<=e&&t.destroy()}}(t,t.size.value,h,c),t.destroyed||(t.size.value=a(t.size.value,h,c))}}(t,i)}}const Xi={fpsLimit:120,particles:{number:{value:0},color:{value:"random"},shape:{type:"circle"},opacity:{value:.3},size:{value:{min:5,max:10}},move:{angle:{offset:0,value:30},enable:!0,speed:15,direction:"top",random:!1,straight:!1,outModes:{default:"destroy"}}},detectRetina:!0,background:{color:"#fff"},emitters:[{direction:"top",position:{y:100},life:{duration:3,delay:5,count:0}}]};async function Yi(t){await async function(t){t.addMover("base",(()=>new zi))}(t),await async function(t){await t.addShape("circle",new Pi)}(t),await async function(t){await t.addParticleUpdater("color",(t=>new Ci(t)))}(t),await async function(t){await t.addParticleUpdater("size",(()=>new Gi))}(t),await async function(t){await t.addParticleUpdater("opacity",(t=>new qi(t)))}(t),await async function(t){await t.addParticleUpdater("outModes",(t=>new ji(t)))}(t),await async function(t){t.emitterShapeManager||(t.emitterShapeManager=new Li(t)),t.addEmitterShape||(t.addEmitterShape=(i,e)=>{var s;null===(s=t.emitterShapeManager)||void 0===s||s.addShape(i,e)});const i=new Vi(t);await t.addPlugin(i),t.addEmitterShape("circle",new ki),t.addEmitterShape("square",new Fi)}(t),await t.addPreset("bubbles",Xi)}return(async()=>{await Yi(xi)})(),i})()));
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Author : Matteo Bruni
|
|
3
|
+
* MIT license: https://opensource.org/licenses/MIT
|
|
4
|
+
* Demo / Generator : https://particles.js.org/
|
|
5
|
+
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
|
+
* How to use? : Check the GitHub README
|
|
7
|
+
* v3.0.0-alpha.1
|
|
8
|
+
*/
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size"));
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define(["@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/plugin-emitters", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size"], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = typeof exports === 'object' ? factory(require("@tsparticles/move-base"), require("@tsparticles/shape-circle"), require("@tsparticles/updater-color"), require("@tsparticles/plugin-emitters"), require("@tsparticles/updater-opacity"), require("@tsparticles/updater-out-modes"), require("@tsparticles/updater-size")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(this, (__WEBPACK_EXTERNAL_MODULE__619__, __WEBPACK_EXTERNAL_MODULE__163__, __WEBPACK_EXTERNAL_MODULE__501__, __WEBPACK_EXTERNAL_MODULE__68__, __WEBPACK_EXTERNAL_MODULE__686__, __WEBPACK_EXTERNAL_MODULE__290__, __WEBPACK_EXTERNAL_MODULE__2__) => {
|
|
19
|
+
return /******/ (() => { // webpackBootstrap
|
|
20
|
+
/******/ "use strict";
|
|
21
|
+
/******/ var __webpack_modules__ = ({
|
|
22
|
+
|
|
23
|
+
/***/ 619:
|
|
24
|
+
/***/ ((module) => {
|
|
25
|
+
|
|
26
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__619__;
|
|
27
|
+
|
|
28
|
+
/***/ }),
|
|
29
|
+
|
|
30
|
+
/***/ 68:
|
|
31
|
+
/***/ ((module) => {
|
|
32
|
+
|
|
33
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__68__;
|
|
34
|
+
|
|
35
|
+
/***/ }),
|
|
36
|
+
|
|
37
|
+
/***/ 163:
|
|
38
|
+
/***/ ((module) => {
|
|
39
|
+
|
|
40
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__163__;
|
|
41
|
+
|
|
42
|
+
/***/ }),
|
|
43
|
+
|
|
44
|
+
/***/ 501:
|
|
45
|
+
/***/ ((module) => {
|
|
46
|
+
|
|
47
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__501__;
|
|
48
|
+
|
|
49
|
+
/***/ }),
|
|
50
|
+
|
|
51
|
+
/***/ 686:
|
|
52
|
+
/***/ ((module) => {
|
|
53
|
+
|
|
54
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__686__;
|
|
55
|
+
|
|
56
|
+
/***/ }),
|
|
57
|
+
|
|
58
|
+
/***/ 290:
|
|
59
|
+
/***/ ((module) => {
|
|
60
|
+
|
|
61
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__290__;
|
|
62
|
+
|
|
63
|
+
/***/ }),
|
|
64
|
+
|
|
65
|
+
/***/ 2:
|
|
66
|
+
/***/ ((module) => {
|
|
67
|
+
|
|
68
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__2__;
|
|
69
|
+
|
|
70
|
+
/***/ })
|
|
71
|
+
|
|
72
|
+
/******/ });
|
|
73
|
+
/************************************************************************/
|
|
74
|
+
/******/ // The module cache
|
|
75
|
+
/******/ var __webpack_module_cache__ = {};
|
|
76
|
+
/******/
|
|
77
|
+
/******/ // The require function
|
|
78
|
+
/******/ function __webpack_require__(moduleId) {
|
|
79
|
+
/******/ // Check if module is in cache
|
|
80
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
81
|
+
/******/ if (cachedModule !== undefined) {
|
|
82
|
+
/******/ return cachedModule.exports;
|
|
83
|
+
/******/ }
|
|
84
|
+
/******/ // Create a new module (and put it into the cache)
|
|
85
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
86
|
+
/******/ // no module.id needed
|
|
87
|
+
/******/ // no module.loaded needed
|
|
88
|
+
/******/ exports: {}
|
|
89
|
+
/******/ };
|
|
90
|
+
/******/
|
|
91
|
+
/******/ // Execute the module function
|
|
92
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
93
|
+
/******/
|
|
94
|
+
/******/ // Return the exports of the module
|
|
95
|
+
/******/ return module.exports;
|
|
96
|
+
/******/ }
|
|
97
|
+
/******/
|
|
98
|
+
/************************************************************************/
|
|
99
|
+
/******/ /* webpack/runtime/define property getters */
|
|
100
|
+
/******/ (() => {
|
|
101
|
+
/******/ // define getter functions for harmony exports
|
|
102
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
103
|
+
/******/ for(var key in definition) {
|
|
104
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
105
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
106
|
+
/******/ }
|
|
107
|
+
/******/ }
|
|
108
|
+
/******/ };
|
|
109
|
+
/******/ })();
|
|
110
|
+
/******/
|
|
111
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
112
|
+
/******/ (() => {
|
|
113
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
114
|
+
/******/ })();
|
|
115
|
+
/******/
|
|
116
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
117
|
+
/******/ (() => {
|
|
118
|
+
/******/ // define __esModule on exports
|
|
119
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
120
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
121
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
122
|
+
/******/ }
|
|
123
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
124
|
+
/******/ };
|
|
125
|
+
/******/ })();
|
|
126
|
+
/******/
|
|
127
|
+
/************************************************************************/
|
|
128
|
+
var __webpack_exports__ = {};
|
|
129
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
130
|
+
(() => {
|
|
131
|
+
// ESM COMPAT FLAG
|
|
132
|
+
__webpack_require__.r(__webpack_exports__);
|
|
133
|
+
|
|
134
|
+
// EXPORTS
|
|
135
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
136
|
+
"loadBubblesPreset": () => (/* binding */ loadBubblesPreset)
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/move-base","commonjs2":"@tsparticles/move-base","amd":"@tsparticles/move-base","root":"window"}
|
|
140
|
+
var move_base_root_window_ = __webpack_require__(619);
|
|
141
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/shape-circle","commonjs2":"@tsparticles/shape-circle","amd":"@tsparticles/shape-circle","root":"window"}
|
|
142
|
+
var shape_circle_root_window_ = __webpack_require__(163);
|
|
143
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-color","commonjs2":"@tsparticles/updater-color","amd":"@tsparticles/updater-color","root":"window"}
|
|
144
|
+
var updater_color_root_window_ = __webpack_require__(501);
|
|
145
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/plugin-emitters","commonjs2":"@tsparticles/plugin-emitters","amd":"@tsparticles/plugin-emitters","root":"window"}
|
|
146
|
+
var plugin_emitters_root_window_ = __webpack_require__(68);
|
|
147
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-opacity","commonjs2":"@tsparticles/updater-opacity","amd":"@tsparticles/updater-opacity","root":"window"}
|
|
148
|
+
var updater_opacity_root_window_ = __webpack_require__(686);
|
|
149
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-out-modes","commonjs2":"@tsparticles/updater-out-modes","amd":"@tsparticles/updater-out-modes","root":"window"}
|
|
150
|
+
var updater_out_modes_root_window_ = __webpack_require__(290);
|
|
151
|
+
// EXTERNAL MODULE: external {"commonjs":"@tsparticles/updater-size","commonjs2":"@tsparticles/updater-size","amd":"@tsparticles/updater-size","root":"window"}
|
|
152
|
+
var updater_size_root_window_ = __webpack_require__(2);
|
|
153
|
+
;// CONCATENATED MODULE: ./dist/browser/options.js
|
|
154
|
+
const options = {
|
|
155
|
+
fpsLimit: 120,
|
|
156
|
+
particles: {
|
|
157
|
+
number: {
|
|
158
|
+
value: 0
|
|
159
|
+
},
|
|
160
|
+
color: {
|
|
161
|
+
value: "random"
|
|
162
|
+
},
|
|
163
|
+
shape: {
|
|
164
|
+
type: "circle"
|
|
165
|
+
},
|
|
166
|
+
opacity: {
|
|
167
|
+
value: 0.3
|
|
168
|
+
},
|
|
169
|
+
size: {
|
|
170
|
+
value: {
|
|
171
|
+
min: 5,
|
|
172
|
+
max: 10
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
move: {
|
|
176
|
+
angle: {
|
|
177
|
+
offset: 0,
|
|
178
|
+
value: 30
|
|
179
|
+
},
|
|
180
|
+
enable: true,
|
|
181
|
+
speed: 15,
|
|
182
|
+
direction: "top",
|
|
183
|
+
random: false,
|
|
184
|
+
straight: false,
|
|
185
|
+
outModes: {
|
|
186
|
+
default: "destroy"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
detectRetina: true,
|
|
191
|
+
background: {
|
|
192
|
+
color: "#fff"
|
|
193
|
+
},
|
|
194
|
+
emitters: [{
|
|
195
|
+
direction: "top",
|
|
196
|
+
position: {
|
|
197
|
+
y: 100
|
|
198
|
+
},
|
|
199
|
+
life: {
|
|
200
|
+
duration: 3,
|
|
201
|
+
delay: 5,
|
|
202
|
+
count: 0
|
|
203
|
+
}
|
|
204
|
+
}]
|
|
205
|
+
};
|
|
206
|
+
;// CONCATENATED MODULE: ./dist/browser/index.js
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
async function loadBubblesPreset(engine) {
|
|
216
|
+
await (0,move_base_root_window_.loadBaseMover)(engine);
|
|
217
|
+
await (0,shape_circle_root_window_.loadCircleShape)(engine);
|
|
218
|
+
await (0,updater_color_root_window_.loadColorUpdater)(engine);
|
|
219
|
+
await (0,updater_size_root_window_.loadSizeUpdater)(engine);
|
|
220
|
+
await (0,updater_opacity_root_window_.loadOpacityUpdater)(engine);
|
|
221
|
+
await (0,updater_out_modes_root_window_.loadOutModesUpdater)(engine);
|
|
222
|
+
await (0,plugin_emitters_root_window_.loadEmittersPlugin)(engine);
|
|
223
|
+
await engine.addPreset("bubbles", options);
|
|
224
|
+
}
|
|
225
|
+
})();
|
|
226
|
+
|
|
227
|
+
/******/ return __webpack_exports__;
|
|
228
|
+
/******/ })()
|
|
229
|
+
;
|
|
230
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see tsparticles.preset.bubbles.min.js.LICENSE.txt */
|
|
2
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size"));else if("function"==typeof define&&define.amd)define(["@tsparticles/move-base","@tsparticles/shape-circle","@tsparticles/updater-color","@tsparticles/plugin-emitters","@tsparticles/updater-opacity","@tsparticles/updater-out-modes","@tsparticles/updater-size"],t);else{var r="object"==typeof exports?t(require("@tsparticles/move-base"),require("@tsparticles/shape-circle"),require("@tsparticles/updater-color"),require("@tsparticles/plugin-emitters"),require("@tsparticles/updater-opacity"),require("@tsparticles/updater-out-modes"),require("@tsparticles/updater-size")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var a in r)("object"==typeof exports?exports:e)[a]=r[a]}}(this,((e,t,r,a,o,i,s)=>(()=>{"use strict";var p={619:t=>{t.exports=e},68:e=>{e.exports=a},163:e=>{e.exports=t},501:e=>{e.exports=r},686:e=>{e.exports=o},290:e=>{e.exports=i},2:e=>{e.exports=s}},l={};function d(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={exports:{}};return p[e](r,r.exports,d),r.exports}d.d=(e,t)=>{for(var r in t)d.o(t,r)&&!d.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var u={};return(()=>{d.r(u),d.d(u,{loadBubblesPreset:()=>l});var e=d(619),t=d(163),r=d(501),a=d(68),o=d(686),i=d(290),s=d(2);const p={fpsLimit:120,particles:{number:{value:0},color:{value:"random"},shape:{type:"circle"},opacity:{value:.3},size:{value:{min:5,max:10}},move:{angle:{offset:0,value:30},enable:!0,speed:15,direction:"top",random:!1,straight:!1,outModes:{default:"destroy"}}},detectRetina:!0,background:{color:"#fff"},emitters:[{direction:"top",position:{y:100},life:{duration:3,delay:5,count:0}}]};async function l(l){await(0,e.loadBaseMover)(l),await(0,t.loadCircleShape)(l),await(0,r.loadColorUpdater)(l),await(0,s.loadSizeUpdater)(l),await(0,o.loadOpacityUpdater)(l),await(0,i.loadOutModesUpdater)(l),await(0,a.loadEmittersPlugin)(l),await l.addPreset("bubbles",p)}})(),u})()));
|
package/types/index.d.ts
ADDED
package/umd/bundle.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", ".", "@tsparticles/engine"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.tsParticles = exports.loadBubblesPreset = void 0;
|
|
13
|
+
const _1 = require(".");
|
|
14
|
+
Object.defineProperty(exports, "loadBubblesPreset", { enumerable: true, get: function () { return _1.loadBubblesPreset; } });
|
|
15
|
+
const engine_1 = require("@tsparticles/engine");
|
|
16
|
+
Object.defineProperty(exports, "tsParticles", { enumerable: true, get: function () { return engine_1.tsParticles; } });
|
|
17
|
+
(async () => {
|
|
18
|
+
await (0, _1.loadBubblesPreset)(engine_1.tsParticles);
|
|
19
|
+
})();
|
|
20
|
+
});
|
package/umd/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "@tsparticles/move-base", "@tsparticles/shape-circle", "@tsparticles/updater-color", "@tsparticles/plugin-emitters", "@tsparticles/updater-opacity", "@tsparticles/updater-out-modes", "@tsparticles/updater-size", "./options"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.loadBubblesPreset = void 0;
|
|
13
|
+
const move_base_1 = require("@tsparticles/move-base");
|
|
14
|
+
const shape_circle_1 = require("@tsparticles/shape-circle");
|
|
15
|
+
const updater_color_1 = require("@tsparticles/updater-color");
|
|
16
|
+
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
|
|
17
|
+
const updater_opacity_1 = require("@tsparticles/updater-opacity");
|
|
18
|
+
const updater_out_modes_1 = require("@tsparticles/updater-out-modes");
|
|
19
|
+
const updater_size_1 = require("@tsparticles/updater-size");
|
|
20
|
+
const options_1 = require("./options");
|
|
21
|
+
async function loadBubblesPreset(engine) {
|
|
22
|
+
await (0, move_base_1.loadBaseMover)(engine);
|
|
23
|
+
await (0, shape_circle_1.loadCircleShape)(engine);
|
|
24
|
+
await (0, updater_color_1.loadColorUpdater)(engine);
|
|
25
|
+
await (0, updater_size_1.loadSizeUpdater)(engine);
|
|
26
|
+
await (0, updater_opacity_1.loadOpacityUpdater)(engine);
|
|
27
|
+
await (0, updater_out_modes_1.loadOutModesUpdater)(engine);
|
|
28
|
+
await (0, plugin_emitters_1.loadEmittersPlugin)(engine);
|
|
29
|
+
await engine.addPreset("bubbles", options_1.options);
|
|
30
|
+
}
|
|
31
|
+
exports.loadBubblesPreset = loadBubblesPreset;
|
|
32
|
+
});
|
package/umd/options.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.options = void 0;
|
|
13
|
+
exports.options = {
|
|
14
|
+
fpsLimit: 120,
|
|
15
|
+
particles: {
|
|
16
|
+
number: {
|
|
17
|
+
value: 0,
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
value: "random",
|
|
21
|
+
},
|
|
22
|
+
shape: {
|
|
23
|
+
type: "circle",
|
|
24
|
+
},
|
|
25
|
+
opacity: {
|
|
26
|
+
value: 0.3,
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
value: { min: 5, max: 10 },
|
|
30
|
+
},
|
|
31
|
+
move: {
|
|
32
|
+
angle: {
|
|
33
|
+
offset: 0,
|
|
34
|
+
value: 30,
|
|
35
|
+
},
|
|
36
|
+
enable: true,
|
|
37
|
+
speed: 15,
|
|
38
|
+
direction: "top",
|
|
39
|
+
random: false,
|
|
40
|
+
straight: false,
|
|
41
|
+
outModes: {
|
|
42
|
+
default: "destroy",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
detectRetina: true,
|
|
47
|
+
background: {
|
|
48
|
+
color: "#fff",
|
|
49
|
+
},
|
|
50
|
+
emitters: [
|
|
51
|
+
{
|
|
52
|
+
direction: "top",
|
|
53
|
+
position: {
|
|
54
|
+
y: 100,
|
|
55
|
+
},
|
|
56
|
+
life: {
|
|
57
|
+
duration: 3,
|
|
58
|
+
delay: 5,
|
|
59
|
+
count: 0,
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
],
|
|
63
|
+
};
|
|
64
|
+
});
|