UNPKG

@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 398 kB
!function(t){t.__tsParticlesInternals=t.__tsParticlesInternals||{},t.__tsParticlesInternals.bundles=t.__tsParticlesInternals.bundles||{},t.__tsParticlesInternals.effects=t.__tsParticlesInternals.effects||{},t.__tsParticlesInternals.engine=t.__tsParticlesInternals.engine||{},t.__tsParticlesInternals.interactions=t.__tsParticlesInternals.interactions||{},t.__tsParticlesInternals.palettes=t.__tsParticlesInternals.palettes||{},t.__tsParticlesInternals.paths=t.__tsParticlesInternals.paths||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins=t.__tsParticlesInternals.plugins||{},t.__tsParticlesInternals.plugins.emittersShapes=t.__tsParticlesInternals.plugins.emittersShapes||{},t.__tsParticlesInternals.presets=t.__tsParticlesInternals.presets||{},t.__tsParticlesInternals.shapes=t.__tsParticlesInternals.shapes||{},t.__tsParticlesInternals.updaters=t.__tsParticlesInternals.updaters||{},t.__tsParticlesInternals.utils=t.__tsParticlesInternals.utils||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas=t.__tsParticlesInternals.canvas||{},t.__tsParticlesInternals.canvas.utils=t.__tsParticlesInternals.canvas.utils||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path=t.__tsParticlesInternals.path||{},t.__tsParticlesInternals.path.utils=t.__tsParticlesInternals.path.utils||{};var e="undefined"!=typeof Proxy?function(t){return new Proxy(t,{get:function(t,e){return e in t||(t[e]={}),t[e]}})}:function(t){return t};t.__tsParticlesInternals.bundles=e(t.__tsParticlesInternals.bundles),t.__tsParticlesInternals.effects=e(t.__tsParticlesInternals.effects),t.__tsParticlesInternals.interactions=e(t.__tsParticlesInternals.interactions),t.__tsParticlesInternals.palettes=e(t.__tsParticlesInternals.palettes),t.__tsParticlesInternals.paths=e(t.__tsParticlesInternals.paths),t.__tsParticlesInternals.plugins=e(t.__tsParticlesInternals.plugins),t.__tsParticlesInternals.plugins.emittersShapes=e(t.__tsParticlesInternals.plugins.emittersShapes),t.__tsParticlesInternals.presets=e(t.__tsParticlesInternals.presets),t.__tsParticlesInternals.shapes=e(t.__tsParticlesInternals.shapes),t.__tsParticlesInternals.updaters=e(t.__tsParticlesInternals.updaters),t.__tsParticlesInternals.utils=e(t.__tsParticlesInternals.utils),t.__tsParticlesInternals.canvas=e(t.__tsParticlesInternals.canvas),t.__tsParticlesInternals.path=e(t.__tsParticlesInternals.path),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;var P;function S(t){return"z"in t?t.z:c.z}t.MoveDirection=void 0,(P=t.MoveDirection||(t.MoveDirection={})).bottom="bottom",P.bottomLeft="bottom-left",P.bottomRight="bottom-right",P.left="left",P.none="none",P.right="right",P.top="top",P.topLeft="top-left",P.topRight="top-right",P.outside="outside",P.inside="inside";class M{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 M.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 M.create(t.x,t.y,S(t))}static create(t,e,i){return"number"==typeof t?new M(t,e??c.y,i??c.z):new M(t.x,t.y,S(t))}add(t){return M.create(this.x+t.x,this.y+t.y,this.z+S(t))}addTo(t){this.x+=t.x,this.y+=t.y,this.z+=S(t)}copy(){return M.clone(this)}div(t){return M.create(this.x/t,this.y/t,this.z/t)}getLengthSq(){return this.x**2+this.y**2}mult(t){return M.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 M.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=S(t)}sub(t){return M.create(this.x-t.x,this.y-t.y,this.z-S(t))}subFrom(t){this.x-=t.x,this.y-=t.y,this.z-=S(t)}#t(t,e){this.x=Math.cos(t)*e,this.y=Math.sin(t)*e}}class _ extends M{constructor(t=c.x,e=c.y){super(t,e,c.z)}static get origin(){return _.create(c.x,c.y)}static clone(t){return _.create(t.x,t.y)}static create(t,e){return"number"==typeof t?new _(t,e??c.y):new _(t.x,t.y)}}function C(t){return"boolean"==typeof t}function O(t){return"string"==typeof t}function k(t){return"number"==typeof t}function T(t){return"function"==typeof t}function D(t){return"object"==typeof t&&null!==t}function V(t){return Array.isArray(t)}function A(t){return null==t}const I=Math.PI/180;let z=Math.random;const E={nextFrame:t=>requestAnimationFrame(t),cancel:t=>{cancelAnimationFrame(t)}};function R(){return H(z(),0,1-Number.EPSILON)}function G(t,e){return R()*(e-t)+t}function L(t){return E.nextFrame(t)}function F(t){E.cancel(t)}function H(t,e,i){return Math.min(Math.max(t,e),i)}function B(t,e,i,n){return Math.floor((t*i+e*n)/(i+n))}function N(t){const e=j(t);let i=$(t);return e===i&&(i=0),G(i,e)}function U(t){return k(t)?t:N(t)}function $(t){return k(t)?t:t.min}function j(t){return k(t)?t:t.max}function q(t,e){if(t===e||void 0===e&&k(t))return t;const i=$(t),n=j(t);return void 0!==e?{min:Math.min(i,e),max:Math.max(n,e)}:q(i,n)}function W(t,e){const i=t.x-e.x,n=t.y-e.y;return{dx:i,dy:n,distance:Math.hypot(i,n)}}function Q(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(Q(t,e))}function Y(t,e,i){return Q(t,e)<=i*i}function X(t){return t*I}function K(e,i,n){if(k(e))return X(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 R()*u}}function J(t){const e=_.origin;return e.length=1,e.angle=t,e}function tt(t,e,i,n){return _.create(t.x*(i-n)/(i+n)+2*e.x*n/(i+n),t.y)}function et(t){return{x:(t.position?.x??R()*o)*t.size.width/o,y:(t.position?.y??R()*o)*t.size.height/o}}function it(t){const e={x:void 0!==t.position?.x?U(t.position.x):void 0,y:void 0!==t.position?.y?U(t.position.y):void 0};return et({size:t.size,position:e})}function nt(t){const{position:e,size:i}=t;return{x:e?.x??R()*i.width,y:e?.y??R()*i.height}}function st(t){return t?t.endsWith("%")?parseFloat(t)/o:parseFloat(t):1}var ot,at;t.OutModeDirection=void 0,(ot=t.OutModeDirection||(t.OutModeDirection={})).bottom="bottom",ot.left="left",ot.right="right",ot.top="top",t.PixelMode=void 0,(at=t.PixelMode||(t.PixelMode={})).precise="precise",at.percent="percent";function rt(){return globalThis.document}function ct(t){if("undefined"!=typeof matchMedia)return matchMedia(t)}function lt(t){if("undefined"!=typeof MutationObserver)return new MutationObserver(t)}function ht(t,e){return t===e||V(e)&&e.includes(t)}function dt(t,e,i=!0){return t[void 0!==e&&i?e%t.length:Math.floor(R()*t.length)]}function ut(t,e,i,n,s){return pt(gt(t,n??0),e,i,s)}function pt(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 gt(t,e){return{bottom:t.y+e,left:t.x-e,right:t.x+e,top:t.y-e}}function ft(t,...e){for(const i of e){if(A(i))continue;if(!D(i)){t=i;continue}Array.isArray(i)?Array.isArray(t)||(t=[]):D(t)&&!Array.isArray(t)||(t={});const e=Object.keys(i),n=new Set(["__proto__","constructor","prototype"]);if(!e.some(t=>{const e=i[t];return D(e)||Array.isArray(e)})){const s=i,o=t;for(const t of e)if(!n.has(t)&&t in s){const e=s[t];void 0!==e&&(o[t]=e)}continue}for(const s of e){if(n.has(s))continue;const e=t,o=i[s];e[s]=Array.isArray(o)?o.map(t=>ft(void 0,t)):ft(e[s],o)}}return t}function yt(t){return{position:t.getPosition(),radius:t.getRadius(),mass:t.getMass(),velocity:t.velocity,factor:_.create(U(t.options.bounce.horizontal.value),U(t.options.bounce.vertical.value))}}function mt(t,e){const{x:i,y:n}=t.velocity.sub(e.velocity),[s,o]=[t.position,e.position],{dx:a,dy:r}=W(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=tt(d,u,l,h),g=tt(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 wt(t,e){return V(t)?t.map((t,i)=>e(t,i)):e(t,0)}function vt(t,e,i){return V(t)?dt(t,e,i):t}function bt(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 xt(t){const e=rt().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 Pt,St;function Mt(t){if(Pt!==t||!St){Pt=t;const e=rt().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)}St=e}return St}function _t(t,e,i,n,s){if(n){let n={passive:!0};C(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 Ct(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 Ot(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 kt{#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 Tt;t.EventType=void 0,(Tt=t.EventType||(t.EventType={})).configAdded="configAdded",Tt.containerInit="containerInit",Tt.particlesSetup="particlesSetup",Tt.containerStarted="containerStarted",Tt.containerStopped="containerStopped",Tt.containerDestroyed="containerDestroyed",Tt.containerPaused="containerPaused",Tt.containerPlay="containerPlay",Tt.containerBuilt="containerBuilt",Tt.particleAdded="particleAdded",Tt.particleDestroyed="particleDestroyed",Tt.particleRemoved="particleRemoved";class Dt{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 Ot(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 Ot(t,this.shapeDrawers,this.initializers.shapes,e)}async getUpdaters(t,e=!1){return Ct(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 Vt=t=>(...e)=>{t(...e)},At={debug:Vt(console.debug),error:(t,...e)=>{console.error(`tsParticles - Error - ${t}`,...e)},info:Vt(console.info),log:Vt(console.log),trace:Vt(console.trace),verbose:Vt(console.log),warning:Vt(console.warn)};function It(){return At}const zt="100%";class Et{pluginManager=new Dt(this);#h=[];#d=new kt;#a=!1;get items(){return this.#h}get version(){return"4.2.1"}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 bf}),s=t.id??i?.id??`tsparticles${Math.floor(1e4*R()).toString()}`,{index:o,url:a}=t,r=a?await async function(t){const e=vt(t.url,t.index);if(!e)return t.fallback;const i=await fetch(e);return i.ok?await i.json():(It().error(`${i.status.toString()} while retrieving config file`),t.fallback)}({fallback:t.options,url:a,index:o}):t.options,c=vt(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=rt();let n;if(t instanceof HTMLCanvasElement||t.tagName.toLowerCase()===f)n=t,n.dataset[e]??=g,n.dataset[e]===p&&(n.style.width||=zt,n.style.height||=zt,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||=zt,n.style.height||=zt,n.style.pointerEvents="none",n.style.setProperty("pointer-events","none")}return n})(((t,i)=>{const n=rt();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 Rt,Gt,Lt,Ft,Ht,Bt,Nt,Ut,$t,jt,qt;!function(t){t.circle="circle",t.rectangle="rectangle"}(Rt||(Rt={}));class Wt{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 Qt extends Wt{radius;constructor(t,e,i){super(t,e,Rt.circle),this.radius=i}contains(t){return Y(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 Qt||t.type===Rt.circle){return n+t.radius>Math.hypot(s,o)}if(t instanceof Zt||t.type===Rt.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 Zt extends Wt{size;constructor(t,e,i,n){super(t,e,Rt.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 Qt)return t.intersects(this);if(!(t instanceof Zt))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,(Gt=t.RotateDirection||(t.RotateDirection={})).clockwise="clockwise",Gt.counterClockwise="counter-clockwise",Gt.random="random",t.AnimationMode=void 0,(Lt=t.AnimationMode||(t.AnimationMode={})).auto="auto",Lt.increase="increase",Lt.decrease="decrease",Lt.random="random",t.LimitMode=void 0,(Ft=t.LimitMode||(t.LimitMode={})).delete="delete",Ft.wait="wait",t.OutMode=void 0,(Ht=t.OutMode||(t.OutMode={})).bounce="bounce",Ht.none="none",Ht.out="out",Ht.destroy="destroy",Ht.split="split",t.AlterType=void 0,(Bt=t.AlterType||(t.AlterType={})).darken="darken",Bt.enlighten="enlighten",t.DestroyType=void 0,(Nt=t.DestroyType||(t.DestroyType={})).none="none",Nt.max="max",Nt.min="min",t.GradientType=void 0,(Ut=t.GradientType||(t.GradientType={})).linear="linear",Ut.radial="radial",Ut.random="random",t.ParticleOutType=void 0,($t=t.ParticleOutType||(t.ParticleOutType={})).normal="normal",$t.inside="inside",$t.outside="outside",t.StartValueType=void 0,(jt=t.StartValueType||(t.StartValueType={})).max="max",jt.min="min",jt.random="random",t.AnimationStatus=void 0,(qt=t.AnimationStatus||(t.AnimationStatus={})).increasing="increasing",qt.decreasing="decreasing";class Yt{load(t){A(t)||this.doLoad(t)}}function Xt(t,...e){for(const i of e)t.load(i)}function Kt(t,e,i){void 0!==i&&(t[e]=i)}function Jt(t,e,i){void 0!==i&&(t[e]=q(i))}function te(t,e,i){void 0!==i&&t[e].load(i)}function ee(t,e,i,n){if(void 0!==i){const s=t;s[e]??=n(),s[e].load(i)}}function ie(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 ne extends Yt{count=0;decay=0;delay=0;enable=!1;speed=1;sync=!1;doLoad(t){Jt(this,"count",t.count),Kt(this,"enable",t.enable),Jt(this,"speed",t.speed),Jt(this,"decay",t.decay),Jt(this,"delay",t.delay),Kt(this,"sync",t.sync)}}class se extends ne{mode=t.AnimationMode.auto;startValue=t.StartValueType.random;doLoad(t){super.doLoad(t),Kt(this,"mode",t.mode),Kt(this,"startValue",t.startValue)}}class oe extends ne{max;min;offset=0;sync=!0;constructor(t,e){super(),this.min=t,this.max=e}doLoad(t){super.doLoad(t),Kt(this,"max",t.max),Kt(this,"min",t.min),Jt(this,"offset",t.offset)}}class ae extends Yt{h=new oe(0,m);l=new oe(0,v);s=new oe(0,w);doLoad(t){this.h.load(t.h),this.s.load(t.s),this.l.load(t.l)}}class re extends Yt{value="";static create(t,e){const i=new re;return i.load(t),void 0!==e&&(O(e)||V(e)?i.load({value:e}):i.load(e)),i}doLoad(t){A(t.value)||(this.value=t.value)}}class ce extends re{animation=new ae;static create(t,e){const i=new ce;return i.load(t),void 0!==e&&(O(e)||V(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 le extends Yt{color;image="";opacity=1;position="";repeat="";size="";constructor(){super(),this.color=new re,this.color.value=""}doLoad(t){void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"image",t.image),Kt(this,"position",t.position),Kt(this,"repeat",t.repeat),Kt(this,"size",t.size),Kt(this,"opacity",t.opacity)}}class he extends Yt{enable=!0;zIndex=0;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"zIndex",t.zIndex)}}class de extends Yt{delay=.5;enable=!0;doLoad(t){Kt(this,"delay",t.delay),Kt(this,"enable",t.enable)}}class ue extends Yt{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]=ft(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class pe extends Yt{color;enable=!0;opacity=1;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Kt(this,"enable",t.enable),Jt(this,"opacity",t.opacity)}}class ge extends Yt{offset=0;value=90;doLoad(t){Jt(this,"offset",t.offset),Jt(this,"value",t.value)}}class fe extends Yt{mode=t.PixelMode.percent;radius=0;x=50;y=50;doLoad(t){Kt(this,"x",t.x),Kt(this,"y",t.y),Kt(this,"mode",t.mode),Kt(this,"radius",t.radius)}}class ye extends Yt{acceleration=9.81;enable=!1;inverse=!1;maxSpeed=50;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),Kt(this,"inverse",t.inverse),Jt(this,"maxSpeed",t.maxSpeed)}}class me extends Yt{value=0;doLoad(t){A(t.value)||(this.value=q(t.value))}}class we extends me{animation=new ne;doLoad(t){super.doLoad(t),te(this,"animation",t.animation)}}class ve extends we{animation=new se}class be extends Yt{clamp=!0;delay=new me;enable=!1;generator;options={};doLoad(t){Kt(this,"clamp",t.clamp),this.delay.load(t.delay),Kt(this,"enable",t.enable),this.generator=t.generator,t.options&&(this.options=ft(this.options,t.options))}}class xe extends Yt{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 Pe extends Yt{acceleration=0;enable=!1;position;doLoad(t){Jt(this,"acceleration",t.acceleration),Kt(this,"enable",t.enable),t.position&&(this.position=ft({},t.position))}}class Se extends Yt{angle=new ge;center=new fe;decay=0;direction=t.MoveDirection.none;distance={};drift=0;enable=!1;gravity=new ye;outModes=new xe;path=new be;random=!1;size=!1;speed=2;spin=new Pe;straight=!1;vibrate=!1;warp=!1;doLoad(t){this.angle.load(k(t.angle)?{value:t.angle}:t.angle),this.center.load(t.center),Jt(this,"decay",t.decay),Kt(this,"direction",t.direction),void 0!==t.distance&&(this.distance=k(t.distance)?{horizontal:t.distance,vertical:t.distance}:{...t.distance}),Jt(this,"drift",t.drift),Kt(this,"enable",t.enable),this.gravity.load(t.gravity);const e=t.outModes;void 0!==e&&(D(e)?this.outModes.load(e):this.outModes.load({default:e})),this.path.load(t.path),Kt(this,"random",t.random),Kt(this,"size",t.size),Jt(this,"speed",t.speed),this.spin.load(t.spin),Kt(this,"straight",t.straight),Kt(this,"vibrate",t.vibrate),Kt(this,"warp",t.warp)}}class Me extends Yt{color;opacity;width=0;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),Jt(this,"width",t.width),Jt(this,"opacity",t.opacity)}}class _e extends Yt{color;fill;stroke;doLoad(t){void 0!==t.color&&(this.color=ce.create(this.color,t.color)),ee(this,"fill",t.fill,()=>new pe),ee(this,"stroke",t.stroke,()=>new Me)}}class Ce extends me{value=1}class Oe extends Yt{horizontal=new Ce;vertical=new Ce;doLoad(t){this.horizontal.load(t.horizontal),this.vertical.load(t.vertical)}}class ke extends Yt{enable=!1;height=1080;width=1920;doLoad(t){Kt(this,"enable",t.enable),Kt(this,"width",t.width),Kt(this,"height",t.height)}}class Te extends Yt{mode=t.LimitMode.delete;value=0;doLoad(t){Kt(this,"mode",t.mode),Kt(this,"value",t.value)}}class De extends Yt{density=new ke;limit=new Te;value=0;doLoad(t){this.density.load(t.density),this.limit.load(t.limit),Kt(this,"value",t.value)}}class Ve extends Yt{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]=ft(this.options[t]??{},i))}Kt(this,"close",t.close),Kt(this,"type",t.type)}}class Ae extends me{opacityRate=1;sizeRate=1;velocityRate=1;doLoad(t){super.doLoad(t),Kt(this,"opacityRate",t.opacityRate),Kt(this,"sizeRate",t.sizeRate),Kt(this,"velocityRate",t.velocityRate)}}class Ie extends Yt{bounce=new Oe;effect=new ue;groups={};move=new Se;number=new De;paint;palette;reduceDuplicates=!1;shape=new Ve;zIndex=new Ae;#u;#p;constructor(t,e){super(),this.#p=t,this.#u=e,this.paint=new _e,this.paint.color=new ce,this.paint.color.value="#fff",this.paint.fill=new pe,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]=ft(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&&(V(e)?this.paint=wt(e,t=>{const e=new _e;return e.load(t),e}):V(this.paint)?(this.paint=new _e,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=(V(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 ze(t,e,...i){const n=new Ie(t,e);return Xt(n,...i),n}class Ee extends Yt{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 le,this.fullScreen=new he,this.particles=ze(this.#p,this.#u),this.resize=new de}doLoad(t){void 0!==t.preset&&(this.preset=t.preset,wt(this.preset,t=>{this.#f(t)})),void 0!==t.palette&&(this.palette=t.palette,this.#g(this.palette)),Kt(this,"autoPlay",t.autoPlay),Kt(this,"clear",t.clear),Kt(this,"key",t.key),Kt(this,"name",t.name),Jt(this,"delay",t.delay),Kt(this,"detectRetina",t.detectRetina),Jt(this,"duration",t.duration),Kt(this,"fpsLimit",t.fpsLimit),Kt(this,"hdr",t.hdr),Kt(this,"pauseOnBlur",t.pauseOnBlur),Kt(this,"pauseOnOutsideViewport",t.pauseOnOutsideViewport),Kt(this,"zLayers",t.zLayers),this.background.load(t.background);const e=t.fullScreen;C(e)?this.fullScreen.enable=e:this.fullScreen.load(e),this.particles.load(t.particles),this.resize.load(t.resize),this.style=ft(this.style,t.style),Kt(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 Re=new Map;function Ge(t,e){let i=Re.get(t);return i||(i=e(),Re.size>2e3&&Re.clear(),Re.set(t,i)),i}function Le(t,e){if(e)for(const i of t.colorManagers.values())if(i.accepts(e))return i.parseString(e)}function Fe(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return He(t,s.value,i,n);if(V(s.value)){const e=dt(s.value,i,n);if(!e)return;return Fe(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleRangeColor(s);if(t)return t}}function He(t,e,i,n=!0){if(!e)return;const s=O(e)?{value:e}:e;if(O(s.value))return s.value===h?Qe():$e(t,s.value);if(V(s.value)){const e=dt(s.value,i,n);if(!e)return;return He(t,{value:e})}for(const e of t.colorManagers.values()){const t=e.handleColor(s);if(t)return t}}function Be(t,e,i,n=!0){const s=Fe(t,e,i,n);return s?Ne(s):void 0}function Ne(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 Ue(t,e){return Le(t,e)?.a}function $e(t,e){return Le(t,e)}function je(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 qe(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*je(l,c,s+h)),u=Math.min(y,y*je(l,c,s)),p=Math.min(y,y*je(l,c,s-h));return{r:Math.round(d),g:Math.round(u),b:Math.round(p)}}function We(t){const e=qe(t);return{a:t.a,b:e.b,g:e.g,r:e.r}}function Qe(t){const e=t??0,i=()=>Math.floor(G(e,256));return{b:i(),g:i(),r:i()}}function Ze(t,e,i){const n=i??1;return Ge(`rgb-${t.r.toFixed(2)}-${t.g.toFixed(2)}-${t.b.toFixed(2)}-${e?"hdr":"sdr"}-${n.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 Ye(t,e,i){const n=i??1;return Ge(`hsl-${t.h.toFixed(2)}-${t.s.toFixed(2)}-${t.l.toFixed(2)}-${e?"hdr":"sdr"}-${n.toString()}`,()=>e?Ze(qe(t),!0,i):`hsla(${t.h.toString()}, ${t.s.toString()}%, ${t.l.toString()}%, ${n.toString()})`)}function Xe(t,e,i,n){let s=t,o=e;return"r"in s||(s=qe(t)),"r"in o||(o=qe(e)),{b:B(s.b,o.b,i,n),g:B(s.g,o.g,i,n),r:B(s.r,o.r,i,n)}}function Ke(t,e,i){if(i===h)return Qe();if(i!==d)return i;{const i=t.getFillColor()??t.getStrokeColor(),n=e?.getFillColor()??e?.getStrokeColor();if(i&&n&&e)return Xe(i,n,t.getRadius(),e.getRadius());{const t=i??n;if(t)return qe(t)}}}function Je(t,e,i,n){const s=O(e)?e:e.value;return s===h?n?Fe(t,{value:s}):i?h:d:s===d?d:Fe(t,{value:s})}function ti(t){return void 0===t?void 0:{h:t.h.value,s:t.s.value,l:t.l.value}}function ei(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&&(ii(n.h,e.h,i),ii(n.s,e.s,i),ii(n.l,e.l,i)),n}function ii(e,i,n){e.enable=i.enable,e.min=i.min,e.max=i.max,e.enable?(e.velocity=U(i.speed)/o*n,e.decay=1-U(i.decay),e.status=t.AnimationStatus.increasing,e.loops=0,e.maxLoops=U(i.count),e.time=0,e.delayTime=U(i.delay)*r,i.sync||(e.velocity*=R(),e.value*=R()),e.initialValue=e.value,e.offset=q(i.offset)):e.velocity=0}function ni(e,i,n){if(!e.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time??=0,(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=n.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const s=e.offset?N(e.offset):0,o=(e.velocity??0)*n.factor+3.6*s,a=e.decay??1,r=e.max,c=e.min;i&&e.status!==t.AnimationStatus.increasing?(e.value-=o,e.value<c&&(e.loops??=0,e.loops++,e.status=t.AnimationStatus.increasing)):(e.value+=o,e.value>r&&(e.loops??=0,e.loops++,i?e.status=t.AnimationStatus.decreasing:e.value-=r)),e.velocity&&1!==a&&(e.velocity*=a),e.value=H(e.value,c,r)}function si(t,e){if(!t)return;const{h:i,s:n,l:s}=t;ni(i,!1,e),ni(n,!0,e),ni(s,!0,e)}function oi(e,i,n){return{h:e.h,s:e.s,l:e.l+(i===t.AlterType.darken?-1:1)*n}}const ai=new Et;class ri{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=U(i?.heightFactor??.5),e.headWidthFactor=U(i?.headWidthFactor??.2),e.bodyHeightFactor=U(i?.bodyHeightFactor??.5)}}async function ci(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["arrow"],()=>Promise.resolve(new ri))})}class li{color;image;opacity=1;load(t){A(t)||(void 0!==t.color&&(this.color=re.create(this.color,t.color)),Kt(this,"image",t.image),Kt(this,"opacity",t.opacity))}}class hi{composite="destination-out";cover=new li;enable=!1;load(t){if(!A(t)){if(Kt(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.image?e:{color:i})}Kt(this,"enable",t.enable)}}}class di{id="background-mask";#p;constructor(t){this.#p=t}async getPlugin(t){const{BackgroundMaskPluginInstance:e}=await Promise.resolve().then(function(){return xf});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 hi),n.load(i?.backgroundMask)}needsPlugin(t){return!!t?.backgroundMask?.enable}}async function ui(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new di(t.pluginManager))})}class pi{id="move";#p;constructor(t){this.#p=t}async getPlugin(t){const{MovePluginInstance:e}=await Promise.resolve().then(function(){return Sf});return new e(this.#p,t)}loadOptions(){}needsPlugin(){return!0}}async function gi(t){t.checkVersion("4.2.1"),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,Ot(t,e.pathGenerators,e.initializers.pathGenerators,i)),t.pluginManager.addPlugin(new pi(t.pluginManager))})}function fi(t){if(!t.pluginManager.addPathGenerator)throw new Error("tsParticles Base Mover is not loaded")}const yi={segmentLength:20,branchChance:.2,maxAngle:Math.PI/3,speedVariation:.3,inertia:{enable:!1,factor:.1}};class mi{options;#u;#y;constructor(t){this.#u=t,this.#y=_.origin,this.options={...yi,inertia:{...yi.inertia}}}generate(t){const e=this.options;t.branching??={angle:R()*u,remaining:e.segmentLength,baseSpeed:t.velocity.length,speed:t.velocity.length};const i=t.branching;if(i.remaining<=0){const t=R()<(e.branchChance??0),n=e.maxAngle??yi.maxAngle,s=(2*R()-1)*(t?n:.3*n);i.angle+=s,i.remaining=e.segmentLength;const o=1+(2*R()-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={...yi.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 wi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{fi(t),t.pluginManager.addPathGenerator?.("branchesPathGenerator",t=>Promise.resolve(new mi(t)))})}class vi{options;#u;#y;constructor(t){this.#u=t,this.#y=_.origin,this.options={angleDelta:Math.PI/12,damping:1}}generate(t){t.brownian??={angle:R()*u,speed:t.velocity.length};const e=t.brownian,i=(2*R()-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 bi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{fi(t),t.pluginManager.addPathGenerator?.("brownianPathGenerator",t=>Promise.resolve(new vi(t)))})}class xi{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 Pi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addEffect("bubble",()=>Promise.resolve(new xi))})}class Si{color=!0;opacity=!1;load(t){A(t)||(Kt(this,"color",t.color),Kt(this,"opacity",t.opacity))}}class Mi{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];T(e)&&(this.filter=e)}}else this.filter=t.filter;Kt(this,"offset",t.offset)}}}class _i{src="";load(t){A(t)||Kt(this,"src",t.src)}}class Ci{family="sans-serif";size=100;style="";variant="";weight="";load(t){A(t)||(Kt(this,"family",t.family),Kt(this,"size",t.size),Kt(this,"style",t.style),Kt(this,"variant",t.variant),Kt(this,"weight",t.weight))}}class Oi{separator="\n";spacing=10;load(t){A(t)||(Kt(this,"separator",t.separator),Kt(this,"spacing",t.spacing))}}class ki{color="#000000";fill=!0;font=new Ci;lines=new Oi;text="";load(t){A(t)||(Kt(this,"color",t.color),Kt(this,"fill",t.fill),this.font.load(t.font),this.lines.load(t.lines),Kt(this,"text",t.text))}}class Ti{element;enable=!1;image;override=new Si;pixels=new Mi;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),Kt(this,"enable",t.enable),t.image&&(this.image??=new _i,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),Kt(this,"scale",t.scale),Kt(this,"selector",t.selector),t.text&&(this.text??=new ki,this.text.load(t.text)))}}class Di{id="canvas-mask";async getPlugin(t){const{CanvasMaskPluginInstance:e}=await Promise.resolve().then(function(){return Cf});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 Ti),n.load(i?.canvasMask)}needsPlugin(t){return t?.canvasMask?.enable??!1}}async function Vi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addPlugin(new Di)})}var Ai;!function(t){t.move="move",t.line="line",t.bezier="bezier",t.quadratic="quadratic",t.arc="arc",t.ellipse="ellipse"}(Ai||(Ai={}));function Ii(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 Ai.move:t.moveTo(i.x*e,i.y*e);break;case Ai.line:t.lineTo(i.x*e,i.y*e);break;case Ai.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 Ai.quadratic:if(!s||!o)continue;t.quadraticCurveTo(s.x*e,s.y*e,o.x*e,o.y*e);break;case Ai.arc:if(!s||!o)continue;t.arc(i.x*e,i.y*e,s.x*e,o.x,o.y);break;case Ai.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 Ai.line:if(!o)break;t.lineTo(o.x*-e,o.y*e);break;case Ai.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 Ai.quadratic:if(!c||!l)break;t.quadraticCurveTo(-c.x*e,c.y*e,-l.x*e,l.y*e);case Ai.arc:case Ai.ellipse:}}}var zi;!function(t){t.hearts="hearts",t.diamonds="diamonds",t.clubs="clubs",t.spades="spades"}(zi||(zi={}));const Ei=a,Ri=.25,Gi=-Ei,Li=-.25,Fi=.0625,Hi=.375,Bi={half:!0,segments:[{type:Ai.bezier,values:[{x:0,y:Gi},{x:0,y:Gi},{x:Ri,y:Gi},{x:Ri,y:Li}]},{type:Ai.bezier,values:[{x:Ri,y:Li},{x:Ri,y:Li},{x:Ei,y:Li},{x:Ei,y:0}]},{type:Ai.bezier,values:[{x:Ei,y:0},{x:Ei,y:0},{x:Ei,y:Ri},{x:Ri,y:Ri}]},{type:Ai.bezier,values:[{x:Ri,y:Ri},{x:Ri,y:Ri},{x:Fi,y:Ri},{x:Fi,y:Fi}]},{type:Ai.bezier,values:[{x:Fi,y:Fi},{x:Fi,y:Ri},{x:Ri,y:Ei},{x:Ri,y:Ei}]},{type:Ai.bezier,values:[{x:Ri,y:Ei},{x:Ri,y:Ei},{x:0,y:Ei},{x:0,y:Ei}]}]},Ni={half:!0,segments:[{type:Ai.bezier,values:[{x:0,y:Ei},{x:0,y:Ei},{x:Hi,y:0},{x:Hi,y:0}]},{type:Ai.bezier,values:[{x:Hi,y:0},{x:Hi,y:0},{x:0,y:Gi},{x:0,y:Gi}]}]},Ui={half:!0,segments:[{type:Ai.bezier,values:[{x:0,y:Ei},{x:0,y:Ei},{x:Ei,y:0},{x:Ei,y:Li}]},{type:Ai.bezier,values:[{x:Ei,y:Li},{x:Ei,y:Li},{x:Ei,y:Gi},{x:Ri,y:Gi}]},{type:Ai.bezier,values:[{x:Ri,y:Gi},{x:Ri,y:Gi},{x:0,y:Gi},{x:0,y:Li}]}]},$i={half:!0,segments:[{type:Ai.bezier,values:[{x:0,y:Gi},{x:0,y:Gi},{x:Ei,y:Li},{x:Ei,y:0}]},{type:Ai.bezier,values:[{x:Ei,y:0},{x:Ei,y:0},{x:Ei,y:Ri},{x:Ri,y:Ri}]},{type:Ai.bezier,values:[{x:Ri,y:Ri},{x:Ri,y:Ri},{x:Fi,y:Ri},{x:Fi,y:Fi}]},{type:Ai.bezier,values:[{x:Fi,y:Fi},{x:Fi,y:Ri},{x:Ri,y:Ei},{x:Ri,y:Ei}]},{type:Ai.bezier,values:[{x:Ri,y:Ei},{x:Ri,y:Ei},{x:0,y:Ei},{x:0,y:Ei}]}]},ji={[zi.hearts]:Ui,[zi.diamonds]:Ni,[zi.clubs]:Bi,[zi.spades]:$i};class qi{draw(t){const{context:e,radius:i}=t;Ii(e,i,ji.clubs)}}async function Wi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["club","clubs"],()=>Promise.resolve(new qi))})}class Qi{draw(t){const{context:e,radius:i}=t;Ii(e,i,ji.diamonds)}}async function Zi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["diamond","diamonds"],()=>Promise.resolve(new Qi))})}let Yi=class{draw(t){const{context:e,radius:i}=t;Ii(e,i,ji.hearts)}};async function Xi(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["heart","hearts"],()=>Promise.resolve(new Yi))})}class Ki{draw(t){const{context:e,radius:i}=t;Ii(e,i,ji.spades)}}async function Ji(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["spade","spades"],()=>Promise.resolve(new Ki))})}async function tn(t){t.checkVersion("4.2.1"),await Promise.all([Wi(t),Zi(t),Xi(t),Ji(t)])}const en=4/3,nn=new Map,sn={r:215,g:20,b:20},on={r:18,g:18,b:18};function an(t,e,i,n,s,o){if(s)!function(t,e){cn(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*en,c=2*e,l=r*a,h=c*a;let d=nn.get(s);if(!d){const t=new OffscreenCanvas(r,c),a=t.getContext("2d",o);a&&(a.translate(l,h),rn(a,e,i,n),d=t instanceof HTMLCanvasElement?t:t.transferToImageBitmap(),nn.set(s,d))}d?t.drawImage(d,-l,-h,r,c):rn(t,e,i,n)}}function rn(t,e,i,n){const{suit:s,value:o}=i,r=e*en*a,l=2*e*a,h=.2*e,d=.4*e,p=.3*e,g=.7*e,f=.25*e,y=.1*e,m=Ze(s===zi.hearts||s===zi.diamonds?sn:on,n);t.save(),cn(t,e),t.fillStyle=Ze({r:255,g:255,b:255},n),t.fill(),t.strokeStyle=Ze({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(),Ii(t,p,ji[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(),Ii(t,p,ji[s]),t.fill(),t.restore(),t.fillText(o,c.x+f,c.y),t.restore(),t.save(),t.beginPath(),Ii(t,g,ji[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 cn(t,e){const i=e*en*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 ln{#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,an(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=ft({},i))}}async function hn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["card"],t=>Promise.resolve(new ln(t)))})}async function dn(t){t.checkVersion("4.2.1"),await Promise.all([hn(t),tn(t)])}class un{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=U(i?.holeRadius??44),e.cogInnerRadius=U(i?.innerRadius??72),e.cogInnerTaper=U(i?.innerTaper??35),e.cogNotches=U(i?.notches??7),e.cogOuterTaper=U(i?.outerTaper??50)}}async function pn(t){t.checkVersion("4.2.1"),await t.pluginManager.register(t=>{t.pluginManager.addShape(["cog"],()=>Promise.resolve(new un))})}function gn(t){const e=new Uint32Array(1);return e[0]=1664525*t[0]+1013904223,e}class fn{#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.#O(n[e],n[e+1],n[e+2]),null===o?s[t/4]=a:o.next=a,o=a;a&&(a.next=this.#O(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=gn(gn(gn(a)));for(let t=255;t>=0;t--){a=gn(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]}}#O(t,e,i){const n=this.#w;return{dx:-e-t*n,dy:-i-t*n,xsb:e,ysb:i}}}const yn=1/3;class mn{#k;#T;#D;#V;#A;#P;#I;#z;#_;#E;constructor(){this.#k=1/103,this.#T=(Math.sqrt(4)-1)*yn,this.#D=(1/Math.sqrt(4)-1)*yn,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.#A=[-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.#I=[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.#z=[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.#E=new Uint8Array(256)}noise(t,e,i){const n=this.#D,s=this.#k,o=this.#T,a=this.#P,r=this.#_,c=this.#E,l=this.#A,h=(t+e+i)*n,d=t+h,u=e+h,p=i+h,g=Math.floor(d),f=Math.floor(u),y=Math.floor(p),m=(g+f+y)*o,w=t-(g+m),v=e-(f+m),b=i-(y+m),x=d-g,P=u-f,S=p-y,M=x+P+S;let _=0;for(let t=a[P-S+1|x-P+1<<1|x-S+1<<2|M<<3|M+S<<5|M+P<<7|M+x<<9];void 0!==t;t=t.next){const e=w+t.dx,i=v+t.dy,n=b+t.dz,s=2-e*e-i*i-n*n;if(s>0){const o=g+t.xsb,a=f+t.ysb,h=y+t.zsb,d=c[r[r[255&o]+a&255]+h&255];_+=s*s*s*s*(l[d]*e+l[d+1]*i+l[d+2]*n)}}return _*s}seed(t){const e=this.#V,i=this.#I,n=this.#z,s=[];for(let t=0;t<n.length;t+=9){const i=e[n[t]];let o=null,a=null;for(let e=0;e<i.length;e+=4)a=this.#R(i[e],i[e+1],i[e+2],i[e+3]),null===o?s[t/9]=a:o.next=a,o=a;a&&(a.next=this.#R(n[t+1],n[t+2],n[t+3],n[t+4]),a.next.next=this.#R(n[t+5],n[t+6],n[t+7],n[t+8]))}this.#P=[];for(let t=0;t<i.length;t+=2)this.#P[i[t]]=s[i[t+1]];this.#_=new Uint8Array(256),this.#E=new Uint8Array(256);const