@tsparticles/all
Version:
All-inclusive tsParticles bundle — all engine packages, plugins, interactions, presets, shapes, updaters, effects, paths, emitters, sounds, and palettes in one dependency. Ready to use components available for React, Vue.js (2.x and 3.x), Angular, Svelte,
1 lines • 404 kB
JavaScript
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),t.tsparticlesInternalExports=t.tsparticlesInternalExports||{}}("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:this),function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.bundles.all=t.__tsParticlesInternals.bundles.all||{}))}(this,function(t){"use strict";const e="generated",i="source-over",n="resize",s="visibilitychange",o=100,a=.5,r=1e3,c={x:0,y:0,z:0},l={a:1,b:0,c:0,d:1},h="random",d="mid",u=2*Math.PI,p="true",g="false",f="canvas",y=255,m=360,w=100,v=100,b=.25,x=.75,P=400;var S;function M(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(S=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",S.bottomLeft="bottom-left",S.bottomRight="bottom-right",S.left="left",S.none="none",S.right="right",S.top="top",S.topLeft="top-left",S.topRight="top-right",S.outside="outside",S.inside="inside";class _{x;y;z;constructor(t=c.x,e=c.y,i=c.z){this.x=t,this.y=e,this.z=i}static get origin(){return _.create(c.x,c.y,c.z)}get angle(){return Math.atan2(this.y,this.x)}set angle(t){this.#t(t,this.length)}get length(){return Math.sqrt(this.getLengthSq())}set length(t){this.#t(this.angle,t)}static clone(t){return _.create(t.x,t.y,M(t))}static create(t,e,i){return"number"==typeof t?new _(t,e??c.y,i??c.z):new _(t.x,t.y,M(t))}add(t){return _.create(this.x+t.x,this.y+t.y,this.z+M(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=M(t)}copy(){return _.clone(this)}div(t){return _.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return _.create(this.x*t,this.y*t,this.z*t)}multTo(t){this.x*=t,this.y*=t,this.z*=t}normalize(){const t=this.length;0!=t&&this.multTo(1/t)}rotate(t){return _.create(this.x*Math.cos(t)-this.y*Math.sin(t),this.x*Math.sin(t)+this.y*Math.cos(t),c.z)}setTo(t){this.x=t.x,this.y=t.y,this.z=M(t)}sub(t){return _.create(this.x-t.x,this.y-t.y,this.z-M(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=M(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class C extends _{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return C.create(c.x,c.y)}static clone(t){return C.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new C(t,e??c.y):new C(t.x,t.y)}}function k(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function T(t){return"number"==typeof t}function D(t){return"function"==typeof t}function V(t){return"object"==typeof t&&null!==t}function I(t){return Array.isArray(t)}function A(t){return null==t}const E=Math.PI/180;let z=Math.random;const R={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function G(){return B(z(),0,1-Number.EPSILON)}function L(t,e){return G()*(e-t)+t}function F(t){return R.nextFrame(t)}function H(t){R.cancel(t)}function B(t,e,i){return Math.min(Math.max(t,e),i)}function N(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function U(t){const e=q(t);let i=j(t);return e===i&&(i=0),L(i,e)}function $(t){return T(t)?t:U(t)}function j(t){return T(t)?t:t.min}function q(t){return T(t)?t:t.max}function W(t,e){if(t===e||void 0===e&&T(t))return t;const i=j(t),n=q(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:W(i,n)}function Q(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function Y(t,e){const i=t.x-e.x,n=t.y-e.y;return i*i+n*n}function Z(t,e){return Math.sqrt(Y(t,e))}function X(t,e,i){return Y(t,e)<=i*i}function K(t){return t*E}function J(e,i,n){if(T(e))return K(e);switch(e){case t.MoveDirection.top:return-Math.PI*a;case t.MoveDirection.topRight:return-Math.PI*b;case t.MoveDirection.right:return 0;case t.MoveDirection.bottomRight:return Math.PI*b;case t.MoveDirection.bottom:return Math.PI*a;case t.MoveDirection.bottomLeft:return Math.PI*x;case t.MoveDirection.left:return Math.PI;case t.MoveDirection.topLeft:return-Math.PI*x;case t.MoveDirection.inside:return Math.atan2(n.y-i.y,n.x-i.x);case t.MoveDirection.outside:return Math.atan2(i.y-n.y,i.x-n.x);default:return G()*u}}function tt(t){const e=C.origin;return e.length=1,e.angle=t,e}function et(t,e,i,n){return C.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function it(t){return{x:(t.position?.x??G()*o)*t.size.width/o,y:(t.position?.y??G()*o)*t.size.height/o}}function nt(t){const e={x:void 0!==t.position?.x?$(t.position.x):void 0,y:void 0!==t.position?.y?$(t.position.y):void 0};return it({size:t.size,position:e})}function st(t){const{position:e,size:i}=t;return{x:e?.x??G()*i.width,y:e?.y??G()*i.height}}function ot(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var at,rt;t.OutModeDirection=void 0,(at=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",at.left="left",at.right="right",at.top="top",t.PixelMode=void 0,(rt=t.PixelMode||(t.PixelMode={})).precise="precise",rt.percent="percent";function ct(t){return"__proto__"===t||"constructor"===t||"prototype"===t}function lt(){return globalThis.document}function ht(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function dt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ut(t,e){return t===e||I(e)&&e.includes(t)}function pt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(G()*t.length)]}function gt(t,e,i,n,s){return ft(yt(t,n??0),e,i,s)}function ft(e,i,n,s){let o=!0;return s&&s!==t.OutModeDirection.bottom||(o=e.top<i.height+n.x),!o||s&&s!==t.OutModeDirection.left||(o=e.right>n.x),!o||s&&s!==t.OutModeDirection.right||(o=e.left<i.width+n.y),!o||s&&s!==t.OutModeDirection.top||(o=e.bottom>n.y),o}function yt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function mt(t,...e){for(const i of e){if(A(i))continue;if(!V(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):V(t)&&!Array.isArray(t)||(t=Object.create(null));const e=Object.keys(i);if(!e.some(t=>{const e=i[t];return V(e)||Array.isArray(e)})){const n=i,s=t;for(const t of e){if(ct(t))continue;const e=n[t];void 0!==e&&(s[t]=e)}continue}for(const n of e){if(ct(n))continue;const e=t,s=i[n];e[n]=Array.isArray(s)?s.map(t=>mt(void 0,t)):mt(e[n],s)}}return t}function wt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:C.create($(t.options.bounce.horizontal.value),$(t.options.bounce.vertical.value))}}function vt(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,o]=[t.position,e.position],{dx:a,dy:r}=Q(o,s);if(i*a+n*r<0)return;const c=-Math.atan2(r,a),l=t.mass,h=e.mass,d=t.velocity.rotate(c),u=e.velocity.rotate(c),p=et(d,u,l,h),g=et(u,d,l,h),f=p.rotate(-c),y=g.rotate(-c);t.velocity.x=f.x*t.factor.x,t.velocity.y=f.y*t.factor.y,e.velocity.x=y.x*e.factor.x,e.velocity.y=y.y*e.factor.y}function bt(t,e){return I(t)?t.map((t,i)=>e(t,i)):e(t,0)}function xt(t,e,i){return I(t)?pt(t,e,i):t}function Pt(e,i){return function(e,i){if(e.mode!==t.PixelMode.percent){const{mode:t,...i}=e;return i}return"x"in e?{x:e.x/o*i.width,y:e.y/o*i.height}:{width:e.width/o*i.width,height:e.height/o*i.height}}(e,i)}function St(t){const e=lt().createElement("div").style;for(const i in t){const n=t[i];if(!(i in t)||A(n))continue;const s=t.getPropertyValue?.(n);if(!s)continue;const o=t.getPropertyPriority?.(n);o?e.setProperty(n,s,o):e.setProperty(n,s)}return e}let Mt,_t;function Ct(t){if(Mt!==t||!_t){Mt=t;const e=lt().createElement("div").style,i=10,n={width:"100%",height:"100%",margin:"0",padding:"0",borderWidth:"0",position:"fixed",zIndex:t.toString(i),"z-index":t.toString(i),top:"0",left:"0","pointer-events":"none"};for(const t in n){const i=n[t];void 0!==i&&e.setProperty(t,i)}_t=e}return _t}function kt(t,e,i,n,s){if(n){let n={passive:!0};k(s)?n.capture=s:void 0!==s&&(n=s),t.addEventListener(e,i,n)}else{const n=s;t.removeEventListener(e,i,n)}}async function Ot(t,e,i,n=!1){let s=e.get(t);return s&&!n||(s=await Promise.all([...i.values()].map(e=>e(t))),e.set(t,s)),s}async function Tt(t,e,i,n=!1){let s=e.get(t);if(!s||n){const n=await Promise.all([...i.entries()].map(([e,i])=>i(t).then(t=>[e,t])));s=new Map(n),e.set(t,s)}return s}class Dt{#e;constructor(){this.#e=new Map}addEventListener(t,e){this.removeEventListener(t,e);let i=this.#e.get(t);i||(i=[],this.#e.set(t,i)),i.push(e)}dispatchEvent(t,e){const i=this.#e.get(t);i?.forEach(t=>{t(e)})}hasEventListener(t){return!!this.#e.get(t)}removeAllEventListeners(t){t?this.#e.delete(t):this.#e=new Map}removeEventListener(t,e){const i=this.#e.get(t);if(!i)return;const n=i.length,s=i.indexOf(e);s<0||(1===n?this.#e.delete(t):i.splice(s,1))}}var Vt;t.EventType=void 0,(Vt=t.EventType||(t.EventType={})).configAdded="configAdded",Vt.containerInit="containerInit",Vt.particlesSetup="particlesSetup",Vt.containerStarted="containerStarted",Vt.containerStopped="containerStopped",Vt.containerDestroyed="containerDestroyed",Vt.containerPaused="containerPaused",Vt.containerPlay="containerPlay",Vt.containerBuilt="containerBuilt",Vt.particleAdded="particleAdded",Vt.particleDestroyed="particleDestroyed",Vt.particleRemoved="particleRemoved";class It{colorManagers=new Map;easingFunctions=new Map;effectDrawers=new Map;initializers={effects:new Map,shapes:new Map,updaters:new Map};palettes=new Map;plugins=[];presets=new Map;shapeDrawers=new Map;updaters=new Map;#i=new Set;#n=new Map;#s;#o=new Set;#a=!1;#r=!1;#c=new Set;constructor(t){this.#s=t}get configs(){const t={};for(const[e,i]of this.#n)t[e]=i;return t}addColorManager(t,e){this.colorManagers.set(t,e)}addConfig(e){const i=e.key??e.name??"default";this.#n.set(i,e),this.#s.dispatchEvent(t.EventType.configAdded,{data:{name:i,config:e}})}addEasing(t,e){this.easingFunctions.get(t)||this.easingFunctions.set(t,e)}addEffect(t,e){this.initializers.effects.set(t,e)}addPalette(t,e){this.palettes.set(t,e)}addParticleUpdater(t,e){this.initializers.updaters.set(t,e)}addPlugin(t){this.getPlugin(t.id)||this.plugins.push(t)}addPreset(t,e,i=!1){!i&&this.getPreset(t)||this.presets.set(t,e)}addShape(t,e){for(const i of t)this.initializers.shapes.set(i,e)}clearPlugins(t){this.effectDrawers.delete(t),this.shapeDrawers.delete(t),this.updaters.delete(t)}getEasing(t){return this.easingFunctions.get(t)??(t=>t)}getEffectDrawers(t,e=!1){return Tt(t,this.effectDrawers,this.initializers.effects,e)}getPalette(t){return this.palettes.get(t)}getPlugin(t){return this.plugins.find(e=>e.id===t)}getPreset(t){return this.presets.get(t)}async getShapeDrawers(t,e=!1){return Tt(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ot(t,this.updaters,this.initializers.updaters,e)}async init(){if(!this.#a&&!this.#r){this.#r=!0,this.#o=new Set,this.#i=new Set(this.#c);try{for(const t of this.#i)await this.#l(t,this.#o,this.#i)}finally{this.#c.clear(),this.#r=!1,this.#a=!0}}}loadParticlesOptions(t,e,...i){const n=this.updaters.get(t);n&&n.forEach(t=>t.loadOptions?.(e,...i))}async register(...t){if(this.#a)throw new Error("Register plugins can only be done before calling tsParticles.load()");for(const e of t)this.#r?await this.#l(e,this.#o,this.#i):this.#c.add(e)}async#l(t,e,i){e.has(t)||(e.add(t),i.add(t),await t(this.#s))}}const At=t=>(...e)=>{t(...e)},Et={debug:At(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:At(console.info),log:At(console.log),trace:At(console.trace),verbose:At(console.log),warning:At(console.warn)};function zt(){return Et}const Rt="100%";class Gt{pluginManager=new It(this);#h=[];#d=new Dt;#a=!1;get items(){return this.#h}get version(){return"4.3.2"}addEventListener(t,e){this.#d.addEventListener(t,e)}checkVersion(t){if(this.version!==t)throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${this.version}. Plugin version: ${t}`)}dispatchEvent(t,e){this.#d.dispatchEvent(t,e)}async init(){this.#a||(await this.pluginManager.init(),this.#a=!0)}item(t){const e=this.items,i=e[t];if(!i?.destroyed)return i;e.splice(t,1)}async load(t){let i;await this.init(),"undefined"!=typeof HTMLElement&&t.element instanceof HTMLElement&&(i=t.element);const{Container:n}=await Promise.resolve().then(function(){return Of}),s=t.id??i?.id??`tsparticles${Math.floor(1e4*G()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=xt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(zt().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,c=xt(r,o),{items:l}=this,h=l.findIndex(t=>t.id.description===s),d=new n({dispatchCallback:(t,e)=>{this.dispatchEvent(t,e)},id:s,onDestroy:t=>{if(!t)return;const e=this.items,i=e.indexOf(d);i>=0&&e.splice(i,1)},pluginManager:this.pluginManager,sourceOptions:c});if(h>=0){const t=this.item(h),e=t?1:0;t&&!t.destroyed&&t.destroy(!1),l.splice(h,e,d)}else l.push(d);const u="undefined"!=typeof OffscreenCanvas&&t.element instanceof OffscreenCanvas?t.element:(t=>{const i=lt();let n;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)n=t,n.dataset[e]??=g,n.dataset[e]===p&&(n.style.width||=Rt,n.style.height||=Rt,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none"));else{const s=t.getElementsByTagName(f).item(0);s?(n=s,n.dataset[e]=g):(n=i.createElement(f),n.dataset[e]=p,t.appendChild(n)),n.style.width||=Rt,n.style.height||=Rt,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none")}return n})(((t,i)=>{const n=lt();let s=i??n.getElementById(t);return s||(s=n.createElement("canvas"),s.id=t,s.dataset[e]=p,n.body.append(s),s)})(s,i));return d.canvas.loadCanvas(u),await d.start(),d}async refresh(t=!0){t&&await Promise.all(this.items.map(t=>t.refresh()))}removeEventListener(t,e){this.#d.removeEventListener(t,e)}}var Lt,Ft,Ht,Bt,Nt,Ut,$t,jt,qt,Wt,Qt,Yt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Lt||(Lt={}));class Zt{position;type;constructor(t,e,i){this.position={x:t,y:e},this.type=i}_resetPosition(t,e){this.position.x=t,this.position.y=e}}class Xt extends Zt{radius;constructor(t,e,i){super(t,e,Lt.circle),this.radius=i}contains(t){return X(t,this.position,this.radius)}intersects(t){const e=this.position,i=t.position,n=this.radius,s=Math.abs(i.x-e.x),o=Math.abs(i.y-e.y);if(t instanceof Xt||t.type===Lt.circle){return n+t.radius>Math.hypot(s,o)}if(t instanceof Kt||t.type===Lt.rectangle){const e=t,{width:i,height:a}=e.size;return Math.pow(s-i,2)+Math.pow(o-a,2)<=n**2||s<=n+i&&o<=n+a||s<=i||o<=a}return!1}reset(t,e,i){return this._resetPosition(t,e),this.radius=i,this}}class Kt extends Zt{size;constructor(t,e,i,n){super(t,e,Lt.rectangle),this.size={height:n,width:i}}contains(t){const e=this.size.width,i=this.size.height,n=this.position;return t.x>=n.x&&t.x<=n.x+e&&t.y>=n.y&&t.y<=n.y+i}intersects(t){if(t instanceof Xt)return t.intersects(this);if(!(t instanceof Kt))return!1;const e=this.size.width,i=this.size.height,n=this.position,s=t.position,o=t.size,a=o.width,r=o.height;return s.x<n.x+e&&s.x+a>n.x&&s.y<n.y+i&&s.y+r>n.y}reset(t,e,i,n){return this._resetPosition(t,e),this.size.width=i,this.size.height=n,this}}t.RotateDirection=void 0,(Ft=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Ft.counterClockwise="counter-clockwise",Ft.random="random",t.AnimationMode=void 0,(Ht=t.AnimationMode||(t.AnimationMode={})).auto="auto",Ht.increase="increase",Ht.decrease="decrease",Ht.random="random",t.LimitMode=void 0,(Bt=t.LimitMode||(t.LimitMode={})).delete="delete",Bt.wait="wait",t.OutMode=void 0,(Nt=t.OutMode||(t.OutMode={})).bounce="bounce",Nt.none="none",Nt.out="out",Nt.destroy="destroy",Nt.split="split",t.AlterType=void 0,(Ut=t.AlterType||(t.AlterType={})).darken="darken",Ut.enlighten="enlighten",t.DestroyType=void 0,($t=t.DestroyType||(t.DestroyType={})).none="none",$t.max="max",$t.min="min",t.GradientType=void 0,(jt=t.GradientType||(t.GradientType={})).linear="linear",jt.radial="radial",jt.random="random",t.ParticleOutType=void 0,(qt=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",qt.inside="inside",qt.outside="outside",t.StartValueType=void 0,(Wt=t.StartValueType||(t.StartValueType={})).max="max",Wt.min="min",Wt.random="random",t.AnimationStatus=void 0,(Qt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",Qt.decreasing="decreasing",t.DrawLayer=void 0,(Yt=t.DrawLayer||(t.DrawLayer={}))[Yt.BackgroundElement=0]="BackgroundElement",Yt[Yt.BackgroundDraw=1]="BackgroundDraw",Yt[Yt.BackgroundMask=2]="BackgroundMask",Yt[Yt.CanvasSetup=3]="CanvasSetup",Yt[Yt.PluginContent=4]="PluginContent",Yt[Yt.Particles=5]="Particles",Yt[Yt.CanvasCleanup=6]="CanvasCleanup",Yt[Yt.Foreground=7]="Foreground";class Jt{load(t){A(t)||this.doLoad(t)}}function te(t,...e){for(const i of e)t.load(i)}function ee(t,e,i){void 0!==i&&(t[e]=i)}function ie(t,e,i){void 0!==i&&(t[e]=W(i))}function ne(t,e,i){void 0!==i&&t[e].load(i)}function se(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function oe(t,e,i,...n){const s=t;s[e]??=new i;const o=s[e];for(const t of n)o.load(t?.[e])}class ae extends Jt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){ie(this,"count",t.count),ee(this,"enable",t.enable),ie(this,"speed",t.speed),ie(this,"decay",t.decay),ie(this,"delay",t.delay),ee(this,"sync",t.sync)}}class re extends ae{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),ee(this,"mode",t.mode),ee(this,"startValue",t.startValue)}}class ce extends ae{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),ee(this,"max",t.max),ee(this,"min",t.min),ie(this,"offset",t.offset)}}class le extends Jt{h=new ce(0,m);l=new ce(0,v);s=new ce(0,w);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class he extends Jt{value="";static create(t,e){const i=new he;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){A(t.value)||(this.value=t.value)}}class de extends he{animation=new le;static create(t,e){const i=new de;return i.load(t),void 0!==e&&(O(e)||I(e)?i.load({value:e}):i.load(e)),i}doLoad(t){super.doLoad(t);const e=t.animation;void 0!==e&&(void 0===e.enable?this.animation.load(t.animation):this.animation.h.load(e))}}class ue extends Jt{color;draw;element;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new he,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=he.create(this.color,t.color)),ee(this,"element",t.element),ee(this,"draw",t.draw),ee(this,"image",t.image),ee(this,"position",t.position),ee(this,"repeat",t.repeat),ee(this,"size",t.size),ee(this,"opacity",t.opacity)}}class pe extends Jt{enable=!0;zIndex=0;doLoad(t){ee(this,"enable",t.enable),ee(this,"zIndex",t.zIndex)}}class ge extends Jt{delay=.5;enable=!0;doLoad(t){ee(this,"delay",t.delay),ee(this,"enable",t.enable)}}class fe extends Jt{close=!0;options={};type=[];doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}ee(this,"close",t.close),ee(this,"type",t.type)}}class ye extends Jt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ee(this,"enable",t.enable),ie(this,"opacity",t.opacity)}}class me extends Jt{offset=0;value=90;doLoad(t){ie(this,"offset",t.offset),ie(this,"value",t.value)}}class we extends Jt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){ee(this,"x",t.x),ee(this,"y",t.y),ee(this,"mode",t.mode),ee(this,"radius",t.radius)}}class ve extends Jt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){ie(this,"acceleration",t.acceleration),ee(this,"enable",t.enable),ee(this,"inverse",t.inverse),ie(this,"maxSpeed",t.maxSpeed)}}class be extends Jt{value=0;doLoad(t){A(t.value)||(this.value=W(t.value))}}class xe extends be{animation=new ae;doLoad(t){super.doLoad(t),ne(this,"animation",t.animation)}}class Pe extends xe{animation=new re}class Se extends Jt{clamp=!0;delay=new be;enable=!1;generator;options={};doLoad(t){ee(this,"clamp",t.clamp),this.delay.load(t.delay),ee(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=mt(this.options,t.options))}}class Me extends Jt{bottom;default=t.OutMode.out;left;right;top;doLoad(t){void 0!==t.default&&(this.default=t.default),this.bottom=t.bottom??t.default,this.left=t.left??t.default,this.right=t.right??t.default,this.top=t.top??t.default}}class _e extends Jt{acceleration=0;enable=!1;position;doLoad(t){ie(this,"acceleration",t.acceleration),ee(this,"enable",t.enable),t.position&&(this.position=mt({},t.position))}}class Ce extends Jt{angle=new me;center=new we;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ve;outModes=new Me;path=new Se;random=!1;size=!1;speed=2;spin=new _e;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(T(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),ie(this,"decay",t.decay),ee(this,"direction",t.direction),void 0!==t.distance&&(this.distance=T(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),ie(this,"drift",t.drift),ee(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(V(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),ee(this,"random",t.random),ee(this,"size",t.size),ie(this,"speed",t.speed),this.spin.load(t.spin),ee(this,"straight",t.straight),ee(this,"vibrate",t.vibrate),ee(this,"warp",t.warp)}}class ke extends Jt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),ie(this,"width",t.width),ie(this,"opacity",t.opacity)}}class Oe extends Jt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=de.create(this.color,t.color)),se(this,"fill",t.fill,()=>new ye),se(this,"stroke",t.stroke,()=>new ke)}}class Te extends be{value=1}class De extends Jt{horizontal=new Te;vertical=new Te;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class Ve extends Jt{enable=!1;height=1080;width=1920;doLoad(t){ee(this,"enable",t.enable),ee(this,"width",t.width),ee(this,"height",t.height)}}class Ie extends Jt{mode=t.LimitMode.delete;value=0;doLoad(t){ee(this,"mode",t.mode),ee(this,"value",t.value)}}class Ae extends Jt{density=new Ve;limit=new Ie;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),ee(this,"value",t.value)}}class Ee extends Jt{close=!0;options={};type="circle";doLoad(t){const e=t.options;if(void 0!==e)for(const t in e){const i=e[t];i&&(this.options[t]=mt(this.options[t]??{},i))}ee(this,"close",t.close),ee(this,"type",t.type)}}class ze extends be{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),ee(this,"opacityRate",t.opacityRate),ee(this,"sizeRate",t.sizeRate),ee(this,"velocityRate",t.velocityRate)}}class Re extends Jt{bounce=new De;effect=new fe;groups={};move=new Ce;number=new Ae;paint;palette;reduceDuplicates=!1;shape=new Ee;zIndex=new ze;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new Oe,this.paint.color=new de,this.paint.color.value="#fff",this.paint.fill=new ye,this.paint.fill.enable=!0}doLoad(t){if(t.palette&&(this.palette=t.palette,this.#g(this.palette)),void 0!==t.groups)for(const e of Object.keys(t.groups)){if(!(e in t.groups))continue;const i=t.groups[e];void 0!==i&&(this.groups[e]=mt(this.groups[e]??{},i))}void 0!==t.reduceDuplicates&&(this.reduceDuplicates=t.reduceDuplicates),this.bounce.load(t.bounce),this.effect.load(t.effect),this.move.load(t.move),this.number.load(t.number);const e=t.paint;if(e&&(I(e)?this.paint=bt(e,t=>{const e=new Oe;return e.load(t),e}):I(this.paint)?(this.paint=new Oe,this.paint.load(e)):this.paint.load(e)),this.shape.load(t.shape),this.zIndex.load(t.zIndex),this.#u){for(const e of this.#p.plugins)e.loadParticlesOptions&&e.loadParticlesOptions(this.#u,this,t);const e=this.#p.updaters.get(this.#u);if(e)for(const i of e)i.loadOptions&&i.loadOptions(this,t)}}#g(t){const e=this.#p.getPalette(t);if(!e)return;const i=e.colors,n=(I(i)?i:[i]).flatMap(t=>{const e=t.fill,i=t.stroke,n=e?{color:{value:e.value},enable:e.enable,opacity:e.opacity}:void 0;return i?[{fill:n,stroke:{color:{value:i.value},opacity:i.opacity,width:i.width||0}}]:[{fill:n}]}),s=n.length>1?n:n[0]??{};this.load({paint:s,blend:{enable:!0,mode:e.blendMode}})}}function Ge(t,e,...i){const n=new Re(t,e);return te(n,...i),n}class Le extends Jt{autoPlay=!0;background;clear=!0;defaultThemes={};delay=0;detectRetina=!0;duration=0;fpsLimit=120;fullScreen;hdr=!0;key;name;palette;particles;pauseOnBlur=!0;pauseOnOutsideViewport=!0;preset;resize;smooth=!1;style={};zLayers=100;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.background=new ue,this.fullScreen=new pe,this.particles=Ge(this.#p,this.#u),this.resize=new ge}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,bt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),ee(this,"autoPlay",t.autoPlay),ee(this,"clear",t.clear),ee(this,"key",t.key),ee(this,"name",t.name),ie(this,"delay",t.delay),ee(this,"detectRetina",t.detectRetina),ie(this,"duration",t.duration),ee(this,"fpsLimit",t.fpsLimit),ee(this,"hdr",t.hdr),ee(this,"pauseOnBlur",t.pauseOnBlur),ee(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),ee(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;k(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=mt(this.style,t.style),ee(this,"smooth",t.smooth),this.#p.plugins.forEach(e=>{e.loadOptions(this.#u,this,t)})}#g(t){const e=this.#p.getPalette(t);e&&this.load({background:{color:e.background},blend:{enable:!0,mode:e.blendMode},particles:{palette:t}})}#f(t){this.load(this.#p.getPreset(t))}}const Fe=new Map;function He(t,e){let i=Fe.get(t);return i||(i=e(),Fe.size>2e3&&Fe.clear(),Fe.set(t,i)),i}function Be(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Ne(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return Ue(t,s.value,i,n);if(I(s.value)){const e=pt(s.value,i,n);if(!e)return;return Ne(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function Ue(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return s.value===h?Ke():We(t,s.value);if(I(s.value)){const e=pt(s.value,i,n);if(!e)return;return Ue(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function $e(t,e,i,n=!0){const s=Ne(t,e,i,n);return s?je(s):void 0}function je(t){const e=t.r/y,i=t.g/y,n=t.b/y,s=Math.max(e,i,n),o=Math.min(e,i,n),r={h:0,l:(s+o)*a,s:0};return s!==o&&(r.s=r.l<a?(s-o)/(s+o):(s-o)/(2-s-o),r.h=e===s?(i-n)/(s-o):i===s?2+(n-e)/(s-o):4+(e-i)/(s-o)),r.l*=v,r.s*=w,r.h*=60,r.h<0&&(r.h+=m),r.h>=m&&(r.h-=m),r}function qe(t,e){return Be(t,e)?.a}function We(t,e){return Be(t,e)}function Qe(t,e,i){if(i<0&&i++,i>1&&i--,6*i<1)return t+6*(e-t)*i;if(2*i<1)return e;if(3*i<2){return t+(e-t)*(2/3-i)*6}return t}function Ye(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(w,t.s)),n=Math.max(0,Math.min(v,t.l)),s=e/m,o=i/w,r=n/v;if(0===i){const t=Math.round(r*y);return{r:t,g:t,b:t}}const c=r<a?r*(1+o):r+o-r*o,l=2*r-c,h=1/3,d=Math.min(y,y*Qe(l,c,s+h)),u=Math.min(y,y*Qe(l,c,s)),p=Math.min(y,y*Qe(l,c,s-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function Ze(t){const e=(t.h%m+m)%m,i=Math.max(0,Math.min(w,t.s)),n=Math.max(0,Math.min(v,t.l)),s=e/m,o=i/w,r=n/v;if(0===i){const t=r*y;return{r:t,g:t,b:t}}const c=r<a?r*(1+o):r+o-r*o,l=2*r-c,h=1/3;return{r:Math.min(y,y*Qe(l,c,s+h)),g:Math.min(y,y*Qe(l,c,s)),b:Math.min(y,y*Qe(l,c,s-h))}}function Xe(t){const e=Ye(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Ke(t,e){const i=t??0;if(e)return{r:L(i,y),g:L(i,y),b:L(i,y)};const n=()=>Math.floor(L(i,256));return{b:n(),g:n(),r:n()}}function Je(t,e,i){const n=e?4:2,s=i??1;return He(`rgb-${t.r.toFixed(n)}-${t.g.toFixed(n)}-${t.b.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?function(t,e,i=400){const n=i/203;return`color(display-p3 ${(t.r/y*n).toString()} ${(t.g/y*n).toString()} ${(t.b/y*n).toString()} / ${(e??1).toString()})`}(t,i):function(t,e){return`rgba(${t.r.toString()}, ${t.g.toString()}, ${t.b.toString()}, ${(e??1).toString()})`}(t,i))}function ti(t,e,i){const n=e?4:2,s=i??1;return He(`hsl-${t.h.toFixed(n)}-${t.s.toFixed(n)}-${t.l.toFixed(n)}-${e?"hdr":"sdr"}-${s.toString()}`,()=>e?Je(Ze(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${s.toString()})`)}function ei(t,e,i,n){let s=t,o=e;return"r"in s||(s=Ye(t)),"r"in o||(o=Ye(e)),{b:N(s.b,o.b,i,n),g:N(s.g,o.g,i,n),r:N(s.r,o.r,i,n)}}function ii(t,e,i){if(i===h)return Ke();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return ei(i,n,t.getRadius(),e.getRadius());{const t=i??n;if(t)return Ye(t)}}}function ni(t,e,i,n){const s=O(e)?e:e.value;return s===h?n?Ne(t,{value:s}):i?h:d:s===d?d:Ne(t,{value:s})}function si(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function oi(t,e,i){const n={h:{enable:!1,value:t.h,min:0,max:m},s:{enable:!1,value:t.s,min:0,max:w},l:{enable:!1,value:t.l,min:0,max:v}};return e&&(ai(n.h,e.h,i),ai(n.s,e.s,i),ai(n.l,e.l,i)),n}function ai(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=$(i.speed)/o*n,e.decay=1-$(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=$(i.count),e.time=0,e.delayTime=$(i.delay)*r,i.sync||(e.velocity*=G(),e.value*=G()),e.initialValue=e.value,e.offset=W(i.offset)):e.velocity=0}function ri(e,i,n,s){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const o=e.offset?U(e.offset):0,a=((e.velocity??0)*n.factor+3.6*o)*(s?.5075:1),r=e.decay??1,c=e.max,l=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=a,e.value<l&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=a,e.value>c&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=c)),e.velocity&&1!==r&&(e.velocity*=r),e.value=B(e.value,l,c)}function ci(t,e,i){if(!t)return;const{h:n,s:s,l:o}=t;ri(n,!1,e,i),ri(s,!0,e,i),ri(o,!0,e,i)}function li(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const hi=new Gt;class di{draw(t){!function(t){const{context:e,particle:i,radius:n}=t,s=2*n,o=s*(i.heightFactor??.5),r=s*(i.headWidthFactor??.2),l=o*(i.bodyHeightFactor??.5);e.moveTo(-s*a,c.y),e.lineTo(-s*a,-l*a),e.lineTo(s*a-r,-l*a),e.lineTo(s*a-r,-o*a),e.lineTo(s*a+r,c.y),e.lineTo(s*a-r,o*a),e.lineTo(s*a-r,l*a),e.lineTo(-s*a,l*a),e.lineTo(-s*a,c.y)}(t)}particleInit(t,e){const i=e.shapeData;e.heightFactor=$(i?.heightFactor??.5),e.headWidthFactor=$(i?.headWidthFactor??.2),e.bodyHeightFactor=$(i?.bodyHeightFactor??.5)}}async function ui(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["arrow"],()=>Promise.resolve(new di))})}class pi{color;draw;element;image;opacity=1;load(t){A(t)||(void 0!==t.color&&(this.color=he.create(this.color,t.color)),ee(this,"draw",t.draw),ee(this,"element",t.element),ee(this,"image",t.image),ee(this,"opacity",t.opacity))}}class gi{composite="destination-out";cover=new pi;enable=!1;load(t){if(!A(t)){if(ee(this,"composite",t.composite),void 0!==t.cover){const e=t.cover,i=O(t.cover)?{color:t.cover}:t.cover;this.cover.load(void 0!==e.color||void 0!==e.draw||void 0!==e.element||void 0!==e.image?e:{color:i})}ee(this,"enable",t.enable)}}}class fi{id="background-mask";#p;constructor(t){this.#p=t}async getPlugin(t){const{BackgroundMaskPluginInstance:e}=await Promise.resolve().then(function(){return Tf});return new e(this.#p,t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.backgroundMask;n?.load||(e.backgroundMask=n=new gi),n.load(i?.backgroundMask)}needsPlugin(t){return!!t?.backgroundMask?.enable}}async function yi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new fi(t.pluginManager))})}class mi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Vf});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function wi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{const e=t.pluginManager;e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,e.addPathGenerator=(t,i)=>{e.initializers.pathGenerators??=new Map,e.initializers.pathGenerators.set(t,i)},e.getPathGenerators=async(t,i=!1)=>(e.initializers.pathGenerators??=new Map,e.pathGenerators??=new Map,Tt(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new mi(t.pluginManager))})}function vi(t){if(!t.pluginManager.addPathGenerator)throw new Error("tsParticles Base Mover is not loaded")}const bi={segmentLength:20,branchChance:.2,maxAngle:Math.PI/3,speedVariation:.3,inertia:{enable:!1,factor:.1}};class xi{options;#u;#y;constructor(t){this.#u=t,this.#y=C.origin,this.options={...bi,inertia:{...bi.inertia}}}generate(t){const e=this.options;t.branching??={angle:G()*u,remaining:e.segmentLength,baseSpeed:t.velocity.length,speed:t.velocity.length};const i=t.branching;if(i.remaining<=0){const t=G()<(e.branchChance??0),n=e.maxAngle??bi.maxAngle,s=(2*G()-1)*(t?n:.3*n);i.angle+=s,i.remaining=e.segmentLength;const o=1+(2*G()-1)*(e.speedVariation??0);i.speed=i.baseSpeed*o}i.remaining-=i.speed;const n=Math.cos(i.angle)*i.speed,s=Math.sin(i.angle)*i.speed,o=e.inertia;if(o?.enable){const e=o.factor??.1;t.velocity.x+=(n-t.velocity.x)*e,t.velocity.y+=(s-t.velocity.y)*e,this.#y.x=t.velocity.x,this.#y.y=t.velocity.y}else t.velocity.x=0,t.velocity.y=0,this.#y.x=n,this.#y.y=s;return this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.segmentLength=t.segmentLength??this.options.segmentLength,this.options.branchChance=t.branchChance??this.options.branchChance,this.options.maxAngle=t.maxAngle??this.options.maxAngle,this.options.speedVariation=t.speedVariation??this.options.speedVariation;const e=t.inertia;if(e){const t={...bi.inertia};t.enable=e.enable??t.enable,t.factor=e.factor??t.factor,this.options.inertia=t}}reset(t){delete t.branching}update(){}}async function Pi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{vi(t),t.pluginManager.addPathGenerator?.("branchesPathGenerator",t=>Promise.resolve(new xi(t)))})}class Si{options;#u;#y;constructor(t){this.#u=t,this.#y=C.origin,this.options={angleDelta:Math.PI/12,damping:1}}generate(t){t.brownian??={angle:G()*u,speed:t.velocity.length};const e=t.brownian,i=(2*G()-1)*(this.options.angleDelta??0);e.angle+=i;const n=this.options.damping??1;return t.velocity.x=0,t.velocity.y=0,this.#y.length=e.speed*n,this.#y.angle=e.angle,this.#y}init(){const t=this.#u.actualOptions.particles.move.path.options;this.options.angleDelta=t.angleDelta??this.options.angleDelta,this.options.damping=t.damping??this.options.damping}reset(t){delete t.brownian}update(){}}async function Mi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{vi(t),t.pluginManager.addPathGenerator?.("brownianPathGenerator",t=>Promise.resolve(new Si(t)))})}class _i{drawAfter(t){const{context:e,radius:i}=t,n=i/3;e.beginPath(),e.arc(n,-n,n,0,u,!1),e.closePath(),e.fillStyle="#fff9",e.fill()}}async function Ci(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("bubble",()=>Promise.resolve(new _i))})}class ki{color=!0;opacity=!1;load(t){A(t)||(ee(this,"color",t.color),ee(this,"opacity",t.opacity))}}class Oi{offset=4;filter=t=>t.a>0;load(t){if(!A(t)){if(void 0!==t.filter)if(O(t.filter)){if(t.filter in globalThis){const e=globalThis[t.filter];D(e)&&(this.filter=e)}}else this.filter=t.filter;ee(this,"offset",t.offset)}}}class Ti{src="";load(t){A(t)||ee(this,"src",t.src)}}class Di{family="sans-serif";size=100;style="";variant="";weight="";load(t){A(t)||(ee(this,"family",t.family),ee(this,"size",t.size),ee(this,"style",t.style),ee(this,"variant",t.variant),ee(this,"weight",t.weight))}}class Vi{separator="\n";spacing=10;load(t){A(t)||(ee(this,"separator",t.separator),ee(this,"spacing",t.spacing))}}class Ii{color="#000000";fill=!0;font=new Di;lines=new Vi;text="";load(t){A(t)||(ee(this,"color",t.color),ee(this,"fill",t.fill),this.font.load(t.font),this.lines.load(t.lines),ee(this,"text",t.text))}}class Ai{element;enable=!1;image;override=new ki;pixels=new Oi;position;scale=1;selector;text;constructor(){this.position={x:50,y:50}}load(t){A(t)||(void 0!==t.element&&t.element instanceof HTMLCanvasElement&&(this.element=t.element),ee(this,"enable",t.enable),t.image&&(this.image??=new Ti,this.image.load(t.image)),this.pixels.load(t.pixels),t.position&&(this.position={x:t.position.x??this.position.x,y:t.position.y??this.position.y}),this.override.load(t.override),ee(this,"scale",t.scale),ee(this,"selector",t.selector),t.text&&(this.text??=new Ii,this.text.load(t.text)))}}class Ei{id="canvas-mask";async getPlugin(t){const{CanvasMaskPluginInstance:e}=await Promise.resolve().then(function(){return Ef});return new e(t)}loadOptions(t,e,i){if(!this.needsPlugin(e)&&!this.needsPlugin(i))return;let n=e.canvasMask;void 0===n?.load&&(e.canvasMask=n=new Ai),n.load(i?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}async function zi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Ei)})}var Ri;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Ri||(Ri={}));function Gi(t,e,i){const n=i.segments[0];if(!n)return;const s=n.values[0];if(!s)return;t.moveTo(s.x*e,s.y*e);for(const n of i.segments){const i=n.values[0];if(!i)continue;const s=n.values[1],o=n.values[2],a=n.values[3];switch(n.type){case Ri.move:t.moveTo(i.x*e,i.y*e);break;case Ri.line:t.lineTo(i.x*e,i.y*e);break;case Ri.bezier:if(!s||!o||!a)continue;t.bezierCurveTo(s.x*e,s.y*e,o.x*e,o.y*e,a.x*e,a.y*e);break;case Ri.quadratic:if(!s||!o)continue;t.quadraticCurveTo(s.x*e,s.y*e,o.x*e,o.y*e);break;case Ri.arc:if(!s||!o)continue;t.arc(i.x*e,i.y*e,s.x*e,o.x,o.y);break;case Ri.ellipse:if(!s||!o||!a)continue;t.ellipse(i.x*e,i.y*e,s.x*e,s.y*e,o.x,a.x,a.y)}}if(!i.half)return;for(let n=i.segments.length-1;n>=0;n--){const s=i.segments[n];if(!s)continue;const o=s.values[0],a=1,r=2,c=s.values[a],l=s.values[r];switch(s.type){case Ri.line:if(!o)break;t.lineTo(o.x*-e,o.y*e);break;case Ri.bezier:if(!o||!c||!l)break;t.bezierCurveTo(-l.x*e,l.y*e,-c.x*e,c.y*e,-o.x*e,o.y*e);break;case Ri.quadratic:if(!c||!l)break;t.quadraticCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e);case Ri.arc:case Ri.ellipse:}}}var Li;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(Li||(Li={}));const Fi=a,Hi=.25,Bi=-Fi,Ni=-.25,Ui=.0625,$i=.375,ji={half:!0,segments:[{type:Ri.bezier,values:[{x:0,y:Bi},{x:0,y:Bi},{x:Hi,y:Bi},{x:Hi,y:Ni}]},{type:Ri.bezier,values:[{x:Hi,y:Ni},{x:Hi,y:Ni},{x:Fi,y:Ni},{x:Fi,y:0}]},{type:Ri.bezier,values:[{x:Fi,y:0},{x:Fi,y:0},{x:Fi,y:Hi},{x:Hi,y:Hi}]},{type:Ri.bezier,values:[{x:Hi,y:Hi},{x:Hi,y:Hi},{x:Ui,y:Hi},{x:Ui,y:Ui}]},{type:Ri.bezier,values:[{x:Ui,y:Ui},{x:Ui,y:Hi},{x:Hi,y:Fi},{x:Hi,y:Fi}]},{type:Ri.bezier,values:[{x:Hi,y:Fi},{x:Hi,y:Fi},{x:0,y:Fi},{x:0,y:Fi}]}]},qi={half:!0,segments:[{type:Ri.bezier,values:[{x:0,y:Fi},{x:0,y:Fi},{x:$i,y:0},{x:$i,y:0}]},{type:Ri.bezier,values:[{x:$i,y:0},{x:$i,y:0},{x:0,y:Bi},{x:0,y:Bi}]}]},Wi={half:!0,segments:[{type:Ri.bezier,values:[{x:0,y:Fi},{x:0,y:Fi},{x:Fi,y:0},{x:Fi,y:Ni}]},{type:Ri.bezier,values:[{x:Fi,y:Ni},{x:Fi,y:Ni},{x:Fi,y:Bi},{x:Hi,y:Bi}]},{type:Ri.bezier,values:[{x:Hi,y:Bi},{x:Hi,y:Bi},{x:0,y:Bi},{x:0,y:Ni}]}]},Qi={half:!0,segments:[{type:Ri.bezier,values:[{x:0,y:Bi},{x:0,y:Bi},{x:Fi,y:Ni},{x:Fi,y:0}]},{type:Ri.bezier,values:[{x:Fi,y:0},{x:Fi,y:0},{x:Fi,y:Hi},{x:Hi,y:Hi}]},{type:Ri.bezier,values:[{x:Hi,y:Hi},{x:Hi,y:Hi},{x:Ui,y:Hi},{x:Ui,y:Ui}]},{type:Ri.bezier,values:[{x:Ui,y:Ui},{x:Ui,y:Hi},{x:Hi,y:Fi},{x:Hi,y:Fi}]},{type:Ri.bezier,values:[{x:Hi,y:Fi},{x:Hi,y:Fi},{x:0,y:Fi},{x:0,y:Fi}]}]},Yi={[Li.hearts]:Wi,[Li.diamonds]:qi,[Li.clubs]:ji,[Li.spades]:Qi};class Zi{draw(t){const{context:e,radius:i}=t;Gi(e,i,Yi.clubs)}}async function Xi(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new Zi))})}class Ki{draw(t){const{context:e,radius:i}=t;Gi(e,i,Yi.diamonds)}}async function Ji(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new Ki))})}let tn=class{draw(t){const{context:e,radius:i}=t;Gi(e,i,Yi.hearts)}};async function en(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new tn))})}class nn{draw(t){const{context:e,radius:i}=t;Gi(e,i,Yi.spades)}}async function sn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new nn))})}async function on(t){t.checkVersion("4.3.2"),await Promise.all([Xi(t),Ji(t),en(t),sn(t)])}const an=4/3,rn=new Map,cn={r:215,g:20,b:20},ln={r:18,g:18,b:18};function hn(t,e,i,n,s,o){if(s)!function(t,e){un(t,e)}(t,e);else{const s=function(t,e,i){return`${t.toFixed(2)}-${e?"hdr":"sdr"}-${i.suit}-${i.value}`}(e,n,i),r=e*an,c=2*e,l=r*a,h=c*a;let d=rn.get(s);if(!d){const t=new OffscreenCanvas(r,c),a=t.getContext("2d",o);a&&(a.translate(l,h),dn(a,e,i,n),d=t instanceof HTMLCanvasElement?t:t.transferToImageBitmap(),rn.set(s,d))}d?t.drawImage(d,-l,-h,r,c):dn(t,e,i,n)}}function dn(t,e,i,n){const{suit:s,value:o}=i,r=e*an*a,l=2*e*a,h=.2*e,d=.4*e,p=.3*e,g=.7*e,f=.25*e,y=.1*e,m=Je(s===Li.hearts||s===Li.diamonds?cn:ln,n);t.save(),un(t,e),t.fillStyle=Je({r:255,g:255,b:255},n),t.fill(),t.strokeStyle=Je({r:0,g:0,b:0},n),t.stroke(),t.fillStyle=m,t.font=`bold ${d.toString()}px Arial, serif`,t.textAlign="left",t.textBaseline="middle";const w=-r+h+y,v=-l+h+d*a;t.save(),t.translate(w,v),t.beginPath(),Gi(t,p,Yi[s]),t.fill(),t.restore(),t.fillText(o,w+f,v),t.save(),t.translate(r-h-y,l-h-d*a),t.rotate(Math.PI),t.save(),t.beginPath(),Gi(t,p,Yi[s]),t.fill(),t.restore(),t.fillText(o,c.x+f,c.y),t.restore(),t.save(),t.beginPath(),Gi(t,g,Yi[s]),t.fillStyle=m,t.fill(),t.restore(),t.beginPath(),t.arc(c.x,c.y,0,0,u,!1),t.closePath(),t.restore()}function un(t,e){const i=e*an*a,n=2*e*a,s=.2*e;t.beginPath(),t.moveTo(-i+s,-n),t.lineTo(i-s,-n),t.quadraticCurveTo(i,-n,i,-n+s),t.lineTo(i,n-s),t.quadraticCurveTo(i,n,i-s,n),t.lineTo(-i+s,n),t.quadraticCurveTo(-i,n,-i,n-s),t.lineTo(-i,-n+s),t.quadraticCurveTo(-i,-n,-i+s,-n),t.closePath()}class pn{#u;constructor(t){this.#u=t}draw(t){const{context:e,particle:i,opacity:n,radius:s}=t;if(!i.cardData)return;const o=e.globalAlpha,a=this.#u;e.globalAlpha=n,hn(e,s,i.cardData,a.hdr,i.isShowingBack(),a.canvas.render.settings),e.globalAlpha=o}particleInit(t,e){const i=e.shapeData;i&&(e.cardData=mt({},i))}}async function gn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["card"],t=>Promise.resolve(new pn(t)))})}async function fn(t){t.checkVersion("4.3.2"),await Promise.all([gn(t),on(t)])}class yn{afterDraw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const s=n*i.cogHoleRadius/o;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(s,c.y),e.arc(c.x,c.y,s,0,u),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(t)}draw(t){!function(t){const{context:e,particle:i,radius:n}=t;if(void 0===i.cogHoleRadius||void 0===i.cogInnerRadius||void 0===i.cogInnerTaper||void 0===i.cogNotches||void 0===i.cogOuterTaper)return;const s=u/(2*i.cogNotches),a=s*i.cogInnerTaper*.005,r=s*i.cogOuterTaper*.005,c=n*i.cogInnerRadius/o;let l=s,h=!1;for(e.moveTo(n*Math.cos(r),n*Math.sin(r));l<=u;l+=s)h?(e.lineTo(c*Math.cos(l-a),c*Math.sin(l-a)),e.lineTo(n*Math.cos(l+r),n*Math.sin(l+r))):(e.lineTo(n*Math.cos(l-r),n*Math.sin(l-r)),e.lineTo(c*Math.cos(l+a),c*Math.sin(l+a))),h=!h}(t)}particleInit(t,e){const i=e.shapeData;e.cogHoleRadius=$(i?.holeRadius??44),e.cogInnerRadius=$(i?.innerRadius??72),e.cogInnerTaper=$(i?.innerTaper??35),e.cogNotches=$(i?.notches??7),e.cogOuterTaper=$(i?.outerTaper??50)}}async function mn(t){t.checkVersion("4.3.2"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["cog"],()=>Promise.resolve(new yn))})}function wn(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class vn{#m;#w;#v;#b;#x;#P;#S;#M;#_;#C;constructor(){this.#m=1/47,this.#w=.5*(Math.sqrt(3)-1),this.#v=.5*(1/Math.sqrt(3)-1),this.#b=[[1,1,0,1,0,1,0,0,0],[1,1,0,1,0,1,2,1,1]],this.#x=[5,2,2,5,-5,2,-2,5,5,-2,2,-5,-5,-2,-2,-5],this.#P=[],this.#S=[0,1,1,0,4,1,17,0,20,2,21,2,22,5,23,5,26,4,39,3,42,4,43,3],this.#M=[0,0,1,-1,0,0,-1,1,0,2,1,1,1,2,2,0,1,2,0,2,1,0,0,0],this.#_=new Uint8Array(256),this.#C=new Uint8Array(256)}noise(t,e){const i=this.#x,n=this.#m,s=this.#w,o=this.#v,a=this.#P,r=this.#_,c=this.#C,l=(t+e)*o,h=t+l,d=e+l,u=Math.floor(h),p=Math.floor(d),g=(u+p)*s,f=t-(u+g),y=e-(p+g),m=h-u,w=d-p,v=m+w;let b=0;for(let t=a[m-w+1|v<<1|v+w<<2|v+m<<4];void 0!==t;t=t.next){const e=f+t.dx,n=y+t.dy,s=2-e*e-n*n;if(s<=0)continue;const o=u+t.xsb,a=p+t.ysb,l=c[r[255&o]+a&255];b+=s*s*s*s*(i[l]*e+i[l+1]*n)}return b*n}seed(t){const e=this.#M,i=this.#b,n=this.#S,s=[];for(let t=0;t<e.length;t+=4){const n=i[e[t]];let o=null,a=null;for(let e=0;e<n.length;e+=3)a=this.#k(n[e],n[e+1],n[e+2]),null===o?s[t/4]=a:o.next=a,o=a;a&&(a.next=this.#k(e[t+1],e[t+2],e[t+3]))}this.#P=[];for(let t=0;t<n.length;t+=2)this.#P[n[t]]=s[n[t+1]];this.#_=new Uint8Array(256),this.#C=new Uint8Array(256);const o=new Uint8Array(256);for(let t=0;t<256;t++)o[t]=t;let a=new Uint32Array(1);a[0]=t,a=wn(wn(wn(a)));for(let t=255;t>=0;t--){a=wn(a);const e=new Uint32Array(1);e[0]=(a[0]+31)%(t+1),e[0]<0&&(e[0]+=t+1),this.#_[t]=o[e[0]],this.#C[t]=14&this.#_[t],o[e[0]]=o[t]}}#k(t,e,i){const n=this.#w;return{dx:-e-t*n,dy:-i-t*n,xsb:e,ysb:i}}}const bn=1/3;class xn{#O;#T;#D;#V;#I;#P;#A;#E;#_;#z;constructor(){this.#O=1/103,this.#T=(Math.sqrt(4)-1)*bn,this.#D=(1/Math.sqrt(4)-1)*bn,this.#V=[[0,0,0,0,1,1,0,0,1,0,1,0,1,0,0,1],[2,1,1,0,2,1,0,1,2,0,1,1,3,1,1,1],[1,1,0,0,1,0,1,0,1,0,0,1,2,1,1,0,2,1,0,1,2,0,1,1]],this.#I=[-11,4,4,-4,11,4,-4,4,11,11,4,4,4,11,4,4,4,11,-11,-4,4,-4,-11,4,-4,-4,11,11,-4,4,4,-11,4,4,-4,11,-11,4,-4,-4,11,-4,-4,4,-11,11,4,-4,4,11,-4,4,4,-11,-11,-4,-4,-4,-11,-4,-4,-4,-11,11,-4,-4,4,-11,-4,4,-4,-11],this.#P=[],this.#A=[0,2,1,1,2,2,5,1,6,0,7,0,32,2,34,2,129,1,133,1,160,5,161,5,518,0,519,0,546,4,550,4,645,3,647,3,672,5,673,5,674,4,677,3,678,4,679,3,680,13,681,13,682,12,685,14,686,12,687,14,712,20,714,18,809,21,813,23,840,20,841,21,1198,19,1199,22,1226,18,1230,19,1325,23,1327,22,1352,15,1353,17,1354,15,1357,17,1358,16,1359,16,1360,11,1361,10,1362,11,1365,10,1366,9,1367,9,1392,11,1394,11,1489,10,1493,10,1520,8,1521,8,1878,9,1879,9,1906,7,1910,7,2005,6,2007,6,2032,8,2033,8,2034,7,2037,6,2038,7,2039,6],this.#E=[0,0,1,-1,0,0,1,0,-1,0,0,-1,1,0,0,0,1,-1,0,0,-1,0,1,0,0,-1,1,0,2,1,1,0,1,1,1,-1,0,2,1,0,1,1,1,-1,1,0,2,0,1,1,1,-1,1,1,1,3,2,1,0,3,1,2,0,1,3,2,0,1,3,1,0,2,1,3,0,2,1,3,0,1,2,1,1,1,0,0,2,2,0,0,1,1,0,1,0,2,0,2,0,1,1,0,0,1,2,0,0,2,2,0,0,0,0,1,1,-1,1,2,0,0,0,0,1,-1,1,1,2,0,0,0,0,1,1,1,-1,2,3,1,1,1,2,0,0,2,2,3,1,1,1,2,2,0,0,2,3,1,1,1,2,0,2,0,2,1,1,-1,1,2,0,0,2,2,1,1,-1,1,2,2,0,0,2,1,-1,1,1,2,0,0,2,2,1,-1,1,1,2,0,2,0,2,1,1,1,-1,2,2,0,0,2,1,1,1,-1,2,0,2,0],this.#_=new Uint8Array(256),this.#z=new Uint