@novely/particles 0.8.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -8
- package/dist/{index.js → chunk-QB4O5T45.js} +2 -2
- package/dist/chunk-QB4O5T45.js.map +1 -0
- package/dist/chunk-ZNV5PZ6I.js +2 -0
- package/dist/chunk-ZNV5PZ6I.js.map +1 -0
- package/dist/eager.d.ts +7 -0
- package/dist/eager.js +2 -0
- package/dist/eager.js.map +1 -0
- package/dist/lazy.d.ts +7 -0
- package/dist/lazy.js +2 -0
- package/dist/lazy.js.map +1 -0
- package/dist/particles-B-Ej9Zxz.d.ts +5 -0
- package/dist/tsparticles-U2KDNUB2.js +2 -0
- package/dist/tsparticles-U2KDNUB2.js.map +1 -0
- package/package.json +17 -6
- package/dist/index.d.ts +0 -8
- package/dist/index.js.map +0 -1
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/Constants.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Directions/MoveDirection.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/TypeUtils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/Vectors.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/NumberUtils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/AnimationMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/AnimationStatus.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/DestroyType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Directions/OutModeDirection.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/PixelMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/StartValueType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/Utils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/AlterType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/ColorUtils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/CanvasUtils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Canvas.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/InteractivityDetect.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/EventListeners.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/EventType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/OptionsColor.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Background/Background.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/BackgroundMask/BackgroundMaskCover.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/BackgroundMask/BackgroundMask.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/FullScreen/FullScreen.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/ClickEvent.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/DivType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/DivEvent.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/Parallax.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/HoverEvent.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/ResizeEvent.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Events/Events.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Modes/Modes.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Interactivity/Interactivity.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/ManualParticle.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/ResponsiveMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Responsive.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/ThemeMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Theme/ThemeDefault.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Theme/Theme.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/AnimationOptions.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/ColorAnimation.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/HslAnimation.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/AnimatableColor.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/CollisionMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Collisions/CollisionsAbsorb.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Collisions/CollisionsOverlap.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/ValueWithRandom.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Bounce/ParticlesBounceFactor.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Bounce/ParticlesBounce.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Collisions/Collisions.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Effect/Effect.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveAngle.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveAttract.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveCenter.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveGravity.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/Path/MovePath.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveTrailFill.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/MoveTrail.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/OutMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/OutModes.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/Spin.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Move/Move.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Opacity/OpacityAnimation.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Opacity/Opacity.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Number/ParticlesDensity.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Modes/LimitMode.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Number/ParticlesNumberLimit.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Number/ParticlesNumber.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Shadow.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Shape/Shape.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Size/SizeAnimation.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Size/Size.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/Stroke.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/ZIndex/ZIndex.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Particles/ParticlesOptions.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/OptionsUtils.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Options/Classes/Options.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/InteractorType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/InteractionManager.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/ParticleOutType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Particle.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/Point.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Types/RangeType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/Ranges.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/QuadTree.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Particles.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Retina.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Container.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Utils/EventDispatcher.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Engine.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/init.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/ExternalInteractorBase.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Core/Utils/ParticlesInteractorBase.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Directions/RotateDirection.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/GradientType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/Enums/Types/EasingType.js","../../../node_modules/.pnpm/@tsparticles+engine@3.7.1/node_modules/@tsparticles/engine/esm/index.js","../../../node_modules/.pnpm/@tsparticles+move-base@3.7.1/node_modules/@tsparticles/move-base/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+move-base@3.7.1/node_modules/@tsparticles/move-base/esm/BaseMover.js","../../../node_modules/.pnpm/@tsparticles+move-base@3.7.1/node_modules/@tsparticles/move-base/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-circle@3.7.1/node_modules/@tsparticles/shape-circle/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-circle@3.7.1/node_modules/@tsparticles/shape-circle/esm/CircleDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-circle@3.7.1/node_modules/@tsparticles/shape-circle/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-color@3.7.1/node_modules/@tsparticles/updater-color/esm/ColorUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-color@3.7.1/node_modules/@tsparticles/updater-color/esm/index.js","../../../node_modules/.pnpm/@tsparticles+plugin-hex-color@3.7.1/node_modules/@tsparticles/plugin-hex-color/esm/HexColorManager.js","../../../node_modules/.pnpm/@tsparticles+plugin-hex-color@3.7.1/node_modules/@tsparticles/plugin-hex-color/esm/index.js","../../../node_modules/.pnpm/@tsparticles+plugin-hsl-color@3.7.1/node_modules/@tsparticles/plugin-hsl-color/esm/HslColorManager.js","../../../node_modules/.pnpm/@tsparticles+plugin-hsl-color@3.7.1/node_modules/@tsparticles/plugin-hsl-color/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-opacity@3.7.1/node_modules/@tsparticles/updater-opacity/esm/OpacityUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-opacity@3.7.1/node_modules/@tsparticles/updater-opacity/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/BounceOutMode.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/DestroyOutMode.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/NoneOutMode.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/OutOutMode.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/OutOfCanvasUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-out-modes@3.7.1/node_modules/@tsparticles/updater-out-modes/esm/index.js","../../../node_modules/.pnpm/@tsparticles+plugin-rgb-color@3.7.1/node_modules/@tsparticles/plugin-rgb-color/esm/RgbColorManager.js","../../../node_modules/.pnpm/@tsparticles+plugin-rgb-color@3.7.1/node_modules/@tsparticles/plugin-rgb-color/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-size@3.7.1/node_modules/@tsparticles/updater-size/esm/SizeUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-size@3.7.1/node_modules/@tsparticles/updater-size/esm/index.js","../../../node_modules/.pnpm/@tsparticles+basic@3.7.1/node_modules/@tsparticles/basic/esm/index.js","../../../node_modules/.pnpm/@tsparticles+plugin-easing-quad@3.7.1/node_modules/@tsparticles/plugin-easing-quad/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-emoji@3.7.1/node_modules/@tsparticles/shape-emoji/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-emoji@3.7.1/node_modules/@tsparticles/shape-emoji/esm/EmojiDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-emoji@3.7.1/node_modules/@tsparticles/shape-emoji/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-attract@3.7.1/node_modules/@tsparticles/interaction-external-attract/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-attract@3.7.1/node_modules/@tsparticles/interaction-external-attract/esm/Options/Classes/Attract.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-attract@3.7.1/node_modules/@tsparticles/interaction-external-attract/esm/Attractor.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-attract@3.7.1/node_modules/@tsparticles/interaction-external-attract/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bounce@3.7.1/node_modules/@tsparticles/interaction-external-bounce/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bounce@3.7.1/node_modules/@tsparticles/interaction-external-bounce/esm/Options/Classes/Bounce.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bounce@3.7.1/node_modules/@tsparticles/interaction-external-bounce/esm/Bouncer.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bounce@3.7.1/node_modules/@tsparticles/interaction-external-bounce/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Options/Classes/BubbleBase.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Options/Classes/BubbleDiv.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Options/Classes/Bubble.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Enums.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/Bubbler.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-bubble@3.7.1/node_modules/@tsparticles/interaction-external-bubble/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-connect@3.7.1/node_modules/@tsparticles/interaction-external-connect/esm/Options/Classes/ConnectLinks.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-connect@3.7.1/node_modules/@tsparticles/interaction-external-connect/esm/Options/Classes/Connect.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-connect@3.7.1/node_modules/@tsparticles/interaction-external-connect/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-connect@3.7.1/node_modules/@tsparticles/interaction-external-connect/esm/Connector.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-connect@3.7.1/node_modules/@tsparticles/interaction-external-connect/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-grab@3.7.1/node_modules/@tsparticles/interaction-external-grab/esm/Options/Classes/GrabLinks.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-grab@3.7.1/node_modules/@tsparticles/interaction-external-grab/esm/Options/Classes/Grab.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-grab@3.7.1/node_modules/@tsparticles/interaction-external-grab/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-grab@3.7.1/node_modules/@tsparticles/interaction-external-grab/esm/Grabber.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-grab@3.7.1/node_modules/@tsparticles/interaction-external-grab/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-pause@3.7.1/node_modules/@tsparticles/interaction-external-pause/esm/Pauser.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-pause@3.7.1/node_modules/@tsparticles/interaction-external-pause/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-push@3.7.1/node_modules/@tsparticles/interaction-external-push/esm/Options/Classes/Push.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-push@3.7.1/node_modules/@tsparticles/interaction-external-push/esm/Pusher.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-push@3.7.1/node_modules/@tsparticles/interaction-external-push/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-remove@3.7.1/node_modules/@tsparticles/interaction-external-remove/esm/Options/Classes/Remove.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-remove@3.7.1/node_modules/@tsparticles/interaction-external-remove/esm/Remover.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-remove@3.7.1/node_modules/@tsparticles/interaction-external-remove/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-repulse@3.7.1/node_modules/@tsparticles/interaction-external-repulse/esm/Options/Classes/RepulseBase.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-repulse@3.7.1/node_modules/@tsparticles/interaction-external-repulse/esm/Options/Classes/RepulseDiv.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-repulse@3.7.1/node_modules/@tsparticles/interaction-external-repulse/esm/Options/Classes/Repulse.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-repulse@3.7.1/node_modules/@tsparticles/interaction-external-repulse/esm/Repulser.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-repulse@3.7.1/node_modules/@tsparticles/interaction-external-repulse/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-slow@3.7.1/node_modules/@tsparticles/interaction-external-slow/esm/Options/Classes/Slow.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-slow@3.7.1/node_modules/@tsparticles/interaction-external-slow/esm/Slower.js","../../../node_modules/.pnpm/@tsparticles+interaction-external-slow@3.7.1/node_modules/@tsparticles/interaction-external-slow/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/GifUtils/Constants.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/GifUtils/ByteStream.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/GifUtils/Enums/DisposalMethod.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/GifUtils/Types/GIFDataHeaders.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/GifUtils/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/ImageDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/Options/Classes/Preload.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/ImagePreloader.js","../../../node_modules/.pnpm/@tsparticles+shape-image@3.7.1/node_modules/@tsparticles/shape-image/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/Options/Classes/LifeDelay.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/Options/Classes/LifeDuration.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/Options/Classes/Life.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/LifeUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-life@3.7.1/node_modules/@tsparticles/updater-life/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-line@3.7.1/node_modules/@tsparticles/shape-line/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-line@3.7.1/node_modules/@tsparticles/shape-line/esm/LineDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-line@3.7.1/node_modules/@tsparticles/shape-line/esm/index.js","../../../node_modules/.pnpm/@tsparticles+move-parallax@3.7.1/node_modules/@tsparticles/move-parallax/esm/ParallaxMover.js","../../../node_modules/.pnpm/@tsparticles+move-parallax@3.7.1/node_modules/@tsparticles/move-parallax/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-attract@3.7.1/node_modules/@tsparticles/interaction-particles-attract/esm/Attractor.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-attract@3.7.1/node_modules/@tsparticles/interaction-particles-attract/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/Absorb.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/Bounce.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/Destroy.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/ResolveCollision.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/Collider.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-collisions@3.7.1/node_modules/@tsparticles/interaction-particles-collisions/esm/index.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/CircleWarp.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/Options/Classes/LinksShadow.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/Options/Classes/LinksTriangle.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/Options/Classes/Links.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/Linker.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/interaction.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/LinkInstance.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/LinksPlugin.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/plugin.js","../../../node_modules/.pnpm/@tsparticles+interaction-particles-links@3.7.1/node_modules/@tsparticles/interaction-particles-links/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-polygon@3.7.1/node_modules/@tsparticles/shape-polygon/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-polygon@3.7.1/node_modules/@tsparticles/shape-polygon/esm/PolygonDrawerBase.js","../../../node_modules/.pnpm/@tsparticles+shape-polygon@3.7.1/node_modules/@tsparticles/shape-polygon/esm/PolygonDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-polygon@3.7.1/node_modules/@tsparticles/shape-polygon/esm/TriangleDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-polygon@3.7.1/node_modules/@tsparticles/shape-polygon/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-rotate@3.7.1/node_modules/@tsparticles/updater-rotate/esm/Options/Classes/RotateAnimation.js","../../../node_modules/.pnpm/@tsparticles+updater-rotate@3.7.1/node_modules/@tsparticles/updater-rotate/esm/Options/Classes/Rotate.js","../../../node_modules/.pnpm/@tsparticles+updater-rotate@3.7.1/node_modules/@tsparticles/updater-rotate/esm/RotateUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-rotate@3.7.1/node_modules/@tsparticles/updater-rotate/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-square@3.7.1/node_modules/@tsparticles/shape-square/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-square@3.7.1/node_modules/@tsparticles/shape-square/esm/SquareDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-square@3.7.1/node_modules/@tsparticles/shape-square/esm/index.js","../../../node_modules/.pnpm/@tsparticles+shape-star@3.7.1/node_modules/@tsparticles/shape-star/esm/Utils.js","../../../node_modules/.pnpm/@tsparticles+shape-star@3.7.1/node_modules/@tsparticles/shape-star/esm/StarDrawer.js","../../../node_modules/.pnpm/@tsparticles+shape-star@3.7.1/node_modules/@tsparticles/shape-star/esm/index.js","../../../node_modules/.pnpm/@tsparticles+updater-stroke-color@3.7.1/node_modules/@tsparticles/updater-stroke-color/esm/StrokeColorUpdater.js","../../../node_modules/.pnpm/@tsparticles+updater-stroke-color@3.7.1/node_modules/@tsparticles/updater-stroke-color/esm/index.js","../../../node_modules/.pnpm/@tsparticles+slim@3.7.1/node_modules/@tsparticles/slim/esm/index.js","../src/particles.ts"],"sourcesContent":["export const generatedAttribute = \"generated\";\nexport const mouseDownEvent = \"pointerdown\";\nexport const mouseUpEvent = \"pointerup\";\nexport const mouseLeaveEvent = \"pointerleave\";\nexport const mouseOutEvent = \"pointerout\";\nexport const mouseMoveEvent = \"pointermove\";\nexport const touchStartEvent = \"touchstart\";\nexport const touchEndEvent = \"touchend\";\nexport const touchMoveEvent = \"touchmove\";\nexport const touchCancelEvent = \"touchcancel\";\nexport const resizeEvent = \"resize\";\nexport const visibilityChangeEvent = \"visibilitychange\";\nexport const errorPrefix = \"tsParticles - Error\";\nexport const percentDenominator = 100;\nexport const halfRandom = 0.5;\nexport const millisecondsToSeconds = 1000;\n","export var MoveDirection;\n(function (MoveDirection) {\n MoveDirection[\"bottom\"] = \"bottom\";\n MoveDirection[\"bottomLeft\"] = \"bottom-left\";\n MoveDirection[\"bottomRight\"] = \"bottom-right\";\n MoveDirection[\"left\"] = \"left\";\n MoveDirection[\"none\"] = \"none\";\n MoveDirection[\"right\"] = \"right\";\n MoveDirection[\"top\"] = \"top\";\n MoveDirection[\"topLeft\"] = \"top-left\";\n MoveDirection[\"topRight\"] = \"top-right\";\n MoveDirection[\"outside\"] = \"outside\";\n MoveDirection[\"inside\"] = \"inside\";\n})(MoveDirection || (MoveDirection = {}));\n","export function isBoolean(arg) {\n return typeof arg === \"boolean\";\n}\nexport function isString(arg) {\n return typeof arg === \"string\";\n}\nexport function isNumber(arg) {\n return typeof arg === \"number\";\n}\nexport function isFunction(arg) {\n return typeof arg === \"function\";\n}\nexport function isObject(arg) {\n return typeof arg === \"object\" && arg !== null;\n}\nexport function isArray(arg) {\n return Array.isArray(arg);\n}\nexport function isNull(arg) {\n return arg === null || arg === undefined;\n}\n","import { errorPrefix } from \"./Constants.js\";\nimport { isNumber } from \"../../Utils/TypeUtils.js\";\nconst origin = {\n x: 0,\n y: 0,\n z: 0,\n}, squareExp = 2, inverseFactorNumerator = 1.0;\nexport class Vector3d {\n constructor(xOrCoords, y, z) {\n this._updateFromAngle = (angle, length) => {\n this.x = Math.cos(angle) * length;\n this.y = Math.sin(angle) * length;\n };\n if (!isNumber(xOrCoords) && xOrCoords) {\n this.x = xOrCoords.x;\n this.y = xOrCoords.y;\n const coords3d = xOrCoords;\n this.z = coords3d.z ? coords3d.z : origin.z;\n }\n else if (xOrCoords !== undefined && y !== undefined) {\n this.x = xOrCoords;\n this.y = y;\n this.z = z ?? origin.z;\n }\n else {\n throw new Error(`${errorPrefix} Vector3d not initialized correctly`);\n }\n }\n static get origin() {\n return Vector3d.create(origin.x, origin.y, origin.z);\n }\n get angle() {\n return Math.atan2(this.y, this.x);\n }\n set angle(angle) {\n this._updateFromAngle(angle, this.length);\n }\n get length() {\n return Math.sqrt(this.getLengthSq());\n }\n set length(length) {\n this._updateFromAngle(this.angle, length);\n }\n static clone(source) {\n return Vector3d.create(source.x, source.y, source.z);\n }\n static create(x, y, z) {\n return new Vector3d(x, y, z);\n }\n add(v) {\n return Vector3d.create(this.x + v.x, this.y + v.y, this.z + v.z);\n }\n addTo(v) {\n this.x += v.x;\n this.y += v.y;\n this.z += v.z;\n }\n copy() {\n return Vector3d.clone(this);\n }\n distanceTo(v) {\n return this.sub(v).length;\n }\n distanceToSq(v) {\n return this.sub(v).getLengthSq();\n }\n div(n) {\n return Vector3d.create(this.x / n, this.y / n, this.z / n);\n }\n divTo(n) {\n this.x /= n;\n this.y /= n;\n this.z /= n;\n }\n getLengthSq() {\n return this.x ** squareExp + this.y ** squareExp;\n }\n mult(n) {\n return Vector3d.create(this.x * n, this.y * n, this.z * n);\n }\n multTo(n) {\n this.x *= n;\n this.y *= n;\n this.z *= n;\n }\n normalize() {\n const length = this.length, noLength = 0;\n if (length != noLength) {\n this.multTo(inverseFactorNumerator / length);\n }\n }\n rotate(angle) {\n return Vector3d.create(this.x * Math.cos(angle) - this.y * Math.sin(angle), this.x * Math.sin(angle) + this.y * Math.cos(angle), origin.z);\n }\n setTo(c) {\n this.x = c.x;\n this.y = c.y;\n const v3d = c;\n this.z = v3d.z ? v3d.z : origin.z;\n }\n sub(v) {\n return Vector3d.create(this.x - v.x, this.y - v.y, this.z - v.z);\n }\n subFrom(v) {\n this.x -= v.x;\n this.y -= v.y;\n this.z -= v.z;\n }\n}\nexport class Vector extends Vector3d {\n constructor(xOrCoords, y) {\n super(xOrCoords, y, origin.z);\n }\n static get origin() {\n return Vector.create(origin.x, origin.y);\n }\n static clone(source) {\n return Vector.create(source.x, source.y);\n }\n static create(x, y) {\n return new Vector(x, y);\n }\n}\n","import { MoveDirection } from \"../Enums/Directions/MoveDirection.js\";\nimport { Vector } from \"../Core/Utils/Vectors.js\";\nimport { isNumber } from \"./TypeUtils.js\";\nimport { percentDenominator } from \"../Core/Utils/Constants.js\";\nlet _random = Math.random;\nconst _animationLoop = {\n nextFrame: (cb) => requestAnimationFrame(cb),\n cancel: (idx) => cancelAnimationFrame(idx),\n}, double = 2, doublePI = Math.PI * double;\nexport function setRandom(rnd = Math.random) {\n _random = rnd;\n}\nexport function getRandom() {\n const min = 0, max = 1;\n return clamp(_random(), min, max - Number.EPSILON);\n}\nexport function setAnimationFunctions(nextFrame, cancel) {\n _animationLoop.nextFrame = (callback) => nextFrame(callback);\n _animationLoop.cancel = (handle) => cancel(handle);\n}\nexport function animate(fn) {\n return _animationLoop.nextFrame(fn);\n}\nexport function cancelAnimation(handle) {\n _animationLoop.cancel(handle);\n}\nexport function clamp(num, min, max) {\n return Math.min(Math.max(num, min), max);\n}\nexport function mix(comp1, comp2, weight1, weight2) {\n return Math.floor((comp1 * weight1 + comp2 * weight2) / (weight1 + weight2));\n}\nexport function randomInRange(r) {\n const max = getRangeMax(r), minOffset = 0;\n let min = getRangeMin(r);\n if (max === min) {\n min = minOffset;\n }\n return getRandom() * (max - min) + min;\n}\nexport function getRangeValue(value) {\n return isNumber(value) ? value : randomInRange(value);\n}\nexport function getRangeMin(value) {\n return isNumber(value) ? value : value.min;\n}\nexport function getRangeMax(value) {\n return isNumber(value) ? value : value.max;\n}\nexport function setRangeValue(source, value) {\n if (source === value || (value === undefined && isNumber(source))) {\n return source;\n }\n const min = getRangeMin(source), max = getRangeMax(source);\n return value !== undefined\n ? {\n min: Math.min(min, value),\n max: Math.max(max, value),\n }\n : setRangeValue(min, max);\n}\nexport function getDistances(pointA, pointB) {\n const dx = pointA.x - pointB.x, dy = pointA.y - pointB.y, squareExp = 2;\n return { dx: dx, dy: dy, distance: Math.sqrt(dx ** squareExp + dy ** squareExp) };\n}\nexport function getDistance(pointA, pointB) {\n return getDistances(pointA, pointB).distance;\n}\nexport function degToRad(degrees) {\n const PIDeg = 180;\n return (degrees * Math.PI) / PIDeg;\n}\nexport function getParticleDirectionAngle(direction, position, center) {\n if (isNumber(direction)) {\n return degToRad(direction);\n }\n const empty = 0, half = 0.5, quarter = 0.25, threeQuarter = half + quarter;\n switch (direction) {\n case MoveDirection.top:\n return -Math.PI * half;\n case MoveDirection.topRight:\n return -Math.PI * quarter;\n case MoveDirection.right:\n return empty;\n case MoveDirection.bottomRight:\n return Math.PI * quarter;\n case MoveDirection.bottom:\n return Math.PI * half;\n case MoveDirection.bottomLeft:\n return Math.PI * threeQuarter;\n case MoveDirection.left:\n return Math.PI;\n case MoveDirection.topLeft:\n return -Math.PI * threeQuarter;\n case MoveDirection.inside:\n return Math.atan2(center.y - position.y, center.x - position.x);\n case MoveDirection.outside:\n return Math.atan2(position.y - center.y, position.x - center.x);\n default:\n return getRandom() * doublePI;\n }\n}\nexport function getParticleBaseVelocity(direction) {\n const baseVelocity = Vector.origin;\n baseVelocity.length = 1;\n baseVelocity.angle = direction;\n return baseVelocity;\n}\nexport function collisionVelocity(v1, v2, m1, m2) {\n const double = 2;\n return Vector.create((v1.x * (m1 - m2)) / (m1 + m2) + (v2.x * double * m2) / (m1 + m2), v1.y);\n}\nexport function calcPositionFromSize(data) {\n return data.position?.x !== undefined && data.position.y !== undefined\n ? {\n x: (data.position.x * data.size.width) / percentDenominator,\n y: (data.position.y * data.size.height) / percentDenominator,\n }\n : undefined;\n}\nexport function calcPositionOrRandomFromSize(data) {\n return {\n x: ((data.position?.x ?? getRandom() * percentDenominator) * data.size.width) / percentDenominator,\n y: ((data.position?.y ?? getRandom() * percentDenominator) * data.size.height) / percentDenominator,\n };\n}\nexport function calcPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function calcExactPositionOrRandomFromSize(data) {\n return {\n x: data.position?.x ?? getRandom() * data.size.width,\n y: data.position?.y ?? getRandom() * data.size.height,\n };\n}\nexport function calcExactPositionOrRandomFromSizeRanged(data) {\n const position = {\n x: data.position?.x !== undefined ? getRangeValue(data.position.x) : undefined,\n y: data.position?.y !== undefined ? getRangeValue(data.position.y) : undefined,\n };\n return calcExactPositionOrRandomFromSize({ size: data.size, position });\n}\nexport function parseAlpha(input) {\n const defaultAlpha = 1;\n if (!input) {\n return defaultAlpha;\n }\n return input.endsWith(\"%\") ? parseFloat(input) / percentDenominator : parseFloat(input);\n}\n","export var AnimationMode;\n(function (AnimationMode) {\n AnimationMode[\"auto\"] = \"auto\";\n AnimationMode[\"increase\"] = \"increase\";\n AnimationMode[\"decrease\"] = \"decrease\";\n AnimationMode[\"random\"] = \"random\";\n})(AnimationMode || (AnimationMode = {}));\n","export var AnimationStatus;\n(function (AnimationStatus) {\n AnimationStatus[\"increasing\"] = \"increasing\";\n AnimationStatus[\"decreasing\"] = \"decreasing\";\n})(AnimationStatus || (AnimationStatus = {}));\n","export var DestroyType;\n(function (DestroyType) {\n DestroyType[\"none\"] = \"none\";\n DestroyType[\"max\"] = \"max\";\n DestroyType[\"min\"] = \"min\";\n})(DestroyType || (DestroyType = {}));\n","export var OutModeDirection;\n(function (OutModeDirection) {\n OutModeDirection[\"bottom\"] = \"bottom\";\n OutModeDirection[\"left\"] = \"left\";\n OutModeDirection[\"right\"] = \"right\";\n OutModeDirection[\"top\"] = \"top\";\n})(OutModeDirection || (OutModeDirection = {}));\n","export var PixelMode;\n(function (PixelMode) {\n PixelMode[\"precise\"] = \"precise\";\n PixelMode[\"percent\"] = \"percent\";\n})(PixelMode || (PixelMode = {}));\n","export var StartValueType;\n(function (StartValueType) {\n StartValueType[\"max\"] = \"max\";\n StartValueType[\"min\"] = \"min\";\n StartValueType[\"random\"] = \"random\";\n})(StartValueType || (StartValueType = {}));\n","import { clamp, collisionVelocity, getDistances, getRandom, getRangeMax, getRangeMin, getRangeValue, randomInRange, } from \"./NumberUtils.js\";\nimport { halfRandom, millisecondsToSeconds, percentDenominator } from \"../Core/Utils/Constants.js\";\nimport { isArray, isObject } from \"./TypeUtils.js\";\nimport { AnimationMode } from \"../Enums/Modes/AnimationMode.js\";\nimport { AnimationStatus } from \"../Enums/AnimationStatus.js\";\nimport { DestroyType } from \"../Enums/Types/DestroyType.js\";\nimport { OutModeDirection } from \"../Enums/Directions/OutModeDirection.js\";\nimport { PixelMode } from \"../Enums/Modes/PixelMode.js\";\nimport { StartValueType } from \"../Enums/Types/StartValueType.js\";\nimport { Vector } from \"../Core/Utils/Vectors.js\";\nconst _logger = {\n debug: console.debug,\n error: console.error,\n info: console.info,\n log: console.log,\n verbose: console.log,\n warning: console.warn,\n};\nexport function setLogger(logger) {\n _logger.debug = logger.debug || _logger.debug;\n _logger.error = logger.error || _logger.error;\n _logger.info = logger.info || _logger.info;\n _logger.log = logger.log || _logger.log;\n _logger.verbose = logger.verbose || _logger.verbose;\n _logger.warning = logger.warning || _logger.warning;\n}\nexport function getLogger() {\n return _logger;\n}\nfunction rectSideBounce(data) {\n const res = { bounced: false }, { pSide, pOtherSide, rectSide, rectOtherSide, velocity, factor } = data, half = 0.5, minVelocity = 0;\n if (pOtherSide.min < rectOtherSide.min ||\n pOtherSide.min > rectOtherSide.max ||\n pOtherSide.max < rectOtherSide.min ||\n pOtherSide.max > rectOtherSide.max) {\n return res;\n }\n if ((pSide.max >= rectSide.min && pSide.max <= (rectSide.max + rectSide.min) * half && velocity > minVelocity) ||\n (pSide.min <= rectSide.max && pSide.min > (rectSide.max + rectSide.min) * half && velocity < minVelocity)) {\n res.velocity = velocity * -factor;\n res.bounced = true;\n }\n return res;\n}\nfunction checkSelector(element, selectors) {\n const res = executeOnSingleOrMultiple(selectors, selector => {\n return element.matches(selector);\n });\n return isArray(res) ? res.some(t => t) : res;\n}\nexport function isSsr() {\n return typeof window === \"undefined\" || !window || typeof window.document === \"undefined\" || !window.document;\n}\nexport function hasMatchMedia() {\n return !isSsr() && typeof matchMedia !== \"undefined\";\n}\nexport function safeMatchMedia(query) {\n if (!hasMatchMedia()) {\n return;\n }\n return matchMedia(query);\n}\nexport function safeIntersectionObserver(callback) {\n if (isSsr() || typeof IntersectionObserver === \"undefined\") {\n return;\n }\n return new IntersectionObserver(callback);\n}\nexport function safeMutationObserver(callback) {\n if (isSsr() || typeof MutationObserver === \"undefined\") {\n return;\n }\n return new MutationObserver(callback);\n}\nexport function isInArray(value, array) {\n const invalidIndex = -1;\n return value === array || (isArray(array) && array.indexOf(value) > invalidIndex);\n}\nexport async function loadFont(font, weight) {\n try {\n await document.fonts.load(`${weight ?? \"400\"} 36px '${font ?? \"Verdana\"}'`);\n }\n catch {\n }\n}\nexport function arrayRandomIndex(array) {\n return Math.floor(getRandom() * array.length);\n}\nexport function itemFromArray(array, index, useIndex = true) {\n return array[index !== undefined && useIndex ? index % array.length : arrayRandomIndex(array)];\n}\nexport function isPointInside(point, size, offset, radius, direction) {\n const minRadius = 0;\n return areBoundsInside(calculateBounds(point, radius ?? minRadius), size, offset, direction);\n}\nexport function areBoundsInside(bounds, size, offset, direction) {\n let inside = true;\n if (!direction || direction === OutModeDirection.bottom) {\n inside = bounds.top < size.height + offset.x;\n }\n if (inside && (!direction || direction === OutModeDirection.left)) {\n inside = bounds.right > offset.x;\n }\n if (inside && (!direction || direction === OutModeDirection.right)) {\n inside = bounds.left < size.width + offset.y;\n }\n if (inside && (!direction || direction === OutModeDirection.top)) {\n inside = bounds.bottom > offset.y;\n }\n return inside;\n}\nexport function calculateBounds(point, radius) {\n return {\n bottom: point.y + radius,\n left: point.x - radius,\n right: point.x + radius,\n top: point.y - radius,\n };\n}\nexport function deepExtend(destination, ...sources) {\n for (const source of sources) {\n if (source === undefined || source === null) {\n continue;\n }\n if (!isObject(source)) {\n destination = source;\n continue;\n }\n const sourceIsArray = Array.isArray(source);\n if (sourceIsArray && (isObject(destination) || !destination || !Array.isArray(destination))) {\n destination = [];\n }\n else if (!sourceIsArray && (isObject(destination) || !destination || Array.isArray(destination))) {\n destination = {};\n }\n for (const key in source) {\n if (key === \"__proto__\") {\n continue;\n }\n const sourceDict = source, value = sourceDict[key], destDict = destination;\n destDict[key] =\n isObject(value) && Array.isArray(value)\n ? value.map(v => deepExtend(destDict[key], v))\n : deepExtend(destDict[key], value);\n }\n }\n return destination;\n}\nexport function isDivModeEnabled(mode, divs) {\n return !!findItemFromSingleOrMultiple(divs, t => t.enable && isInArray(mode, t.mode));\n}\nexport function divModeExecute(mode, divs, callback) {\n executeOnSingleOrMultiple(divs, div => {\n const divMode = div.mode, divEnabled = div.enable;\n if (divEnabled && isInArray(mode, divMode)) {\n singleDivModeExecute(div, callback);\n }\n });\n}\nexport function singleDivModeExecute(div, callback) {\n const selectors = div.selectors;\n executeOnSingleOrMultiple(selectors, selector => {\n callback(selector, div);\n });\n}\nexport function divMode(divs, element) {\n if (!element || !divs) {\n return;\n }\n return findItemFromSingleOrMultiple(divs, div => {\n return checkSelector(element, div.selectors);\n });\n}\nexport function circleBounceDataFromParticle(p) {\n return {\n position: p.getPosition(),\n radius: p.getRadius(),\n mass: p.getMass(),\n velocity: p.velocity,\n factor: Vector.create(getRangeValue(p.options.bounce.horizontal.value), getRangeValue(p.options.bounce.vertical.value)),\n };\n}\nexport function circleBounce(p1, p2) {\n const { x: xVelocityDiff, y: yVelocityDiff } = p1.velocity.sub(p2.velocity), [pos1, pos2] = [p1.position, p2.position], { dx: xDist, dy: yDist } = getDistances(pos2, pos1), minimumDistance = 0;\n if (xVelocityDiff * xDist + yVelocityDiff * yDist < minimumDistance) {\n return;\n }\n const angle = -Math.atan2(yDist, xDist), m1 = p1.mass, m2 = p2.mass, u1 = p1.velocity.rotate(angle), u2 = p2.velocity.rotate(angle), v1 = collisionVelocity(u1, u2, m1, m2), v2 = collisionVelocity(u2, u1, m1, m2), vFinal1 = v1.rotate(-angle), vFinal2 = v2.rotate(-angle);\n p1.velocity.x = vFinal1.x * p1.factor.x;\n p1.velocity.y = vFinal1.y * p1.factor.y;\n p2.velocity.x = vFinal2.x * p2.factor.x;\n p2.velocity.y = vFinal2.y * p2.factor.y;\n}\nexport function rectBounce(particle, divBounds) {\n const pPos = particle.getPosition(), size = particle.getRadius(), bounds = calculateBounds(pPos, size), bounceOptions = particle.options.bounce, resH = rectSideBounce({\n pSide: {\n min: bounds.left,\n max: bounds.right,\n },\n pOtherSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n rectSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n rectOtherSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n velocity: particle.velocity.x,\n factor: getRangeValue(bounceOptions.horizontal.value),\n });\n if (resH.bounced) {\n if (resH.velocity !== undefined) {\n particle.velocity.x = resH.velocity;\n }\n if (resH.position !== undefined) {\n particle.position.x = resH.position;\n }\n }\n const resV = rectSideBounce({\n pSide: {\n min: bounds.top,\n max: bounds.bottom,\n },\n pOtherSide: {\n min: bounds.left,\n max: bounds.right,\n },\n rectSide: {\n min: divBounds.top,\n max: divBounds.bottom,\n },\n rectOtherSide: {\n min: divBounds.left,\n max: divBounds.right,\n },\n velocity: particle.velocity.y,\n factor: getRangeValue(bounceOptions.vertical.value),\n });\n if (resV.bounced) {\n if (resV.velocity !== undefined) {\n particle.velocity.y = resV.velocity;\n }\n if (resV.position !== undefined) {\n particle.position.y = resV.position;\n }\n }\n}\nexport function executeOnSingleOrMultiple(obj, callback) {\n const defaultIndex = 0;\n return isArray(obj) ? obj.map((item, index) => callback(item, index)) : callback(obj, defaultIndex);\n}\nexport function itemFromSingleOrMultiple(obj, index, useIndex) {\n return isArray(obj) ? itemFromArray(obj, index, useIndex) : obj;\n}\nexport function findItemFromSingleOrMultiple(obj, callback) {\n if (isArray(obj)) {\n return obj.find((t, index) => callback(t, index));\n }\n const defaultIndex = 0;\n return callback(obj, defaultIndex) ? obj : undefined;\n}\nexport function initParticleNumericAnimationValue(options, pxRatio) {\n const valueRange = options.value, animationOptions = options.animation, res = {\n delayTime: getRangeValue(animationOptions.delay) * millisecondsToSeconds,\n enable: animationOptions.enable,\n value: getRangeValue(options.value) * pxRatio,\n max: getRangeMax(valueRange) * pxRatio,\n min: getRangeMin(valueRange) * pxRatio,\n loops: 0,\n maxLoops: getRangeValue(animationOptions.count),\n time: 0,\n }, decayOffset = 1;\n if (animationOptions.enable) {\n res.decay = decayOffset - getRangeValue(animationOptions.decay);\n switch (animationOptions.mode) {\n case AnimationMode.increase:\n res.status = AnimationStatus.increasing;\n break;\n case AnimationMode.decrease:\n res.status = AnimationStatus.decreasing;\n break;\n case AnimationMode.random:\n res.status = getRandom() >= halfRandom ? AnimationStatus.increasing : AnimationStatus.decreasing;\n break;\n }\n const autoStatus = animationOptions.mode === AnimationMode.auto;\n switch (animationOptions.startValue) {\n case StartValueType.min:\n res.value = res.min;\n if (autoStatus) {\n res.status = AnimationStatus.increasing;\n }\n break;\n case StartValueType.max:\n res.value = res.max;\n if (autoStatus) {\n res.status = AnimationStatus.decreasing;\n }\n break;\n case StartValueType.random:\n default:\n res.value = randomInRange(res);\n if (autoStatus) {\n res.status = getRandom() >= halfRandom ? AnimationStatus.increasing : AnimationStatus.decreasing;\n }\n break;\n }\n }\n res.initialValue = res.value;\n return res;\n}\nfunction getPositionOrSize(positionOrSize, canvasSize) {\n const isPercent = positionOrSize.mode === PixelMode.percent;\n if (!isPercent) {\n const { mode: _, ...rest } = positionOrSize;\n return rest;\n }\n const isPosition = \"x\" in positionOrSize;\n if (isPosition) {\n return {\n x: (positionOrSize.x / percentDenominator) * canvasSize.width,\n y: (positionOrSize.y / percentDenominator) * canvasSize.height,\n };\n }\n else {\n return {\n width: (positionOrSize.width / percentDenominator) * canvasSize.width,\n height: (positionOrSize.height / percentDenominator) * canvasSize.height,\n };\n }\n}\nexport function getPosition(position, canvasSize) {\n return getPositionOrSize(position, canvasSize);\n}\nexport function getSize(size, canvasSize) {\n return getPositionOrSize(size, canvasSize);\n}\nfunction checkDestroy(particle, destroyType, value, minValue, maxValue) {\n switch (destroyType) {\n case DestroyType.max:\n if (value >= maxValue) {\n particle.destroy();\n }\n break;\n case DestroyType.min:\n if (value <= minValue) {\n particle.destroy();\n }\n break;\n }\n}\nexport function updateAnimation(particle, data, changeDirection, destroyType, delta) {\n const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minDecay = 1;\n if (particle.destroyed ||\n !data ||\n !data.enable ||\n ((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {\n return;\n }\n const velocity = (data.velocity ?? minVelocity) * delta.factor, minValue = data.min, maxValue = data.max, decay = data.decay ?? minDecay;\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n return;\n }\n switch (data.status) {\n case AnimationStatus.increasing:\n if (data.value >= maxValue) {\n if (changeDirection) {\n data.status = AnimationStatus.decreasing;\n }\n else {\n data.value -= maxValue;\n }\n if (!data.loops) {\n data.loops = minLoops;\n }\n data.loops++;\n }\n else {\n data.value += velocity;\n }\n break;\n case AnimationStatus.decreasing:\n if (data.value <= minValue) {\n if (changeDirection) {\n data.status = AnimationStatus.increasing;\n }\n else {\n data.value += maxValue;\n }\n if (!data.loops) {\n data.loops = minLoops;\n }\n data.loops++;\n }\n else {\n data.value -= velocity;\n }\n }\n if (data.velocity && decay !== identity) {\n data.velocity *= decay;\n }\n checkDestroy(particle, destroyType, data.value, minValue, maxValue);\n if (!particle.destroyed) {\n data.value = clamp(data.value, minValue, maxValue);\n }\n}\nexport function assertValidVersion(engine, pluginVersion) {\n if (engine.version === pluginVersion) {\n return;\n }\n throw new Error(`The tsParticles version is different from the loaded plugins version. Engine version: ${engine.version}. Plugins version: ${pluginVersion}`);\n}\n","export var AlterType;\n(function (AlterType) {\n AlterType[\"darken\"] = \"darken\";\n AlterType[\"enlighten\"] = \"enlighten\";\n})(AlterType || (AlterType = {}));\n","import { clamp, getRandom, getRangeMax, getRangeMin, getRangeValue, mix, randomInRange, setRangeValue, } from \"./NumberUtils.js\";\nimport { isArray, isString } from \"./TypeUtils.js\";\nimport { millisecondsToSeconds, percentDenominator } from \"../Core/Utils/Constants.js\";\nimport { AnimationStatus } from \"../Enums/AnimationStatus.js\";\nimport { itemFromArray } from \"./Utils.js\";\nconst randomColorValue = \"random\", midColorValue = \"mid\";\nfunction stringToRgba(engine, input) {\n if (!input) {\n return;\n }\n for (const manager of engine.colorManagers.values()) {\n if (input.startsWith(manager.stringPrefix)) {\n return manager.parseString(input);\n }\n }\n}\nexport function rangeColorToRgb(engine, input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return colorToRgb(engine, color.value, index, useIndex);\n }\n if (isArray(color.value)) {\n return rangeColorToRgb(engine, {\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const manager of engine.colorManagers.values()) {\n const res = manager.handleRangeColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToRgb(engine, input, index, useIndex = true) {\n if (!input) {\n return;\n }\n const color = isString(input) ? { value: input } : input;\n if (isString(color.value)) {\n return color.value === randomColorValue ? getRandomRgbColor() : stringToRgb(engine, color.value);\n }\n if (isArray(color.value)) {\n return colorToRgb(engine, {\n value: itemFromArray(color.value, index, useIndex),\n });\n }\n for (const manager of engine.colorManagers.values()) {\n const res = manager.handleColor(color);\n if (res) {\n return res;\n }\n }\n}\nexport function colorToHsl(engine, color, index, useIndex = true) {\n const rgb = colorToRgb(engine, color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rangeColorToHsl(engine, color, index, useIndex = true) {\n const rgb = rangeColorToRgb(engine, color, index, useIndex);\n return rgb ? rgbToHsl(rgb) : undefined;\n}\nexport function rgbToHsl(color) {\n const rgbMax = 255, hMax = 360, sMax = 100, lMax = 100, hMin = 0, sMin = 0, hPhase = 60, half = 0.5, double = 2, r1 = color.r / rgbMax, g1 = color.g / rgbMax, b1 = color.b / rgbMax, max = Math.max(r1, g1, b1), min = Math.min(r1, g1, b1), res = {\n h: hMin,\n l: (max + min) * half,\n s: sMin,\n };\n if (max !== min) {\n res.s = res.l < half ? (max - min) / (max + min) : (max - min) / (double - max - min);\n res.h =\n r1 === max\n ? (g1 - b1) / (max - min)\n : (res.h = g1 === max ? double + (b1 - r1) / (max - min) : double * double + (r1 - g1) / (max - min));\n }\n res.l *= lMax;\n res.s *= sMax;\n res.h *= hPhase;\n if (res.h < hMin) {\n res.h += hMax;\n }\n if (res.h >= hMax) {\n res.h -= hMax;\n }\n return res;\n}\nexport function stringToAlpha(engine, input) {\n return stringToRgba(engine, input)?.a;\n}\nexport function stringToRgb(engine, input) {\n return stringToRgba(engine, input);\n}\nexport function hslToRgb(hsl) {\n const hMax = 360, sMax = 100, lMax = 100, sMin = 0, lMin = 0, h = ((hsl.h % hMax) + hMax) % hMax, s = Math.max(sMin, Math.min(sMax, hsl.s)), l = Math.max(lMin, Math.min(lMax, hsl.l)), hNormalized = h / hMax, sNormalized = s / sMax, lNormalized = l / lMax, rgbFactor = 255, triple = 3;\n if (s === sMin) {\n const grayscaleValue = Math.round(lNormalized * rgbFactor);\n return { r: grayscaleValue, g: grayscaleValue, b: grayscaleValue };\n }\n const half = 0.5, double = 2, channel = (temp1, temp2, temp3) => {\n const temp3Min = 0, temp3Max = 1, sextuple = 6;\n if (temp3 < temp3Min) {\n temp3++;\n }\n if (temp3 > temp3Max) {\n temp3--;\n }\n if (temp3 * sextuple < temp3Max) {\n return temp1 + (temp2 - temp1) * sextuple * temp3;\n }\n if (temp3 * double < temp3Max) {\n return temp2;\n }\n if (temp3 * triple < temp3Max * double) {\n const temp3Offset = double / triple;\n return temp1 + (temp2 - temp1) * (temp3Offset - temp3) * sextuple;\n }\n return temp1;\n }, sNormalizedOffset = 1, temp1 = lNormalized < half\n ? lNormalized * (sNormalizedOffset + sNormalized)\n : lNormalized + sNormalized - lNormalized * sNormalized, temp2 = double * lNormalized - temp1, phaseNumerator = 1, phaseThird = phaseNumerator / triple, red = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized + phaseThird)), green = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized)), blue = Math.min(rgbFactor, rgbFactor * channel(temp2, temp1, hNormalized - phaseThird));\n return { r: Math.round(red), g: Math.round(green), b: Math.round(blue) };\n}\nexport function hslaToRgba(hsla) {\n const rgbResult = hslToRgb(hsla);\n return {\n a: hsla.a,\n b: rgbResult.b,\n g: rgbResult.g,\n r: rgbResult.r,\n };\n}\nexport function getRandomRgbColor(min) {\n const defaultMin = 0, fixedMin = min ?? defaultMin, rgbMax = 256;\n return {\n b: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n g: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n r: Math.floor(randomInRange(setRangeValue(fixedMin, rgbMax))),\n };\n}\nexport function getStyleFromRgb(color, opacity) {\n const defaultOpacity = 1;\n return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity ?? defaultOpacity})`;\n}\nexport function getStyleFromHsl(color, opacity) {\n const defaultOpacity = 1;\n return `hsla(${color.h}, ${color.s}%, ${color.l}%, ${opacity ?? defaultOpacity})`;\n}\nexport function colorMix(color1, color2, size1, size2) {\n let rgb1 = color1, rgb2 = color2;\n if (rgb1.r === undefined) {\n rgb1 = hslToRgb(color1);\n }\n if (rgb2.r === undefined) {\n rgb2 = hslToRgb(color2);\n }\n return {\n b: mix(rgb1.b, rgb2.b, size1, size2),\n g: mix(rgb1.g, rgb2.g, size1, size2),\n r: mix(rgb1.r, rgb2.r, size1, size2),\n };\n}\nexport function getLinkColor(p1, p2, linkColor) {\n if (linkColor === randomColorValue) {\n return getRandomRgbColor();\n }\n else if (linkColor === midColorValue) {\n const sourceColor = p1.getFillColor() ?? p1.getStrokeColor(), destColor = p2?.getFillColor() ?? p2?.getStrokeColor();\n if (sourceColor && destColor && p2) {\n return colorMix(sourceColor, destColor, p1.getRadius(), p2.getRadius());\n }\n else {\n const hslColor = sourceColor ?? destColor;\n if (hslColor) {\n return hslToRgb(hslColor);\n }\n }\n }\n else {\n return linkColor;\n }\n}\nexport function getLinkRandomColor(engine, optColor, blink, consent) {\n const color = isString(optColor) ? optColor : optColor.value;\n if (color === randomColorValue) {\n if (consent) {\n return rangeColorToRgb(engine, {\n value: color,\n });\n }\n if (blink) {\n return randomColorValue;\n }\n return midColorValue;\n }\n else if (color === midColorValue) {\n return midColorValue;\n }\n else {\n return rangeColorToRgb(engine, {\n value: color,\n });\n }\n}\nexport function getHslFromAnimation(animation) {\n return animation !== undefined\n ? {\n h: animation.h.value,\n s: animation.s.value,\n l: animation.l.value,\n }\n : undefined;\n}\nexport function getHslAnimationFromHsl(hsl, animationOptions, reduceFactor) {\n const resColor = {\n h: {\n enable: false,\n value: hsl.h,\n },\n s: {\n enable: false,\n value: hsl.s,\n },\n l: {\n enable: false,\n value: hsl.l,\n },\n };\n if (animationOptions) {\n setColorAnimation(resColor.h, animationOptions.h, reduceFactor);\n setColorAnimation(resColor.s, animationOptions.s, reduceFactor);\n setColorAnimation(resColor.l, animationOptions.l, reduceFactor);\n }\n return resColor;\n}\nfunction setColorAnimation(colorValue, colorAnimation, reduceFactor) {\n colorValue.enable = colorAnimation.enable;\n const defaultVelocity = 0, decayOffset = 1, defaultLoops = 0, defaultTime = 0;\n if (colorValue.enable) {\n colorValue.velocity = (getRangeValue(colorAnimation.speed) / percentDenominator) * reduceFactor;\n colorValue.decay = decayOffset - getRangeValue(colorAnimation.decay);\n colorValue.status = AnimationStatus.increasing;\n colorValue.loops = defaultLoops;\n colorValue.maxLoops = getRangeValue(colorAnimation.count);\n colorValue.time = defaultTime;\n colorValue.delayTime = getRangeValue(colorAnimation.delay) * millisecondsToSeconds;\n if (!colorAnimation.sync) {\n colorValue.velocity *= getRandom();\n colorValue.value *= getRandom();\n }\n colorValue.initialValue = colorValue.value;\n colorValue.offset = setRangeValue(colorAnimation.offset);\n }\n else {\n colorValue.velocity = defaultVelocity;\n }\n}\nexport function updateColorValue(data, range, decrease, delta) {\n const minLoops = 0, minDelay = 0, identity = 1, minVelocity = 0, minOffset = 0, velocityFactor = 3.6;\n if (!data ||\n !data.enable ||\n ((data.maxLoops ?? minLoops) > minLoops && (data.loops ?? minLoops) > (data.maxLoops ?? minLoops))) {\n return;\n }\n if (!data.time) {\n data.time = 0;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n data.time += delta.value;\n }\n if ((data.delayTime ?? minDelay) > minDelay && data.time < (data.delayTime ?? minDelay)) {\n return;\n }\n const offset = data.offset ? randomInRange(data.offset) : minOffset, velocity = (data.velocity ?? minVelocity) * delta.factor + offset * velocityFactor, decay = data.decay ?? identity, max = getRangeMax(range), min = getRangeMin(range);\n if (!decrease || data.status === AnimationStatus.increasing) {\n data.value += velocity;\n if (data.value > max) {\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n if (decrease) {\n data.status = AnimationStatus.decreasing;\n }\n else {\n data.value -= max;\n }\n }\n }\n else {\n data.value -= velocity;\n const minValue = 0;\n if (data.value < minValue) {\n if (!data.loops) {\n data.loops = 0;\n }\n data.loops++;\n data.status = AnimationStatus.increasing;\n }\n }\n if (data.velocity && decay !== identity) {\n data.velocity *= decay;\n }\n data.value = clamp(data.value, min, max);\n}\nexport function updateColor(color, delta) {\n if (!color) {\n return;\n }\n const { h, s, l } = color;\n const ranges = {\n h: { min: 0, max: 360 },\n s: { min: 0, max: 100 },\n l: { min: 0, max: 100 },\n };\n if (h) {\n updateColorValue(h, ranges.h, false, delta);\n }\n if (s) {\n updateColorValue(s, ranges.s, true, delta);\n }\n if (l) {\n updateColorValue(l, ranges.l, true, delta);\n }\n}\n","import { AlterType } from \"../Enums/Types/AlterType.js\";\nimport { getStyleFromRgb } from \"./ColorUtils.js\";\nconst origin = { x: 0, y: 0 }, defaultTransform = {\n a: 1,\n b: 0,\n c: 0,\n d: 1,\n};\nexport function drawLine(context, begin, end) {\n context.beginPath();\n context.moveTo(begin.x, begin.y);\n context.lineTo(end.x, end.y);\n context.closePath();\n}\nexport function paintBase(context, dimension, baseColor) {\n context.fillStyle = baseColor ?? \"rgba(0,0,0,0)\";\n context.fillRect(origin.x, origin.y, dimension.width, dimension.height);\n}\nexport function paintImage(context, dimension, image, opacity) {\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n context.drawImage(image, origin.x, origin.y, dimension.width, dimension.height);\n context.globalAlpha = 1;\n}\nexport function clear(context, dimension) {\n context.clearRect(origin.x, origin.y, dimension.width, dimension.height);\n}\nexport function drawParticle(data) {\n const { container, context, particle, delta, colorStyles, backgroundMask, composite, radius, opacity, shadow, transform, } = data, pos = particle.getPosition(), defaultAngle = 0, angle = particle.rotation + (particle.pathRotation ? particle.velocity.angle : defaultAngle), rotateData = {\n sin: Math.sin(angle),\n cos: Math.cos(angle),\n }, rotating = !!angle, identity = 1, transformData = {\n a: rotateData.cos * (transform.a ?? defaultTransform.a),\n b: rotating ? rotateData.sin * (transform.b ?? identity) : (transform.b ?? defaultTransform.b),\n c: rotating ? -rotateData.sin * (transform.c ?? identity) : (transform.c ?? defaultTransform.c),\n d: rotateData.cos * (transform.d ?? defaultTransform.d),\n };\n context.setTransform(transformData.a, transformData.b, transformData.c, transformData.d, pos.x, pos.y);\n if (backgroundMask) {\n context.globalCompositeOperation = composite;\n }\n const shadowColor = particle.shadowColor;\n if (shadow.enable && shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n context.shadowOffsetX = shadow.offset.x;\n context.shadowOffsetY = shadow.offset.y;\n }\n if (colorStyles.fill) {\n context.fillStyle = colorStyles.fill;\n }\n const minStrokeWidth = 0, strokeWidth = particle.strokeWidth ?? minStrokeWidth;\n context.lineWidth = strokeWidth;\n if (colorStyles.stroke) {\n context.strokeStyle = colorStyles.stroke;\n }\n const drawData = {\n container,\n context,\n particle,\n radius,\n opacity,\n delta,\n transformData,\n strokeWidth,\n };\n drawShape(drawData);\n drawShapeAfterDraw(drawData);\n drawEffect(drawData);\n context.globalCompositeOperation = \"source-over\";\n context.resetTransform();\n}\nexport function drawEffect(data) {\n const { container, context, particle, radius, opacity, delta, transformData } = data;\n if (!particle.effect) {\n return;\n }\n const drawer = container.effectDrawers.get(particle.effect);\n if (!drawer) {\n return;\n }\n drawer.draw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n}\nexport function drawShape(data) {\n const { container, context, particle, radius, opacity, delta, strokeWidth, transformData } = data, minStrokeWidth = 0;\n if (!particle.shape) {\n return;\n }\n const drawer = container.shapeDrawers.get(particle.shape);\n if (!drawer) {\n return;\n }\n context.beginPath();\n drawer.draw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n if (particle.shapeClose) {\n context.closePath();\n }\n if (strokeWidth > minStrokeWidth) {\n context.stroke();\n }\n if (particle.shapeFill) {\n context.fill();\n }\n}\nexport function drawShapeAfterDraw(data) {\n const { container, context, particle, radius, opacity, delta, transformData } = data;\n if (!particle.shape) {\n return;\n }\n const drawer = container.shapeDrawers.get(particle.shape);\n if (!drawer?.afterDraw) {\n return;\n }\n drawer.afterDraw({\n context,\n particle,\n radius,\n opacity,\n delta,\n pixelRatio: container.retina.pixelRatio,\n transformData: { ...transformData },\n });\n}\nexport function drawPlugin(context, plugin, delta) {\n if (!plugin.draw) {\n return;\n }\n plugin.draw(context, delta);\n}\nexport function drawParticlePlugin(context, plugin, particle, delta) {\n if (!plugin.drawParticle) {\n return;\n }\n plugin.drawParticle(context, particle, delta);\n}\nexport function alterHsl(color, type, value) {\n const lFactor = 1;\n return {\n h: color.h,\n s: color.s,\n l: color.l + (type === AlterType.darken ? -lFactor : lFactor) * value,\n };\n}\n","import { clear, drawParticle, drawParticlePlugin, drawPlugin, paintBase, paintImage } from \"../Utils/CanvasUtils.js\";\nimport { deepExtend, getLogger, safeMutationObserver } from \"../Utils/Utils.js\";\nimport { getStyleFromHsl, getStyleFromRgb, rangeColorToHsl, rangeColorToRgb } from \"../Utils/ColorUtils.js\";\nimport { generatedAttribute } from \"./Utils/Constants.js\";\nfunction setTransformValue(factor, newFactor, key) {\n const newValue = newFactor[key], defaultValue = 1;\n if (newValue !== undefined) {\n factor[key] = (factor[key] ?? defaultValue) * newValue;\n }\n}\nfunction setStyle(canvas, style, important = false) {\n if (!style) {\n return;\n }\n const element = canvas;\n if (!element) {\n return;\n }\n const elementStyle = element.style;\n if (!elementStyle) {\n return;\n }\n for (const key in style) {\n const value = style[key];\n elementStyle.setProperty(key, value, important ? \"important\" : \"\");\n }\n}\nexport class Canvas {\n constructor(container, engine) {\n this.container = container;\n this._applyPostDrawUpdaters = particle => {\n for (const updater of this._postDrawUpdaters) {\n updater.afterDraw?.(particle);\n }\n };\n this._applyPreDrawUpdaters = (ctx, particle, radius, zOpacity, colorStyles, transform) => {\n for (const updater of this._preDrawUpdaters) {\n if (updater.getColorStyles) {\n const { fill, stroke } = updater.getColorStyles(particle, ctx, radius, zOpacity);\n if (fill) {\n colorStyles.fill = fill;\n }\n if (stroke) {\n colorStyles.stroke = stroke;\n }\n }\n if (updater.getTransformValues) {\n const updaterTransform = updater.getTransformValues(particle);\n for (const key in updaterTransform) {\n setTransformValue(transform, updaterTransform, key);\n }\n }\n updater.beforeDraw?.(particle);\n }\n };\n this._applyResizePlugins = () => {\n for (const plugin of this._resizePlugins) {\n plugin.resize?.();\n }\n };\n this._getPluginParticleColors = particle => {\n let fColor, sColor;\n for (const plugin of this._colorPlugins) {\n if (!fColor && plugin.particleFillColor) {\n fColor = rangeColorToHsl(this._engine, plugin.particleFillColor(particle));\n }\n if (!sColor && plugin.particleStrokeColor) {\n sColor = rangeColorToHsl(this._engine, plugin.particleStrokeColor(particle));\n }\n if (fColor && sColor) {\n break;\n }\n }\n return [fColor, sColor];\n };\n this._initCover = async () => {\n const options = this.container.actualOptions, cover = options.backgroundMask.cover, color = cover.color;\n if (color) {\n const coverRgb = rangeColorToRgb(this._engine, color);\n if (coverRgb) {\n const coverColor = {\n ...coverRgb,\n a: cover.opacity,\n };\n this._coverColorStyle = getStyleFromRgb(coverColor, coverColor.a);\n }\n }\n else {\n await new Promise((resolve, reject) => {\n if (!cover.image) {\n return;\n }\n const img = document.createElement(\"img\");\n img.addEventListener(\"load\", () => {\n this._coverImage = {\n image: img,\n opacity: cover.opacity,\n };\n resolve();\n });\n img.addEventListener(\"error\", evt => {\n reject(evt.error);\n });\n img.src = cover.image;\n });\n }\n };\n this._initStyle = () => {\n const element = this.element, options = this.container.actualOptions;\n if (!element) {\n return;\n }\n if (this._fullScreen) {\n this._originalStyle = deepExtend({}, element.style);\n this._setFullScreenStyle();\n }\n else {\n this._resetOriginalStyle();\n }\n for (const key in options.style) {\n if (!key || !options.style) {\n continue;\n }\n const value = options.style[key];\n if (!value) {\n continue;\n }\n element.style.setProperty(key, value, \"important\");\n }\n };\n this._initTrail = async () => {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = trail.fill;\n if (!trail.enable) {\n return;\n }\n const factorNumerator = 1, opacity = factorNumerator / trail.length;\n if (trailFill.color) {\n const fillColor = rangeColorToRgb(this._engine, trailFill.color);\n if (!fillColor) {\n return;\n }\n this._trailFill = {\n color: {\n ...fillColor,\n },\n opacity,\n };\n }\n else {\n await new Promise((resolve, reject) => {\n if (!trailFill.image) {\n return;\n }\n const img = document.createElement(\"img\");\n img.addEventListener(\"load\", () => {\n this._trailFill = {\n image: img,\n opacity,\n };\n resolve();\n });\n img.addEventListener(\"error\", evt => {\n reject(evt.error);\n });\n img.src = trailFill.image;\n });\n }\n };\n this._paintBase = baseColor => {\n this.draw(ctx => paintBase(ctx, this.size, baseColor));\n };\n this._paintImage = (image, opacity) => {\n this.draw(ctx => paintImage(ctx, this.size, image, opacity));\n };\n this._repairStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n this._safeMutationObserver(observer => observer.disconnect());\n this._initStyle();\n this.initBackground();\n this._safeMutationObserver(observer => {\n if (!element || !(element instanceof Node)) {\n return;\n }\n observer.observe(element, { attributes: true });\n });\n };\n this._resetOriginalStyle = () => {\n const element = this.element, originalStyle = this._originalStyle;\n if (!(element && originalStyle)) {\n return;\n }\n setStyle(element, originalStyle);\n };\n this._safeMutationObserver = callback => {\n if (!this._mutationObserver) {\n return;\n }\n callback(this._mutationObserver);\n };\n this._setFullScreenStyle = () => {\n const element = this.element;\n if (!element) {\n return;\n }\n const radix = 10, zIndex = this.container.actualOptions.fullScreen.zIndex.toString(radix);\n setStyle(element, {\n position: \"fixed\",\n \"z-index\": zIndex,\n zIndex: zIndex,\n top: \"0\",\n left: \"0\",\n width: \"100%\",\n height: \"100%\",\n }, true);\n };\n this._engine = engine;\n this._standardSize = {\n height: 0,\n width: 0,\n };\n const pxRatio = container.retina.pixelRatio, stdSize = this._standardSize;\n this.size = {\n height: stdSize.height * pxRatio,\n width: stdSize.width * pxRatio,\n };\n this._context = null;\n this._generated = false;\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n get _fullScreen() {\n return this.container.actualOptions.fullScreen.enable;\n }\n clear() {\n const options = this.container.actualOptions, trail = options.particles.move.trail, trailFill = this._trailFill, minimumLength = 0;\n if (options.backgroundMask.enable) {\n this.paint();\n }\n else if (trail.enable && trail.length > minimumLength && trailFill) {\n if (trailFill.color) {\n this._paintBase(getStyleFromRgb(trailFill.color, trailFill.opacity));\n }\n else if (trailFill.image) {\n this._paintImage(trailFill.image, trailFill.opacity);\n }\n }\n else if (options.clear) {\n this.draw(ctx => {\n clear(ctx, this.size);\n });\n }\n }\n destroy() {\n this.stop();\n if (this._generated) {\n const element = this.element;\n element?.remove();\n }\n else {\n this._resetOriginalStyle();\n }\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n this._resizePlugins = [];\n this._colorPlugins = [];\n }\n draw(cb) {\n const ctx = this._context;\n if (!ctx) {\n return;\n }\n return cb(ctx);\n }\n drawAsync(cb) {\n const ctx = this._context;\n if (!ctx) {\n return undefined;\n }\n return cb(ctx);\n }\n drawParticle(particle, delta) {\n if (particle.spawning || particle.destroyed) {\n return;\n }\n const radius = particle.getRadius(), minimumSize = 0;\n if (radius <= minimumSize) {\n return;\n }\n const pfColor = particle.getFillColor(), psColor = particle.getStrokeColor() ?? pfColor;\n let [fColor, sColor] = this._getPluginParticleColors(particle);\n if (!fColor) {\n fColor = pfColor;\n }\n if (!sColor) {\n sColor = psColor;\n }\n if (!fColor && !sColor) {\n return;\n }\n this.draw((ctx) => {\n const container = this.container, options = container.actualOptions, zIndexOptions = particle.options.zIndex, zIndexFactorOffset = 1, zIndexFactor = zIndexFactorOffset - particle.zIndexFactor, zOpacityFactor = zIndexFactor ** zIndexOptions.opacityRate, defaultOpacity = 1, opacity = particle.bubble.opacity ?? particle.opacity?.value ?? defaultOpacity, strokeOpacity = particle.strokeOpacity ?? opacity, zOpacity = opacity * zOpacityFactor, zStrokeOpacity = strokeOpacity * zOpacityFactor, transform = {}, colorStyles = {\n fill: fColor ? getStyleFromHsl(fColor, zOpacity) : undefined,\n };\n colorStyles.stroke = sColor ? getStyleFromHsl(sColor, zStrokeOpacity) : colorStyles.fill;\n this._applyPreDrawUpdaters(ctx, particle, radius, zOpacity, colorStyles, transform);\n drawParticle({\n container,\n context: ctx,\n particle,\n delta,\n colorStyles,\n backgroundMask: options.backgroundMask.enable,\n composite: options.backgroundMask.composite,\n radius: radius * zIndexFactor ** zIndexOptions.sizeRate,\n opacity: zOpacity,\n shadow: particle.options.shadow,\n transform,\n });\n this._applyPostDrawUpdaters(particle);\n });\n }\n drawParticlePlugin(plugin, particle, delta) {\n this.draw(ctx => drawParticlePlugin(ctx, plugin, particle, delta));\n }\n drawPlugin(plugin, delta) {\n this.draw(ctx => drawPlugin(ctx, plugin, delta));\n }\n async init() {\n this._safeMutationObserver(obs => obs.disconnect());\n this._mutationObserver = safeMutationObserver(records => {\n for (const record of records) {\n if (record.type === \"attributes\" && record.attributeName === \"style\") {\n this._repairStyle();\n }\n }\n });\n this.resize();\n this._initStyle();\n await this._initCover();\n try {\n await this._initTrail();\n }\n catch (e) {\n getLogger().error(e);\n }\n this.initBackground();\n this._safeMutationObserver(obs => {\n if (!this.element || !(this.element instanceof Node)) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.initUpdaters();\n this.initPlugins();\n this.paint();\n }\n initBackground() {\n const options = this.container.actualOptions, background = options.background, element = this.element;\n if (!element) {\n return;\n }\n const elementStyle = element.style;\n if (!elementStyle) {\n return;\n }\n if (background.color) {\n const color = rangeColorToRgb(this._engine, background.color);\n elementStyle.backgroundColor = color ? getStyleFromRgb(color, background.opacity) : \"\";\n }\n else {\n elementStyle.backgroundColor = \"\";\n }\n elementStyle.backgroundImage = background.image || \"\";\n elementStyle.backgroundPosition = background.position || \"\";\n elementStyle.backgroundRepeat = background.repeat || \"\";\n elementStyle.backgroundSize = background.size || \"\";\n }\n initPlugins() {\n this._resizePlugins = [];\n for (const plugin of this.container.plugins.values()) {\n if (plugin.resize) {\n this._resizePlugins.push(plugin);\n }\n if (plugin.particleFillColor ?? plugin.particleStrokeColor) {\n this._colorPlugins.push(plugin);\n }\n }\n }\n initUpdaters() {\n this._preDrawUpdaters = [];\n this._postDrawUpdaters = [];\n for (const updater of this.container.particles.updaters) {\n if (updater.afterDraw) {\n this._postDrawUpdaters.push(updater);\n }\n if (updater.getColorStyles ?? updater.getTransformValues ?? updater.beforeDraw) {\n this._preDrawUpdaters.push(updater);\n }\n }\n }\n loadCanvas(canvas) {\n if (this._generated && this.element) {\n this.element.remove();\n }\n this._generated =\n canvas.dataset && generatedAttribute in canvas.dataset\n ? canvas.dataset[generatedAttribute] === \"true\"\n : this._generated;\n this.element = canvas;\n this.element.ariaHidden = \"true\";\n this._originalStyle = deepExtend({}, this.element.style);\n const standardSize = this._standardSize;\n standardSize.height = canvas.offsetHeight;\n standardSize.width = canvas.offsetWidth;\n const pxRatio = this.container.retina.pixelRatio, retinaSize = this.size;\n canvas.height = retinaSize.height = standardSize.height * pxRatio;\n canvas.width = retinaSize.width = standardSize.width * pxRatio;\n this._context = this.element.getContext(\"2d\");\n this._safeMutationObserver(obs => {\n if (!this.element || !(this.element instanceof Node)) {\n return;\n }\n obs.observe(this.element, { attributes: true });\n });\n this.container.retina.init();\n this.initBackground();\n }\n paint() {\n const options = this.container.actualOptions;\n this.draw(ctx => {\n if (options.backgroundMask.enable && options.backgroundMask.cover) {\n clear(ctx, this.size);\n if (this._coverImage) {\n this._paintImage(this._coverImage.image, this._coverImage.opacity);\n }\n else if (this._coverColorStyle) {\n this._paintBase(this._coverColorStyle);\n }\n else {\n this._paintBase();\n }\n }\n else {\n this._paintBase();\n }\n });\n }\n resize() {\n if (!this.element) {\n return false;\n }\n const container = this.container, currentSize = container.canvas._standardSize, newSize = {\n width: this.element.offsetWidth,\n height: this.element.offsetHeight,\n }, pxRatio = container.retina.pixelRatio, retinaSize = {\n width: newSize.width * pxRatio,\n height: newSize.height * pxRatio,\n };\n if (newSize.height === currentSize.height &&\n newSize.width === currentSize.width &&\n retinaSize.height === this.element.height &&\n retinaSize.width === this.element.width) {\n return false;\n }\n const oldSize = { ...currentSize };\n currentSize.height = newSize.height;\n currentSize.width = newSize.width;\n const canvasSize = this.size;\n this.element.width = canvasSize.width = retinaSize.width;\n this.element.height = canvasSize.height = retinaSize.height;\n if (this.container.started) {\n container.particles.setResizeFactor({\n width: currentSize.width / oldSize.width,\n height: currentSize.height / oldSize.height,\n });\n }\n return true;\n }\n stop() {\n this._safeMutationObserver(obs => obs.disconnect());\n this._mutationObserver = undefined;\n this.draw(ctx => clear(ctx, this.size));\n }\n async windowResize() {\n if (!this.element || !this.resize()) {\n return;\n }\n const container = this.container, needsRefresh = container.updateActualOptions();\n container.particles.setDensity();\n this._applyResizePlugins();\n if (needsRefresh) {\n await container.refresh();\n }\n }\n}\n","export var InteractivityDetect;\n(function (InteractivityDetect) {\n InteractivityDetect[\"canvas\"] = \"canvas\";\n InteractivityDetect[\"parent\"] = \"parent\";\n InteractivityDetect[\"window\"] = \"window\";\n})(InteractivityDetect || (InteractivityDetect = {}));\n","import { executeOnSingleOrMultiple, safeMatchMedia } from \"../../Utils/Utils.js\";\nimport { millisecondsToSeconds, mouseDownEvent, mouseLeaveEvent, mouseMoveEvent, mouseOutEvent, mouseUpEvent, resizeEvent, touchCancelEvent, touchEndEvent, touchMoveEvent, touchStartEvent, visibilityChangeEvent, } from \"./Constants.js\";\nimport { InteractivityDetect } from \"../../Enums/InteractivityDetect.js\";\nimport { isBoolean } from \"../../Utils/TypeUtils.js\";\nconst double = 2;\nfunction manageListener(element, event, handler, add, options) {\n if (add) {\n let addOptions = { passive: true };\n if (isBoolean(options)) {\n addOptions.capture = options;\n }\n else if (options !== undefined) {\n addOptions = options;\n }\n element.addEventListener(event, handler, addOptions);\n }\n else {\n const removeOptions = options;\n element.removeEventListener(event, handler, removeOptions);\n }\n}\nexport class EventListeners {\n constructor(container) {\n this.container = container;\n this._doMouseTouchClick = e => {\n const container = this.container, options = container.actualOptions;\n if (this._canPush) {\n const mouseInteractivity = container.interactivity.mouse, mousePos = mouseInteractivity.position;\n if (!mousePos) {\n return;\n }\n mouseInteractivity.clickPosition = { ...mousePos };\n mouseInteractivity.clickTime = new Date().getTime();\n const onClick = options.interactivity.events.onClick;\n executeOnSingleOrMultiple(onClick.mode, mode => this.container.handleClickMode(mode));\n }\n if (e.type === \"touchend\") {\n const touchDelay = 500;\n setTimeout(() => this._mouseTouchFinish(), touchDelay);\n }\n };\n this._handleThemeChange = (e) => {\n const mediaEvent = e, container = this.container, options = container.options, defaultThemes = options.defaultThemes, themeName = mediaEvent.matches ? defaultThemes.dark : defaultThemes.light, theme = options.themes.find(theme => theme.name === themeName);\n if (theme?.default.auto) {\n void container.loadTheme(themeName);\n }\n };\n this._handleVisibilityChange = () => {\n const container = this.container, options = container.actualOptions;\n this._mouseTouchFinish();\n if (!options.pauseOnBlur) {\n return;\n }\n if (document?.hidden) {\n container.pageHidden = true;\n container.pause();\n }\n else {\n container.pageHidden = false;\n if (container.animationStatus) {\n void container.play(true);\n }\n else {\n void container.draw(true);\n }\n }\n };\n this._handleWindowResize = () => {\n if (this._resizeTimeout) {\n clearTimeout(this._resizeTimeout);\n delete this._resizeTimeout;\n }\n const handleResize = async () => {\n const canvas = this.container.canvas;\n await canvas?.windowResize();\n };\n this._resizeTimeout = setTimeout(() => void handleResize(), this.container.actualOptions.interactivity.events.resize.delay * millisecondsToSeconds);\n };\n this._manageInteractivityListeners = (mouseLeaveTmpEvent, add) => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n const interactivityEl = container.interactivity.element;\n if (!interactivityEl) {\n return;\n }\n const html = interactivityEl, canvasEl = container.canvas.element;\n if (canvasEl) {\n canvasEl.style.pointerEvents = html === canvasEl ? \"initial\" : \"none\";\n }\n if (!(options.interactivity.events.onHover.enable || options.interactivity.events.onClick.enable)) {\n return;\n }\n manageListener(interactivityEl, mouseMoveEvent, handlers.mouseMove, add);\n manageListener(interactivityEl, touchStartEvent, handlers.touchStart, add);\n manageListener(interactivityEl, touchMoveEvent, handlers.touchMove, add);\n if (!options.interactivity.events.onClick.enable) {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEnd, add);\n }\n else {\n manageListener(interactivityEl, touchEndEvent, handlers.touchEndClick, add);\n manageListener(interactivityEl, mouseUpEvent, handlers.mouseUp, add);\n manageListener(interactivityEl, mouseDownEvent, handlers.mouseDown, add);\n }\n manageListener(interactivityEl, mouseLeaveTmpEvent, handlers.mouseLeave, add);\n manageListener(interactivityEl, touchCancelEvent, handlers.touchCancel, add);\n };\n this._manageListeners = add => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions, detectType = options.interactivity.detectsOn, canvasEl = container.canvas.element;\n let mouseLeaveTmpEvent = mouseLeaveEvent;\n if (detectType === InteractivityDetect.window) {\n container.interactivity.element = window;\n mouseLeaveTmpEvent = mouseOutEvent;\n }\n else if (detectType === InteractivityDetect.parent && canvasEl) {\n container.interactivity.element = canvasEl.parentElement ?? canvasEl.parentNode;\n }\n else {\n container.interactivity.element = canvasEl;\n }\n this._manageMediaMatch(add);\n this._manageResize(add);\n this._manageInteractivityListeners(mouseLeaveTmpEvent, add);\n if (document) {\n manageListener(document, visibilityChangeEvent, handlers.visibilityChange, add, false);\n }\n };\n this._manageMediaMatch = add => {\n const handlers = this._handlers, mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\");\n if (!mediaMatch) {\n return;\n }\n if (mediaMatch.addEventListener !== undefined) {\n manageListener(mediaMatch, \"change\", handlers.themeChange, add);\n return;\n }\n if (mediaMatch.addListener === undefined) {\n return;\n }\n if (add) {\n mediaMatch.addListener(handlers.oldThemeChange);\n }\n else {\n mediaMatch.removeListener(handlers.oldThemeChange);\n }\n };\n this._manageResize = add => {\n const handlers = this._handlers, container = this.container, options = container.actualOptions;\n if (!options.interactivity.events.resize) {\n return;\n }\n if (typeof ResizeObserver === \"undefined\") {\n manageListener(window, resizeEvent, handlers.resize, add);\n return;\n }\n const canvasEl = container.canvas.element;\n if (this._resizeObserver && !add) {\n if (canvasEl) {\n this._resizeObserver.unobserve(canvasEl);\n }\n this._resizeObserver.disconnect();\n delete this._resizeObserver;\n }\n else if (!this._resizeObserver && add && canvasEl) {\n this._resizeObserver = new ResizeObserver((entries) => {\n const entry = entries.find(e => e.target === canvasEl);\n if (!entry) {\n return;\n }\n this._handleWindowResize();\n });\n this._resizeObserver.observe(canvasEl);\n }\n };\n this._mouseDown = () => {\n const { interactivity } = this.container;\n if (!interactivity) {\n return;\n }\n const { mouse } = interactivity;\n mouse.clicking = true;\n mouse.downPosition = mouse.position;\n };\n this._mouseTouchClick = e => {\n const container = this.container, options = container.actualOptions, { mouse } = container.interactivity;\n mouse.inside = true;\n let handled = false;\n const mousePosition = mouse.position;\n if (!mousePosition || !options.interactivity.events.onClick.enable) {\n return;\n }\n for (const plugin of container.plugins.values()) {\n if (!plugin.clickPositionValid) {\n continue;\n }\n handled = plugin.clickPositionValid(mousePosition);\n if (handled) {\n break;\n }\n }\n if (!handled) {\n this._doMouseTouchClick(e);\n }\n mouse.clicking = false;\n };\n this._mouseTouchFinish = () => {\n const interactivity = this.container.interactivity;\n if (!interactivity) {\n return;\n }\n const mouse = interactivity.mouse;\n delete mouse.position;\n delete mouse.clickPosition;\n delete mouse.downPosition;\n interactivity.status = mouseLeaveEvent;\n mouse.inside = false;\n mouse.clicking = false;\n };\n this._mouseTouchMove = e => {\n const container = this.container, options = container.actualOptions, interactivity = container.interactivity, canvasEl = container.canvas.element;\n if (!interactivity?.element) {\n return;\n }\n interactivity.mouse.inside = true;\n let pos;\n if (e.type.startsWith(\"pointer\")) {\n this._canPush = true;\n const mouseEvent = e;\n if (interactivity.element === window) {\n if (canvasEl) {\n const clientRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.clientX - clientRect.left,\n y: mouseEvent.clientY - clientRect.top,\n };\n }\n }\n else if (options.interactivity.detectsOn === InteractivityDetect.parent) {\n const source = mouseEvent.target, target = mouseEvent.currentTarget;\n if (source && target && canvasEl) {\n const sourceRect = source.getBoundingClientRect(), targetRect = target.getBoundingClientRect(), canvasRect = canvasEl.getBoundingClientRect();\n pos = {\n x: mouseEvent.offsetX + double * sourceRect.left - (targetRect.left + canvasRect.left),\n y: mouseEvent.offsetY + double * sourceRect.top - (targetRect.top + canvasRect.top),\n };\n }\n else {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else if (mouseEvent.target === canvasEl) {\n pos = {\n x: mouseEvent.offsetX ?? mouseEvent.clientX,\n y: mouseEvent.offsetY ?? mouseEvent.clientY,\n };\n }\n }\n else {\n this._canPush = e.type !== \"touchmove\";\n if (canvasEl) {\n const touchEvent = e, lengthOffset = 1, lastTouch = touchEvent.touches[touchEvent.touches.length - lengthOffset], canvasRect = canvasEl.getBoundingClientRect(), defaultCoordinate = 0;\n pos = {\n x: lastTouch.clientX - (canvasRect.left ?? defaultCoordinate),\n y: lastTouch.clientY - (canvasRect.top ?? defaultCoordinate),\n };\n }\n }\n const pxRatio = container.retina.pixelRatio;\n if (pos) {\n pos.x *= pxRatio;\n pos.y *= pxRatio;\n }\n interactivity.mouse.position = pos;\n interactivity.status = mouseMoveEvent;\n };\n this._touchEnd = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchFinish();\n };\n this._touchEndClick = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.delete(touch.identifier);\n }\n this._mouseTouchClick(e);\n };\n this._touchStart = e => {\n const evt = e, touches = Array.from(evt.changedTouches);\n for (const touch of touches) {\n this._touches.set(touch.identifier, performance.now());\n }\n this._mouseTouchMove(e);\n };\n this._canPush = true;\n this._touches = new Map();\n this._handlers = {\n mouseDown: () => this._mouseDown(),\n mouseLeave: () => this._mouseTouchFinish(),\n mouseMove: (e) => this._mouseTouchMove(e),\n mouseUp: (e) => this._mouseTouchClick(e),\n touchStart: (e) => this._touchStart(e),\n touchMove: (e) => this._mouseTouchMove(e),\n touchEnd: (e) => this._touchEnd(e),\n touchCancel: (e) => this._touchEnd(e),\n touchEndClick: (e) => this._touchEndClick(e),\n visibilityChange: () => this._handleVisibilityChange(),\n themeChange: (e) => this._handleThemeChange(e),\n oldThemeChange: (e) => this._handleThemeChange(e),\n resize: () => {\n this._handleWindowResize();\n },\n };\n }\n addListeners() {\n this._manageListeners(true);\n }\n removeListeners() {\n this._manageListeners(false);\n }\n}\n","export var EventType;\n(function (EventType) {\n EventType[\"configAdded\"] = \"configAdded\";\n EventType[\"containerInit\"] = \"containerInit\";\n EventType[\"particlesSetup\"] = \"particlesSetup\";\n EventType[\"containerStarted\"] = \"containerStarted\";\n EventType[\"containerStopped\"] = \"containerStopped\";\n EventType[\"containerDestroyed\"] = \"containerDestroyed\";\n EventType[\"containerPaused\"] = \"containerPaused\";\n EventType[\"containerPlay\"] = \"containerPlay\";\n EventType[\"containerBuilt\"] = \"containerBuilt\";\n EventType[\"particleAdded\"] = \"particleAdded\";\n EventType[\"particleDestroyed\"] = \"particleDestroyed\";\n EventType[\"particleRemoved\"] = \"particleRemoved\";\n})(EventType || (EventType = {}));\n","import { isArray, isNull, isString } from \"../../Utils/TypeUtils.js\";\nexport class OptionsColor {\n constructor() {\n this.value = \"\";\n }\n static create(source, data) {\n const color = new OptionsColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (!isNull(data.value)) {\n this.value = data.value;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class Background {\n constructor() {\n this.color = new OptionsColor();\n this.color.value = \"\";\n this.image = \"\";\n this.position = \"\";\n this.repeat = \"\";\n this.size = \"\";\n this.opacity = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n if (data.position !== undefined) {\n this.position = data.position;\n }\n if (data.repeat !== undefined) {\n this.repeat = data.repeat;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class BackgroundMaskCover {\n constructor() {\n this.opacity = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { isNull, isString } from \"../../../Utils/TypeUtils.js\";\nimport { BackgroundMaskCover } from \"./BackgroundMaskCover.js\";\nexport class BackgroundMask {\n constructor() {\n this.composite = \"destination-out\";\n this.cover = new BackgroundMaskCover();\n this.enable = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.composite !== undefined) {\n this.composite = data.composite;\n }\n if (data.cover !== undefined) {\n const cover = data.cover, color = (isString(data.cover) ? { color: data.cover } : data.cover);\n this.cover.load(cover.color !== undefined || cover.image !== undefined ? cover : { color: color });\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class FullScreen {\n constructor() {\n this.enable = true;\n this.zIndex = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.zIndex !== undefined) {\n this.zIndex = data.zIndex;\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ClickEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n }\n}\n","export var DivType;\n(function (DivType) {\n DivType[\"circle\"] = \"circle\";\n DivType[\"rectangle\"] = \"rectangle\";\n})(DivType || (DivType = {}));\n","import { DivType } from \"../../../../Enums/Types/DivType.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class DivEvent {\n constructor() {\n this.selectors = [];\n this.enable = false;\n this.mode = [];\n this.type = DivType.circle;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Parallax {\n constructor() {\n this.enable = false;\n this.force = 2;\n this.smooth = 10;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.force !== undefined) {\n this.force = data.force;\n }\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n }\n}\n","import { Parallax } from \"./Parallax.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class HoverEvent {\n constructor() {\n this.enable = false;\n this.mode = [];\n this.parallax = new Parallax();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.parallax.load(data.parallax);\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ResizeEvent {\n constructor() {\n this.delay = 0.5;\n this.enable = true;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.delay !== undefined) {\n this.delay = data.delay;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { ClickEvent } from \"./ClickEvent.js\";\nimport { DivEvent } from \"./DivEvent.js\";\nimport { HoverEvent } from \"./HoverEvent.js\";\nimport { ResizeEvent } from \"./ResizeEvent.js\";\nimport { executeOnSingleOrMultiple } from \"../../../../Utils/Utils.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Events {\n constructor() {\n this.onClick = new ClickEvent();\n this.onDiv = new DivEvent();\n this.onHover = new HoverEvent();\n this.resize = new ResizeEvent();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.onClick.load(data.onClick);\n const onDiv = data.onDiv;\n if (onDiv !== undefined) {\n this.onDiv = executeOnSingleOrMultiple(onDiv, t => {\n const tmp = new DivEvent();\n tmp.load(t);\n return tmp;\n });\n }\n this.onHover.load(data.onHover);\n this.resize.load(data.resize);\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Modes {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (!this._container) {\n return;\n }\n const interactors = this._engine.interactors.get(this._container);\n if (!interactors) {\n return;\n }\n for (const interactor of interactors) {\n if (!interactor.loadModeOptions) {\n continue;\n }\n interactor.loadModeOptions(this, data);\n }\n }\n}\n","import { Events } from \"./Events/Events.js\";\nimport { InteractivityDetect } from \"../../../Enums/InteractivityDetect.js\";\nimport { Modes } from \"./Modes/Modes.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class Interactivity {\n constructor(engine, container) {\n this.detectsOn = InteractivityDetect.window;\n this.events = new Events();\n this.modes = new Modes(engine, container);\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n const detectsOn = data.detectsOn;\n if (detectsOn !== undefined) {\n this.detectsOn = detectsOn;\n }\n this.events.load(data.events);\n this.modes.load(data.modes);\n }\n}\n","import { PixelMode } from \"../../Enums/Modes/PixelMode.js\";\nimport { deepExtend } from \"../../Utils/Utils.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nconst defaultPosition = 50;\nexport class ManualParticle {\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.position) {\n this.position = {\n x: data.position.x ?? defaultPosition,\n y: data.position.y ?? defaultPosition,\n mode: data.position.mode ?? PixelMode.percent,\n };\n }\n if (data.options) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","export var ResponsiveMode;\n(function (ResponsiveMode) {\n ResponsiveMode[\"screen\"] = \"screen\";\n ResponsiveMode[\"canvas\"] = \"canvas\";\n})(ResponsiveMode || (ResponsiveMode = {}));\n","import { ResponsiveMode } from \"../../Enums/Modes/ResponsiveMode.js\";\nimport { deepExtend } from \"../../Utils/Utils.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nexport class Responsive {\n constructor() {\n this.maxWidth = Infinity;\n this.options = {};\n this.mode = ResponsiveMode.canvas;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (!isNull(data.maxWidth)) {\n this.maxWidth = data.maxWidth;\n }\n if (!isNull(data.mode)) {\n if (data.mode === ResponsiveMode.screen) {\n this.mode = ResponsiveMode.screen;\n }\n else {\n this.mode = ResponsiveMode.canvas;\n }\n }\n if (!isNull(data.options)) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","export var ThemeMode;\n(function (ThemeMode) {\n ThemeMode[\"any\"] = \"any\";\n ThemeMode[\"dark\"] = \"dark\";\n ThemeMode[\"light\"] = \"light\";\n})(ThemeMode || (ThemeMode = {}));\n","import { ThemeMode } from \"../../../Enums/Modes/ThemeMode.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class ThemeDefault {\n constructor() {\n this.auto = false;\n this.mode = ThemeMode.any;\n this.value = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.auto !== undefined) {\n this.auto = data.auto;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { ThemeDefault } from \"./ThemeDefault.js\";\nimport { deepExtend } from \"../../../Utils/Utils.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class Theme {\n constructor() {\n this.name = \"\";\n this.default = new ThemeDefault();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n this.default.load(data.default);\n if (data.options !== undefined) {\n this.options = deepExtend({}, data.options);\n }\n }\n}\n","import { AnimationMode } from \"../../Enums/Modes/AnimationMode.js\";\nimport { StartValueType } from \"../../Enums/Types/StartValueType.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class AnimationOptions {\n constructor() {\n this.count = 0;\n this.enable = false;\n this.speed = 1;\n this.decay = 0;\n this.delay = 0;\n this.sync = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.count !== undefined) {\n this.count = setRangeValue(data.count);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\nexport class RangedAnimationOptions extends AnimationOptions {\n constructor() {\n super();\n this.mode = AnimationMode.auto;\n this.startValue = StartValueType.random;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.startValue !== undefined) {\n this.startValue = data.startValue;\n }\n }\n}\n","import { AnimationOptions } from \"./AnimationOptions.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class ColorAnimation extends AnimationOptions {\n constructor() {\n super();\n this.offset = 0;\n this.sync = true;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n }\n}\n","import { ColorAnimation } from \"./ColorAnimation.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nexport class HslAnimation {\n constructor() {\n this.h = new ColorAnimation();\n this.s = new ColorAnimation();\n this.l = new ColorAnimation();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.h.load(data.h);\n this.s.load(data.s);\n this.l.load(data.l);\n }\n}\n","import { isArray, isNull, isString } from \"../../Utils/TypeUtils.js\";\nimport { HslAnimation } from \"./HslAnimation.js\";\nimport { OptionsColor } from \"./OptionsColor.js\";\nexport class AnimatableColor extends OptionsColor {\n constructor() {\n super();\n this.animation = new HslAnimation();\n }\n static create(source, data) {\n const color = new AnimatableColor();\n color.load(source);\n if (data !== undefined) {\n if (isString(data) || isArray(data)) {\n color.load({ value: data });\n }\n else {\n color.load(data);\n }\n }\n return color;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n const colorAnimation = data.animation;\n if (colorAnimation !== undefined) {\n if (colorAnimation.enable !== undefined) {\n this.animation.h.load(colorAnimation);\n }\n else {\n this.animation.load(data.animation);\n }\n }\n }\n}\n","export var CollisionMode;\n(function (CollisionMode) {\n CollisionMode[\"absorb\"] = \"absorb\";\n CollisionMode[\"bounce\"] = \"bounce\";\n CollisionMode[\"destroy\"] = \"destroy\";\n})(CollisionMode || (CollisionMode = {}));\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class CollisionsAbsorb {\n constructor() {\n this.speed = 2;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class CollisionsOverlap {\n constructor() {\n this.enable = true;\n this.retries = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.retries !== undefined) {\n this.retries = data.retries;\n }\n }\n}\n","import { AnimationOptions, RangedAnimationOptions } from \"./AnimationOptions.js\";\nimport { isNull } from \"../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class ValueWithRandom {\n constructor() {\n this.value = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (!isNull(data.value)) {\n this.value = setRangeValue(data.value);\n }\n }\n}\nexport class AnimationValueWithRandom extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new AnimationOptions();\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\nexport class RangedAnimationValueWithRandom extends AnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new RangedAnimationOptions();\n }\n load(data) {\n super.load(data);\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom.js\";\nexport class ParticlesBounceFactor extends ValueWithRandom {\n constructor() {\n super();\n this.value = 1;\n }\n}\n","import { ParticlesBounceFactor } from \"./ParticlesBounceFactor.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ParticlesBounce {\n constructor() {\n this.horizontal = new ParticlesBounceFactor();\n this.vertical = new ParticlesBounceFactor();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.horizontal.load(data.horizontal);\n this.vertical.load(data.vertical);\n }\n}\n","import { CollisionMode } from \"../../../../Enums/Modes/CollisionMode.js\";\nimport { CollisionsAbsorb } from \"./CollisionsAbsorb.js\";\nimport { CollisionsOverlap } from \"./CollisionsOverlap.js\";\nimport { ParticlesBounce } from \"../Bounce/ParticlesBounce.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Collisions {\n constructor() {\n this.absorb = new CollisionsAbsorb();\n this.bounce = new ParticlesBounce();\n this.enable = false;\n this.maxSpeed = 50;\n this.mode = CollisionMode.bounce;\n this.overlap = new CollisionsOverlap();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.absorb.load(data.absorb);\n this.bounce.load(data.bounce);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n this.overlap.load(data.overlap);\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Effect {\n constructor() {\n this.close = true;\n this.fill = true;\n this.options = {};\n this.type = [];\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n const options = data.options;\n if (options !== undefined) {\n for (const effect in options) {\n const item = options[effect];\n if (item) {\n this.options[effect] = deepExtend(this.options[effect] ?? {}, item);\n }\n }\n }\n if (data.close !== undefined) {\n this.close = data.close;\n }\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveAngle {\n constructor() {\n this.offset = 0;\n this.value = 90;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.offset !== undefined) {\n this.offset = setRangeValue(data.offset);\n }\n if (data.value !== undefined) {\n this.value = setRangeValue(data.value);\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveAttract {\n constructor() {\n this.distance = 200;\n this.enable = false;\n this.rotate = {\n x: 3000,\n y: 3000,\n };\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = setRangeValue(data.distance);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.rotate) {\n const rotateX = data.rotate.x;\n if (rotateX !== undefined) {\n this.rotate.x = rotateX;\n }\n const rotateY = data.rotate.y;\n if (rotateY !== undefined) {\n this.rotate.y = rotateY;\n }\n }\n }\n}\n","import { PixelMode } from \"../../../../Enums/Modes/PixelMode.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class MoveCenter {\n constructor() {\n this.x = 50;\n this.y = 50;\n this.mode = PixelMode.percent;\n this.radius = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.x !== undefined) {\n this.x = data.x;\n }\n if (data.y !== undefined) {\n this.y = data.y;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class MoveGravity {\n constructor() {\n this.acceleration = 9.81;\n this.enable = false;\n this.inverse = false;\n this.maxSpeed = 50;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.inverse !== undefined) {\n this.inverse = data.inverse;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = setRangeValue(data.maxSpeed);\n }\n }\n}\n","import { ValueWithRandom } from \"../../../ValueWithRandom.js\";\nimport { deepExtend } from \"../../../../../Utils/Utils.js\";\nimport { isNull } from \"../../../../../Utils/TypeUtils.js\";\nexport class MovePath {\n constructor() {\n this.clamp = true;\n this.delay = new ValueWithRandom();\n this.enable = false;\n this.options = {};\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.clamp !== undefined) {\n this.clamp = data.clamp;\n }\n this.delay.load(data.delay);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.generator = data.generator;\n if (data.options) {\n this.options = deepExtend(this.options, data.options);\n }\n }\n}\n","import { OptionsColor } from \"../../OptionsColor.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class MoveTrailFill {\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.image !== undefined) {\n this.image = data.image;\n }\n }\n}\n","import { MoveTrailFill } from \"./MoveTrailFill.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class MoveTrail {\n constructor() {\n this.enable = false;\n this.length = 10;\n this.fill = new MoveTrailFill();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.fill !== undefined) {\n this.fill.load(data.fill);\n }\n if (data.length !== undefined) {\n this.length = data.length;\n }\n }\n}\n","export var OutMode;\n(function (OutMode) {\n OutMode[\"bounce\"] = \"bounce\";\n OutMode[\"none\"] = \"none\";\n OutMode[\"out\"] = \"out\";\n OutMode[\"destroy\"] = \"destroy\";\n OutMode[\"split\"] = \"split\";\n})(OutMode || (OutMode = {}));\n","import { OutMode } from \"../../../../Enums/Modes/OutMode.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class OutModes {\n constructor() {\n this.default = OutMode.out;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n this.bottom = data.bottom ?? data.default;\n this.left = data.left ?? data.default;\n this.right = data.right ?? data.default;\n this.top = data.top ?? data.default;\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Spin {\n constructor() {\n this.acceleration = 0;\n this.enable = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.acceleration !== undefined) {\n this.acceleration = setRangeValue(data.acceleration);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.position) {\n this.position = deepExtend({}, data.position);\n }\n }\n}\n","import { MoveDirection } from \"../../../../Enums/Directions/MoveDirection.js\";\nimport { isNull, isNumber, isObject } from \"../../../../Utils/TypeUtils.js\";\nimport { MoveAngle } from \"./MoveAngle.js\";\nimport { MoveAttract } from \"./MoveAttract.js\";\nimport { MoveCenter } from \"./MoveCenter.js\";\nimport { MoveGravity } from \"./MoveGravity.js\";\nimport { MovePath } from \"./Path/MovePath.js\";\nimport { MoveTrail } from \"./MoveTrail.js\";\nimport { OutModes } from \"./OutModes.js\";\nimport { Spin } from \"./Spin.js\";\nimport { setRangeValue } from \"../../../../Utils/NumberUtils.js\";\nexport class Move {\n constructor() {\n this.angle = new MoveAngle();\n this.attract = new MoveAttract();\n this.center = new MoveCenter();\n this.decay = 0;\n this.distance = {};\n this.direction = MoveDirection.none;\n this.drift = 0;\n this.enable = false;\n this.gravity = new MoveGravity();\n this.path = new MovePath();\n this.outModes = new OutModes();\n this.random = false;\n this.size = false;\n this.speed = 2;\n this.spin = new Spin();\n this.straight = false;\n this.trail = new MoveTrail();\n this.vibrate = false;\n this.warp = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.angle.load(isNumber(data.angle) ? { value: data.angle } : data.angle);\n this.attract.load(data.attract);\n this.center.load(data.center);\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n if (data.distance !== undefined) {\n this.distance = isNumber(data.distance)\n ? {\n horizontal: data.distance,\n vertical: data.distance,\n }\n : { ...data.distance };\n }\n if (data.drift !== undefined) {\n this.drift = setRangeValue(data.drift);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.gravity.load(data.gravity);\n const outModes = data.outModes;\n if (outModes !== undefined) {\n if (isObject(outModes)) {\n this.outModes.load(outModes);\n }\n else {\n this.outModes.load({\n default: outModes,\n });\n }\n }\n this.path.load(data.path);\n if (data.random !== undefined) {\n this.random = data.random;\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n this.spin.load(data.spin);\n if (data.straight !== undefined) {\n this.straight = data.straight;\n }\n this.trail.load(data.trail);\n if (data.vibrate !== undefined) {\n this.vibrate = data.vibrate;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","import { DestroyType } from \"../../../../Enums/Types/DestroyType.js\";\nimport { RangedAnimationOptions } from \"../../AnimationOptions.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class OpacityAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = DestroyType.none;\n this.speed = 2;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { OpacityAnimation } from \"./OpacityAnimation.js\";\nimport { RangedAnimationValueWithRandom } from \"../../ValueWithRandom.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Opacity extends RangedAnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new OpacityAnimation();\n this.value = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n super.load(data);\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\n","import { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ParticlesDensity {\n constructor() {\n this.enable = false;\n this.width = 1920;\n this.height = 1080;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n const width = data.width;\n if (width !== undefined) {\n this.width = width;\n }\n const height = data.height;\n if (height !== undefined) {\n this.height = height;\n }\n }\n}\n","export var LimitMode;\n(function (LimitMode) {\n LimitMode[\"delete\"] = \"delete\";\n LimitMode[\"wait\"] = \"wait\";\n})(LimitMode || (LimitMode = {}));\n","import { LimitMode } from \"../../../../Enums/Modes/LimitMode.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ParticlesNumberLimit {\n constructor() {\n this.mode = LimitMode.delete;\n this.value = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { ParticlesDensity } from \"./ParticlesDensity.js\";\nimport { ParticlesNumberLimit } from \"./ParticlesNumberLimit.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ParticlesNumber {\n constructor() {\n this.density = new ParticlesDensity();\n this.limit = new ParticlesNumberLimit();\n this.value = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n this.density.load(data.density);\n this.limit.load(data.limit);\n if (data.value !== undefined) {\n this.value = data.value;\n }\n }\n}\n","import { OptionsColor } from \"../OptionsColor.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class Shadow {\n constructor() {\n this.blur = 0;\n this.color = new OptionsColor();\n this.enable = false;\n this.offset = {\n x: 0,\n y: 0,\n };\n this.color.value = \"#000\";\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.offset === undefined) {\n return;\n }\n if (data.offset.x !== undefined) {\n this.offset.x = data.offset.x;\n }\n if (data.offset.y !== undefined) {\n this.offset.y = data.offset.y;\n }\n }\n}\n","import { deepExtend } from \"../../../../Utils/Utils.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Shape {\n constructor() {\n this.close = true;\n this.fill = true;\n this.options = {};\n this.type = \"circle\";\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n const options = data.options;\n if (options !== undefined) {\n for (const shape in options) {\n const item = options[shape];\n if (item) {\n this.options[shape] = deepExtend(this.options[shape] ?? {}, item);\n }\n }\n }\n if (data.close !== undefined) {\n this.close = data.close;\n }\n if (data.fill !== undefined) {\n this.fill = data.fill;\n }\n if (data.type !== undefined) {\n this.type = data.type;\n }\n }\n}\n","import { DestroyType } from \"../../../../Enums/Types/DestroyType.js\";\nimport { RangedAnimationOptions } from \"../../AnimationOptions.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class SizeAnimation extends RangedAnimationOptions {\n constructor() {\n super();\n this.destroy = DestroyType.none;\n this.speed = 5;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.destroy !== undefined) {\n this.destroy = data.destroy;\n }\n }\n}\n","import { RangedAnimationValueWithRandom } from \"../../ValueWithRandom.js\";\nimport { SizeAnimation } from \"./SizeAnimation.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class Size extends RangedAnimationValueWithRandom {\n constructor() {\n super();\n this.animation = new SizeAnimation();\n this.value = 3;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n const animation = data.animation;\n if (animation !== undefined) {\n this.animation.load(animation);\n }\n }\n}\n","import { AnimatableColor } from \"../AnimatableColor.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nimport { setRangeValue } from \"../../../Utils/NumberUtils.js\";\nexport class Stroke {\n constructor() {\n this.width = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = AnimatableColor.create(this.color, data.color);\n }\n if (data.width !== undefined) {\n this.width = setRangeValue(data.width);\n }\n if (data.opacity !== undefined) {\n this.opacity = setRangeValue(data.opacity);\n }\n }\n}\n","import { ValueWithRandom } from \"../../ValueWithRandom.js\";\nimport { isNull } from \"../../../../Utils/TypeUtils.js\";\nexport class ZIndex extends ValueWithRandom {\n constructor() {\n super();\n this.opacityRate = 1;\n this.sizeRate = 1;\n this.velocityRate = 1;\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.opacityRate !== undefined) {\n this.opacityRate = data.opacityRate;\n }\n if (data.sizeRate !== undefined) {\n this.sizeRate = data.sizeRate;\n }\n if (data.velocityRate !== undefined) {\n this.velocityRate = data.velocityRate;\n }\n }\n}\n","import { deepExtend, executeOnSingleOrMultiple } from \"../../../Utils/Utils.js\";\nimport { AnimatableColor } from \"../AnimatableColor.js\";\nimport { Collisions } from \"./Collisions/Collisions.js\";\nimport { Effect } from \"./Effect/Effect.js\";\nimport { Move } from \"./Move/Move.js\";\nimport { Opacity } from \"./Opacity/Opacity.js\";\nimport { ParticlesBounce } from \"./Bounce/ParticlesBounce.js\";\nimport { ParticlesNumber } from \"./Number/ParticlesNumber.js\";\nimport { Shadow } from \"./Shadow.js\";\nimport { Shape } from \"./Shape/Shape.js\";\nimport { Size } from \"./Size/Size.js\";\nimport { Stroke } from \"./Stroke.js\";\nimport { ZIndex } from \"./ZIndex/ZIndex.js\";\nimport { isNull } from \"../../../Utils/TypeUtils.js\";\nexport class ParticlesOptions {\n constructor(engine, container) {\n this._engine = engine;\n this._container = container;\n this.bounce = new ParticlesBounce();\n this.collisions = new Collisions();\n this.color = new AnimatableColor();\n this.color.value = \"#fff\";\n this.effect = new Effect();\n this.groups = {};\n this.move = new Move();\n this.number = new ParticlesNumber();\n this.opacity = new Opacity();\n this.reduceDuplicates = false;\n this.shadow = new Shadow();\n this.shape = new Shape();\n this.size = new Size();\n this.stroke = new Stroke();\n this.zIndex = new ZIndex();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.groups !== undefined) {\n for (const group of Object.keys(data.groups)) {\n if (!Object.hasOwn(data.groups, group)) {\n continue;\n }\n const item = data.groups[group];\n if (item !== undefined) {\n this.groups[group] = deepExtend(this.groups[group] ?? {}, item);\n }\n }\n }\n if (data.reduceDuplicates !== undefined) {\n this.reduceDuplicates = data.reduceDuplicates;\n }\n this.bounce.load(data.bounce);\n this.color.load(AnimatableColor.create(this.color, data.color));\n this.effect.load(data.effect);\n this.move.load(data.move);\n this.number.load(data.number);\n this.opacity.load(data.opacity);\n this.shape.load(data.shape);\n this.size.load(data.size);\n this.shadow.load(data.shadow);\n this.zIndex.load(data.zIndex);\n this.collisions.load(data.collisions);\n if (data.interactivity !== undefined) {\n this.interactivity = deepExtend({}, data.interactivity);\n }\n const strokeToLoad = data.stroke;\n if (strokeToLoad) {\n this.stroke = executeOnSingleOrMultiple(strokeToLoad, t => {\n const tmp = new Stroke();\n tmp.load(t);\n return tmp;\n });\n }\n if (this._container) {\n const updaters = this._engine.updaters.get(this._container);\n if (updaters) {\n for (const updater of updaters) {\n if (updater.loadOptions) {\n updater.loadOptions(this, data);\n }\n }\n }\n const interactors = this._engine.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadParticlesOptions) {\n interactor.loadParticlesOptions(this, data);\n }\n }\n }\n }\n }\n}\n","import { ParticlesOptions } from \"../Options/Classes/Particles/ParticlesOptions.js\";\nexport function loadOptions(options, ...sourceOptionsArr) {\n for (const sourceOptions of sourceOptionsArr) {\n options.load(sourceOptions);\n }\n}\nexport function loadParticlesOptions(engine, container, ...sourceOptionsArr) {\n const options = new ParticlesOptions(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\n","import { deepExtend, executeOnSingleOrMultiple, safeMatchMedia } from \"../../Utils/Utils.js\";\nimport { isBoolean, isNull } from \"../../Utils/TypeUtils.js\";\nimport { Background } from \"./Background/Background.js\";\nimport { BackgroundMask } from \"./BackgroundMask/BackgroundMask.js\";\nimport { FullScreen } from \"./FullScreen/FullScreen.js\";\nimport { Interactivity } from \"./Interactivity/Interactivity.js\";\nimport { ManualParticle } from \"./ManualParticle.js\";\nimport { Responsive } from \"./Responsive.js\";\nimport { ResponsiveMode } from \"../../Enums/Modes/ResponsiveMode.js\";\nimport { Theme } from \"./Theme/Theme.js\";\nimport { ThemeMode } from \"../../Enums/Modes/ThemeMode.js\";\nimport { loadParticlesOptions } from \"../../Utils/OptionsUtils.js\";\nimport { setRangeValue } from \"../../Utils/NumberUtils.js\";\nexport class Options {\n constructor(engine, container) {\n this._findDefaultTheme = mode => {\n return (this.themes.find(theme => theme.default.value && theme.default.mode === mode) ??\n this.themes.find(theme => theme.default.value && theme.default.mode === ThemeMode.any));\n };\n this._importPreset = preset => {\n this.load(this._engine.getPreset(preset));\n };\n this._engine = engine;\n this._container = container;\n this.autoPlay = true;\n this.background = new Background();\n this.backgroundMask = new BackgroundMask();\n this.clear = true;\n this.defaultThemes = {};\n this.delay = 0;\n this.fullScreen = new FullScreen();\n this.detectRetina = true;\n this.duration = 0;\n this.fpsLimit = 120;\n this.interactivity = new Interactivity(engine, container);\n this.manualParticles = [];\n this.particles = loadParticlesOptions(this._engine, this._container);\n this.pauseOnBlur = true;\n this.pauseOnOutsideViewport = true;\n this.responsive = [];\n this.smooth = false;\n this.style = {};\n this.themes = [];\n this.zLayers = 100;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.preset !== undefined) {\n executeOnSingleOrMultiple(data.preset, preset => this._importPreset(preset));\n }\n if (data.autoPlay !== undefined) {\n this.autoPlay = data.autoPlay;\n }\n if (data.clear !== undefined) {\n this.clear = data.clear;\n }\n if (data.key !== undefined) {\n this.key = data.key;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n if (data.delay !== undefined) {\n this.delay = setRangeValue(data.delay);\n }\n const detectRetina = data.detectRetina;\n if (detectRetina !== undefined) {\n this.detectRetina = detectRetina;\n }\n if (data.duration !== undefined) {\n this.duration = setRangeValue(data.duration);\n }\n const fpsLimit = data.fpsLimit;\n if (fpsLimit !== undefined) {\n this.fpsLimit = fpsLimit;\n }\n if (data.pauseOnBlur !== undefined) {\n this.pauseOnBlur = data.pauseOnBlur;\n }\n if (data.pauseOnOutsideViewport !== undefined) {\n this.pauseOnOutsideViewport = data.pauseOnOutsideViewport;\n }\n if (data.zLayers !== undefined) {\n this.zLayers = data.zLayers;\n }\n this.background.load(data.background);\n const fullScreen = data.fullScreen;\n if (isBoolean(fullScreen)) {\n this.fullScreen.enable = fullScreen;\n }\n else {\n this.fullScreen.load(fullScreen);\n }\n this.backgroundMask.load(data.backgroundMask);\n this.interactivity.load(data.interactivity);\n if (data.manualParticles) {\n this.manualParticles = data.manualParticles.map(t => {\n const tmp = new ManualParticle();\n tmp.load(t);\n return tmp;\n });\n }\n this.particles.load(data.particles);\n this.style = deepExtend(this.style, data.style);\n this._engine.loadOptions(this, data);\n if (data.smooth !== undefined) {\n this.smooth = data.smooth;\n }\n const interactors = this._engine.interactors.get(this._container);\n if (interactors) {\n for (const interactor of interactors) {\n if (interactor.loadOptions) {\n interactor.loadOptions(this, data);\n }\n }\n }\n if (data.responsive !== undefined) {\n for (const responsive of data.responsive) {\n const optResponsive = new Responsive();\n optResponsive.load(responsive);\n this.responsive.push(optResponsive);\n }\n }\n this.responsive.sort((a, b) => a.maxWidth - b.maxWidth);\n if (data.themes !== undefined) {\n for (const theme of data.themes) {\n const existingTheme = this.themes.find(t => t.name === theme.name);\n if (!existingTheme) {\n const optTheme = new Theme();\n optTheme.load(theme);\n this.themes.push(optTheme);\n }\n else {\n existingTheme.load(theme);\n }\n }\n }\n this.defaultThemes.dark = this._findDefaultTheme(ThemeMode.dark)?.name;\n this.defaultThemes.light = this._findDefaultTheme(ThemeMode.light)?.name;\n }\n setResponsive(width, pxRatio, defaultOptions) {\n this.load(defaultOptions);\n const responsiveOptions = this.responsive.find(t => t.mode === ResponsiveMode.screen && screen ? t.maxWidth > screen.availWidth : t.maxWidth * pxRatio > width);\n this.load(responsiveOptions?.options);\n return responsiveOptions?.maxWidth;\n }\n setTheme(name) {\n if (name) {\n const chosenTheme = this.themes.find(theme => theme.name === name);\n if (chosenTheme) {\n this.load(chosenTheme.options);\n }\n }\n else {\n const mediaMatch = safeMatchMedia(\"(prefers-color-scheme: dark)\"), clientDarkMode = mediaMatch?.matches, defaultTheme = this._findDefaultTheme(clientDarkMode ? ThemeMode.dark : ThemeMode.light);\n if (defaultTheme) {\n this.load(defaultTheme.options);\n }\n }\n }\n}\n","export var InteractorType;\n(function (InteractorType) {\n InteractorType[\"external\"] = \"external\";\n InteractorType[\"particles\"] = \"particles\";\n})(InteractorType || (InteractorType = {}));\n","import { InteractorType } from \"../../Enums/Types/InteractorType.js\";\nexport class InteractionManager {\n constructor(engine, container) {\n this.container = container;\n this._engine = engine;\n this._interactors = [];\n this._externalInteractors = [];\n this._particleInteractors = [];\n }\n externalInteract(delta) {\n for (const interactor of this._externalInteractors) {\n if (interactor.isEnabled()) {\n interactor.interact(delta);\n }\n }\n }\n handleClickMode(mode) {\n for (const interactor of this._externalInteractors) {\n interactor.handleClickMode?.(mode);\n }\n }\n async init() {\n this._interactors = await this._engine.getInteractors(this.container, true);\n this._externalInteractors = [];\n this._particleInteractors = [];\n for (const interactor of this._interactors) {\n switch (interactor.type) {\n case InteractorType.external:\n this._externalInteractors.push(interactor);\n break;\n case InteractorType.particles:\n this._particleInteractors.push(interactor);\n break;\n }\n interactor.init();\n }\n }\n particlesInteract(particle, delta) {\n for (const interactor of this._externalInteractors) {\n interactor.clear(particle, delta);\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle)) {\n interactor.interact(particle, delta);\n }\n }\n }\n reset(particle) {\n for (const interactor of this._externalInteractors) {\n if (interactor.isEnabled()) {\n interactor.reset(particle);\n }\n }\n for (const interactor of this._particleInteractors) {\n if (interactor.isEnabled(particle)) {\n interactor.reset(particle);\n }\n }\n }\n}\n","export var ParticleOutType;\n(function (ParticleOutType) {\n ParticleOutType[\"normal\"] = \"normal\";\n ParticleOutType[\"inside\"] = \"inside\";\n ParticleOutType[\"outside\"] = \"outside\";\n})(ParticleOutType || (ParticleOutType = {}));\n","import { Vector, Vector3d } from \"./Utils/Vectors.js\";\nimport { calcExactPositionOrRandomFromSize, clamp, degToRad, getDistance, getParticleBaseVelocity, getParticleDirectionAngle, getRandom, getRangeValue, randomInRange, setRangeValue, } from \"../Utils/NumberUtils.js\";\nimport { deepExtend, getPosition, initParticleNumericAnimationValue, isInArray, itemFromSingleOrMultiple, } from \"../Utils/Utils.js\";\nimport { errorPrefix, millisecondsToSeconds } from \"./Utils/Constants.js\";\nimport { getHslFromAnimation, rangeColorToRgb } from \"../Utils/ColorUtils.js\";\nimport { EventType } from \"../Enums/Types/EventType.js\";\nimport { Interactivity } from \"../Options/Classes/Interactivity/Interactivity.js\";\nimport { MoveDirection } from \"../Enums/Directions/MoveDirection.js\";\nimport { OutMode } from \"../Enums/Modes/OutMode.js\";\nimport { ParticleOutType } from \"../Enums/Types/ParticleOutType.js\";\nimport { PixelMode } from \"../Enums/Modes/PixelMode.js\";\nimport { alterHsl } from \"../Utils/CanvasUtils.js\";\nimport { loadParticlesOptions } from \"../Utils/OptionsUtils.js\";\nconst defaultRetryCount = 0, double = 2, half = 0.5, squareExp = 2, randomString = \"random\";\nfunction loadEffectData(effect, effectOptions, id, reduceDuplicates) {\n const effectData = effectOptions.options[effect];\n if (!effectData) {\n return;\n }\n return deepExtend({\n close: effectOptions.close,\n fill: effectOptions.fill,\n }, itemFromSingleOrMultiple(effectData, id, reduceDuplicates));\n}\nfunction loadShapeData(shape, shapeOptions, id, reduceDuplicates) {\n const shapeData = shapeOptions.options[shape];\n if (!shapeData) {\n return;\n }\n return deepExtend({\n close: shapeOptions.close,\n fill: shapeOptions.fill,\n }, itemFromSingleOrMultiple(shapeData, id, reduceDuplicates));\n}\nfunction fixOutMode(data) {\n if (!isInArray(data.outMode, data.checkModes)) {\n return;\n }\n const diameter = data.radius * double;\n if (data.coord > data.maxCoord - diameter) {\n data.setCb(-data.radius);\n }\n else if (data.coord < diameter) {\n data.setCb(data.radius);\n }\n}\nexport class Particle {\n constructor(engine, container) {\n this.container = container;\n this._calcPosition = (container, position, zIndex, tryCount = defaultRetryCount) => {\n for (const plugin of container.plugins.values()) {\n const pluginPos = plugin.particlePosition !== undefined ? plugin.particlePosition(position, this) : undefined;\n if (pluginPos) {\n return Vector3d.create(pluginPos.x, pluginPos.y, zIndex);\n }\n }\n const canvasSize = container.canvas.size, exactPosition = calcExactPositionOrRandomFromSize({\n size: canvasSize,\n position: position,\n }), pos = Vector3d.create(exactPosition.x, exactPosition.y, zIndex), radius = this.getRadius(), outModes = this.options.move.outModes, fixHorizontal = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [OutMode.bounce],\n coord: pos.x,\n maxCoord: container.canvas.size.width,\n setCb: (value) => (pos.x += value),\n radius,\n });\n }, fixVertical = (outMode) => {\n fixOutMode({\n outMode,\n checkModes: [OutMode.bounce],\n coord: pos.y,\n maxCoord: container.canvas.size.height,\n setCb: (value) => (pos.y += value),\n radius,\n });\n };\n fixHorizontal(outModes.left ?? outModes.default);\n fixHorizontal(outModes.right ?? outModes.default);\n fixVertical(outModes.top ?? outModes.default);\n fixVertical(outModes.bottom ?? outModes.default);\n if (this._checkOverlap(pos, tryCount)) {\n const increment = 1;\n return this._calcPosition(container, undefined, zIndex, tryCount + increment);\n }\n return pos;\n };\n this._calculateVelocity = () => {\n const baseVelocity = getParticleBaseVelocity(this.direction), res = baseVelocity.copy(), moveOptions = this.options.move;\n if (moveOptions.direction === MoveDirection.inside || moveOptions.direction === MoveDirection.outside) {\n return res;\n }\n const rad = degToRad(getRangeValue(moveOptions.angle.value)), radOffset = degToRad(getRangeValue(moveOptions.angle.offset)), range = {\n left: radOffset - rad * half,\n right: radOffset + rad * half,\n };\n if (!moveOptions.straight) {\n res.angle += randomInRange(setRangeValue(range.left, range.right));\n }\n if (moveOptions.random && typeof moveOptions.speed === \"number\") {\n res.length *= getRandom();\n }\n return res;\n };\n this._checkOverlap = (pos, tryCount = defaultRetryCount) => {\n const collisionsOptions = this.options.collisions, radius = this.getRadius();\n if (!collisionsOptions.enable) {\n return false;\n }\n const overlapOptions = collisionsOptions.overlap;\n if (overlapOptions.enable) {\n return false;\n }\n const retries = overlapOptions.retries, minRetries = 0;\n if (retries >= minRetries && tryCount > retries) {\n throw new Error(`${errorPrefix} particle is overlapping and can't be placed`);\n }\n return !!this.container.particles.find(particle => getDistance(pos, particle.position) < radius + particle.getRadius());\n };\n this._getRollColor = color => {\n if (!color || !this.roll || (!this.backColor && !this.roll.alter)) {\n return color;\n }\n const rollFactor = 1, none = 0, backFactor = this.roll.horizontal && this.roll.vertical ? double * rollFactor : rollFactor, backSum = this.roll.horizontal ? Math.PI * half : none, rolled = Math.floor(((this.roll.angle ?? none) + backSum) / (Math.PI / backFactor)) % double;\n if (!rolled) {\n return color;\n }\n if (this.backColor) {\n return this.backColor;\n }\n if (this.roll.alter) {\n return alterHsl(color, this.roll.alter.type, this.roll.alter.value);\n }\n return color;\n };\n this._initPosition = position => {\n const container = this.container, zIndexValue = getRangeValue(this.options.zIndex.value), minZ = 0;\n this.position = this._calcPosition(container, position, clamp(zIndexValue, minZ, container.zLayers));\n this.initialPosition = this.position.copy();\n const canvasSize = container.canvas.size, defaultRadius = 0;\n this.moveCenter = {\n ...getPosition(this.options.move.center, canvasSize),\n radius: this.options.move.center.radius ?? defaultRadius,\n mode: this.options.move.center.mode ?? PixelMode.percent,\n };\n this.direction = getParticleDirectionAngle(this.options.move.direction, this.position, this.moveCenter);\n switch (this.options.move.direction) {\n case MoveDirection.inside:\n this.outType = ParticleOutType.inside;\n break;\n case MoveDirection.outside:\n this.outType = ParticleOutType.outside;\n break;\n }\n this.offset = Vector.origin;\n };\n this._engine = engine;\n }\n destroy(override) {\n if (this.unbreakable || this.destroyed) {\n return;\n }\n this.destroyed = true;\n this.bubble.inRange = false;\n this.slow.inRange = false;\n const container = this.container, pathGenerator = this.pathGenerator, shapeDrawer = container.shapeDrawers.get(this.shape);\n shapeDrawer?.particleDestroy?.(this);\n for (const plugin of container.plugins.values()) {\n plugin.particleDestroyed?.(this, override);\n }\n for (const updater of container.particles.updaters) {\n updater.particleDestroyed?.(this, override);\n }\n pathGenerator?.reset(this);\n this._engine.dispatchEvent(EventType.particleDestroyed, {\n container: this.container,\n data: {\n particle: this,\n },\n });\n }\n draw(delta) {\n const container = this.container, canvas = container.canvas;\n for (const plugin of container.plugins.values()) {\n canvas.drawParticlePlugin(plugin, this, delta);\n }\n canvas.drawParticle(this, delta);\n }\n getFillColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.color));\n }\n getMass() {\n return this.getRadius() ** squareExp * Math.PI * half;\n }\n getPosition() {\n return {\n x: this.position.x + this.offset.x,\n y: this.position.y + this.offset.y,\n z: this.position.z,\n };\n }\n getRadius() {\n return this.bubble.radius ?? this.size.value;\n }\n getStrokeColor() {\n return this._getRollColor(this.bubble.color ?? getHslFromAnimation(this.strokeColor));\n }\n init(id, position, overrideOptions, group) {\n const container = this.container, engine = this._engine;\n this.id = id;\n this.group = group;\n this.effectClose = true;\n this.effectFill = true;\n this.shapeClose = true;\n this.shapeFill = true;\n this.pathRotation = false;\n this.lastPathTime = 0;\n this.destroyed = false;\n this.unbreakable = false;\n this.isRotating = false;\n this.rotation = 0;\n this.misplaced = false;\n this.retina = {\n maxDistance: {},\n };\n this.outType = ParticleOutType.normal;\n this.ignoresResizeRatio = true;\n const pxRatio = container.retina.pixelRatio, mainOptions = container.actualOptions, particlesOptions = loadParticlesOptions(this._engine, container, mainOptions.particles), { reduceDuplicates } = particlesOptions, effectType = particlesOptions.effect.type, shapeType = particlesOptions.shape.type;\n this.effect = itemFromSingleOrMultiple(effectType, this.id, reduceDuplicates);\n this.shape = itemFromSingleOrMultiple(shapeType, this.id, reduceDuplicates);\n const effectOptions = particlesOptions.effect, shapeOptions = particlesOptions.shape;\n if (overrideOptions) {\n if (overrideOptions.effect?.type) {\n const overrideEffectType = overrideOptions.effect.type, effect = itemFromSingleOrMultiple(overrideEffectType, this.id, reduceDuplicates);\n if (effect) {\n this.effect = effect;\n effectOptions.load(overrideOptions.effect);\n }\n }\n if (overrideOptions.shape?.type) {\n const overrideShapeType = overrideOptions.shape.type, shape = itemFromSingleOrMultiple(overrideShapeType, this.id, reduceDuplicates);\n if (shape) {\n this.shape = shape;\n shapeOptions.load(overrideOptions.shape);\n }\n }\n }\n if (this.effect === randomString) {\n const availableEffects = [...this.container.effectDrawers.keys()];\n this.effect = availableEffects[Math.floor(Math.random() * availableEffects.length)];\n }\n if (this.shape === randomString) {\n const availableShapes = [...this.container.shapeDrawers.keys()];\n this.shape = availableShapes[Math.floor(Math.random() * availableShapes.length)];\n }\n this.effectData = loadEffectData(this.effect, effectOptions, this.id, reduceDuplicates);\n this.shapeData = loadShapeData(this.shape, shapeOptions, this.id, reduceDuplicates);\n particlesOptions.load(overrideOptions);\n const effectData = this.effectData;\n if (effectData) {\n particlesOptions.load(effectData.particles);\n }\n const shapeData = this.shapeData;\n if (shapeData) {\n particlesOptions.load(shapeData.particles);\n }\n const interactivity = new Interactivity(engine, container);\n interactivity.load(container.actualOptions.interactivity);\n interactivity.load(particlesOptions.interactivity);\n this.interactivity = interactivity;\n this.effectFill = effectData?.fill ?? particlesOptions.effect.fill;\n this.effectClose = effectData?.close ?? particlesOptions.effect.close;\n this.shapeFill = shapeData?.fill ?? particlesOptions.shape.fill;\n this.shapeClose = shapeData?.close ?? particlesOptions.shape.close;\n this.options = particlesOptions;\n const pathOptions = this.options.move.path;\n this.pathDelay = getRangeValue(pathOptions.delay.value) * millisecondsToSeconds;\n if (pathOptions.generator) {\n this.pathGenerator = this._engine.getPathGenerator(pathOptions.generator);\n if (this.pathGenerator && container.addPath(pathOptions.generator, this.pathGenerator)) {\n this.pathGenerator.init(container);\n }\n }\n container.retina.initParticle(this);\n this.size = initParticleNumericAnimationValue(this.options.size, pxRatio);\n this.bubble = {\n inRange: false,\n };\n this.slow = {\n inRange: false,\n factor: 1,\n };\n this._initPosition(position);\n this.initialVelocity = this._calculateVelocity();\n this.velocity = this.initialVelocity.copy();\n const decayOffset = 1;\n this.moveDecay = decayOffset - getRangeValue(this.options.move.decay);\n const particles = container.particles;\n particles.setLastZIndex(this.position.z);\n this.zIndexFactor = this.position.z / container.zLayers;\n this.sides = 24;\n let effectDrawer = container.effectDrawers.get(this.effect);\n if (!effectDrawer) {\n effectDrawer = this._engine.getEffectDrawer(this.effect);\n if (effectDrawer) {\n container.effectDrawers.set(this.effect, effectDrawer);\n }\n }\n if (effectDrawer?.loadEffect) {\n effectDrawer.loadEffect(this);\n }\n let shapeDrawer = container.shapeDrawers.get(this.shape);\n if (!shapeDrawer) {\n shapeDrawer = this._engine.getShapeDrawer(this.shape);\n if (shapeDrawer) {\n container.shapeDrawers.set(this.shape, shapeDrawer);\n }\n }\n if (shapeDrawer?.loadShape) {\n shapeDrawer.loadShape(this);\n }\n const sideCountFunc = shapeDrawer?.getSidesCount;\n if (sideCountFunc) {\n this.sides = sideCountFunc(this);\n }\n this.spawning = false;\n this.shadowColor = rangeColorToRgb(this._engine, this.options.shadow.color);\n for (const updater of particles.updaters) {\n updater.init(this);\n }\n for (const mover of particles.movers) {\n mover.init?.(this);\n }\n effectDrawer?.particleInit?.(container, this);\n shapeDrawer?.particleInit?.(container, this);\n for (const plugin of container.plugins.values()) {\n plugin.particleCreated?.(this);\n }\n }\n isInsideCanvas() {\n const radius = this.getRadius(), canvasSize = this.container.canvas.size, position = this.position;\n return (position.x >= -radius &&\n position.y >= -radius &&\n position.y <= canvasSize.height + radius &&\n position.x <= canvasSize.width + radius);\n }\n isVisible() {\n return !this.destroyed && !this.spawning && this.isInsideCanvas();\n }\n reset() {\n for (const updater of this.container.particles.updaters) {\n updater.reset?.(this);\n }\n }\n}\n","export class Point {\n constructor(position, particle) {\n this.position = position;\n this.particle = particle;\n }\n}\n","export var RangeType;\n(function (RangeType) {\n RangeType[\"circle\"] = \"circle\";\n RangeType[\"rectangle\"] = \"rectangle\";\n})(RangeType || (RangeType = {}));\n","import { RangeType } from \"../../Types/RangeType.js\";\nimport { getDistance } from \"../../Utils/NumberUtils.js\";\nconst squareExp = 2;\nexport class BaseRange {\n constructor(x, y, type) {\n this.position = {\n x: x,\n y: y,\n };\n this.type = type;\n }\n}\nexport class Circle extends BaseRange {\n constructor(x, y, radius) {\n super(x, y, RangeType.circle);\n this.radius = radius;\n }\n contains(point) {\n return getDistance(point, this.position) <= this.radius;\n }\n intersects(range) {\n const pos1 = this.position, pos2 = range.position, distPos = { x: Math.abs(pos2.x - pos1.x), y: Math.abs(pos2.y - pos1.y) }, r = this.radius;\n if (range instanceof Circle || range.type === RangeType.circle) {\n const circleRange = range, rSum = r + circleRange.radius, dist = Math.sqrt(distPos.x ** squareExp + distPos.y ** squareExp);\n return rSum > dist;\n }\n else if (range instanceof Rectangle || range.type === RangeType.rectangle) {\n const rectRange = range, { width, height } = rectRange.size, edges = Math.pow(distPos.x - width, squareExp) + Math.pow(distPos.y - height, squareExp);\n return (edges <= r ** squareExp ||\n (distPos.x <= r + width && distPos.y <= r + height) ||\n distPos.x <= width ||\n distPos.y <= height);\n }\n return false;\n }\n}\nexport class Rectangle extends BaseRange {\n constructor(x, y, width, height) {\n super(x, y, RangeType.rectangle);\n this.size = {\n height: height,\n width: width,\n };\n }\n contains(point) {\n const w = this.size.width, h = this.size.height, pos = this.position;\n return point.x >= pos.x && point.x <= pos.x + w && point.y >= pos.y && point.y <= pos.y + h;\n }\n intersects(range) {\n if (range instanceof Circle) {\n return range.intersects(this);\n }\n const w = this.size.width, h = this.size.height, pos1 = this.position, pos2 = range.position, size2 = range instanceof Rectangle ? range.size : { width: 0, height: 0 }, w2 = size2.width, h2 = size2.height;\n return pos2.x < pos1.x + w && pos2.x + w2 > pos1.x && pos2.y < pos1.y + h && pos2.y + h2 > pos1.y;\n }\n}\n","import { Circle, Rectangle } from \"./Ranges.js\";\nimport { getDistance } from \"../../Utils/NumberUtils.js\";\nconst half = 0.5, double = 2, subdivideCount = 4;\nexport class QuadTree {\n constructor(rectangle, capacity) {\n this.rectangle = rectangle;\n this.capacity = capacity;\n this._subdivide = () => {\n const { x, y } = this.rectangle.position, { width, height } = this.rectangle.size, { capacity } = this;\n for (let i = 0; i < subdivideCount; i++) {\n const fixedIndex = i % double;\n this._subs.push(new QuadTree(new Rectangle(x + width * half * fixedIndex, y + height * half * (Math.round(i * half) - fixedIndex), width * half, height * half), capacity));\n }\n this._divided = true;\n };\n this._points = [];\n this._divided = false;\n this._subs = [];\n }\n insert(point) {\n if (!this.rectangle.contains(point.position)) {\n return false;\n }\n if (this._points.length < this.capacity) {\n this._points.push(point);\n return true;\n }\n if (!this._divided) {\n this._subdivide();\n }\n return this._subs.some(sub => sub.insert(point));\n }\n query(range, check) {\n const res = [];\n if (!range.intersects(this.rectangle)) {\n return [];\n }\n for (const p of this._points) {\n if (!range.contains(p.position) &&\n getDistance(range.position, p.position) > p.particle.getRadius() &&\n (!check || check(p.particle))) {\n continue;\n }\n res.push(p.particle);\n }\n if (this._divided) {\n for (const sub of this._subs) {\n res.push(...sub.query(range, check));\n }\n }\n return res;\n }\n queryCircle(position, radius, check) {\n return this.query(new Circle(position.x, position.y, radius), check);\n }\n queryRectangle(position, size, check) {\n return this.query(new Rectangle(position.x, position.y, size.width, size.height), check);\n }\n}\n","import { getLogger, getPosition } from \"../Utils/Utils.js\";\nimport { EventType } from \"../Enums/Types/EventType.js\";\nimport { InteractionManager } from \"./Utils/InteractionManager.js\";\nimport { LimitMode } from \"../Enums/Modes/LimitMode.js\";\nimport { Particle } from \"./Particle.js\";\nimport { Point } from \"./Utils/Point.js\";\nimport { QuadTree } from \"./Utils/QuadTree.js\";\nimport { Rectangle } from \"./Utils/Ranges.js\";\nimport { errorPrefix } from \"./Utils/Constants.js\";\nconst qTreeCapacity = 4, squareExp = 2, defaultRemoveQuantity = 1;\nconst qTreeRectangle = (canvasSize) => {\n const { height, width } = canvasSize, posOffset = -0.25, sizeFactor = 1.5;\n return new Rectangle(posOffset * width, posOffset * height, sizeFactor * width, sizeFactor * height);\n};\nexport class Particles {\n constructor(engine, container) {\n this._addToPool = (...particles) => {\n this._pool.push(...particles);\n };\n this._applyDensity = (options, manualCount, group) => {\n const numberOptions = options.number;\n if (!options.number.density?.enable) {\n if (group === undefined) {\n this._limit = numberOptions.limit.value;\n }\n else if (numberOptions.limit) {\n this._groupLimits.set(group, numberOptions.limit.value);\n }\n return;\n }\n const densityFactor = this._initDensityFactor(numberOptions.density), optParticlesNumber = numberOptions.value, minLimit = 0, optParticlesLimit = numberOptions.limit.value > minLimit ? numberOptions.limit.value : optParticlesNumber, particlesNumber = Math.min(optParticlesNumber, optParticlesLimit) * densityFactor + manualCount, particlesCount = Math.min(this.count, this.filter(t => t.group === group).length);\n if (group === undefined) {\n this._limit = numberOptions.limit.value * densityFactor;\n }\n else {\n this._groupLimits.set(group, numberOptions.limit.value * densityFactor);\n }\n if (particlesCount < particlesNumber) {\n this.push(Math.abs(particlesNumber - particlesCount), undefined, options, group);\n }\n else if (particlesCount > particlesNumber) {\n this.removeQuantity(particlesCount - particlesNumber, group);\n }\n };\n this._initDensityFactor = densityOptions => {\n const container = this._container, defaultFactor = 1;\n if (!container.canvas.element || !densityOptions.enable) {\n return defaultFactor;\n }\n const canvas = container.canvas.element, pxRatio = container.retina.pixelRatio;\n return (canvas.width * canvas.height) / (densityOptions.height * densityOptions.width * pxRatio ** squareExp);\n };\n this._pushParticle = (position, overrideOptions, group, initializer) => {\n try {\n let particle = this._pool.pop();\n if (!particle) {\n particle = new Particle(this._engine, this._container);\n }\n particle.init(this._nextId, position, overrideOptions, group);\n let canAdd = true;\n if (initializer) {\n canAdd = initializer(particle);\n }\n if (!canAdd) {\n return;\n }\n this._array.push(particle);\n this._zArray.push(particle);\n this._nextId++;\n this._engine.dispatchEvent(EventType.particleAdded, {\n container: this._container,\n data: {\n particle,\n },\n });\n return particle;\n }\n catch (e) {\n getLogger().warning(`${errorPrefix} adding particle: ${e}`);\n }\n };\n this._removeParticle = (index, group, override) => {\n const particle = this._array[index];\n if (!particle || particle.group !== group) {\n return false;\n }\n const zIdx = this._zArray.indexOf(particle), deleteCount = 1;\n this._array.splice(index, deleteCount);\n this._zArray.splice(zIdx, deleteCount);\n particle.destroy(override);\n this._engine.dispatchEvent(EventType.particleRemoved, {\n container: this._container,\n data: {\n particle,\n },\n });\n this._addToPool(particle);\n return true;\n };\n this._engine = engine;\n this._container = container;\n this._nextId = 0;\n this._array = [];\n this._zArray = [];\n this._pool = [];\n this._limit = 0;\n this._groupLimits = new Map();\n this._needsSort = false;\n this._lastZIndex = 0;\n this._interactionManager = new InteractionManager(engine, container);\n this._pluginsInitialized = false;\n const canvasSize = container.canvas.size;\n this.quadTree = new QuadTree(qTreeRectangle(canvasSize), qTreeCapacity);\n this.movers = [];\n this.updaters = [];\n }\n get count() {\n return this._array.length;\n }\n addManualParticles() {\n const container = this._container, options = container.actualOptions;\n options.manualParticles.forEach(p => this.addParticle(p.position ? getPosition(p.position, container.canvas.size) : undefined, p.options));\n }\n addParticle(position, overrideOptions, group, initializer) {\n const limitMode = this._container.actualOptions.particles.number.limit.mode, limit = group === undefined ? this._limit : (this._groupLimits.get(group) ?? this._limit), currentCount = this.count, minLimit = 0;\n if (limit > minLimit) {\n switch (limitMode) {\n case LimitMode.delete: {\n const countOffset = 1, minCount = 0, countToRemove = currentCount + countOffset - limit;\n if (countToRemove > minCount) {\n this.removeQuantity(countToRemove);\n }\n break;\n }\n case LimitMode.wait:\n if (currentCount >= limit) {\n return;\n }\n break;\n }\n }\n return this._pushParticle(position, overrideOptions, group, initializer);\n }\n clear() {\n this._array = [];\n this._zArray = [];\n this._pluginsInitialized = false;\n }\n destroy() {\n this._array = [];\n this._zArray = [];\n this.movers = [];\n this.updaters = [];\n }\n draw(delta) {\n const container = this._container, canvas = container.canvas;\n canvas.clear();\n this.update(delta);\n for (const plugin of container.plugins.values()) {\n canvas.drawPlugin(plugin, delta);\n }\n for (const p of this._zArray) {\n p.draw(delta);\n }\n }\n filter(condition) {\n return this._array.filter(condition);\n }\n find(condition) {\n return this._array.find(condition);\n }\n get(index) {\n return this._array[index];\n }\n handleClickMode(mode) {\n this._interactionManager.handleClickMode(mode);\n }\n async init() {\n const container = this._container, options = container.actualOptions;\n this._lastZIndex = 0;\n this._needsSort = false;\n await this.initPlugins();\n let handled = false;\n for (const plugin of container.plugins.values()) {\n handled = plugin.particlesInitialization?.() ?? handled;\n if (handled) {\n break;\n }\n }\n this.addManualParticles();\n if (!handled) {\n const particlesOptions = options.particles, groups = particlesOptions.groups;\n for (const group in groups) {\n const groupOptions = groups[group];\n for (let i = this.count, j = 0; j < groupOptions.number?.value && i < particlesOptions.number.value; i++, j++) {\n this.addParticle(undefined, groupOptions, group);\n }\n }\n for (let i = this.count; i < particlesOptions.number.value; i++) {\n this.addParticle();\n }\n }\n }\n async initPlugins() {\n if (this._pluginsInitialized) {\n return;\n }\n const container = this._container;\n this.movers = await this._engine.getMovers(container, true);\n this.updaters = await this._engine.getUpdaters(container, true);\n await this._interactionManager.init();\n for (const pathGenerator of container.pathGenerators.values()) {\n pathGenerator.init(container);\n }\n }\n push(nb, mouse, overrideOptions, group) {\n for (let i = 0; i < nb; i++) {\n this.addParticle(mouse?.position, overrideOptions, group);\n }\n }\n async redraw() {\n this.clear();\n await this.init();\n this.draw({ value: 0, factor: 0 });\n }\n remove(particle, group, override) {\n this.removeAt(this._array.indexOf(particle), undefined, group, override);\n }\n removeAt(index, quantity = defaultRemoveQuantity, group, override) {\n const minIndex = 0;\n if (index < minIndex || index > this.count) {\n return;\n }\n let deleted = 0;\n for (let i = index; deleted < quantity && i < this.count; i++) {\n if (this._removeParticle(i, group, override)) {\n i--;\n deleted++;\n }\n }\n }\n removeQuantity(quantity, group) {\n const defaultIndex = 0;\n this.removeAt(defaultIndex, quantity, group);\n }\n setDensity() {\n const options = this._container.actualOptions, groups = options.particles.groups, manualCount = 0;\n for (const group in groups) {\n this._applyDensity(groups[group], manualCount, group);\n }\n this._applyDensity(options.particles, options.manualParticles.length);\n }\n setLastZIndex(zIndex) {\n this._lastZIndex = zIndex;\n this._needsSort = this._needsSort || this._lastZIndex < zIndex;\n }\n setResizeFactor(factor) {\n this._resizeFactor = factor;\n }\n update(delta) {\n const container = this._container, particlesToDelete = new Set();\n this.quadTree = new QuadTree(qTreeRectangle(container.canvas.size), qTreeCapacity);\n for (const pathGenerator of container.pathGenerators.values()) {\n pathGenerator.update();\n }\n for (const plugin of container.plugins.values()) {\n plugin.update?.(delta);\n }\n const resizeFactor = this._resizeFactor;\n for (const particle of this._array) {\n if (resizeFactor && !particle.ignoresResizeRatio) {\n particle.position.x *= resizeFactor.width;\n particle.position.y *= resizeFactor.height;\n particle.initialPosition.x *= resizeFactor.width;\n particle.initialPosition.y *= resizeFactor.height;\n }\n particle.ignoresResizeRatio = false;\n this._interactionManager.reset(particle);\n for (const plugin of this._container.plugins.values()) {\n if (particle.destroyed) {\n break;\n }\n plugin.particleUpdate?.(particle, delta);\n }\n for (const mover of this.movers) {\n if (mover.isEnabled(particle)) {\n mover.move(particle, delta);\n }\n }\n if (particle.destroyed) {\n particlesToDelete.add(particle);\n continue;\n }\n this.quadTree.insert(new Point(particle.getPosition(), particle));\n }\n if (particlesToDelete.size) {\n const checkDelete = (p) => !particlesToDelete.has(p);\n this._array = this.filter(checkDelete);\n this._zArray = this._zArray.filter(checkDelete);\n for (const particle of particlesToDelete) {\n this._engine.dispatchEvent(EventType.particleRemoved, {\n container: this._container,\n data: {\n particle,\n },\n });\n }\n this._addToPool(...particlesToDelete);\n }\n this._interactionManager.externalInteract(delta);\n for (const particle of this._array) {\n for (const updater of this.updaters) {\n updater.update(particle, delta);\n }\n if (!particle.destroyed && !particle.spawning) {\n this._interactionManager.particlesInteract(particle, delta);\n }\n }\n delete this._resizeFactor;\n if (this._needsSort) {\n const zArray = this._zArray;\n zArray.sort((a, b) => b.position.z - a.position.z || a.id - b.id);\n const lengthOffset = 1;\n this._lastZIndex = zArray[zArray.length - lengthOffset].position.z;\n this._needsSort = false;\n }\n }\n}\n","import { getRangeValue } from \"../Utils/NumberUtils.js\";\nimport { isSsr } from \"../Utils/Utils.js\";\nconst defaultRatio = 1, defaultReduceFactor = 1;\nexport class Retina {\n constructor(container) {\n this.container = container;\n this.pixelRatio = defaultRatio;\n this.reduceFactor = defaultReduceFactor;\n }\n init() {\n const container = this.container, options = container.actualOptions;\n this.pixelRatio = !options.detectRetina || isSsr() ? defaultRatio : window.devicePixelRatio;\n this.reduceFactor = defaultReduceFactor;\n const ratio = this.pixelRatio, canvas = container.canvas;\n if (canvas.element) {\n const element = canvas.element;\n canvas.size.width = element.offsetWidth * ratio;\n canvas.size.height = element.offsetHeight * ratio;\n }\n const particles = options.particles, moveOptions = particles.move;\n this.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n this.sizeAnimationSpeed = getRangeValue(particles.size.animation.speed) * ratio;\n }\n initParticle(particle) {\n const options = particle.options, ratio = this.pixelRatio, moveOptions = options.move, moveDistance = moveOptions.distance, props = particle.retina;\n props.moveDrift = getRangeValue(moveOptions.drift) * ratio;\n props.moveSpeed = getRangeValue(moveOptions.speed) * ratio;\n props.sizeAnimationSpeed = getRangeValue(options.size.animation.speed) * ratio;\n const maxDistance = props.maxDistance;\n maxDistance.horizontal = moveDistance.horizontal !== undefined ? moveDistance.horizontal * ratio : undefined;\n maxDistance.vertical = moveDistance.vertical !== undefined ? moveDistance.vertical * ratio : undefined;\n props.maxSpeed = getRangeValue(moveOptions.gravity.maxSpeed) * ratio;\n }\n}\n","import { animate, cancelAnimation, getRangeValue } from \"../Utils/NumberUtils.js\";\nimport { errorPrefix, millisecondsToSeconds } from \"./Utils/Constants.js\";\nimport { getLogger, safeIntersectionObserver } from \"../Utils/Utils.js\";\nimport { Canvas } from \"./Canvas.js\";\nimport { EventListeners } from \"./Utils/EventListeners.js\";\nimport { EventType } from \"../Enums/Types/EventType.js\";\nimport { Options } from \"../Options/Classes/Options.js\";\nimport { Particles } from \"./Particles.js\";\nimport { Retina } from \"./Retina.js\";\nimport { loadOptions } from \"../Utils/OptionsUtils.js\";\nfunction guardCheck(container) {\n return container && !container.destroyed;\n}\nconst defaultFps = 60;\nfunction initDelta(value, fpsLimit = defaultFps, smooth = false) {\n return {\n value,\n factor: smooth ? defaultFps / fpsLimit : (defaultFps * value) / millisecondsToSeconds,\n };\n}\nfunction loadContainerOptions(engine, container, ...sourceOptionsArr) {\n const options = new Options(engine, container);\n loadOptions(options, ...sourceOptionsArr);\n return options;\n}\nexport class Container {\n constructor(engine, id, sourceOptions) {\n this._intersectionManager = entries => {\n if (!guardCheck(this) || !this.actualOptions.pauseOnOutsideViewport) {\n return;\n }\n for (const entry of entries) {\n if (entry.target !== this.interactivity.element) {\n continue;\n }\n if (entry.isIntersecting) {\n void this.play();\n }\n else {\n this.pause();\n }\n }\n };\n this._nextFrame = (timestamp) => {\n try {\n if (!this._smooth &&\n this._lastFrameTime !== undefined &&\n timestamp < this._lastFrameTime + millisecondsToSeconds / this.fpsLimit) {\n this.draw(false);\n return;\n }\n this._lastFrameTime ??= timestamp;\n const delta = initDelta(timestamp - this._lastFrameTime, this.fpsLimit, this._smooth);\n this.addLifeTime(delta.value);\n this._lastFrameTime = timestamp;\n if (delta.value > millisecondsToSeconds) {\n this.draw(false);\n return;\n }\n this.particles.draw(delta);\n if (!this.alive()) {\n this.destroy();\n return;\n }\n if (this.animationStatus) {\n this.draw(false);\n }\n }\n catch (e) {\n getLogger().error(`${errorPrefix} in animation loop`, e);\n }\n };\n this._engine = engine;\n this.id = Symbol(id);\n this.fpsLimit = 120;\n this._smooth = false;\n this._delay = 0;\n this._duration = 0;\n this._lifeTime = 0;\n this._firstStart = true;\n this.started = false;\n this.destroyed = false;\n this._paused = true;\n this._lastFrameTime = 0;\n this.zLayers = 100;\n this.pageHidden = false;\n this._clickHandlers = new Map();\n this._sourceOptions = sourceOptions;\n this._initialSourceOptions = sourceOptions;\n this.retina = new Retina(this);\n this.canvas = new Canvas(this, this._engine);\n this.particles = new Particles(this._engine, this);\n this.pathGenerators = new Map();\n this.interactivity = {\n mouse: {\n clicking: false,\n inside: false,\n },\n };\n this.plugins = new Map();\n this.effectDrawers = new Map();\n this.shapeDrawers = new Map();\n this._options = loadContainerOptions(this._engine, this);\n this.actualOptions = loadContainerOptions(this._engine, this);\n this._eventListeners = new EventListeners(this);\n this._intersectionObserver = safeIntersectionObserver(entries => this._intersectionManager(entries));\n this._engine.dispatchEvent(EventType.containerBuilt, { container: this });\n }\n get animationStatus() {\n return !this._paused && !this.pageHidden && guardCheck(this);\n }\n get options() {\n return this._options;\n }\n get sourceOptions() {\n return this._sourceOptions;\n }\n addClickHandler(callback) {\n if (!guardCheck(this)) {\n return;\n }\n const el = this.interactivity.element;\n if (!el) {\n return;\n }\n const clickOrTouchHandler = (e, pos, radius) => {\n if (!guardCheck(this)) {\n return;\n }\n const pxRatio = this.retina.pixelRatio, posRetina = {\n x: pos.x * pxRatio,\n y: pos.y * pxRatio,\n }, particles = this.particles.quadTree.queryCircle(posRetina, radius * pxRatio);\n callback(e, particles);\n }, clickHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n const mouseEvent = e, pos = {\n x: mouseEvent.offsetX || mouseEvent.clientX,\n y: mouseEvent.offsetY || mouseEvent.clientY,\n }, radius = 1;\n clickOrTouchHandler(e, pos, radius);\n }, touchStartHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = true;\n touchMoved = false;\n }, touchMoveHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touchMoved = true;\n }, touchEndHandler = (e) => {\n if (!guardCheck(this)) {\n return;\n }\n if (touched && !touchMoved) {\n const touchEvent = e, lengthOffset = 1;\n let lastTouch = touchEvent.touches[touchEvent.touches.length - lengthOffset];\n if (!lastTouch) {\n lastTouch = touchEvent.changedTouches[touchEvent.changedTouches.length - lengthOffset];\n if (!lastTouch) {\n return;\n }\n }\n const element = this.canvas.element, canvasRect = element ? element.getBoundingClientRect() : undefined, minCoordinate = 0, pos = {\n x: lastTouch.clientX - (canvasRect ? canvasRect.left : minCoordinate),\n y: lastTouch.clientY - (canvasRect ? canvasRect.top : minCoordinate),\n };\n clickOrTouchHandler(e, pos, Math.max(lastTouch.radiusX, lastTouch.radiusY));\n }\n touched = false;\n touchMoved = false;\n }, touchCancelHandler = () => {\n if (!guardCheck(this)) {\n return;\n }\n touched = false;\n touchMoved = false;\n };\n let touched = false, touchMoved = false;\n this._clickHandlers.set(\"click\", clickHandler);\n this._clickHandlers.set(\"touchstart\", touchStartHandler);\n this._clickHandlers.set(\"touchmove\", touchMoveHandler);\n this._clickHandlers.set(\"touchend\", touchEndHandler);\n this._clickHandlers.set(\"touchcancel\", touchCancelHandler);\n for (const [key, handler] of this._clickHandlers) {\n el.addEventListener(key, handler);\n }\n }\n addLifeTime(value) {\n this._lifeTime += value;\n }\n addPath(key, generator, override = false) {\n if (!guardCheck(this) || (!override && this.pathGenerators.has(key))) {\n return false;\n }\n this.pathGenerators.set(key, generator);\n return true;\n }\n alive() {\n return !this._duration || this._lifeTime <= this._duration;\n }\n clearClickHandlers() {\n if (!guardCheck(this)) {\n return;\n }\n for (const [key, handler] of this._clickHandlers) {\n this.interactivity.element?.removeEventListener(key, handler);\n }\n this._clickHandlers.clear();\n }\n destroy(remove = true) {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n this.clearClickHandlers();\n this.particles.destroy();\n this.canvas.destroy();\n for (const effectDrawer of this.effectDrawers.values()) {\n effectDrawer.destroy?.(this);\n }\n for (const shapeDrawer of this.shapeDrawers.values()) {\n shapeDrawer.destroy?.(this);\n }\n for (const key of this.effectDrawers.keys()) {\n this.effectDrawers.delete(key);\n }\n for (const key of this.shapeDrawers.keys()) {\n this.shapeDrawers.delete(key);\n }\n this._engine.clearPlugins(this);\n this.destroyed = true;\n if (remove) {\n const mainArr = this._engine.items, idx = mainArr.findIndex(t => t === this), minIndex = 0;\n if (idx >= minIndex) {\n const deleteCount = 1;\n mainArr.splice(idx, deleteCount);\n }\n }\n this._engine.dispatchEvent(EventType.containerDestroyed, { container: this });\n }\n draw(force) {\n if (!guardCheck(this)) {\n return;\n }\n let refreshTime = force;\n const frame = (timestamp) => {\n if (refreshTime) {\n this._lastFrameTime = undefined;\n refreshTime = false;\n }\n this._nextFrame(timestamp);\n };\n this._drawAnimationFrame = animate(timestamp => frame(timestamp));\n }\n async export(type, options = {}) {\n for (const plugin of this.plugins.values()) {\n if (!plugin.export) {\n continue;\n }\n const res = await plugin.export(type, options);\n if (!res.supported) {\n continue;\n }\n return res.blob;\n }\n getLogger().error(`${errorPrefix} - Export plugin with type ${type} not found`);\n }\n handleClickMode(mode) {\n if (!guardCheck(this)) {\n return;\n }\n this.particles.handleClickMode(mode);\n for (const plugin of this.plugins.values()) {\n plugin.handleClickMode?.(mode);\n }\n }\n async init() {\n if (!guardCheck(this)) {\n return;\n }\n const effects = this._engine.getSupportedEffects();\n for (const type of effects) {\n const drawer = this._engine.getEffectDrawer(type);\n if (drawer) {\n this.effectDrawers.set(type, drawer);\n }\n }\n const shapes = this._engine.getSupportedShapes();\n for (const type of shapes) {\n const drawer = this._engine.getShapeDrawer(type);\n if (drawer) {\n this.shapeDrawers.set(type, drawer);\n }\n }\n await this.particles.initPlugins();\n this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n const availablePlugins = await this._engine.getAvailablePlugins(this);\n for (const [id, plugin] of availablePlugins) {\n this.plugins.set(id, plugin);\n }\n this.retina.init();\n await this.canvas.init();\n this.updateActualOptions();\n this.canvas.initBackground();\n this.canvas.resize();\n const { zLayers, duration, delay, fpsLimit, smooth } = this.actualOptions;\n this.zLayers = zLayers;\n this._duration = getRangeValue(duration) * millisecondsToSeconds;\n this._delay = getRangeValue(delay) * millisecondsToSeconds;\n this._lifeTime = 0;\n const defaultFpsLimit = 120, minFpsLimit = 0;\n this.fpsLimit = fpsLimit > minFpsLimit ? fpsLimit : defaultFpsLimit;\n this._smooth = smooth;\n for (const drawer of this.effectDrawers.values()) {\n await drawer.init?.(this);\n }\n for (const drawer of this.shapeDrawers.values()) {\n await drawer.init?.(this);\n }\n for (const plugin of this.plugins.values()) {\n await plugin.init?.();\n }\n this._engine.dispatchEvent(EventType.containerInit, { container: this });\n await this.particles.init();\n this.particles.setDensity();\n for (const plugin of this.plugins.values()) {\n plugin.particlesSetup?.();\n }\n this._engine.dispatchEvent(EventType.particlesSetup, { container: this });\n }\n async loadTheme(name) {\n if (!guardCheck(this)) {\n return;\n }\n this._currentTheme = name;\n await this.refresh();\n }\n pause() {\n if (!guardCheck(this)) {\n return;\n }\n if (this._drawAnimationFrame !== undefined) {\n cancelAnimation(this._drawAnimationFrame);\n delete this._drawAnimationFrame;\n }\n if (this._paused) {\n return;\n }\n for (const plugin of this.plugins.values()) {\n plugin.pause?.();\n }\n if (!this.pageHidden) {\n this._paused = true;\n }\n this._engine.dispatchEvent(EventType.containerPaused, { container: this });\n }\n play(force) {\n if (!guardCheck(this)) {\n return;\n }\n const needsUpdate = this._paused || force;\n if (this._firstStart && !this.actualOptions.autoPlay) {\n this._firstStart = false;\n return;\n }\n if (this._paused) {\n this._paused = false;\n }\n if (needsUpdate) {\n for (const plugin of this.plugins.values()) {\n if (plugin.play) {\n plugin.play();\n }\n }\n }\n this._engine.dispatchEvent(EventType.containerPlay, { container: this });\n this.draw(needsUpdate ?? false);\n }\n async refresh() {\n if (!guardCheck(this)) {\n return;\n }\n this.stop();\n return this.start();\n }\n async reset(sourceOptions) {\n if (!guardCheck(this)) {\n return;\n }\n this._initialSourceOptions = sourceOptions;\n this._sourceOptions = sourceOptions;\n this._options = loadContainerOptions(this._engine, this, this._initialSourceOptions, this.sourceOptions);\n this.actualOptions = loadContainerOptions(this._engine, this, this._options);\n return this.refresh();\n }\n async start() {\n if (!guardCheck(this) || this.started) {\n return;\n }\n await this.init();\n this.started = true;\n await new Promise(resolve => {\n const start = async () => {\n this._eventListeners.addListeners();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.observe(this.interactivity.element);\n }\n for (const plugin of this.plugins.values()) {\n await plugin.start?.();\n }\n this._engine.dispatchEvent(EventType.containerStarted, { container: this });\n this.play();\n resolve();\n };\n this._delayTimeout = setTimeout(() => void start(), this._delay);\n });\n }\n stop() {\n if (!guardCheck(this) || !this.started) {\n return;\n }\n if (this._delayTimeout) {\n clearTimeout(this._delayTimeout);\n delete this._delayTimeout;\n }\n this._firstStart = true;\n this.started = false;\n this._eventListeners.removeListeners();\n this.pause();\n this.particles.clear();\n this.canvas.stop();\n if (this.interactivity.element instanceof HTMLElement && this._intersectionObserver) {\n this._intersectionObserver.unobserve(this.interactivity.element);\n }\n for (const plugin of this.plugins.values()) {\n plugin.stop?.();\n }\n for (const key of this.plugins.keys()) {\n this.plugins.delete(key);\n }\n this._sourceOptions = this._options;\n this._engine.dispatchEvent(EventType.containerStopped, { container: this });\n }\n updateActualOptions() {\n this.actualOptions.responsive = [];\n const newMaxWidth = this.actualOptions.setResponsive(this.canvas.size.width, this.retina.pixelRatio, this._options);\n this.actualOptions.setTheme(this._currentTheme);\n if (this._responsiveMaxWidth === newMaxWidth) {\n return false;\n }\n this._responsiveMaxWidth = newMaxWidth;\n return true;\n }\n}\n","export class EventDispatcher {\n constructor() {\n this._listeners = new Map();\n }\n addEventListener(type, listener) {\n this.removeEventListener(type, listener);\n let arr = this._listeners.get(type);\n if (!arr) {\n arr = [];\n this._listeners.set(type, arr);\n }\n arr.push(listener);\n }\n dispatchEvent(type, args) {\n const listeners = this._listeners.get(type);\n listeners?.forEach(handler => handler(args));\n }\n hasEventListener(type) {\n return !!this._listeners.get(type);\n }\n removeAllEventListeners(type) {\n if (!type) {\n this._listeners = new Map();\n }\n else {\n this._listeners.delete(type);\n }\n }\n removeEventListener(type, listener) {\n const arr = this._listeners.get(type);\n if (!arr) {\n return;\n }\n const length = arr.length, idx = arr.indexOf(listener), minIndex = 0;\n if (idx < minIndex) {\n return;\n }\n const deleteCount = 1;\n if (length === deleteCount) {\n this._listeners.delete(type);\n }\n else {\n arr.splice(idx, deleteCount);\n }\n }\n}\n","import { errorPrefix, generatedAttribute } from \"./Utils/Constants.js\";\nimport { executeOnSingleOrMultiple, getLogger, itemFromSingleOrMultiple } from \"../Utils/Utils.js\";\nimport { Container } from \"./Container.js\";\nimport { EventDispatcher } from \"../Utils/EventDispatcher.js\";\nimport { EventType } from \"../Enums/Types/EventType.js\";\nimport { getRandom } from \"../Utils/NumberUtils.js\";\nasync function getItemsFromInitializer(container, map, initializers, force = false) {\n let res = map.get(container);\n if (!res || force) {\n res = await Promise.all([...initializers.values()].map(t => t(container)));\n map.set(container, res);\n }\n return res;\n}\nasync function getDataFromUrl(data) {\n const url = itemFromSingleOrMultiple(data.url, data.index);\n if (!url) {\n return data.fallback;\n }\n const response = await fetch(url);\n if (response.ok) {\n return (await response.json());\n }\n getLogger().error(`${errorPrefix} ${response.status} while retrieving config file`);\n return data.fallback;\n}\nconst generatedTrue = \"true\", generatedFalse = \"false\", canvasTag = \"canvas\", getCanvasFromContainer = (domContainer) => {\n let canvasEl;\n if (domContainer instanceof HTMLCanvasElement || domContainer.tagName.toLowerCase() === canvasTag) {\n canvasEl = domContainer;\n if (!canvasEl.dataset[generatedAttribute]) {\n canvasEl.dataset[generatedAttribute] = generatedFalse;\n }\n }\n else {\n const existingCanvases = domContainer.getElementsByTagName(canvasTag);\n if (existingCanvases.length) {\n const firstIndex = 0;\n canvasEl = existingCanvases[firstIndex];\n canvasEl.dataset[generatedAttribute] = generatedFalse;\n }\n else {\n canvasEl = document.createElement(canvasTag);\n canvasEl.dataset[generatedAttribute] = generatedTrue;\n domContainer.appendChild(canvasEl);\n }\n }\n const fullPercent = \"100%\";\n if (!canvasEl.style.width) {\n canvasEl.style.width = fullPercent;\n }\n if (!canvasEl.style.height) {\n canvasEl.style.height = fullPercent;\n }\n return canvasEl;\n}, getDomContainer = (id, source) => {\n let domContainer = source ?? document.getElementById(id);\n if (domContainer) {\n return domContainer;\n }\n domContainer = document.createElement(\"div\");\n domContainer.id = id;\n domContainer.dataset[generatedAttribute] = generatedTrue;\n document.body.append(domContainer);\n return domContainer;\n};\nexport class Engine {\n constructor() {\n this._configs = new Map();\n this._domArray = [];\n this._eventDispatcher = new EventDispatcher();\n this._initialized = false;\n this.plugins = [];\n this.colorManagers = new Map();\n this.easingFunctions = new Map();\n this._initializers = {\n interactors: new Map(),\n movers: new Map(),\n updaters: new Map(),\n };\n this.interactors = new Map();\n this.movers = new Map();\n this.updaters = new Map();\n this.presets = new Map();\n this.effectDrawers = new Map();\n this.shapeDrawers = new Map();\n this.pathGenerators = new Map();\n }\n get configs() {\n const res = {};\n for (const [name, config] of this._configs) {\n res[name] = config;\n }\n return res;\n }\n get items() {\n return this._domArray;\n }\n get version() {\n return \"3.7.1\";\n }\n async addColorManager(manager, refresh = true) {\n this.colorManagers.set(manager.key, manager);\n await this.refresh(refresh);\n }\n addConfig(config) {\n const key = config.key ?? config.name ?? \"default\";\n this._configs.set(key, config);\n this._eventDispatcher.dispatchEvent(EventType.configAdded, { data: { name: key, config } });\n }\n async addEasing(name, easing, refresh = true) {\n if (this.getEasing(name)) {\n return;\n }\n this.easingFunctions.set(name, easing);\n await this.refresh(refresh);\n }\n async addEffect(effect, drawer, refresh = true) {\n executeOnSingleOrMultiple(effect, type => {\n if (!this.getEffectDrawer(type)) {\n this.effectDrawers.set(type, drawer);\n }\n });\n await this.refresh(refresh);\n }\n addEventListener(type, listener) {\n this._eventDispatcher.addEventListener(type, listener);\n }\n async addInteractor(name, interactorInitializer, refresh = true) {\n this._initializers.interactors.set(name, interactorInitializer);\n await this.refresh(refresh);\n }\n async addMover(name, moverInitializer, refresh = true) {\n this._initializers.movers.set(name, moverInitializer);\n await this.refresh(refresh);\n }\n async addParticleUpdater(name, updaterInitializer, refresh = true) {\n this._initializers.updaters.set(name, updaterInitializer);\n await this.refresh(refresh);\n }\n async addPathGenerator(name, generator, refresh = true) {\n if (!this.getPathGenerator(name)) {\n this.pathGenerators.set(name, generator);\n }\n await this.refresh(refresh);\n }\n async addPlugin(plugin, refresh = true) {\n if (!this.getPlugin(plugin.id)) {\n this.plugins.push(plugin);\n }\n await this.refresh(refresh);\n }\n async addPreset(preset, options, override = false, refresh = true) {\n if (override || !this.getPreset(preset)) {\n this.presets.set(preset, options);\n }\n await this.refresh(refresh);\n }\n async addShape(drawer, refresh = true) {\n for (const validType of drawer.validTypes) {\n if (this.getShapeDrawer(validType)) {\n continue;\n }\n this.shapeDrawers.set(validType, drawer);\n }\n await this.refresh(refresh);\n }\n clearPlugins(container) {\n this.updaters.delete(container);\n this.movers.delete(container);\n this.interactors.delete(container);\n }\n dispatchEvent(type, args) {\n this._eventDispatcher.dispatchEvent(type, args);\n }\n dom() {\n return this.items;\n }\n domItem(index) {\n return this.item(index);\n }\n async getAvailablePlugins(container) {\n const res = new Map();\n for (const plugin of this.plugins) {\n if (plugin.needsPlugin(container.actualOptions)) {\n res.set(plugin.id, await plugin.getPlugin(container));\n }\n }\n return res;\n }\n getEasing(name) {\n return this.easingFunctions.get(name) ?? ((value) => value);\n }\n getEffectDrawer(type) {\n return this.effectDrawers.get(type);\n }\n async getInteractors(container, force = false) {\n return getItemsFromInitializer(container, this.interactors, this._initializers.interactors, force);\n }\n async getMovers(container, force = false) {\n return getItemsFromInitializer(container, this.movers, this._initializers.movers, force);\n }\n getPathGenerator(type) {\n return this.pathGenerators.get(type);\n }\n getPlugin(plugin) {\n return this.plugins.find(t => t.id === plugin);\n }\n getPreset(preset) {\n return this.presets.get(preset);\n }\n getShapeDrawer(type) {\n return this.shapeDrawers.get(type);\n }\n getSupportedEffects() {\n return this.effectDrawers.keys();\n }\n getSupportedShapes() {\n return this.shapeDrawers.keys();\n }\n async getUpdaters(container, force = false) {\n return getItemsFromInitializer(container, this.updaters, this._initializers.updaters, force);\n }\n init() {\n if (this._initialized) {\n return;\n }\n this._initialized = true;\n }\n item(index) {\n const { items } = this, item = items[index];\n if (!item || item.destroyed) {\n const deleteCount = 1;\n items.splice(index, deleteCount);\n return;\n }\n return item;\n }\n async load(params) {\n const randomFactor = 10000, id = params.id ?? params.element?.id ?? `tsparticles${Math.floor(getRandom() * randomFactor)}`, { index, url } = params, options = url ? await getDataFromUrl({ fallback: params.options, url, index }) : params.options;\n const currentOptions = itemFromSingleOrMultiple(options, index), { items } = this, oldIndex = items.findIndex(v => v.id.description === id), minIndex = 0, newItem = new Container(this, id, currentOptions);\n if (oldIndex >= minIndex) {\n const old = this.item(oldIndex), one = 1, none = 0, deleteCount = old ? one : none;\n if (old && !old.destroyed) {\n old.destroy(false);\n }\n items.splice(oldIndex, deleteCount, newItem);\n }\n else {\n items.push(newItem);\n }\n const domContainer = getDomContainer(id, params.element), canvasEl = getCanvasFromContainer(domContainer);\n newItem.canvas.loadCanvas(canvasEl);\n await newItem.start();\n return newItem;\n }\n loadOptions(options, sourceOptions) {\n this.plugins.forEach(plugin => plugin.loadOptions?.(options, sourceOptions));\n }\n loadParticlesOptions(container, options, ...sourceOptions) {\n const updaters = this.updaters.get(container);\n if (!updaters) {\n return;\n }\n updaters.forEach(updater => updater.loadOptions?.(options, ...sourceOptions));\n }\n async refresh(refresh = true) {\n if (!refresh) {\n return;\n }\n await Promise.all(this.items.map(t => t.refresh()));\n }\n removeEventListener(type, listener) {\n this._eventDispatcher.removeEventListener(type, listener);\n }\n setOnClickHandler(callback) {\n const { items } = this;\n if (!items.length) {\n throw new Error(`${errorPrefix} can only set click handlers after calling tsParticles.load()`);\n }\n items.forEach(item => item.addClickHandler(callback));\n }\n}\n","import { Engine } from \"./Core/Engine.js\";\nexport function init() {\n const engine = new Engine();\n engine.init();\n return engine;\n}\n","import { InteractorType } from \"../../Enums/Types/InteractorType.js\";\nexport class ExternalInteractorBase {\n constructor(container) {\n this.type = InteractorType.external;\n this.container = container;\n }\n}\n","import { InteractorType } from \"../../Enums/Types/InteractorType.js\";\nexport class ParticlesInteractorBase {\n constructor(container) {\n this.type = InteractorType.particles;\n this.container = container;\n }\n}\n","export var RotateDirection;\n(function (RotateDirection) {\n RotateDirection[\"clockwise\"] = \"clockwise\";\n RotateDirection[\"counterClockwise\"] = \"counter-clockwise\";\n RotateDirection[\"random\"] = \"random\";\n})(RotateDirection || (RotateDirection = {}));\n","export var GradientType;\n(function (GradientType) {\n GradientType[\"linear\"] = \"linear\";\n GradientType[\"radial\"] = \"radial\";\n GradientType[\"random\"] = \"random\";\n})(GradientType || (GradientType = {}));\n","export var EasingType;\n(function (EasingType) {\n EasingType[\"easeInBack\"] = \"ease-in-back\";\n EasingType[\"easeInCirc\"] = \"ease-in-circ\";\n EasingType[\"easeInCubic\"] = \"ease-in-cubic\";\n EasingType[\"easeInLinear\"] = \"ease-in-linear\";\n EasingType[\"easeInQuad\"] = \"ease-in-quad\";\n EasingType[\"easeInQuart\"] = \"ease-in-quart\";\n EasingType[\"easeInQuint\"] = \"ease-in-quint\";\n EasingType[\"easeInExpo\"] = \"ease-in-expo\";\n EasingType[\"easeInSine\"] = \"ease-in-sine\";\n EasingType[\"easeOutBack\"] = \"ease-out-back\";\n EasingType[\"easeOutCirc\"] = \"ease-out-circ\";\n EasingType[\"easeOutCubic\"] = \"ease-out-cubic\";\n EasingType[\"easeOutLinear\"] = \"ease-out-linear\";\n EasingType[\"easeOutQuad\"] = \"ease-out-quad\";\n EasingType[\"easeOutQuart\"] = \"ease-out-quart\";\n EasingType[\"easeOutQuint\"] = \"ease-out-quint\";\n EasingType[\"easeOutExpo\"] = \"ease-out-expo\";\n EasingType[\"easeOutSine\"] = \"ease-out-sine\";\n EasingType[\"easeInOutBack\"] = \"ease-in-out-back\";\n EasingType[\"easeInOutCirc\"] = \"ease-in-out-circ\";\n EasingType[\"easeInOutCubic\"] = \"ease-in-out-cubic\";\n EasingType[\"easeInOutLinear\"] = \"ease-in-out-linear\";\n EasingType[\"easeInOutQuad\"] = \"ease-in-out-quad\";\n EasingType[\"easeInOutQuart\"] = \"ease-in-out-quart\";\n EasingType[\"easeInOutQuint\"] = \"ease-in-out-quint\";\n EasingType[\"easeInOutExpo\"] = \"ease-in-out-expo\";\n EasingType[\"easeInOutSine\"] = \"ease-in-out-sine\";\n})(EasingType || (EasingType = {}));\n","import { init } from \"./init.js\";\nimport { isSsr } from \"./Utils/Utils.js\";\nconst tsParticles = init();\nif (!isSsr()) {\n window.tsParticles = tsParticles;\n}\nexport * from \"./exports.js\";\nexport * from \"./export-types.js\";\nexport { tsParticles };\n","import { RotateDirection, clamp, getDistance, getDistances, getRandom, getRangeValue, } from \"@tsparticles/engine\";\nconst half = 0.5, minVelocity = 0, identity = 1, moveSpeedFactor = 60, minSpinRadius = 0, spinFactor = 0.01;\nexport function applyDistance(particle) {\n const initialPosition = particle.initialPosition, { dx, dy } = getDistances(initialPosition, particle.position), dxFixed = Math.abs(dx), dyFixed = Math.abs(dy), { maxDistance } = particle.retina, hDistance = maxDistance.horizontal, vDistance = maxDistance.vertical;\n if (!hDistance && !vDistance) {\n return;\n }\n const hasHDistance = (hDistance && dxFixed >= hDistance) ?? false, hasVDistance = (vDistance && dyFixed >= vDistance) ?? false;\n if ((hasHDistance || hasVDistance) && !particle.misplaced) {\n particle.misplaced = (!!hDistance && dxFixed > hDistance) || (!!vDistance && dyFixed > vDistance);\n if (hDistance) {\n particle.velocity.x = particle.velocity.y * half - particle.velocity.x;\n }\n if (vDistance) {\n particle.velocity.y = particle.velocity.x * half - particle.velocity.y;\n }\n }\n else if ((!hDistance || dxFixed < hDistance) && (!vDistance || dyFixed < vDistance) && particle.misplaced) {\n particle.misplaced = false;\n }\n else if (particle.misplaced) {\n const pos = particle.position, vel = particle.velocity;\n if (hDistance &&\n ((pos.x < initialPosition.x && vel.x < minVelocity) || (pos.x > initialPosition.x && vel.x > minVelocity))) {\n vel.x *= -getRandom();\n }\n if (vDistance &&\n ((pos.y < initialPosition.y && vel.y < minVelocity) || (pos.y > initialPosition.y && vel.y > minVelocity))) {\n vel.y *= -getRandom();\n }\n }\n}\nexport function move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta) {\n applyPath(particle, delta);\n const gravityOptions = particle.gravity, gravityFactor = gravityOptions?.enable && gravityOptions.inverse ? -identity : identity;\n if (moveDrift && moveSpeed) {\n particle.velocity.x += (moveDrift * delta.factor) / (moveSpeedFactor * moveSpeed);\n }\n if (gravityOptions?.enable && moveSpeed) {\n particle.velocity.y +=\n (gravityFactor * (gravityOptions.acceleration * delta.factor)) / (moveSpeedFactor * moveSpeed);\n }\n const decay = particle.moveDecay;\n particle.velocity.multTo(decay);\n const velocity = particle.velocity.mult(moveSpeed);\n if (gravityOptions?.enable &&\n maxSpeed > minVelocity &&\n ((!gravityOptions.inverse && velocity.y >= minVelocity && velocity.y >= maxSpeed) ||\n (gravityOptions.inverse && velocity.y <= minVelocity && velocity.y <= -maxSpeed))) {\n velocity.y = gravityFactor * maxSpeed;\n if (moveSpeed) {\n particle.velocity.y = velocity.y / moveSpeed;\n }\n }\n const zIndexOptions = particle.options.zIndex, zVelocityFactor = (identity - particle.zIndexFactor) ** zIndexOptions.velocityRate;\n velocity.multTo(zVelocityFactor);\n const { position } = particle;\n position.addTo(velocity);\n if (moveOptions.vibrate) {\n position.x += Math.sin(position.x * Math.cos(position.y));\n position.y += Math.cos(position.y * Math.sin(position.x));\n }\n}\nexport function spin(particle, moveSpeed) {\n const container = particle.container;\n if (!particle.spin) {\n return;\n }\n const updateFunc = {\n x: particle.spin.direction === RotateDirection.clockwise ? Math.cos : Math.sin,\n y: particle.spin.direction === RotateDirection.clockwise ? Math.sin : Math.cos,\n };\n particle.position.x = particle.spin.center.x + particle.spin.radius * updateFunc.x(particle.spin.angle);\n particle.position.y = particle.spin.center.y + particle.spin.radius * updateFunc.y(particle.spin.angle);\n particle.spin.radius += particle.spin.acceleration;\n const maxCanvasSize = Math.max(container.canvas.size.width, container.canvas.size.height), halfMaxSize = maxCanvasSize * half;\n if (particle.spin.radius > halfMaxSize) {\n particle.spin.radius = halfMaxSize;\n particle.spin.acceleration *= -identity;\n }\n else if (particle.spin.radius < minSpinRadius) {\n particle.spin.radius = minSpinRadius;\n particle.spin.acceleration *= -identity;\n }\n particle.spin.angle += moveSpeed * spinFactor * (identity - particle.spin.radius / maxCanvasSize);\n}\nexport function applyPath(particle, delta) {\n const particlesOptions = particle.options, pathOptions = particlesOptions.move.path, pathEnabled = pathOptions.enable;\n if (!pathEnabled) {\n return;\n }\n if (particle.lastPathTime <= particle.pathDelay) {\n particle.lastPathTime += delta.value;\n return;\n }\n const path = particle.pathGenerator?.generate(particle, delta);\n if (path) {\n particle.velocity.addTo(path);\n }\n if (pathOptions.clamp) {\n particle.velocity.x = clamp(particle.velocity.x, -identity, identity);\n particle.velocity.y = clamp(particle.velocity.y, -identity, identity);\n }\n particle.lastPathTime -= particle.pathDelay;\n}\nexport function getProximitySpeedFactor(particle) {\n return particle.slow.inRange ? particle.slow.factor : identity;\n}\nexport function initSpin(particle) {\n const container = particle.container, options = particle.options, spinOptions = options.move.spin;\n if (!spinOptions.enable) {\n return;\n }\n const spinPos = spinOptions.position ?? { x: 50, y: 50 }, spinFactor = 0.01, spinCenter = {\n x: spinPos.x * spinFactor * container.canvas.size.width,\n y: spinPos.y * spinFactor * container.canvas.size.height,\n }, pos = particle.getPosition(), distance = getDistance(pos, spinCenter), spinAcceleration = getRangeValue(spinOptions.acceleration);\n particle.retina.spinAcceleration = spinAcceleration * container.retina.pixelRatio;\n const minVelocity = 0;\n particle.spin = {\n center: spinCenter,\n direction: particle.velocity.x >= minVelocity ? RotateDirection.clockwise : RotateDirection.counterClockwise,\n angle: particle.velocity.angle,\n radius: distance,\n acceleration: particle.retina.spinAcceleration,\n };\n}\n","import { getRangeMax, getRangeValue } from \"@tsparticles/engine\";\nimport { applyDistance, getProximitySpeedFactor, initSpin, move, spin } from \"./Utils.js\";\nconst diffFactor = 2, defaultSizeFactor = 1, defaultDeltaFactor = 1;\nexport class BaseMover {\n init(particle) {\n const options = particle.options, gravityOptions = options.move.gravity;\n particle.gravity = {\n enable: gravityOptions.enable,\n acceleration: getRangeValue(gravityOptions.acceleration),\n inverse: gravityOptions.inverse,\n };\n initSpin(particle);\n }\n isEnabled(particle) {\n return !particle.destroyed && particle.options.move.enable;\n }\n move(particle, delta) {\n const particleOptions = particle.options, moveOptions = particleOptions.move;\n if (!moveOptions.enable) {\n return;\n }\n const container = particle.container, pxRatio = container.retina.pixelRatio;\n particle.retina.moveSpeed ??= getRangeValue(moveOptions.speed) * pxRatio;\n particle.retina.moveDrift ??= getRangeValue(particle.options.move.drift) * pxRatio;\n const slowFactor = getProximitySpeedFactor(particle), baseSpeed = particle.retina.moveSpeed * container.retina.reduceFactor, moveDrift = particle.retina.moveDrift, maxSize = getRangeMax(particleOptions.size.value) * pxRatio, sizeFactor = moveOptions.size ? particle.getRadius() / maxSize : defaultSizeFactor, deltaFactor = delta.factor || defaultDeltaFactor, moveSpeed = (baseSpeed * sizeFactor * slowFactor * deltaFactor) / diffFactor, maxSpeed = particle.retina.maxSpeed ?? container.retina.maxSpeed;\n if (moveOptions.spin.enable) {\n spin(particle, moveSpeed);\n }\n else {\n move(particle, moveOptions, moveSpeed, maxSpeed, moveDrift, delta);\n }\n applyDistance(particle);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { BaseMover } from \"./BaseMover.js\";\nexport async function loadBaseMover(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addMover(\"base\", () => {\n return Promise.resolve(new BaseMover());\n }, refresh);\n}\n","const double = 2, doublePI = Math.PI * double, minAngle = 0, origin = { x: 0, y: 0 };\nexport function drawCircle(data) {\n const { context, particle, radius } = data;\n if (!particle.circleRange) {\n particle.circleRange = { min: minAngle, max: doublePI };\n }\n const circleRange = particle.circleRange;\n context.arc(origin.x, origin.y, radius, circleRange.min, circleRange.max, false);\n}\n","import { degToRad, isObject } from \"@tsparticles/engine\";\nimport { drawCircle } from \"./Utils.js\";\nconst sides = 12, maxAngle = 360, minAngle = 0;\nexport class CircleDrawer {\n constructor() {\n this.validTypes = [\"circle\"];\n }\n draw(data) {\n drawCircle(data);\n }\n getSidesCount() {\n return sides;\n }\n particleInit(container, particle) {\n const shapeData = particle.shapeData, angle = shapeData?.angle ?? {\n max: maxAngle,\n min: minAngle,\n };\n particle.circleRange = !isObject(angle)\n ? {\n min: minAngle,\n max: degToRad(angle),\n }\n : { min: degToRad(angle.min), max: degToRad(angle.max) };\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { CircleDrawer } from \"./CircleDrawer.js\";\nexport async function loadCircleShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new CircleDrawer(), refresh);\n}\n","import { getHslAnimationFromHsl, rangeColorToHsl, updateColor, } from \"@tsparticles/engine\";\nexport class ColorUpdater {\n constructor(container, engine) {\n this._container = container;\n this._engine = engine;\n }\n init(particle) {\n const hslColor = rangeColorToHsl(this._engine, particle.options.color, particle.id, particle.options.reduceDuplicates);\n if (hslColor) {\n particle.color = getHslAnimationFromHsl(hslColor, particle.options.color.animation, this._container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const { h: hAnimation, s: sAnimation, l: lAnimation } = particle.options.color.animation, { color } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n ((color?.h.value !== undefined && hAnimation.enable) ||\n (color?.s.value !== undefined && sAnimation.enable) ||\n (color?.l.value !== undefined && lAnimation.enable)));\n }\n update(particle, delta) {\n updateColor(particle.color, delta);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { ColorUpdater } from \"./ColorUpdater.js\";\nexport async function loadColorUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"color\", container => {\n return Promise.resolve(new ColorUpdater(container, engine));\n }, refresh);\n}\n","var RgbIndexes;\n(function (RgbIndexes) {\n RgbIndexes[RgbIndexes[\"r\"] = 1] = \"r\";\n RgbIndexes[RgbIndexes[\"g\"] = 2] = \"g\";\n RgbIndexes[RgbIndexes[\"b\"] = 3] = \"b\";\n RgbIndexes[RgbIndexes[\"a\"] = 4] = \"a\";\n})(RgbIndexes || (RgbIndexes = {}));\nconst shorthandHexRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])([a-f\\d])?$/i, hexRegex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})?$/i, hexRadix = 16, defaultAlpha = 1, alphaFactor = 0xff;\nexport class HexColorManager {\n constructor() {\n this.key = \"hex\";\n this.stringPrefix = \"#\";\n }\n handleColor(color) {\n return this._parseString(color.value);\n }\n handleRangeColor(color) {\n return this._parseString(color.value);\n }\n parseString(input) {\n return this._parseString(input);\n }\n _parseString(hexColor) {\n if (typeof hexColor !== \"string\") {\n return;\n }\n if (!hexColor?.startsWith(this.stringPrefix)) {\n return;\n }\n const hexFixed = hexColor.replace(shorthandHexRegex, (_, r, g, b, a) => {\n return r + r + g + g + b + b + (a !== undefined ? a + a : \"\");\n }), result = hexRegex.exec(hexFixed);\n return result\n ? {\n a: result[RgbIndexes.a] !== undefined\n ? parseInt(result[RgbIndexes.a], hexRadix) / alphaFactor\n : defaultAlpha,\n b: parseInt(result[RgbIndexes.b], hexRadix),\n g: parseInt(result[RgbIndexes.g], hexRadix),\n r: parseInt(result[RgbIndexes.r], hexRadix),\n }\n : undefined;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { HexColorManager } from \"./HexColorManager.js\";\nexport async function loadHexColorPlugin(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addColorManager(new HexColorManager(), refresh);\n}\n","import { getRangeValue, hslToRgb, hslaToRgba, parseAlpha, } from \"@tsparticles/engine\";\nvar HslIndexes;\n(function (HslIndexes) {\n HslIndexes[HslIndexes[\"h\"] = 1] = \"h\";\n HslIndexes[HslIndexes[\"s\"] = 2] = \"s\";\n HslIndexes[HslIndexes[\"l\"] = 3] = \"l\";\n HslIndexes[HslIndexes[\"a\"] = 5] = \"a\";\n})(HslIndexes || (HslIndexes = {}));\nexport class HslColorManager {\n constructor() {\n this.key = \"hsl\";\n this.stringPrefix = \"hsl\";\n }\n handleColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.s !== undefined && hslColor.l !== undefined) {\n return hslToRgb(hslColor);\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, hslColor = colorValue.hsl ?? color.value;\n if (hslColor.h !== undefined && hslColor.l !== undefined) {\n return hslToRgb({\n h: getRangeValue(hslColor.h),\n l: getRangeValue(hslColor.l),\n s: getRangeValue(hslColor.s),\n });\n }\n }\n parseString(input) {\n if (!input.startsWith(\"hsl\")) {\n return;\n }\n const regex = /hsla?\\(\\s*(\\d+)\\s*[\\s,]\\s*(\\d+)%\\s*[\\s,]\\s*(\\d+)%\\s*([\\s,]\\s*(0|1|0?\\.\\d+|(\\d{1,3})%)\\s*)?\\)/i, result = regex.exec(input), minLength = 4, defaultAlpha = 1, radix = 10;\n return result\n ? hslaToRgba({\n a: result.length > minLength ? parseAlpha(result[HslIndexes.a]) : defaultAlpha,\n h: parseInt(result[HslIndexes.h], radix),\n l: parseInt(result[HslIndexes.l], radix),\n s: parseInt(result[HslIndexes.s], radix),\n })\n : undefined;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { HslColorManager } from \"./HslColorManager.js\";\nexport async function loadHslColorPlugin(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addColorManager(new HslColorManager(), refresh);\n}\n","import { getRandom, getRangeValue, initParticleNumericAnimationValue, percentDenominator, updateAnimation, } from \"@tsparticles/engine\";\nexport class OpacityUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const opacityOptions = particle.options.opacity, pxRatio = 1;\n particle.opacity = initParticleNumericAnimationValue(opacityOptions, pxRatio);\n const opacityAnimation = opacityOptions.animation;\n if (opacityAnimation.enable) {\n particle.opacity.velocity =\n (getRangeValue(opacityAnimation.speed) / percentDenominator) * this.container.retina.reduceFactor;\n if (!opacityAnimation.sync) {\n particle.opacity.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n const none = 0;\n return (!particle.destroyed &&\n !particle.spawning &&\n !!particle.opacity &&\n particle.opacity.enable &&\n ((particle.opacity.maxLoops ?? none) <= none ||\n ((particle.opacity.maxLoops ?? none) > none &&\n (particle.opacity.loops ?? none) < (particle.opacity.maxLoops ?? none))));\n }\n reset(particle) {\n if (particle.opacity) {\n particle.opacity.time = 0;\n particle.opacity.loops = 0;\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.opacity) {\n return;\n }\n updateAnimation(particle, particle.opacity, true, particle.options.opacity.animation.destroy, delta);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { OpacityUpdater } from \"./OpacityUpdater.js\";\nexport async function loadOpacityUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"opacity\", container => {\n return Promise.resolve(new OpacityUpdater(container));\n }, refresh);\n}\n","import { OutMode, OutModeDirection, getRangeValue } from \"@tsparticles/engine\";\nconst minVelocity = 0, boundsMin = 0;\nexport function bounceHorizontal(data) {\n if ((data.outMode !== OutMode.bounce && data.outMode !== OutMode.split) ||\n (data.direction !== OutModeDirection.left && data.direction !== OutModeDirection.right)) {\n return;\n }\n if (data.bounds.right < boundsMin && data.direction === OutModeDirection.left) {\n data.particle.position.x = data.size + data.offset.x;\n }\n else if (data.bounds.left > data.canvasSize.width && data.direction === OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - data.size - data.offset.x;\n }\n const velocity = data.particle.velocity.x;\n let bounced = false;\n if ((data.direction === OutModeDirection.right &&\n data.bounds.right >= data.canvasSize.width &&\n velocity > minVelocity) ||\n (data.direction === OutModeDirection.left && data.bounds.left <= boundsMin && velocity < minVelocity)) {\n const newVelocity = getRangeValue(data.particle.options.bounce.horizontal.value);\n data.particle.velocity.x *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.x + data.size;\n if (data.bounds.right >= data.canvasSize.width && data.direction === OutModeDirection.right) {\n data.particle.position.x = data.canvasSize.width - minPos;\n }\n else if (data.bounds.left <= boundsMin && data.direction === OutModeDirection.left) {\n data.particle.position.x = minPos;\n }\n if (data.outMode === OutMode.split) {\n data.particle.destroy();\n }\n}\nexport function bounceVertical(data) {\n if ((data.outMode !== OutMode.bounce && data.outMode !== OutMode.split) ||\n (data.direction !== OutModeDirection.bottom && data.direction !== OutModeDirection.top)) {\n return;\n }\n if (data.bounds.bottom < boundsMin && data.direction === OutModeDirection.top) {\n data.particle.position.y = data.size + data.offset.y;\n }\n else if (data.bounds.top > data.canvasSize.height && data.direction === OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - data.size - data.offset.y;\n }\n const velocity = data.particle.velocity.y;\n let bounced = false;\n if ((data.direction === OutModeDirection.bottom &&\n data.bounds.bottom >= data.canvasSize.height &&\n velocity > minVelocity) ||\n (data.direction === OutModeDirection.top && data.bounds.top <= boundsMin && velocity < minVelocity)) {\n const newVelocity = getRangeValue(data.particle.options.bounce.vertical.value);\n data.particle.velocity.y *= -newVelocity;\n bounced = true;\n }\n if (!bounced) {\n return;\n }\n const minPos = data.offset.y + data.size;\n if (data.bounds.bottom >= data.canvasSize.height && data.direction === OutModeDirection.bottom) {\n data.particle.position.y = data.canvasSize.height - minPos;\n }\n else if (data.bounds.top <= boundsMin && data.direction === OutModeDirection.top) {\n data.particle.position.y = minPos;\n }\n if (data.outMode === OutMode.split) {\n data.particle.destroy();\n }\n}\n","import { OutMode, calculateBounds, } from \"@tsparticles/engine\";\nimport { bounceHorizontal, bounceVertical } from \"./Utils.js\";\nexport class BounceOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [\n OutMode.bounce,\n OutMode.split,\n ];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n let handled = false;\n for (const plugin of container.plugins.values()) {\n if (plugin.particleBounce !== undefined) {\n handled = plugin.particleBounce(particle, delta, direction);\n }\n if (handled) {\n break;\n }\n }\n if (handled) {\n return;\n }\n const pos = particle.getPosition(), offset = particle.offset, size = particle.getRadius(), bounds = calculateBounds(pos, size), canvasSize = container.canvas.size;\n bounceHorizontal({ particle, outMode, direction, bounds, canvasSize, offset, size });\n bounceVertical({ particle, outMode, direction, bounds, canvasSize, offset, size });\n }\n}\n","import { OutMode, ParticleOutType, Vector, getDistances, isPointInside, } from \"@tsparticles/engine\";\nconst minVelocity = 0;\nexport class DestroyOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [OutMode.destroy];\n }\n update(particle, direction, _delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case ParticleOutType.normal:\n case ParticleOutType.outside:\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n break;\n case ParticleOutType.inside: {\n const { dx, dy } = getDistances(particle.position, particle.moveCenter), { x: vx, y: vy } = particle.velocity;\n if ((vx < minVelocity && dx > particle.moveCenter.radius) ||\n (vy < minVelocity && dy > particle.moveCenter.radius) ||\n (vx >= minVelocity && dx < -particle.moveCenter.radius) ||\n (vy >= minVelocity && dy < -particle.moveCenter.radius)) {\n return;\n }\n break;\n }\n }\n container.particles.remove(particle, particle.group, true);\n }\n}\n","import { OutMode, OutModeDirection, Vector, isPointInside, } from \"@tsparticles/engine\";\nconst minVelocity = 0;\nexport class NoneOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [OutMode.none];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n if ((particle.options.move.distance.horizontal &&\n (direction === OutModeDirection.left || direction === OutModeDirection.right)) ??\n (particle.options.move.distance.vertical &&\n (direction === OutModeDirection.top || direction === OutModeDirection.bottom))) {\n return;\n }\n const gravityOptions = particle.options.move.gravity, container = this.container, canvasSize = container.canvas.size, pRadius = particle.getRadius();\n if (!gravityOptions.enable) {\n if ((particle.velocity.y > minVelocity && particle.position.y <= canvasSize.height + pRadius) ||\n (particle.velocity.y < minVelocity && particle.position.y >= -pRadius) ||\n (particle.velocity.x > minVelocity && particle.position.x <= canvasSize.width + pRadius) ||\n (particle.velocity.x < minVelocity && particle.position.x >= -pRadius)) {\n return;\n }\n if (!isPointInside(particle.position, container.canvas.size, Vector.origin, pRadius, direction)) {\n container.particles.remove(particle);\n }\n }\n else {\n const position = particle.position;\n if ((!gravityOptions.inverse &&\n position.y > canvasSize.height + pRadius &&\n direction === OutModeDirection.bottom) ||\n (gravityOptions.inverse && position.y < -pRadius && direction === OutModeDirection.top)) {\n container.particles.remove(particle);\n }\n }\n }\n}\n","import { OutMode, OutModeDirection, ParticleOutType, Vector, calculateBounds, getDistances, getRandom, isPointInside, randomInRange, } from \"@tsparticles/engine\";\nconst minVelocity = 0, minDistance = 0;\nexport class OutOutMode {\n constructor(container) {\n this.container = container;\n this.modes = [OutMode.out];\n }\n update(particle, direction, delta, outMode) {\n if (!this.modes.includes(outMode)) {\n return;\n }\n const container = this.container;\n switch (particle.outType) {\n case ParticleOutType.inside: {\n const { x: vx, y: vy } = particle.velocity;\n const circVec = Vector.origin;\n circVec.length = particle.moveCenter.radius;\n circVec.angle = particle.velocity.angle + Math.PI;\n circVec.addTo(Vector.create(particle.moveCenter));\n const { dx, dy } = getDistances(particle.position, circVec);\n if ((vx <= minVelocity && dx >= minDistance) ||\n (vy <= minVelocity && dy >= minDistance) ||\n (vx >= minVelocity && dx <= minDistance) ||\n (vy >= minVelocity && dy <= minDistance)) {\n return;\n }\n particle.position.x = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.width,\n }));\n particle.position.y = Math.floor(randomInRange({\n min: 0,\n max: container.canvas.size.height,\n }));\n const { dx: newDx, dy: newDy } = getDistances(particle.position, particle.moveCenter);\n particle.direction = Math.atan2(-newDy, -newDx);\n particle.velocity.angle = particle.direction;\n break;\n }\n default: {\n if (isPointInside(particle.position, container.canvas.size, Vector.origin, particle.getRadius(), direction)) {\n return;\n }\n switch (particle.outType) {\n case ParticleOutType.outside: {\n particle.position.x =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.x;\n particle.position.y =\n Math.floor(randomInRange({\n min: -particle.moveCenter.radius,\n max: particle.moveCenter.radius,\n })) + particle.moveCenter.y;\n const { dx, dy } = getDistances(particle.position, particle.moveCenter);\n if (particle.moveCenter.radius) {\n particle.direction = Math.atan2(dy, dx);\n particle.velocity.angle = particle.direction;\n }\n break;\n }\n case ParticleOutType.normal: {\n const warp = particle.options.move.warp, canvasSize = container.canvas.size, newPos = {\n bottom: canvasSize.height + particle.getRadius() + particle.offset.y,\n left: -particle.getRadius() - particle.offset.x,\n right: canvasSize.width + particle.getRadius() + particle.offset.x,\n top: -particle.getRadius() - particle.offset.y,\n }, sizeValue = particle.getRadius(), nextBounds = calculateBounds(particle.position, sizeValue);\n if (direction === OutModeDirection.right &&\n nextBounds.left > canvasSize.width + particle.offset.x) {\n particle.position.x = newPos.left;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n else if (direction === OutModeDirection.left && nextBounds.right < -particle.offset.x) {\n particle.position.x = newPos.right;\n particle.initialPosition.x = particle.position.x;\n if (!warp) {\n particle.position.y = getRandom() * canvasSize.height;\n particle.initialPosition.y = particle.position.y;\n }\n }\n if (direction === OutModeDirection.bottom &&\n nextBounds.top > canvasSize.height + particle.offset.y) {\n if (!warp) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.top;\n particle.initialPosition.y = particle.position.y;\n }\n else if (direction === OutModeDirection.top && nextBounds.bottom < -particle.offset.y) {\n if (!warp) {\n particle.position.x = getRandom() * canvasSize.width;\n particle.initialPosition.x = particle.position.x;\n }\n particle.position.y = newPos.bottom;\n particle.initialPosition.y = particle.position.y;\n }\n break;\n }\n }\n break;\n }\n }\n }\n}\n","import { OutMode, OutModeDirection, } from \"@tsparticles/engine\";\nimport { BounceOutMode } from \"./BounceOutMode.js\";\nimport { DestroyOutMode } from \"./DestroyOutMode.js\";\nimport { NoneOutMode } from \"./NoneOutMode.js\";\nimport { OutOutMode } from \"./OutOutMode.js\";\nconst checkOutMode = (outModes, outMode) => {\n return (outModes.default === outMode ||\n outModes.bottom === outMode ||\n outModes.left === outMode ||\n outModes.right === outMode ||\n outModes.top === outMode);\n};\nexport class OutOfCanvasUpdater {\n constructor(container) {\n this._addUpdaterIfMissing = (particle, outMode, getUpdater) => {\n const outModes = particle.options.move.outModes;\n if (!this.updaters.has(outMode) && checkOutMode(outModes, outMode)) {\n this.updaters.set(outMode, getUpdater(this.container));\n }\n };\n this._updateOutMode = (particle, delta, outMode, direction) => {\n for (const updater of this.updaters.values()) {\n updater.update(particle, direction, delta, outMode);\n }\n };\n this.container = container;\n this.updaters = new Map();\n }\n init(particle) {\n this._addUpdaterIfMissing(particle, OutMode.bounce, container => new BounceOutMode(container));\n this._addUpdaterIfMissing(particle, OutMode.out, container => new OutOutMode(container));\n this._addUpdaterIfMissing(particle, OutMode.destroy, container => new DestroyOutMode(container));\n this._addUpdaterIfMissing(particle, OutMode.none, container => new NoneOutMode(container));\n }\n isEnabled(particle) {\n return !particle.destroyed && !particle.spawning;\n }\n update(particle, delta) {\n const outModes = particle.options.move.outModes;\n this._updateOutMode(particle, delta, outModes.bottom ?? outModes.default, OutModeDirection.bottom);\n this._updateOutMode(particle, delta, outModes.left ?? outModes.default, OutModeDirection.left);\n this._updateOutMode(particle, delta, outModes.right ?? outModes.default, OutModeDirection.right);\n this._updateOutMode(particle, delta, outModes.top ?? outModes.default, OutModeDirection.top);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { OutOfCanvasUpdater } from \"./OutOfCanvasUpdater.js\";\nexport async function loadOutModesUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"outModes\", container => {\n return Promise.resolve(new OutOfCanvasUpdater(container));\n }, refresh);\n}\n","import { getRangeValue, parseAlpha, } from \"@tsparticles/engine\";\nvar RgbIndexes;\n(function (RgbIndexes) {\n RgbIndexes[RgbIndexes[\"r\"] = 1] = \"r\";\n RgbIndexes[RgbIndexes[\"g\"] = 2] = \"g\";\n RgbIndexes[RgbIndexes[\"b\"] = 3] = \"b\";\n RgbIndexes[RgbIndexes[\"a\"] = 5] = \"a\";\n})(RgbIndexes || (RgbIndexes = {}));\nexport class RgbColorManager {\n constructor() {\n this.key = \"rgb\";\n this.stringPrefix = \"rgb\";\n }\n handleColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return rgbColor;\n }\n }\n handleRangeColor(color) {\n const colorValue = color.value, rgbColor = colorValue.rgb ?? color.value;\n if (rgbColor.r !== undefined) {\n return {\n r: getRangeValue(rgbColor.r),\n g: getRangeValue(rgbColor.g),\n b: getRangeValue(rgbColor.b),\n };\n }\n }\n parseString(input) {\n if (!input.startsWith(this.stringPrefix)) {\n return;\n }\n const regex = /rgba?\\(\\s*(\\d{1,3})\\s*[\\s,]\\s*(\\d{1,3})\\s*[\\s,]\\s*(\\d{1,3})\\s*([\\s,]\\s*(0|1|0?\\.\\d+|(\\d{1,3})%)\\s*)?\\)/i, result = regex.exec(input), radix = 10, minLength = 4, defaultAlpha = 1;\n return result\n ? {\n a: result.length > minLength ? parseAlpha(result[RgbIndexes.a]) : defaultAlpha,\n b: parseInt(result[RgbIndexes.b], radix),\n g: parseInt(result[RgbIndexes.g], radix),\n r: parseInt(result[RgbIndexes.r], radix),\n }\n : undefined;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { RgbColorManager } from \"./RgbColorManager.js\";\nexport async function loadRgbColorPlugin(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addColorManager(new RgbColorManager(), refresh);\n}\n","import { getRandom, percentDenominator, updateAnimation, } from \"@tsparticles/engine\";\nconst minLoops = 0;\nexport class SizeUpdater {\n init(particle) {\n const container = particle.container, sizeOptions = particle.options.size, sizeAnimation = sizeOptions.animation;\n if (sizeAnimation.enable) {\n particle.size.velocity =\n ((particle.retina.sizeAnimationSpeed ?? container.retina.sizeAnimationSpeed) / percentDenominator) *\n container.retina.reduceFactor;\n if (!sizeAnimation.sync) {\n particle.size.velocity *= getRandom();\n }\n }\n }\n isEnabled(particle) {\n return (!particle.destroyed &&\n !particle.spawning &&\n particle.size.enable &&\n ((particle.size.maxLoops ?? minLoops) <= minLoops ||\n ((particle.size.maxLoops ?? minLoops) > minLoops &&\n (particle.size.loops ?? minLoops) < (particle.size.maxLoops ?? minLoops))));\n }\n reset(particle) {\n particle.size.loops = minLoops;\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateAnimation(particle, particle.size, true, particle.options.size.animation.destroy, delta);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { SizeUpdater } from \"./SizeUpdater.js\";\nexport async function loadSizeUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"size\", () => {\n return Promise.resolve(new SizeUpdater());\n }, refresh);\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { loadBaseMover } from \"@tsparticles/move-base\";\nimport { loadCircleShape } from \"@tsparticles/shape-circle\";\nimport { loadColorUpdater } from \"@tsparticles/updater-color\";\nimport { loadHexColorPlugin } from \"@tsparticles/plugin-hex-color\";\nimport { loadHslColorPlugin } from \"@tsparticles/plugin-hsl-color\";\nimport { loadOpacityUpdater } from \"@tsparticles/updater-opacity\";\nimport { loadOutModesUpdater } from \"@tsparticles/updater-out-modes\";\nimport { loadRgbColorPlugin } from \"@tsparticles/plugin-rgb-color\";\nimport { loadSizeUpdater } from \"@tsparticles/updater-size\";\nexport async function loadBasic(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await loadHexColorPlugin(engine, false);\n await loadHslColorPlugin(engine, false);\n await loadRgbColorPlugin(engine, false);\n await loadBaseMover(engine, false);\n await loadCircleShape(engine, false);\n await loadColorUpdater(engine, false);\n await loadOpacityUpdater(engine, false);\n await loadOutModesUpdater(engine, false);\n await loadSizeUpdater(engine, false);\n await engine.refresh(refresh);\n}\n","import { EasingType, assertValidVersion } from \"@tsparticles/engine\";\nexport async function loadEasingQuadPlugin(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addEasing(EasingType.easeInQuad, value => value ** 2, false);\n await engine.addEasing(EasingType.easeOutQuad, value => 1 - (1 - value) ** 2, false);\n await engine.addEasing(EasingType.easeInOutQuad, value => (value < 0.5 ? 2 * value ** 2 : 1 - (-2 * value + 2) ** 2 / 2), false);\n await engine.refresh(refresh);\n}\n","export function drawEmoji(data, image) {\n const { context, opacity } = data, half = 0.5, previousAlpha = context.globalAlpha;\n if (!image) {\n return;\n }\n const diameter = image.width, radius = diameter * half;\n context.globalAlpha = opacity;\n context.drawImage(image, -radius, -radius, diameter, diameter);\n context.globalAlpha = previousAlpha;\n}\n","import { executeOnSingleOrMultiple, getRangeMax, isInArray, itemFromSingleOrMultiple, loadFont, } from \"@tsparticles/engine\";\nimport { drawEmoji } from \"./Utils.js\";\nconst defaultFont = '\"Twemoji Mozilla\", Apple Color Emoji, \"Segoe UI Emoji\", \"Noto Color Emoji\", \"EmojiOne Color\"', noPadding = 0;\nexport class EmojiDrawer {\n constructor() {\n this.validTypes = [\"emoji\"];\n this._emojiShapeDict = new Map();\n }\n destroy() {\n for (const [key, data] of this._emojiShapeDict) {\n if (data instanceof ImageBitmap) {\n data?.close();\n }\n this._emojiShapeDict.delete(key);\n }\n }\n draw(data) {\n const key = data.particle.emojiDataKey;\n if (!key) {\n return;\n }\n const image = this._emojiShapeDict.get(key);\n if (!image) {\n return;\n }\n drawEmoji(data, image);\n }\n async init(container) {\n const options = container.actualOptions, { validTypes } = this;\n if (!validTypes.find(t => isInArray(t, options.particles.shape.type))) {\n return;\n }\n const promises = [loadFont(defaultFont)], shapeOptions = validTypes\n .map(t => options.particles.shape.options[t])\n .find(t => !!t);\n if (shapeOptions) {\n executeOnSingleOrMultiple(shapeOptions, shape => {\n if (shape.font) {\n promises.push(loadFont(shape.font));\n }\n });\n }\n await Promise.all(promises);\n }\n particleDestroy(particle) {\n particle.emojiDataKey = undefined;\n }\n particleInit(_container, particle) {\n const double = 2, shapeData = particle.shapeData;\n if (!shapeData?.value) {\n return;\n }\n const emoji = itemFromSingleOrMultiple(shapeData.value, particle.randomIndexData);\n if (!emoji) {\n return;\n }\n const emojiOptions = typeof emoji === \"string\"\n ? {\n font: shapeData.font ?? defaultFont,\n padding: shapeData.padding ?? noPadding,\n value: emoji,\n }\n : {\n font: defaultFont,\n padding: noPadding,\n ...shapeData,\n ...emoji,\n }, font = emojiOptions.font, value = emojiOptions.value;\n const key = `${value}_${font}`;\n if (this._emojiShapeDict.has(key)) {\n particle.emojiDataKey = key;\n return;\n }\n const padding = emojiOptions.padding * double, maxSize = getRangeMax(particle.size.value), fullSize = maxSize + padding, canvasSize = fullSize * double;\n let image;\n if (typeof OffscreenCanvas !== \"undefined\") {\n const canvas = new OffscreenCanvas(canvasSize, canvasSize), context = canvas.getContext(\"2d\");\n if (!context) {\n return;\n }\n context.font = `400 ${maxSize * double}px ${font}`;\n context.textBaseline = \"middle\";\n context.textAlign = \"center\";\n context.fillText(value, fullSize, fullSize);\n image = canvas.transferToImageBitmap();\n }\n else {\n const canvas = document.createElement(\"canvas\");\n canvas.width = canvasSize;\n canvas.height = canvasSize;\n const context = canvas.getContext(\"2d\");\n if (!context) {\n return;\n }\n context.font = `400 ${maxSize * double}px ${font}`;\n context.textBaseline = \"middle\";\n context.textAlign = \"center\";\n context.fillText(value, fullSize, fullSize);\n image = canvas;\n }\n this._emojiShapeDict.set(key, image);\n particle.emojiDataKey = key;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { EmojiDrawer } from \"./EmojiDrawer.js\";\nexport async function loadEmojiShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new EmojiDrawer(), refresh);\n}\n","import { Circle, Vector, clamp, getDistances, } from \"@tsparticles/engine\";\nconst minFactor = 1, identity = 1, minRadius = 0;\nfunction processAttract(engine, container, position, attractRadius, area, queryCb) {\n const attractOptions = container.actualOptions.interactivity.modes.attract;\n if (!attractOptions) {\n return;\n }\n const query = container.particles.quadTree.query(area, queryCb);\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position), velocity = attractOptions.speed * attractOptions.factor, attractFactor = clamp(engine.getEasing(attractOptions.easing)(identity - distance / attractRadius) * velocity, minFactor, attractOptions.maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * attractFactor, !distance ? velocity : (dy / distance) * attractFactor);\n particle.position.subFrom(normVec);\n }\n}\nexport function clickAttract(engine, container, enabledCb) {\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n const { attract } = container;\n if (!attract.finish) {\n if (!attract.count) {\n attract.count = 0;\n }\n attract.count++;\n if (attract.count === container.particles.count) {\n attract.finish = true;\n }\n }\n if (attract.clicking) {\n const mousePos = container.interactivity.mouse.clickPosition, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(engine, container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));\n }\n else if (attract.clicking === false) {\n attract.particles = [];\n }\n}\nexport function hoverAttract(engine, container, enabledCb) {\n const mousePos = container.interactivity.mouse.position, attractRadius = container.retina.attractModeDistance;\n if (!attractRadius || attractRadius < minRadius || !mousePos) {\n return;\n }\n processAttract(engine, container, mousePos, attractRadius, new Circle(mousePos.x, mousePos.y, attractRadius), (p) => enabledCb(p));\n}\n","import { EasingType, isNull } from \"@tsparticles/engine\";\nexport class Attract {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.easing = EasingType.easeOutQuad;\n this.factor = 1;\n this.maxSpeed = 50;\n this.speed = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n }\n}\n","import { ExternalInteractorBase, isInArray, millisecondsToSeconds, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { clickAttract, hoverAttract } from \"./Utils.js\";\nimport { Attract } from \"./Options/Classes/Attract.js\";\nconst attractMode = \"attract\";\nexport class Attractor extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._engine = engine;\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, attract = options.interactivity.modes.attract;\n if (!attract || mode !== attractMode) {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = true;\n container.attract.count = 0;\n for (const particle of container.attract.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n container.attract.particles = [];\n container.attract.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n if (!container.attract) {\n container.attract = { particles: [] };\n }\n container.attract.clicking = false;\n }, attract.duration * millisecondsToSeconds);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, attract = container.actualOptions.interactivity.modes.attract;\n if (!attract) {\n return;\n }\n container.retina.attractModeDistance = attract.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, { enable: hoverEnabled, mode: hoverMode } = events.onHover, { enable: clickEnabled, mode: clickMode } = events.onClick;\n if (mouseMoveStatus && hoverEnabled && isInArray(attractMode, hoverMode)) {\n hoverAttract(this._engine, this.container, p => this.isEnabled(p));\n }\n else if (clickEnabled && isInArray(attractMode, clickMode)) {\n clickAttract(this._engine, this.container, p => this.isEnabled(p));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events;\n if ((!mouse.position || !events.onHover.enable) && (!mouse.clickPosition || !events.onClick.enable)) {\n return false;\n }\n const hoverMode = events.onHover.mode, clickMode = events.onClick.mode;\n return isInArray(attractMode, hoverMode) || isInArray(attractMode, clickMode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.attract) {\n options.attract = new Attract();\n }\n for (const source of sources) {\n options.attract.load(source?.attract);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Attractor } from \"./Attractor.js\";\nexport async function loadExternalAttractInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalAttract\", container => {\n return Promise.resolve(new Attractor(engine, container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Attract.js\";\nexport * from \"./Options/Interfaces/IAttract.js\";\n","import { Circle, DivType, Rectangle, Vector, calculateBounds, circleBounce, circleBounceDataFromParticle, divModeExecute, rectBounce, } from \"@tsparticles/engine\";\nconst squareExp = 2, half = 0.5, halfPI = Math.PI * half, double = 2, toleranceFactor = 10, minRadius = 0;\nfunction processBounce(container, position, radius, area, enabledCb) {\n const query = container.particles.quadTree.query(area, enabledCb);\n for (const particle of query) {\n if (area instanceof Circle) {\n circleBounce(circleBounceDataFromParticle(particle), {\n position,\n radius,\n mass: radius ** squareExp * halfPI,\n velocity: Vector.origin,\n factor: Vector.origin,\n });\n }\n else if (area instanceof Rectangle) {\n rectBounce(particle, calculateBounds(position, radius));\n }\n }\n}\nfunction singleSelectorBounce(container, selector, div, bounceCb) {\n const query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach(item => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, radius = elem.offsetWidth * half * pxRatio, tolerance = toleranceFactor * pxRatio, area = div.type === DivType.circle\n ? new Circle(pos.x, pos.y, radius + tolerance)\n : new Rectangle(elem.offsetLeft * pxRatio - tolerance, elem.offsetTop * pxRatio - tolerance, elem.offsetWidth * pxRatio + tolerance * double, elem.offsetHeight * pxRatio + tolerance * double);\n bounceCb(pos, radius, area);\n });\n}\nexport function divBounce(container, divs, bounceMode, enabledCb) {\n divModeExecute(bounceMode, divs, (selector, div) => singleSelectorBounce(container, selector, div, (pos, radius, area) => processBounce(container, pos, radius, area, enabledCb)));\n}\nexport function mouseBounce(container, enabledCb) {\n const pxRatio = container.retina.pixelRatio, tolerance = toleranceFactor * pxRatio, mousePos = container.interactivity.mouse.position, radius = container.retina.bounceModeDistance;\n if (!radius || radius < minRadius || !mousePos) {\n return;\n }\n processBounce(container, mousePos, radius, new Circle(mousePos.x, mousePos.y, radius + tolerance), enabledCb);\n}\n","import { isNull } from \"@tsparticles/engine\";\nexport class Bounce {\n constructor() {\n this.distance = 200;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n }\n}\n","import { ExternalInteractorBase, isDivModeEnabled, isInArray, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { divBounce, mouseBounce } from \"./Utils.js\";\nimport { Bounce } from \"./Options/Classes/Bounce.js\";\nconst bounceMode = \"bounce\";\nexport class Bouncer extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, bounce = container.actualOptions.interactivity.modes.bounce;\n if (!bounce) {\n return;\n }\n container.retina.bounceModeDistance = bounce.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, events = options.interactivity.events, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, hoverEnabled = events.onHover.enable, hoverMode = events.onHover.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(bounceMode, hoverMode)) {\n mouseBounce(this.container, p => this.isEnabled(p));\n }\n else {\n divBounce(this.container, divs, bounceMode, p => this.isEnabled(p));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv;\n return ((!!mouse.position && events.onHover.enable && isInArray(bounceMode, events.onHover.mode)) ||\n isDivModeEnabled(bounceMode, divs));\n }\n loadModeOptions(options, ...sources) {\n if (!options.bounce) {\n options.bounce = new Bounce();\n }\n for (const source of sources) {\n options.bounce.load(source?.bounce);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Bouncer } from \"./Bouncer.js\";\nexport async function loadExternalBounceInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalBounce\", container => {\n return Promise.resolve(new Bouncer(container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Bounce.js\";\nexport * from \"./Options/Interfaces/IBounce.js\";\n","import { OptionsColor, executeOnSingleOrMultiple, isArray, isNull, } from \"@tsparticles/engine\";\nexport class BubbleBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.mix = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.mix !== undefined) {\n this.mix = data.mix;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n if (data.color !== undefined) {\n const sourceColor = isArray(this.color) ? undefined : this.color;\n this.color = executeOnSingleOrMultiple(data.color, color => {\n return OptionsColor.create(sourceColor, color);\n });\n }\n if (data.size !== undefined) {\n this.size = data.size;\n }\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nimport { BubbleBase } from \"./BubbleBase.js\";\nexport class BubbleDiv extends BubbleBase {\n constructor() {\n super();\n this.selectors = [];\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, isNull, } from \"@tsparticles/engine\";\nimport { BubbleBase } from \"./BubbleBase.js\";\nimport { BubbleDiv } from \"./BubbleDiv.js\";\nexport class Bubble extends BubbleBase {\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, div => {\n const tmp = new BubbleDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","export var ProcessBubbleType;\n(function (ProcessBubbleType) {\n ProcessBubbleType[\"color\"] = \"color\";\n ProcessBubbleType[\"opacity\"] = \"opacity\";\n ProcessBubbleType[\"size\"] = \"size\";\n})(ProcessBubbleType || (ProcessBubbleType = {}));\n","import { clamp } from \"@tsparticles/engine\";\nexport function calculateBubbleValue(particleValue, modeValue, optionsValue, ratio) {\n if (modeValue >= optionsValue) {\n const value = particleValue + (modeValue - optionsValue) * ratio;\n return clamp(value, particleValue, modeValue);\n }\n else if (modeValue < optionsValue) {\n const value = particleValue - (optionsValue - modeValue) * ratio;\n return clamp(value, modeValue, particleValue);\n }\n}\n","import { Circle, DivType, ExternalInteractorBase, Rectangle, colorMix, divMode, divModeExecute, getDistance, getRangeMax, isDivModeEnabled, isInArray, itemFromSingleOrMultiple, millisecondsToSeconds, mouseLeaveEvent, mouseMoveEvent, rangeColorToHsl, rgbToHsl, } from \"@tsparticles/engine\";\nimport { Bubble } from \"./Options/Classes/Bubble.js\";\nimport { ProcessBubbleType } from \"./Enums.js\";\nimport { calculateBubbleValue } from \"./Utils.js\";\nconst bubbleMode = \"bubble\", minDistance = 0, defaultClickTime = 0, double = 2, defaultOpacity = 1, ratioOffset = 1, defaultBubbleValue = 0, minRatio = 0, half = 0.5, defaultRatio = 1;\nexport class Bubbler extends ExternalInteractorBase {\n constructor(container, engine) {\n super(container);\n this._clickBubble = () => {\n const container = this.container, options = container.actualOptions, mouseClickPos = container.interactivity.mouse.clickPosition, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || !mouseClickPos) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n const distance = container.retina.bubbleModeDistance;\n if (!distance || distance < minDistance) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mouseClickPos, distance, p => this.isEnabled(p)), { bubble } = container;\n for (const particle of query) {\n if (!bubble.clicking) {\n continue;\n }\n particle.bubble.inRange = !bubble.durationEnd;\n const pos = particle.getPosition(), distMouse = getDistance(pos, mouseClickPos), timeSpent = (new Date().getTime() - (container.interactivity.mouse.clickTime ?? defaultClickTime)) /\n millisecondsToSeconds;\n if (timeSpent > bubbleOptions.duration) {\n bubble.durationEnd = true;\n }\n if (timeSpent > bubbleOptions.duration * double) {\n bubble.clicking = false;\n bubble.durationEnd = false;\n }\n const sizeData = {\n bubbleObj: {\n optValue: container.retina.bubbleModeSize,\n value: particle.bubble.radius,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.size.value) * container.retina.pixelRatio,\n value: particle.size.value,\n },\n type: ProcessBubbleType.size,\n };\n this._process(particle, distMouse, timeSpent, sizeData);\n const opacityData = {\n bubbleObj: {\n optValue: bubbleOptions.opacity,\n value: particle.bubble.opacity,\n },\n particlesObj: {\n optValue: getRangeMax(particle.options.opacity.value),\n value: particle.opacity?.value ?? defaultOpacity,\n },\n type: ProcessBubbleType.opacity,\n };\n this._process(particle, distMouse, timeSpent, opacityData);\n if (!bubble.durationEnd && distMouse <= distance) {\n this._hoverBubbleColor(particle, distMouse);\n }\n else {\n delete particle.bubble.color;\n }\n }\n };\n this._hoverBubble = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, distance = container.retina.bubbleModeDistance;\n if (!distance || distance < minDistance || !mousePos) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, p => this.isEnabled(p));\n for (const particle of query) {\n particle.bubble.inRange = true;\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos), ratio = ratioOffset - pointDistance / distance;\n if (pointDistance <= distance) {\n if (ratio >= minRatio && container.interactivity.status === mouseMoveEvent) {\n this._hoverBubbleSize(particle, ratio);\n this._hoverBubbleOpacity(particle, ratio);\n this._hoverBubbleColor(particle, ratio);\n }\n }\n else {\n this.reset(particle);\n }\n if (container.interactivity.status === mouseLeaveEvent) {\n this.reset(particle);\n }\n }\n };\n this._hoverBubbleColor = (particle, ratio, divBubble) => {\n const options = this.container.actualOptions, bubbleOptions = divBubble ?? options.interactivity.modes.bubble;\n if (!bubbleOptions) {\n return;\n }\n if (!particle.bubble.finalColor) {\n const modeColor = bubbleOptions.color;\n if (!modeColor) {\n return;\n }\n const bubbleColor = itemFromSingleOrMultiple(modeColor);\n particle.bubble.finalColor = rangeColorToHsl(this._engine, bubbleColor);\n }\n if (!particle.bubble.finalColor) {\n return;\n }\n if (bubbleOptions.mix) {\n particle.bubble.color = undefined;\n const pColor = particle.getFillColor();\n particle.bubble.color = pColor\n ? rgbToHsl(colorMix(pColor, particle.bubble.finalColor, ratioOffset - ratio, ratio))\n : particle.bubble.finalColor;\n }\n else {\n particle.bubble.color = particle.bubble.finalColor;\n }\n };\n this._hoverBubbleOpacity = (particle, ratio, divBubble) => {\n const container = this.container, options = container.actualOptions, modeOpacity = divBubble?.opacity ?? options.interactivity.modes.bubble?.opacity;\n if (!modeOpacity) {\n return;\n }\n const optOpacity = particle.options.opacity.value, pOpacity = particle.opacity?.value ?? defaultOpacity, opacity = calculateBubbleValue(pOpacity, modeOpacity, getRangeMax(optOpacity), ratio);\n if (opacity !== undefined) {\n particle.bubble.opacity = opacity;\n }\n };\n this._hoverBubbleSize = (particle, ratio, divBubble) => {\n const container = this.container, modeSize = divBubble?.size ? divBubble.size * container.retina.pixelRatio : container.retina.bubbleModeSize;\n if (modeSize === undefined) {\n return;\n }\n const optSize = getRangeMax(particle.options.size.value) * container.retina.pixelRatio, pSize = particle.size.value, size = calculateBubbleValue(pSize, modeSize, optSize, ratio);\n if (size !== undefined) {\n particle.bubble.radius = size;\n }\n };\n this._process = (particle, distMouse, timeSpent, data) => {\n const container = this.container, bubbleParam = data.bubbleObj.optValue, options = container.actualOptions, bubbleOptions = options.interactivity.modes.bubble;\n if (!bubbleOptions || bubbleParam === undefined) {\n return;\n }\n const bubbleDuration = bubbleOptions.duration, bubbleDistance = container.retina.bubbleModeDistance, particlesParam = data.particlesObj.optValue, pObjBubble = data.bubbleObj.value, pObj = data.particlesObj.value ?? defaultBubbleValue, type = data.type;\n if (!bubbleDistance || bubbleDistance < minDistance || bubbleParam === particlesParam) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n if (container.bubble.durationEnd) {\n if (pObjBubble) {\n if (type === ProcessBubbleType.size) {\n delete particle.bubble.radius;\n }\n if (type === ProcessBubbleType.opacity) {\n delete particle.bubble.opacity;\n }\n }\n }\n else {\n if (distMouse <= bubbleDistance) {\n const obj = pObjBubble ?? pObj;\n if (obj !== bubbleParam) {\n const value = pObj - (timeSpent * (pObj - bubbleParam)) / bubbleDuration;\n if (type === ProcessBubbleType.size) {\n particle.bubble.radius = value;\n }\n if (type === ProcessBubbleType.opacity) {\n particle.bubble.opacity = value;\n }\n }\n }\n else {\n if (type === ProcessBubbleType.size) {\n delete particle.bubble.radius;\n }\n if (type === ProcessBubbleType.opacity) {\n delete particle.bubble.opacity;\n }\n }\n }\n };\n this._singleSelectorHover = (delta, selector, div) => {\n const container = this.container, selectors = document.querySelectorAll(selector), bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble || !selectors.length) {\n return;\n }\n selectors.forEach(item => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === DivType.circle\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), query = container.particles.quadTree.query(area, p => this.isEnabled(p));\n for (const particle of query) {\n if (!area.contains(particle.getPosition())) {\n continue;\n }\n particle.bubble.inRange = true;\n const divs = bubble.divs, divBubble = divMode(divs, elem);\n if (!particle.bubble.div || particle.bubble.div !== elem) {\n this.clear(particle, delta, true);\n particle.bubble.div = elem;\n }\n this._hoverBubbleSize(particle, defaultRatio, divBubble);\n this._hoverBubbleOpacity(particle, defaultRatio, divBubble);\n this._hoverBubbleColor(particle, defaultRatio, divBubble);\n }\n });\n };\n this._engine = engine;\n if (!container.bubble) {\n container.bubble = {};\n }\n this.handleClickMode = (mode) => {\n if (mode !== bubbleMode) {\n return;\n }\n if (!container.bubble) {\n container.bubble = {};\n }\n container.bubble.clicking = true;\n };\n }\n clear(particle, delta, force) {\n if (particle.bubble.inRange && !force) {\n return;\n }\n delete particle.bubble.div;\n delete particle.bubble.opacity;\n delete particle.bubble.radius;\n delete particle.bubble.color;\n }\n init() {\n const container = this.container, bubble = container.actualOptions.interactivity.modes.bubble;\n if (!bubble) {\n return;\n }\n container.retina.bubbleModeDistance = bubble.distance * container.retina.pixelRatio;\n if (bubble.size !== undefined) {\n container.retina.bubbleModeSize = bubble.size * container.retina.pixelRatio;\n }\n }\n interact(delta) {\n const options = this.container.actualOptions, events = options.interactivity.events, onHover = events.onHover, onClick = events.onClick, hoverEnabled = onHover.enable, hoverMode = onHover.mode, clickEnabled = onClick.enable, clickMode = onClick.mode, divs = events.onDiv;\n if (hoverEnabled && isInArray(bubbleMode, hoverMode)) {\n this._hoverBubble();\n }\n else if (clickEnabled && isInArray(bubbleMode, clickMode)) {\n this._clickBubble();\n }\n else {\n divModeExecute(bubbleMode, divs, (selector, div) => this._singleSelectorHover(delta, selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, { onClick, onDiv, onHover } = events, divBubble = isDivModeEnabled(bubbleMode, onDiv);\n if (!(divBubble || (onHover.enable && !!mouse.position) || (onClick.enable && mouse.clickPosition))) {\n return false;\n }\n return isInArray(bubbleMode, onHover.mode) || isInArray(bubbleMode, onClick.mode) || divBubble;\n }\n loadModeOptions(options, ...sources) {\n if (!options.bubble) {\n options.bubble = new Bubble();\n }\n for (const source of sources) {\n options.bubble.load(source?.bubble);\n }\n }\n reset(particle) {\n particle.bubble.inRange = false;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Bubbler } from \"./Bubbler.js\";\nexport async function loadExternalBubbleInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalBubble\", container => {\n return Promise.resolve(new Bubbler(container, engine));\n }, refresh);\n}\nexport * from \"./Options/Classes/BubbleBase.js\";\nexport * from \"./Options/Classes/BubbleDiv.js\";\nexport * from \"./Options/Classes/Bubble.js\";\nexport * from \"./Options/Interfaces/IBubbleBase.js\";\nexport * from \"./Options/Interfaces/IBubbleDiv.js\";\nexport * from \"./Options/Interfaces/IBubble.js\";\n","import { isNull } from \"@tsparticles/engine\";\nexport class ConnectLinks {\n constructor() {\n this.opacity = 0.5;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nimport { ConnectLinks } from \"./ConnectLinks.js\";\nexport class Connect {\n constructor() {\n this.distance = 80;\n this.links = new ConnectLinks();\n this.radius = 60;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links);\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { clamp, colorMix, drawLine, getStyleFromHsl, getStyleFromRgb, } from \"@tsparticles/engine\";\nconst gradientMin = 0, gradientMax = 1, defaultLinksWidth = 0;\nexport function gradient(context, p1, p2, opacity) {\n const gradStop = Math.floor(p2.getRadius() / p1.getRadius()), color1 = p1.getFillColor(), color2 = p2.getFillColor();\n if (!color1 || !color2) {\n return;\n }\n const sourcePos = p1.getPosition(), destPos = p2.getPosition(), midRgb = colorMix(color1, color2, p1.getRadius(), p2.getRadius()), grad = context.createLinearGradient(sourcePos.x, sourcePos.y, destPos.x, destPos.y);\n grad.addColorStop(gradientMin, getStyleFromHsl(color1, opacity));\n grad.addColorStop(clamp(gradStop, gradientMin, gradientMax), getStyleFromRgb(midRgb, opacity));\n grad.addColorStop(gradientMax, getStyleFromHsl(color2, opacity));\n return grad;\n}\nexport function drawConnectLine(context, width, lineStyle, begin, end) {\n drawLine(context, begin, end);\n context.lineWidth = width;\n context.strokeStyle = lineStyle;\n context.stroke();\n}\nexport function lineStyle(container, ctx, p1, p2) {\n const options = container.actualOptions, connectOptions = options.interactivity.modes.connect;\n if (!connectOptions) {\n return;\n }\n return gradient(ctx, p1, p2, connectOptions.links.opacity);\n}\nexport function drawConnection(container, p1, p2) {\n container.canvas.draw(ctx => {\n const ls = lineStyle(container, ctx, p1, p2);\n if (!ls) {\n return;\n }\n const pos1 = p1.getPosition(), pos2 = p2.getPosition();\n drawConnectLine(ctx, p1.retina.linksWidth ?? defaultLinksWidth, ls, pos1, pos2);\n });\n}\n","import { ExternalInteractorBase, isInArray, } from \"@tsparticles/engine\";\nimport { Connect } from \"./Options/Classes/Connect.js\";\nimport { drawConnection } from \"./Utils.js\";\nconst connectMode = \"connect\", minDistance = 0;\nexport class Connector extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n const container = this.container, connect = container.actualOptions.interactivity.modes.connect;\n if (!connect) {\n return;\n }\n container.retina.connectModeDistance = connect.distance * container.retina.pixelRatio;\n container.retina.connectModeRadius = connect.radius * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions;\n if (options.interactivity.events.onHover.enable && container.interactivity.status === \"pointermove\") {\n const mousePos = container.interactivity.mouse.position, { connectModeDistance, connectModeRadius } = container.retina;\n if (!connectModeDistance ||\n connectModeDistance < minDistance ||\n !connectModeRadius ||\n connectModeRadius < minDistance ||\n !mousePos) {\n return;\n }\n const distance = Math.abs(connectModeRadius), query = container.particles.quadTree.queryCircle(mousePos, distance, p => this.isEnabled(p));\n query.forEach((p1, i) => {\n const pos1 = p1.getPosition(), indexOffset = 1;\n for (const p2 of query.slice(i + indexOffset)) {\n const pos2 = p2.getPosition(), distMax = Math.abs(connectModeDistance), xDiff = Math.abs(pos1.x - pos2.x), yDiff = Math.abs(pos1.y - pos2.y);\n if (xDiff < distMax && yDiff < distMax) {\n drawConnection(container, p1, p2);\n }\n }\n });\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n if (!(events.onHover.enable && mouse.position)) {\n return false;\n }\n return isInArray(connectMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.connect) {\n options.connect = new Connect();\n }\n for (const source of sources) {\n options.connect.load(source?.connect);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Connector } from \"./Connector.js\";\nexport async function loadExternalConnectInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalConnect\", container => {\n return Promise.resolve(new Connector(container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Connect.js\";\nexport * from \"./Options/Classes/ConnectLinks.js\";\nexport * from \"./Options/Interfaces/IConnect.js\";\nexport * from \"./Options/Interfaces/IConnectLinks.js\";\n","import { OptionsColor, isNull } from \"@tsparticles/engine\";\nexport class GrabLinks {\n constructor() {\n this.blink = false;\n this.consent = false;\n this.opacity = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nimport { GrabLinks } from \"./GrabLinks.js\";\nexport class Grab {\n constructor() {\n this.distance = 100;\n this.links = new GrabLinks();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n this.links.load(data.links);\n }\n}\n","import { drawLine, getStyleFromRgb } from \"@tsparticles/engine\";\nconst defaultWidth = 0;\nexport function drawGrabLine(context, width, begin, end, colorLine, opacity) {\n drawLine(context, begin, end);\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n context.lineWidth = width;\n context.stroke();\n}\nexport function drawGrab(container, particle, lineColor, opacity, mousePos) {\n container.canvas.draw(ctx => {\n const beginPos = particle.getPosition();\n drawGrabLine(ctx, particle.retina.linksWidth ?? defaultWidth, beginPos, mousePos, lineColor, opacity);\n });\n}\n","import { ExternalInteractorBase, getDistance, getLinkColor, getLinkRandomColor, isInArray, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { Grab } from \"./Options/Classes/Grab.js\";\nimport { drawGrab } from \"./Utils.js\";\nconst grabMode = \"grab\", minDistance = 0, minOpacity = 0;\nexport class Grabber extends ExternalInteractorBase {\n constructor(container, engine) {\n super(container);\n this._engine = engine;\n }\n clear() {\n }\n init() {\n const container = this.container, grab = container.actualOptions.interactivity.modes.grab;\n if (!grab) {\n return;\n }\n container.retina.grabModeDistance = grab.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, interactivity = options.interactivity;\n if (!interactivity.modes.grab ||\n !interactivity.events.onHover.enable ||\n container.interactivity.status !== mouseMoveEvent) {\n return;\n }\n const mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const distance = container.retina.grabModeDistance;\n if (!distance || distance < minDistance) {\n return;\n }\n const query = container.particles.quadTree.queryCircle(mousePos, distance, p => this.isEnabled(p));\n for (const particle of query) {\n const pos = particle.getPosition(), pointDistance = getDistance(pos, mousePos);\n if (pointDistance > distance) {\n continue;\n }\n const grabLineOptions = interactivity.modes.grab.links, lineOpacity = grabLineOptions.opacity, opacityLine = lineOpacity - (pointDistance * lineOpacity) / distance;\n if (opacityLine <= minOpacity) {\n continue;\n }\n const optColor = grabLineOptions.color ?? particle.options.links?.color;\n if (!container.particles.grabLineColor && optColor) {\n const linksOptions = interactivity.modes.grab.links;\n container.particles.grabLineColor = getLinkRandomColor(this._engine, optColor, linksOptions.blink, linksOptions.consent);\n }\n const colorLine = getLinkColor(particle, undefined, container.particles.grabLineColor);\n if (!colorLine) {\n continue;\n }\n drawGrab(container, particle, colorLine, opacityLine, mousePos);\n }\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(grabMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.grab) {\n options.grab = new Grab();\n }\n for (const source of sources) {\n options.grab.load(source?.grab);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Grabber } from \"./Grabber.js\";\nexport async function loadExternalGrabInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalGrab\", container => {\n return Promise.resolve(new Grabber(container, engine));\n }, refresh);\n}\nexport * from \"./Options/Classes/Grab.js\";\nexport * from \"./Options/Classes/GrabLinks.js\";\nexport * from \"./Options/Interfaces/IGrab.js\";\nexport * from \"./Options/Interfaces/IGrabLinks.js\";\n","import { ExternalInteractorBase } from \"@tsparticles/engine\";\nconst pauseMode = \"pause\";\nexport class Pauser extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== pauseMode) {\n return;\n }\n const container = this.container;\n if (container.animationStatus) {\n container.pause();\n }\n else {\n container.play();\n }\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Pauser } from \"./Pauser.js\";\nexport async function loadExternalPauseInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalPause\", container => {\n return Promise.resolve(new Pauser(container));\n }, refresh);\n}\n","import { isNull, setRangeValue } from \"@tsparticles/engine\";\nexport class Push {\n constructor() {\n this.default = true;\n this.groups = [];\n this.quantity = 4;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.default !== undefined) {\n this.default = data.default;\n }\n if (data.groups !== undefined) {\n this.groups = data.groups.map(t => t);\n }\n if (!this.groups.length) {\n this.default = true;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","import { ExternalInteractorBase, getRangeValue, itemFromArray, } from \"@tsparticles/engine\";\nimport { Push } from \"./Options/Classes/Push.js\";\nconst pushMode = \"push\", minQuantity = 0;\nexport class Pusher extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n if (mode !== pushMode) {\n return;\n }\n const container = this.container, options = container.actualOptions, pushOptions = options.interactivity.modes.push;\n if (!pushOptions) {\n return;\n }\n const quantity = getRangeValue(pushOptions.quantity);\n if (quantity <= minQuantity) {\n return;\n }\n const group = itemFromArray([undefined, ...pushOptions.groups]), groupOptions = group !== undefined ? container.actualOptions.particles.groups[group] : undefined;\n void container.particles.push(quantity, container.interactivity.mouse, groupOptions, group);\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.push) {\n options.push = new Push();\n }\n for (const source of sources) {\n options.push.load(source?.push);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Pusher } from \"./Pusher.js\";\nexport async function loadExternalPushInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalPush\", container => {\n return Promise.resolve(new Pusher(container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Push.js\";\nexport * from \"./Options/Interfaces/IPush.js\";\n","import { isNull, setRangeValue } from \"@tsparticles/engine\";\nexport class Remove {\n constructor() {\n this.quantity = 2;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n const quantity = data.quantity;\n if (quantity !== undefined) {\n this.quantity = setRangeValue(quantity);\n }\n }\n}\n","import { ExternalInteractorBase, getRangeValue, } from \"@tsparticles/engine\";\nimport { Remove } from \"./Options/Classes/Remove.js\";\nconst removeMode = \"remove\";\nexport class Remover extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n this.handleClickMode = (mode) => {\n const container = this.container, options = container.actualOptions;\n if (!options.interactivity.modes.remove || mode !== removeMode) {\n return;\n }\n const removeNb = getRangeValue(options.interactivity.modes.remove.quantity);\n container.particles.removeQuantity(removeNb);\n };\n }\n clear() {\n }\n init() {\n }\n interact() {\n }\n isEnabled() {\n return true;\n }\n loadModeOptions(options, ...sources) {\n if (!options.remove) {\n options.remove = new Remove();\n }\n for (const source of sources) {\n options.remove.load(source?.remove);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Remover } from \"./Remover.js\";\nexport async function loadExternalRemoveInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalRemove\", container => {\n return Promise.resolve(new Remover(container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Remove.js\";\nexport * from \"./Options/Interfaces/IRemove.js\";\n","import { EasingType, isNull } from \"@tsparticles/engine\";\nexport class RepulseBase {\n constructor() {\n this.distance = 200;\n this.duration = 0.4;\n this.factor = 100;\n this.speed = 1;\n this.maxSpeed = 50;\n this.easing = EasingType.easeOutQuad;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.duration !== undefined) {\n this.duration = data.duration;\n }\n if (data.easing !== undefined) {\n this.easing = data.easing;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.speed !== undefined) {\n this.speed = data.speed;\n }\n if (data.maxSpeed !== undefined) {\n this.maxSpeed = data.maxSpeed;\n }\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nimport { RepulseBase } from \"./RepulseBase.js\";\nexport class RepulseDiv extends RepulseBase {\n constructor() {\n super();\n this.selectors = [];\n }\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n if (data.selectors !== undefined) {\n this.selectors = data.selectors;\n }\n }\n}\n","import { executeOnSingleOrMultiple, isNull, } from \"@tsparticles/engine\";\nimport { RepulseBase } from \"./RepulseBase.js\";\nimport { RepulseDiv } from \"./RepulseDiv.js\";\nexport class Repulse extends RepulseBase {\n load(data) {\n super.load(data);\n if (isNull(data)) {\n return;\n }\n this.divs = executeOnSingleOrMultiple(data.divs, div => {\n const tmp = new RepulseDiv();\n tmp.load(div);\n return tmp;\n });\n }\n}\n","import { Circle, DivType, ExternalInteractorBase, Rectangle, Vector, clamp, divMode, divModeExecute, getDistances, isDivModeEnabled, isInArray, millisecondsToSeconds, mouseMoveEvent, } from \"@tsparticles/engine\";\nimport { Repulse } from \"./Options/Classes/Repulse.js\";\nconst repulseMode = \"repulse\", minDistance = 0, repulseRadiusFactor = 6, repulseRadiusPower = 3, squarePower = 2, minRadius = 0, minSpeed = 0, easingOffset = 1, half = 0.5;\nexport class Repulser extends ExternalInteractorBase {\n constructor(engine, container) {\n super(container);\n this._clickRepulse = () => {\n const container = this.container, repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n const repulse = container.repulse ?? { particles: [] };\n if (!repulse.finish) {\n if (!repulse.count) {\n repulse.count = 0;\n }\n repulse.count++;\n if (repulse.count === container.particles.count) {\n repulse.finish = true;\n }\n }\n if (repulse.clicking) {\n const repulseDistance = container.retina.repulseModeDistance;\n if (!repulseDistance || repulseDistance < minDistance) {\n return;\n }\n const repulseRadius = Math.pow(repulseDistance / repulseRadiusFactor, repulseRadiusPower), mouseClickPos = container.interactivity.mouse.clickPosition;\n if (mouseClickPos === undefined) {\n return;\n }\n const range = new Circle(mouseClickPos.x, mouseClickPos.y, repulseRadius), query = container.particles.quadTree.query(range, p => this.isEnabled(p));\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(mouseClickPos, particle.position), d = distance ** squarePower, velocity = repulseOptions.speed, force = (-repulseRadius * velocity) / d;\n if (d <= repulseRadius) {\n repulse.particles.push(particle);\n const vect = Vector.create(dx, dy);\n vect.length = force;\n particle.velocity.setTo(vect);\n }\n }\n }\n else if (repulse.clicking === false) {\n for (const particle of repulse.particles) {\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n }\n };\n this._hoverRepulse = () => {\n const container = this.container, mousePos = container.interactivity.mouse.position, repulseRadius = container.retina.repulseModeDistance;\n if (!repulseRadius || repulseRadius < minRadius || !mousePos) {\n return;\n }\n this._processRepulse(mousePos, repulseRadius, new Circle(mousePos.x, mousePos.y, repulseRadius));\n };\n this._processRepulse = (position, repulseRadius, area, divRepulse) => {\n const container = this.container, query = container.particles.quadTree.query(area, p => this.isEnabled(p)), repulseOptions = container.actualOptions.interactivity.modes.repulse;\n if (!repulseOptions) {\n return;\n }\n const { easing, speed, factor, maxSpeed } = repulseOptions, easingFunc = this._engine.getEasing(easing), velocity = (divRepulse?.speed ?? speed) * factor;\n for (const particle of query) {\n const { dx, dy, distance } = getDistances(particle.position, position), repulseFactor = clamp(easingFunc(easingOffset - distance / repulseRadius) * velocity, minSpeed, maxSpeed), normVec = Vector.create(!distance ? velocity : (dx / distance) * repulseFactor, !distance ? velocity : (dy / distance) * repulseFactor);\n particle.position.addTo(normVec);\n }\n };\n this._singleSelectorRepulse = (selector, div) => {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n const query = document.querySelectorAll(selector);\n if (!query.length) {\n return;\n }\n query.forEach(item => {\n const elem = item, pxRatio = container.retina.pixelRatio, pos = {\n x: (elem.offsetLeft + elem.offsetWidth * half) * pxRatio,\n y: (elem.offsetTop + elem.offsetHeight * half) * pxRatio,\n }, repulseRadius = elem.offsetWidth * half * pxRatio, area = div.type === DivType.circle\n ? new Circle(pos.x, pos.y, repulseRadius)\n : new Rectangle(elem.offsetLeft * pxRatio, elem.offsetTop * pxRatio, elem.offsetWidth * pxRatio, elem.offsetHeight * pxRatio), divs = repulse.divs, divRepulse = divMode(divs, elem);\n this._processRepulse(pos, repulseRadius, area, divRepulse);\n });\n };\n this._engine = engine;\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n this.handleClickMode = (mode) => {\n const options = this.container.actualOptions, repulseOpts = options.interactivity.modes.repulse;\n if (!repulseOpts || mode !== repulseMode) {\n return;\n }\n if (!container.repulse) {\n container.repulse = { particles: [] };\n }\n const repulse = container.repulse;\n repulse.clicking = true;\n repulse.count = 0;\n for (const particle of container.repulse.particles) {\n if (!this.isEnabled(particle)) {\n continue;\n }\n particle.velocity.setTo(particle.initialVelocity);\n }\n repulse.particles = [];\n repulse.finish = false;\n setTimeout(() => {\n if (container.destroyed) {\n return;\n }\n repulse.clicking = false;\n }, repulseOpts.duration * millisecondsToSeconds);\n };\n }\n clear() {\n }\n init() {\n const container = this.container, repulse = container.actualOptions.interactivity.modes.repulse;\n if (!repulse) {\n return;\n }\n container.retina.repulseModeDistance = repulse.distance * container.retina.pixelRatio;\n }\n interact() {\n const container = this.container, options = container.actualOptions, mouseMoveStatus = container.interactivity.status === mouseMoveEvent, events = options.interactivity.events, hover = events.onHover, hoverEnabled = hover.enable, hoverMode = hover.mode, click = events.onClick, clickEnabled = click.enable, clickMode = click.mode, divs = events.onDiv;\n if (mouseMoveStatus && hoverEnabled && isInArray(repulseMode, hoverMode)) {\n this._hoverRepulse();\n }\n else if (clickEnabled && isInArray(repulseMode, clickMode)) {\n this._clickRepulse();\n }\n else {\n divModeExecute(repulseMode, divs, (selector, div) => this._singleSelectorRepulse(selector, div));\n }\n }\n isEnabled(particle) {\n const container = this.container, options = container.actualOptions, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? options.interactivity).events, divs = events.onDiv, hover = events.onHover, click = events.onClick, divRepulse = isDivModeEnabled(repulseMode, divs);\n if (!(divRepulse || (hover.enable && !!mouse.position) || (click.enable && mouse.clickPosition))) {\n return false;\n }\n const hoverMode = hover.mode, clickMode = click.mode;\n return isInArray(repulseMode, hoverMode) || isInArray(repulseMode, clickMode) || divRepulse;\n }\n loadModeOptions(options, ...sources) {\n if (!options.repulse) {\n options.repulse = new Repulse();\n }\n for (const source of sources) {\n options.repulse.load(source?.repulse);\n }\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Repulser } from \"./Repulser.js\";\nexport async function loadExternalRepulseInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalRepulse\", container => {\n return Promise.resolve(new Repulser(engine, container));\n }, refresh);\n}\nexport * from \"./Options/Classes/RepulseBase.js\";\nexport * from \"./Options/Classes/RepulseDiv.js\";\nexport * from \"./Options/Classes/Repulse.js\";\nexport * from \"./Options/Interfaces/IRepulseBase.js\";\nexport * from \"./Options/Interfaces/IRepulseDiv.js\";\nexport * from \"./Options/Interfaces/IRepulse.js\";\n","import { isNull } from \"@tsparticles/engine\";\nexport class Slow {\n constructor() {\n this.factor = 3;\n this.radius = 200;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.factor !== undefined) {\n this.factor = data.factor;\n }\n if (data.radius !== undefined) {\n this.radius = data.radius;\n }\n }\n}\n","import { ExternalInteractorBase, getDistance, isInArray, } from \"@tsparticles/engine\";\nimport { Slow } from \"./Options/Classes/Slow.js\";\nconst slowMode = \"slow\", minRadius = 0;\nexport class Slower extends ExternalInteractorBase {\n constructor(container) {\n super(container);\n }\n clear(particle, delta, force) {\n if (particle.slow.inRange && !force) {\n return;\n }\n particle.slow.factor = 1;\n }\n init() {\n const container = this.container, slow = container.actualOptions.interactivity.modes.slow;\n if (!slow) {\n return;\n }\n container.retina.slowModeRadius = slow.radius * container.retina.pixelRatio;\n }\n interact() {\n }\n isEnabled(particle) {\n const container = this.container, mouse = container.interactivity.mouse, events = (particle?.interactivity ?? container.actualOptions.interactivity).events;\n return events.onHover.enable && !!mouse.position && isInArray(slowMode, events.onHover.mode);\n }\n loadModeOptions(options, ...sources) {\n if (!options.slow) {\n options.slow = new Slow();\n }\n for (const source of sources) {\n options.slow.load(source?.slow);\n }\n }\n reset(particle) {\n particle.slow.inRange = false;\n const container = this.container, options = container.actualOptions, mousePos = container.interactivity.mouse.position, radius = container.retina.slowModeRadius, slowOptions = options.interactivity.modes.slow;\n if (!slowOptions || !radius || radius < minRadius || !mousePos) {\n return;\n }\n const particlePos = particle.getPosition(), dist = getDistance(mousePos, particlePos), proximityFactor = dist / radius, slowFactor = slowOptions.factor, { slow } = particle;\n if (dist > radius) {\n return;\n }\n slow.inRange = true;\n slow.factor = proximityFactor / slowFactor;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Slower } from \"./Slower.js\";\nexport async function loadExternalSlowInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"externalSlow\", container => {\n return Promise.resolve(new Slower(container));\n }, refresh);\n}\nexport * from \"./Options/Classes/Slow.js\";\nexport * from \"./Options/Interfaces/ISlow.js\";\n","import { errorPrefix, getLogger, getStyleFromHsl } from \"@tsparticles/engine\";\nconst stringStart = 0, defaultOpacity = 1;\nconst currentColorRegex = /(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\\((-?\\d+%?[,\\s]+){2,3}\\s*[\\d.]+%?\\))|currentcolor/gi;\nfunction replaceColorSvg(imageShape, color, opacity) {\n const { svgData } = imageShape;\n if (!svgData) {\n return \"\";\n }\n const colorStyle = getStyleFromHsl(color, opacity);\n if (svgData.includes(\"fill\")) {\n return svgData.replace(currentColorRegex, () => colorStyle);\n }\n const preFillIndex = svgData.indexOf(\">\");\n return `${svgData.substring(stringStart, preFillIndex)} fill=\"${colorStyle}\"${svgData.substring(preFillIndex)}`;\n}\nexport async function loadImage(image) {\n return new Promise((resolve) => {\n image.loading = true;\n const img = new Image();\n image.element = img;\n img.addEventListener(\"load\", () => {\n image.loading = false;\n resolve();\n });\n img.addEventListener(\"error\", () => {\n image.element = undefined;\n image.error = true;\n image.loading = false;\n getLogger().error(`${errorPrefix} loading image: ${image.source}`);\n resolve();\n });\n img.src = image.source;\n });\n}\nexport async function downloadSvgImage(image) {\n if (image.type !== \"svg\") {\n await loadImage(image);\n return;\n }\n image.loading = true;\n const response = await fetch(image.source);\n if (!response.ok) {\n getLogger().error(`${errorPrefix} Image not found`);\n image.error = true;\n }\n else {\n image.svgData = await response.text();\n }\n image.loading = false;\n}\nexport function replaceImageColor(image, imageData, color, particle) {\n const svgColoredData = replaceColorSvg(image, color, particle.opacity?.value ?? defaultOpacity), imageRes = {\n color,\n gif: imageData.gif,\n data: {\n ...image,\n svgData: svgColoredData,\n },\n loaded: false,\n ratio: imageData.width / imageData.height,\n replaceColor: imageData.replaceColor,\n source: imageData.src,\n };\n return new Promise(resolve => {\n const svg = new Blob([svgColoredData], { type: \"image/svg+xml\" }), domUrl = URL || window.URL || window.webkitURL || window, url = domUrl.createObjectURL(svg), img = new Image();\n img.addEventListener(\"load\", () => {\n imageRes.loaded = true;\n imageRes.element = img;\n resolve(imageRes);\n domUrl.revokeObjectURL(url);\n });\n const errorHandler = async () => {\n domUrl.revokeObjectURL(url);\n const img2 = {\n ...image,\n error: false,\n loading: true,\n };\n await loadImage(img2);\n imageRes.loaded = true;\n imageRes.element = img2.element;\n resolve(imageRes);\n };\n img.addEventListener(\"error\", () => void errorHandler());\n img.src = url;\n });\n}\n","export const InterlaceOffsets = [0, 4, 2, 1];\nexport const InterlaceSteps = [8, 8, 4, 2];\n","export class ByteStream {\n constructor(bytes) {\n this.pos = 0;\n this.data = new Uint8ClampedArray(bytes);\n }\n getString(count) {\n const slice = this.data.slice(this.pos, this.pos + count);\n this.pos += slice.length;\n return slice.reduce((acc, curr) => acc + String.fromCharCode(curr), \"\");\n }\n nextByte() {\n return this.data[this.pos++];\n }\n nextTwoBytes() {\n const increment = 2, previous = 1, shift = 8;\n this.pos += increment;\n return this.data[this.pos - increment] + (this.data[this.pos - previous] << shift);\n }\n readSubBlocks() {\n let blockString = \"\", size = 0;\n const minCount = 0, emptySize = 0;\n do {\n size = this.data[this.pos++];\n for (let count = size; --count >= minCount; blockString += String.fromCharCode(this.data[this.pos++])) {\n }\n } while (size !== emptySize);\n return blockString;\n }\n readSubBlocksBin() {\n let size = this.data[this.pos], len = 0;\n const emptySize = 0, increment = 1;\n for (let offset = 0; size !== emptySize; offset += size + increment, size = this.data[this.pos + offset]) {\n len += size;\n }\n const blockData = new Uint8Array(len);\n size = this.data[this.pos++];\n for (let i = 0; size !== emptySize; size = this.data[this.pos++]) {\n for (let count = size; --count >= emptySize; blockData[i++] = this.data[this.pos++]) {\n }\n }\n return blockData;\n }\n skipSubBlocks() {\n for (const increment = 1, noData = 0; this.data[this.pos] !== noData; this.pos += this.data[this.pos] + increment) {\n }\n this.pos++;\n }\n}\n","export var DisposalMethod;\n(function (DisposalMethod) {\n DisposalMethod[DisposalMethod[\"Replace\"] = 0] = \"Replace\";\n DisposalMethod[DisposalMethod[\"Combine\"] = 1] = \"Combine\";\n DisposalMethod[DisposalMethod[\"RestoreBackground\"] = 2] = \"RestoreBackground\";\n DisposalMethod[DisposalMethod[\"RestorePrevious\"] = 3] = \"RestorePrevious\";\n DisposalMethod[DisposalMethod[\"UndefinedA\"] = 4] = \"UndefinedA\";\n DisposalMethod[DisposalMethod[\"UndefinedB\"] = 5] = \"UndefinedB\";\n DisposalMethod[DisposalMethod[\"UndefinedC\"] = 6] = \"UndefinedC\";\n DisposalMethod[DisposalMethod[\"UndefinedD\"] = 7] = \"UndefinedD\";\n})(DisposalMethod || (DisposalMethod = {}));\n","export var GIFDataHeaders;\n(function (GIFDataHeaders) {\n GIFDataHeaders[GIFDataHeaders[\"Extension\"] = 33] = \"Extension\";\n GIFDataHeaders[GIFDataHeaders[\"ApplicationExtension\"] = 255] = \"ApplicationExtension\";\n GIFDataHeaders[GIFDataHeaders[\"GraphicsControlExtension\"] = 249] = \"GraphicsControlExtension\";\n GIFDataHeaders[GIFDataHeaders[\"PlainTextExtension\"] = 1] = \"PlainTextExtension\";\n GIFDataHeaders[GIFDataHeaders[\"CommentExtension\"] = 254] = \"CommentExtension\";\n GIFDataHeaders[GIFDataHeaders[\"Image\"] = 44] = \"Image\";\n GIFDataHeaders[GIFDataHeaders[\"EndOfFile\"] = 59] = \"EndOfFile\";\n})(GIFDataHeaders || (GIFDataHeaders = {}));\n","import { loadImage } from \"../Utils.js\";\nimport { InterlaceOffsets, InterlaceSteps } from \"./Constants.js\";\nimport { ByteStream } from \"./ByteStream.js\";\nimport { DisposalMethod } from \"./Enums/DisposalMethod.js\";\nimport { GIFDataHeaders } from \"./Types/GIFDataHeaders.js\";\nconst origin = {\n x: 0,\n y: 0,\n}, defaultFrame = 0, half = 0.5, initialTime = 0, firstIndex = 0, defaultLoopCount = 0;\nfunction parseColorTable(byteStream, count) {\n const colors = [];\n for (let i = 0; i < count; i++) {\n colors.push({\n r: byteStream.data[byteStream.pos],\n g: byteStream.data[byteStream.pos + 1],\n b: byteStream.data[byteStream.pos + 2],\n });\n byteStream.pos += 3;\n }\n return colors;\n}\nfunction parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex) {\n switch (byteStream.nextByte()) {\n case GIFDataHeaders.GraphicsControlExtension: {\n const frame = gif.frames[getFrameIndex(false)];\n byteStream.pos++;\n const packedByte = byteStream.nextByte();\n frame.GCreserved = (packedByte & 0xe0) >>> 5;\n frame.disposalMethod = (packedByte & 0x1c) >>> 2;\n frame.userInputDelayFlag = (packedByte & 2) === 2;\n const transparencyFlag = (packedByte & 1) === 1;\n frame.delayTime = byteStream.nextTwoBytes() * 0xa;\n const transparencyIndex = byteStream.nextByte();\n if (transparencyFlag) {\n getTransparencyIndex(transparencyIndex);\n }\n byteStream.pos++;\n break;\n }\n case GIFDataHeaders.ApplicationExtension: {\n byteStream.pos++;\n const applicationExtension = {\n identifier: byteStream.getString(8),\n authenticationCode: byteStream.getString(3),\n data: byteStream.readSubBlocksBin(),\n };\n gif.applicationExtensions.push(applicationExtension);\n break;\n }\n case GIFDataHeaders.CommentExtension: {\n gif.comments.push([getFrameIndex(false), byteStream.readSubBlocks()]);\n break;\n }\n case GIFDataHeaders.PlainTextExtension: {\n if (gif.globalColorTable.length === 0) {\n throw new EvalError(\"plain text extension without global color table\");\n }\n byteStream.pos++;\n gif.frames[getFrameIndex(false)].plainTextData = {\n left: byteStream.nextTwoBytes(),\n top: byteStream.nextTwoBytes(),\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n charSize: {\n width: byteStream.nextTwoBytes(),\n height: byteStream.nextTwoBytes(),\n },\n foregroundColor: byteStream.nextByte(),\n backgroundColor: byteStream.nextByte(),\n text: byteStream.readSubBlocks(),\n };\n break;\n }\n default:\n byteStream.skipSubBlocks();\n break;\n }\n}\nasync function parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n const frame = gif.frames[getFrameIndex(true)];\n frame.left = byteStream.nextTwoBytes();\n frame.top = byteStream.nextTwoBytes();\n frame.width = byteStream.nextTwoBytes();\n frame.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), localColorTableFlag = (packedByte & 0x80) === 0x80, interlacedFlag = (packedByte & 0x40) === 0x40;\n frame.sortFlag = (packedByte & 0x20) === 0x20;\n frame.reserved = (packedByte & 0x18) >>> 3;\n const localColorCount = 1 << ((packedByte & 7) + 1);\n if (localColorTableFlag) {\n frame.localColorTable = parseColorTable(byteStream, localColorCount);\n }\n const getColor = (index) => {\n const { r, g, b } = (localColorTableFlag ? frame.localColorTable : gif.globalColorTable)[index];\n if (index !== getTransparencyIndex(null)) {\n return { r, g, b, a: 255 };\n }\n return { r, g, b, a: avgAlpha ? ~~((r + g + b) / 3) : 0 };\n };\n const image = (() => {\n try {\n return new ImageData(frame.width, frame.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (image == null) {\n throw new EvalError(\"GIF frame size is to large\");\n }\n const minCodeSize = byteStream.nextByte(), imageData = byteStream.readSubBlocksBin(), clearCode = 1 << minCodeSize;\n const readBits = (pos, len) => {\n const bytePos = pos >>> 3, bitPos = pos & 7;\n return (((imageData[bytePos] + (imageData[bytePos + 1] << 8) + (imageData[bytePos + 2] << 16)) &\n (((1 << len) - 1) << bitPos)) >>>\n bitPos);\n };\n if (interlacedFlag) {\n for (let code = 0, size = minCodeSize + 1, pos = 0, dic = [[0]], pass = 0; pass < 4; pass++) {\n if (InterlaceOffsets[pass] < frame.height) {\n let pixelPos = 0, lineIndex = 0, exit = false;\n while (!exit) {\n const last = code;\n code = readBits(pos, size);\n pos += size + 1;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (const item of dic[code]) {\n const { r, g, b, a } = getColor(item);\n image.data.set([r, g, b, a], InterlaceOffsets[pass] * frame.width +\n InterlaceSteps[pass] * lineIndex +\n (pixelPos % (frame.width * 4)));\n pixelPos += 4;\n }\n if (dic.length === 1 << size && size < 0xc) {\n size++;\n }\n }\n if (pixelPos === frame.width * 4 * (lineIndex + 1)) {\n lineIndex++;\n if (InterlaceOffsets[pass] + InterlaceSteps[pass] * lineIndex >= frame.height) {\n exit = true;\n }\n }\n }\n }\n progressCallback?.(byteStream.pos / (byteStream.data.length - 1), getFrameIndex(false) + 1, image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n }\n else {\n let code = 0, size = minCodeSize + 1, pos = 0, pixelPos = -4, exit = false;\n const dic = [[0]];\n while (!exit) {\n const last = code;\n code = readBits(pos, size);\n pos += size;\n if (code === clearCode) {\n size = minCodeSize + 1;\n dic.length = clearCode + 2;\n for (let i = 0; i < dic.length; i++) {\n dic[i] = i < clearCode ? [i] : [];\n }\n }\n else {\n if (code === clearCode + 1) {\n exit = true;\n break;\n }\n if (code >= dic.length) {\n dic.push(dic[last].concat(dic[last][0]));\n }\n else if (last !== clearCode) {\n dic.push(dic[last].concat(dic[code][0]));\n }\n for (const item of dic[code]) {\n const { r, g, b, a } = getColor(item);\n image.data.set([r, g, b, a], (pixelPos += 4));\n }\n if (dic.length >= 1 << size && size < 0xc) {\n size++;\n }\n }\n }\n frame.image = image;\n frame.bitmap = await createImageBitmap(image);\n progressCallback?.((byteStream.pos + 1) / byteStream.data.length, getFrameIndex(false) + 1, frame.image, { x: frame.left, y: frame.top }, { width: gif.width, height: gif.height });\n }\n}\nasync function parseBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback) {\n switch (byteStream.nextByte()) {\n case GIFDataHeaders.EndOfFile:\n return true;\n case GIFDataHeaders.Image:\n await parseImageBlock(byteStream, gif, avgAlpha, getFrameIndex, getTransparencyIndex, progressCallback);\n break;\n case GIFDataHeaders.Extension:\n parseExtensionBlock(byteStream, gif, getFrameIndex, getTransparencyIndex);\n break;\n default:\n throw new EvalError(\"undefined block found\");\n }\n return false;\n}\nexport function getGIFLoopAmount(gif) {\n for (const extension of gif.applicationExtensions) {\n if (extension.identifier + extension.authenticationCode !== \"NETSCAPE2.0\") {\n continue;\n }\n return extension.data[1] + (extension.data[2] << 8);\n }\n return NaN;\n}\nexport async function decodeGIF(gifURL, progressCallback, avgAlpha) {\n if (!avgAlpha)\n avgAlpha = false;\n const res = await fetch(gifURL);\n if (!res.ok && res.status === 404) {\n throw new EvalError(\"file not found\");\n }\n const buffer = await res.arrayBuffer();\n const gif = {\n width: 0,\n height: 0,\n totalTime: 0,\n colorRes: 0,\n pixelAspectRatio: 0,\n frames: [],\n sortFlag: false,\n globalColorTable: [],\n backgroundImage: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n comments: [],\n applicationExtensions: [],\n }, byteStream = new ByteStream(new Uint8ClampedArray(buffer));\n if (byteStream.getString(6) !== \"GIF89a\") {\n throw new Error(\"not a supported GIF file\");\n }\n gif.width = byteStream.nextTwoBytes();\n gif.height = byteStream.nextTwoBytes();\n const packedByte = byteStream.nextByte(), globalColorTableFlag = (packedByte & 0x80) === 0x80;\n gif.colorRes = (packedByte & 0x70) >>> 4;\n gif.sortFlag = (packedByte & 8) === 8;\n const globalColorCount = 1 << ((packedByte & 7) + 1), backgroundColorIndex = byteStream.nextByte();\n gif.pixelAspectRatio = byteStream.nextByte();\n if (gif.pixelAspectRatio !== 0) {\n gif.pixelAspectRatio = (gif.pixelAspectRatio + 0xf) / 0x40;\n }\n if (globalColorTableFlag) {\n gif.globalColorTable = parseColorTable(byteStream, globalColorCount);\n }\n const backgroundImage = (() => {\n try {\n return new ImageData(gif.width, gif.height, { colorSpace: \"srgb\" });\n }\n catch (error) {\n if (error instanceof DOMException && error.name === \"IndexSizeError\") {\n return null;\n }\n throw error;\n }\n })();\n if (backgroundImage == null) {\n throw new Error(\"GIF frame size is to large\");\n }\n const { r, g, b } = gif.globalColorTable[backgroundColorIndex];\n backgroundImage.data.set(globalColorTableFlag ? [r, g, b, 255] : [0, 0, 0, 0]);\n for (let i = 4; i < backgroundImage.data.length; i *= 2) {\n backgroundImage.data.copyWithin(i, 0, i);\n }\n gif.backgroundImage = backgroundImage;\n let frameIndex = -1, incrementFrameIndex = true, transparencyIndex = -1;\n const getframeIndex = (increment) => {\n if (increment) {\n incrementFrameIndex = true;\n }\n return frameIndex;\n };\n const getTransparencyIndex = (newValue) => {\n if (newValue != null) {\n transparencyIndex = newValue;\n }\n return transparencyIndex;\n };\n try {\n do {\n if (incrementFrameIndex) {\n gif.frames.push({\n left: 0,\n top: 0,\n width: 0,\n height: 0,\n disposalMethod: DisposalMethod.Replace,\n image: new ImageData(1, 1, { colorSpace: \"srgb\" }),\n plainTextData: null,\n userInputDelayFlag: false,\n delayTime: 0,\n sortFlag: false,\n localColorTable: [],\n reserved: 0,\n GCreserved: 0,\n });\n frameIndex++;\n transparencyIndex = -1;\n incrementFrameIndex = false;\n }\n } while (!(await parseBlock(byteStream, gif, avgAlpha, getframeIndex, getTransparencyIndex, progressCallback)));\n gif.frames.length--;\n for (const frame of gif.frames) {\n if (frame.userInputDelayFlag && frame.delayTime === 0) {\n gif.totalTime = Infinity;\n break;\n }\n gif.totalTime += frame.delayTime;\n }\n return gif;\n }\n catch (error) {\n if (error instanceof EvalError) {\n throw new Error(`error while parsing frame ${frameIndex} \"${error.message}\"`);\n }\n throw error;\n }\n}\nexport function drawGif(data) {\n const { context, radius, particle, delta } = data, image = particle.image;\n if (!image?.gifData || !image.gif) {\n return;\n }\n const offscreenCanvas = new OffscreenCanvas(image.gifData.width, image.gifData.height), offscreenContext = offscreenCanvas.getContext(\"2d\");\n if (!offscreenContext) {\n throw new Error(\"could not create offscreen canvas context\");\n }\n offscreenContext.imageSmoothingQuality = \"low\";\n offscreenContext.imageSmoothingEnabled = false;\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n if (particle.gifLoopCount === undefined) {\n particle.gifLoopCount = image.gifLoopCount ?? defaultLoopCount;\n }\n let frameIndex = particle.gifFrame ?? defaultFrame;\n const pos = { x: -image.gifData.width * half, y: -image.gifData.height * half }, frame = image.gifData.frames[frameIndex];\n if (particle.gifTime === undefined) {\n particle.gifTime = initialTime;\n }\n if (!frame.bitmap) {\n return;\n }\n context.scale(radius / image.gifData.width, radius / image.gifData.height);\n switch (frame.disposalMethod) {\n case DisposalMethod.UndefinedA:\n case DisposalMethod.UndefinedB:\n case DisposalMethod.UndefinedC:\n case DisposalMethod.UndefinedD:\n case DisposalMethod.Replace:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n break;\n case DisposalMethod.Combine:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n break;\n case DisposalMethod.RestoreBackground:\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n if (!image.gifData.globalColorTable.length) {\n offscreenContext.putImageData(image.gifData.frames[firstIndex].image, pos.x + frame.left, pos.y + frame.top);\n }\n else {\n offscreenContext.putImageData(image.gifData.backgroundImage, pos.x, pos.y);\n }\n break;\n case DisposalMethod.RestorePrevious:\n {\n const previousImageData = offscreenContext.getImageData(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.drawImage(frame.bitmap, frame.left, frame.top);\n context.drawImage(offscreenCanvas, pos.x, pos.y);\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n offscreenContext.putImageData(previousImageData, origin.x, origin.y);\n }\n break;\n }\n particle.gifTime += delta.value;\n if (particle.gifTime > frame.delayTime) {\n particle.gifTime -= frame.delayTime;\n if (++frameIndex >= image.gifData.frames.length) {\n if (--particle.gifLoopCount <= defaultLoopCount) {\n return;\n }\n frameIndex = firstIndex;\n offscreenContext.clearRect(origin.x, origin.y, offscreenCanvas.width, offscreenCanvas.height);\n }\n particle.gifFrame = frameIndex;\n }\n context.scale(image.gifData.width / radius, image.gifData.height / radius);\n}\nexport async function loadGifImage(image) {\n if (image.type !== \"gif\") {\n await loadImage(image);\n return;\n }\n image.loading = true;\n try {\n image.gifData = await decodeGIF(image.source);\n image.gifLoopCount = getGIFLoopAmount(image.gifData) ?? defaultLoopCount;\n if (!image.gifLoopCount) {\n image.gifLoopCount = Infinity;\n }\n }\n catch {\n image.error = true;\n }\n image.loading = false;\n}\n","import { errorPrefix } from \"@tsparticles/engine\";\nimport { replaceImageColor } from \"./Utils.js\";\nimport { drawGif } from \"./GifUtils/Utils.js\";\nconst double = 2, defaultAlpha = 1, sides = 12, defaultRatio = 1;\nexport class ImageDrawer {\n constructor(engine) {\n this.validTypes = [\"image\", \"images\"];\n this.loadImageShape = async (imageShape) => {\n if (!this._engine.loadImage) {\n throw new Error(`${errorPrefix} image shape not initialized`);\n }\n await this._engine.loadImage({\n gif: imageShape.gif,\n name: imageShape.name,\n replaceColor: imageShape.replaceColor ?? false,\n src: imageShape.src,\n });\n };\n this._engine = engine;\n }\n addImage(image) {\n if (!this._engine.images) {\n this._engine.images = [];\n }\n this._engine.images.push(image);\n }\n draw(data) {\n const { context, radius, particle, opacity } = data, image = particle.image, element = image?.element;\n if (!image) {\n return;\n }\n context.globalAlpha = opacity;\n if (image.gif && image.gifData) {\n drawGif(data);\n }\n else if (element) {\n const ratio = image.ratio, pos = {\n x: -radius,\n y: -radius,\n }, diameter = radius * double;\n context.drawImage(element, pos.x, pos.y, diameter, diameter / ratio);\n }\n context.globalAlpha = defaultAlpha;\n }\n getSidesCount() {\n return sides;\n }\n async init(container) {\n const options = container.actualOptions;\n if (!options.preload || !this._engine.loadImage) {\n return;\n }\n for (const imageData of options.preload) {\n await this._engine.loadImage(imageData);\n }\n }\n loadShape(particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const imageData = particle.shapeData;\n if (!imageData) {\n return;\n }\n const image = this._engine.images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n void this.loadImageShape(imageData).then(() => {\n this.loadShape(particle);\n });\n }\n }\n particleInit(container, particle) {\n if (particle.shape !== \"image\" && particle.shape !== \"images\") {\n return;\n }\n if (!this._engine.images) {\n this._engine.images = [];\n }\n const images = this._engine.images, imageData = particle.shapeData;\n if (!imageData) {\n return;\n }\n const color = particle.getFillColor(), image = images.find((t) => t.name === imageData.name || t.source === imageData.src);\n if (!image) {\n return;\n }\n const replaceColor = imageData.replaceColor ?? image.replaceColor;\n if (image.loading) {\n setTimeout(() => {\n this.particleInit(container, particle);\n });\n return;\n }\n void (async () => {\n let imageRes;\n if (image.svgData && color) {\n imageRes = await replaceImageColor(image, imageData, color, particle);\n }\n else {\n imageRes = {\n color,\n data: image,\n element: image.element,\n gif: image.gif,\n gifData: image.gifData,\n gifLoopCount: image.gifLoopCount,\n loaded: true,\n ratio: imageData.width && imageData.height\n ? imageData.width / imageData.height\n : (image.ratio ?? defaultRatio),\n replaceColor: replaceColor,\n source: imageData.src,\n };\n }\n if (!imageRes.ratio) {\n imageRes.ratio = 1;\n }\n const fill = imageData.fill ?? particle.shapeFill, close = imageData.close ?? particle.shapeClose, imageShape = {\n image: imageRes,\n fill,\n close,\n };\n particle.image = imageShape.image;\n particle.shapeFill = imageShape.fill;\n particle.shapeClose = imageShape.close;\n })();\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nexport class Preload {\n constructor() {\n this.src = \"\";\n this.gif = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.gif !== undefined) {\n this.gif = data.gif;\n }\n if (data.height !== undefined) {\n this.height = data.height;\n }\n if (data.name !== undefined) {\n this.name = data.name;\n }\n if (data.replaceColor !== undefined) {\n this.replaceColor = data.replaceColor;\n }\n if (data.src !== undefined) {\n this.src = data.src;\n }\n if (data.width !== undefined) {\n this.width = data.width;\n }\n }\n}\n","import { Preload } from \"./Options/Classes/Preload.js\";\nexport class ImagePreloaderPlugin {\n constructor(engine) {\n this.id = \"imagePreloader\";\n this._engine = engine;\n }\n async getPlugin() {\n await Promise.resolve();\n return {};\n }\n loadOptions(options, source) {\n if (!source?.preload) {\n return;\n }\n if (!options.preload) {\n options.preload = [];\n }\n const preloadOptions = options.preload;\n for (const item of source.preload) {\n const existing = preloadOptions.find(t => t.name === item.name || t.src === item.src);\n if (existing) {\n existing.load(item);\n }\n else {\n const preload = new Preload();\n preload.load(item);\n preloadOptions.push(preload);\n }\n }\n }\n needsPlugin() {\n return true;\n }\n}\n","import { downloadSvgImage, loadImage } from \"./Utils.js\";\nimport { assertValidVersion, errorPrefix } from \"@tsparticles/engine\";\nimport { ImageDrawer } from \"./ImageDrawer.js\";\nimport { ImagePreloaderPlugin } from \"./ImagePreloader.js\";\nimport { loadGifImage } from \"./GifUtils/Utils.js\";\nconst extLength = 3;\nfunction addLoadImageToEngine(engine) {\n if (engine.loadImage) {\n return;\n }\n engine.loadImage = async (data) => {\n if (!data.name && !data.src) {\n throw new Error(`${errorPrefix} no image source provided`);\n }\n if (!engine.images) {\n engine.images = [];\n }\n if (engine.images.find((t) => t.name === data.name || t.source === data.src)) {\n return;\n }\n try {\n const image = {\n gif: data.gif ?? false,\n name: data.name ?? data.src,\n source: data.src,\n type: data.src.substring(data.src.length - extLength),\n error: false,\n loading: true,\n replaceColor: data.replaceColor,\n ratio: data.width && data.height ? data.width / data.height : undefined,\n };\n engine.images.push(image);\n let imageFunc;\n if (data.gif) {\n imageFunc = loadGifImage;\n }\n else {\n imageFunc = data.replaceColor ? downloadSvgImage : loadImage;\n }\n await imageFunc(image);\n }\n catch {\n throw new Error(`${errorPrefix} ${data.name ?? data.src} not found`);\n }\n };\n}\nexport async function loadImageShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n addLoadImageToEngine(engine);\n const preloader = new ImagePreloaderPlugin(engine);\n await engine.addPlugin(preloader, refresh);\n await engine.addShape(new ImageDrawer(engine), refresh);\n}\n","import { ValueWithRandom, isNull } from \"@tsparticles/engine\";\nexport class LifeDelay extends ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { ValueWithRandom, isNull } from \"@tsparticles/engine\";\nexport class LifeDuration extends ValueWithRandom {\n constructor() {\n super();\n this.sync = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n super.load(data);\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { isNull } from \"@tsparticles/engine\";\nimport { LifeDelay } from \"./LifeDelay.js\";\nimport { LifeDuration } from \"./LifeDuration.js\";\nexport class Life {\n constructor() {\n this.count = 0;\n this.delay = new LifeDelay();\n this.duration = new LifeDuration();\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.count !== undefined) {\n this.count = data.count;\n }\n this.delay.load(data.delay);\n this.duration.load(data.duration);\n }\n}\n","import { getRangeValue, millisecondsToSeconds, randomInRange, setRangeValue, } from \"@tsparticles/engine\";\nconst noTime = 0, infiniteValue = -1, noLife = 0, minCanvasSize = 0;\nexport function updateLife(particle, delta, canvasSize) {\n if (!particle.life) {\n return;\n }\n const life = particle.life;\n let justSpawned = false;\n if (particle.spawning) {\n life.delayTime += delta.value;\n if (life.delayTime >= particle.life.delay) {\n justSpawned = true;\n particle.spawning = false;\n life.delayTime = noTime;\n life.time = noTime;\n }\n else {\n return;\n }\n }\n if (life.duration === infiniteValue) {\n return;\n }\n if (particle.spawning) {\n return;\n }\n if (justSpawned) {\n life.time = noTime;\n }\n else {\n life.time += delta.value;\n }\n if (life.time < life.duration) {\n return;\n }\n life.time = noTime;\n if (particle.life.count > noLife) {\n particle.life.count--;\n }\n if (particle.life.count === noLife) {\n particle.destroy();\n return;\n }\n const widthRange = setRangeValue(minCanvasSize, canvasSize.width), heightRange = setRangeValue(minCanvasSize, canvasSize.width);\n particle.position.x = randomInRange(widthRange);\n particle.position.y = randomInRange(heightRange);\n particle.spawning = true;\n life.delayTime = noTime;\n life.time = noTime;\n particle.reset();\n const lifeOptions = particle.options.life;\n if (lifeOptions) {\n life.delay = getRangeValue(lifeOptions.delay.value) * millisecondsToSeconds;\n life.duration = getRangeValue(lifeOptions.duration.value) * millisecondsToSeconds;\n }\n}\n","import { getRandom, getRangeValue, millisecondsToSeconds, } from \"@tsparticles/engine\";\nimport { Life } from \"./Options/Classes/Life.js\";\nimport { updateLife } from \"./Utils.js\";\nconst noTime = 0, identity = 1, infiniteValue = -1;\nexport class LifeUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const container = this.container, particlesOptions = particle.options, lifeOptions = particlesOptions.life;\n if (!lifeOptions) {\n return;\n }\n particle.life = {\n delay: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.delay.value) * (lifeOptions.delay.sync ? identity : getRandom())) /\n container.retina.reduceFactor) *\n millisecondsToSeconds\n : noTime,\n delayTime: noTime,\n duration: container.retina.reduceFactor\n ? ((getRangeValue(lifeOptions.duration.value) * (lifeOptions.duration.sync ? identity : getRandom())) /\n container.retina.reduceFactor) *\n millisecondsToSeconds\n : noTime,\n time: noTime,\n count: lifeOptions.count,\n };\n if (particle.life.duration <= noTime) {\n particle.life.duration = infiniteValue;\n }\n if (particle.life.count <= noTime) {\n particle.life.count = infiniteValue;\n }\n if (particle.life) {\n particle.spawning = particle.life.delay > noTime;\n }\n }\n isEnabled(particle) {\n return !particle.destroyed;\n }\n loadOptions(options, ...sources) {\n if (!options.life) {\n options.life = new Life();\n }\n for (const source of sources) {\n options.life.load(source?.life);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle) || !particle.life) {\n return;\n }\n updateLife(particle, delta, this.container.canvas.size);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { LifeUpdater } from \"./LifeUpdater.js\";\nexport async function loadLifeUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"life\", async (container) => {\n return Promise.resolve(new LifeUpdater(container));\n }, refresh);\n}\n","export function drawLine(data) {\n const { context, particle, radius } = data, shapeData = particle.shapeData, centerY = 0;\n context.moveTo(-radius, centerY);\n context.lineTo(radius, centerY);\n context.lineCap = shapeData?.cap ?? \"butt\";\n}\n","import { drawLine } from \"./Utils.js\";\nconst sides = 1;\nexport class LineDrawer {\n constructor() {\n this.validTypes = [\"line\"];\n }\n draw(data) {\n drawLine(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { LineDrawer } from \"./LineDrawer.js\";\nexport async function loadLineShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new LineDrawer(), refresh);\n}\n","import { isSsr } from \"@tsparticles/engine\";\nconst half = 0.5;\nexport class ParallaxMover {\n init() {\n }\n isEnabled(particle) {\n return (!isSsr() &&\n !particle.destroyed &&\n particle.container.actualOptions.interactivity.events.onHover.parallax.enable);\n }\n move(particle) {\n const container = particle.container, options = container.actualOptions, parallaxOptions = options.interactivity.events.onHover.parallax;\n if (isSsr() || !parallaxOptions.enable) {\n return;\n }\n const parallaxForce = parallaxOptions.force, mousePos = container.interactivity.mouse.position;\n if (!mousePos) {\n return;\n }\n const canvasSize = container.canvas.size, canvasCenter = {\n x: canvasSize.width * half,\n y: canvasSize.height * half,\n }, parallaxSmooth = parallaxOptions.smooth, factor = particle.getRadius() / parallaxForce, centerDistance = {\n x: (mousePos.x - canvasCenter.x) * factor,\n y: (mousePos.y - canvasCenter.y) * factor,\n }, { offset } = particle;\n offset.x += (centerDistance.x - offset.x) / parallaxSmooth;\n offset.y += (centerDistance.y - offset.y) / parallaxSmooth;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { ParallaxMover } from \"./ParallaxMover.js\";\nexport async function loadParallaxMover(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addMover(\"parallax\", () => {\n return Promise.resolve(new ParallaxMover());\n }, refresh);\n}\n","import { ParticlesInteractorBase, getDistances, getRangeValue, } from \"@tsparticles/engine\";\nconst attractFactor = 1000, identity = 1;\nexport class Attractor extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n interact(p1) {\n const container = this.container;\n if (p1.attractDistance === undefined) {\n p1.attractDistance = getRangeValue(p1.options.move.attract.distance) * container.retina.pixelRatio;\n }\n const distance = p1.attractDistance, pos1 = p1.getPosition(), query = container.particles.quadTree.queryCircle(pos1, distance);\n for (const p2 of query) {\n if (p1 === p2 || !p2.options.move.attract.enable || p2.destroyed || p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), { dx, dy } = getDistances(pos1, pos2), rotate = p1.options.move.attract.rotate, ax = dx / (rotate.x * attractFactor), ay = dy / (rotate.y * attractFactor), p1Factor = p2.size.value / p1.size.value, p2Factor = identity / p1Factor;\n p1.velocity.x -= ax * p1Factor;\n p1.velocity.y -= ay * p1Factor;\n p2.velocity.x += ax * p2Factor;\n p2.velocity.y += ay * p2Factor;\n }\n }\n isEnabled(particle) {\n return particle.options.move.attract.enable;\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Attractor } from \"./Attractor.js\";\nexport async function loadParticlesAttractInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"particlesAttract\", container => {\n return Promise.resolve(new Attractor(container));\n }, refresh);\n}\n","import { clamp } from \"@tsparticles/engine\";\nconst half = 0.5, absorbFactor = 10, minAbsorbFactor = 0;\nfunction updateAbsorb(p1, r1, p2, r2, delta, pixelRatio) {\n const factor = clamp((p1.options.collisions.absorb.speed * delta.factor) / absorbFactor, minAbsorbFactor, r2);\n p1.size.value += factor * half;\n p2.size.value -= factor;\n if (r2 <= pixelRatio) {\n p2.size.value = 0;\n p2.destroy();\n }\n}\nexport function absorb(p1, p2, delta, pixelRatio) {\n const r1 = p1.getRadius(), r2 = p2.getRadius();\n if (r1 === undefined && r2 !== undefined) {\n p1.destroy();\n }\n else if (r1 !== undefined && r2 === undefined) {\n p2.destroy();\n }\n else if (r1 !== undefined && r2 !== undefined) {\n if (r1 >= r2) {\n updateAbsorb(p1, r1, p2, r2, delta, pixelRatio);\n }\n else {\n updateAbsorb(p2, r2, p1, r1, delta, pixelRatio);\n }\n }\n}\n","import { circleBounce, circleBounceDataFromParticle, getRangeValue } from \"@tsparticles/engine\";\nconst fixBounceSpeed = (p) => {\n if (p.collisionMaxSpeed === undefined) {\n p.collisionMaxSpeed = getRangeValue(p.options.collisions.maxSpeed);\n }\n if (p.velocity.length > p.collisionMaxSpeed) {\n p.velocity.length = p.collisionMaxSpeed;\n }\n};\nexport function bounce(p1, p2) {\n circleBounce(circleBounceDataFromParticle(p1), circleBounceDataFromParticle(p2));\n fixBounceSpeed(p1);\n fixBounceSpeed(p2);\n}\n","import { bounce } from \"./Bounce.js\";\nexport function destroy(p1, p2) {\n if (!p1.unbreakable && !p2.unbreakable) {\n bounce(p1, p2);\n }\n if (p1.getRadius() === undefined && p2.getRadius() !== undefined) {\n p1.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() === undefined) {\n p2.destroy();\n }\n else if (p1.getRadius() !== undefined && p2.getRadius() !== undefined) {\n const deleteP = p1.getRadius() >= p2.getRadius() ? p2 : p1;\n deleteP.destroy();\n }\n}\n","import { CollisionMode } from \"@tsparticles/engine\";\nimport { absorb } from \"./Absorb.js\";\nimport { bounce } from \"./Bounce.js\";\nimport { destroy } from \"./Destroy.js\";\nexport function resolveCollision(p1, p2, delta, pixelRatio) {\n switch (p1.options.collisions.mode) {\n case CollisionMode.absorb: {\n absorb(p1, p2, delta, pixelRatio);\n break;\n }\n case CollisionMode.bounce: {\n bounce(p1, p2);\n break;\n }\n case CollisionMode.destroy: {\n destroy(p1, p2);\n break;\n }\n }\n}\n","import { ParticlesInteractorBase, getDistance } from \"@tsparticles/engine\";\nimport { resolveCollision } from \"./ResolveCollision.js\";\nconst double = 2;\nexport class Collider extends ParticlesInteractorBase {\n constructor(container) {\n super(container);\n }\n clear() {\n }\n init() {\n }\n interact(p1, delta) {\n if (p1.destroyed || p1.spawning) {\n return;\n }\n const container = this.container, pos1 = p1.getPosition(), radius1 = p1.getRadius(), query = container.particles.quadTree.queryCircle(pos1, radius1 * double);\n for (const p2 of query) {\n if (p1 === p2 ||\n !p2.options.collisions.enable ||\n p1.options.collisions.mode !== p2.options.collisions.mode ||\n p2.destroyed ||\n p2.spawning) {\n continue;\n }\n const pos2 = p2.getPosition(), radius2 = p2.getRadius();\n if (Math.abs(Math.round(pos1.z) - Math.round(pos2.z)) > radius1 + radius2) {\n continue;\n }\n const dist = getDistance(pos1, pos2), distP = radius1 + radius2;\n if (dist > distP) {\n continue;\n }\n resolveCollision(p1, p2, delta, container.retina.pixelRatio);\n }\n }\n isEnabled(particle) {\n return particle.options.collisions.enable;\n }\n reset() {\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { Collider } from \"./Collider.js\";\nexport async function loadParticlesCollisionsInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addInteractor(\"particlesCollisions\", container => {\n return Promise.resolve(new Collider(container));\n }, refresh);\n}\n","import { Circle, Rectangle } from \"@tsparticles/engine\";\nconst double = 2;\nexport class CircleWarp extends Circle {\n constructor(x, y, radius, canvasSize) {\n super(x, y, radius);\n this.canvasSize = canvasSize;\n this.canvasSize = { ...canvasSize };\n }\n contains(point) {\n const { width, height } = this.canvasSize, { x, y } = point;\n return (super.contains(point) ||\n super.contains({ x: x - width, y }) ||\n super.contains({ x: x - width, y: y - height }) ||\n super.contains({ x, y: y - height }));\n }\n intersects(range) {\n if (super.intersects(range)) {\n return true;\n }\n const rect = range, circle = range, newPos = {\n x: range.position.x - this.canvasSize.width,\n y: range.position.y - this.canvasSize.height,\n };\n if (circle.radius !== undefined) {\n const biggerCircle = new Circle(newPos.x, newPos.y, circle.radius * double);\n return super.intersects(biggerCircle);\n }\n else if (rect.size !== undefined) {\n const rectSW = new Rectangle(newPos.x, newPos.y, rect.size.width * double, rect.size.height * double);\n return super.intersects(rectSW);\n }\n return false;\n }\n}\n","import { OptionsColor, isNull } from \"@tsparticles/engine\";\nexport class LinksShadow {\n constructor() {\n this.blur = 5;\n this.color = new OptionsColor();\n this.color.value = \"#000\";\n this.enable = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.blur !== undefined) {\n this.blur = data.blur;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n }\n}\n","import { OptionsColor, isNull } from \"@tsparticles/engine\";\nexport class LinksTriangle {\n constructor() {\n this.enable = false;\n this.frequency = 1;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.color !== undefined) {\n this.color = OptionsColor.create(this.color, data.color);\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n }\n}\n","import { OptionsColor, isNull } from \"@tsparticles/engine\";\nimport { LinksShadow } from \"./LinksShadow.js\";\nimport { LinksTriangle } from \"./LinksTriangle.js\";\nexport class Links {\n constructor() {\n this.blink = false;\n this.color = new OptionsColor();\n this.color.value = \"#fff\";\n this.consent = false;\n this.distance = 100;\n this.enable = false;\n this.frequency = 1;\n this.opacity = 1;\n this.shadow = new LinksShadow();\n this.triangles = new LinksTriangle();\n this.width = 1;\n this.warp = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.id !== undefined) {\n this.id = data.id;\n }\n if (data.blink !== undefined) {\n this.blink = data.blink;\n }\n this.color = OptionsColor.create(this.color, data.color);\n if (data.consent !== undefined) {\n this.consent = data.consent;\n }\n if (data.distance !== undefined) {\n this.distance = data.distance;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.frequency !== undefined) {\n this.frequency = data.frequency;\n }\n if (data.opacity !== undefined) {\n this.opacity = data.opacity;\n }\n this.shadow.load(data.shadow);\n this.triangles.load(data.triangles);\n if (data.width !== undefined) {\n this.width = data.width;\n }\n if (data.warp !== undefined) {\n this.warp = data.warp;\n }\n }\n}\n","import { Circle, ParticlesInteractorBase, getDistances, getLinkRandomColor, } from \"@tsparticles/engine\";\nimport { CircleWarp } from \"./CircleWarp.js\";\nimport { Links } from \"./Options/Classes/Links.js\";\nconst squarePower = 2, opacityOffset = 1, origin = {\n x: 0,\n y: 0,\n}, minDistance = 0;\nfunction getLinkDistance(pos1, pos2, optDistance, canvasSize, warp) {\n const { dx, dy, distance } = getDistances(pos1, pos2);\n if (!warp || distance <= optDistance) {\n return distance;\n }\n const absDiffs = {\n x: Math.abs(dx),\n y: Math.abs(dy),\n }, warpDistances = {\n x: Math.min(absDiffs.x, canvasSize.width - absDiffs.x),\n y: Math.min(absDiffs.y, canvasSize.height - absDiffs.y),\n };\n return Math.sqrt(warpDistances.x ** squarePower + warpDistances.y ** squarePower);\n}\nexport class Linker extends ParticlesInteractorBase {\n constructor(container, engine) {\n super(container);\n this._setColor = p1 => {\n if (!p1.options.links) {\n return;\n }\n const container = this._linkContainer, linksOptions = p1.options.links;\n let linkColor = linksOptions.id === undefined\n ? container.particles.linksColor\n : container.particles.linksColors.get(linksOptions.id);\n if (linkColor) {\n return;\n }\n const optColor = linksOptions.color;\n linkColor = getLinkRandomColor(this._engine, optColor, linksOptions.blink, linksOptions.consent);\n if (linksOptions.id === undefined) {\n container.particles.linksColor = linkColor;\n }\n else {\n container.particles.linksColors.set(linksOptions.id, linkColor);\n }\n };\n this._linkContainer = container;\n this._engine = engine;\n }\n clear() {\n }\n init() {\n this._linkContainer.particles.linksColor = undefined;\n this._linkContainer.particles.linksColors = new Map();\n }\n interact(p1) {\n if (!p1.options.links) {\n return;\n }\n p1.links = [];\n const pos1 = p1.getPosition(), container = this.container, canvasSize = container.canvas.size;\n if (pos1.x < origin.x || pos1.y < origin.y || pos1.x > canvasSize.width || pos1.y > canvasSize.height) {\n return;\n }\n const linkOpt1 = p1.options.links, optOpacity = linkOpt1.opacity, optDistance = p1.retina.linksDistance ?? minDistance, warp = linkOpt1.warp;\n let range;\n if (warp) {\n range = new CircleWarp(pos1.x, pos1.y, optDistance, canvasSize);\n }\n else {\n range = new Circle(pos1.x, pos1.y, optDistance);\n }\n const query = container.particles.quadTree.query(range);\n for (const p2 of query) {\n const linkOpt2 = p2.options.links;\n if (p1 === p2 ||\n !linkOpt2?.enable ||\n linkOpt1.id !== linkOpt2.id ||\n p2.spawning ||\n p2.destroyed ||\n !p2.links ||\n p1.links.some(t => t.destination === p2) ||\n p2.links.some(t => t.destination === p1)) {\n continue;\n }\n const pos2 = p2.getPosition();\n if (pos2.x < origin.x || pos2.y < origin.y || pos2.x > canvasSize.width || pos2.y > canvasSize.height) {\n continue;\n }\n const distance = getLinkDistance(pos1, pos2, optDistance, canvasSize, warp && linkOpt2.warp);\n if (distance > optDistance) {\n continue;\n }\n const opacityLine = (opacityOffset - distance / optDistance) * optOpacity;\n this._setColor(p1);\n p1.links.push({\n destination: p2,\n opacity: opacityLine,\n });\n }\n }\n isEnabled(particle) {\n return !!particle.options.links?.enable;\n }\n loadParticlesOptions(options, ...sources) {\n if (!options.links) {\n options.links = new Links();\n }\n for (const source of sources) {\n options.links.load(source?.links);\n }\n }\n reset() {\n }\n}\n","import { Linker } from \"./Linker.js\";\nexport async function loadLinksInteraction(engine, refresh = true) {\n await engine.addInteractor(\"particlesLinks\", async (container) => {\n return Promise.resolve(new Linker(container, engine));\n }, refresh);\n}\n","import { drawLine, getDistance, getDistances, getRandom, getStyleFromRgb, rangeColorToRgb, } from \"@tsparticles/engine\";\nexport function drawTriangle(context, p1, p2, p3) {\n context.beginPath();\n context.moveTo(p1.x, p1.y);\n context.lineTo(p2.x, p2.y);\n context.lineTo(p3.x, p3.y);\n context.closePath();\n}\nexport function drawLinkLine(params) {\n let drawn = false;\n const { begin, end, engine, maxDistance, context, canvasSize, width, backgroundMask, colorLine, opacity, links } = params;\n if (getDistance(begin, end) <= maxDistance) {\n drawLine(context, begin, end);\n drawn = true;\n }\n else if (links.warp) {\n let pi1;\n let pi2;\n const endNE = {\n x: end.x - canvasSize.width,\n y: end.y,\n };\n const d1 = getDistances(begin, endNE);\n if (d1.distance <= maxDistance) {\n const yi = begin.y - (d1.dy / d1.dx) * begin.x;\n pi1 = { x: 0, y: yi };\n pi2 = { x: canvasSize.width, y: yi };\n }\n else {\n const endSW = {\n x: end.x,\n y: end.y - canvasSize.height,\n };\n const d2 = getDistances(begin, endSW);\n if (d2.distance <= maxDistance) {\n const yi = begin.y - (d2.dy / d2.dx) * begin.x;\n const xi = -yi / (d2.dy / d2.dx);\n pi1 = { x: xi, y: 0 };\n pi2 = { x: xi, y: canvasSize.height };\n }\n else {\n const endSE = {\n x: end.x - canvasSize.width,\n y: end.y - canvasSize.height,\n };\n const d3 = getDistances(begin, endSE);\n if (d3.distance <= maxDistance) {\n const yi = begin.y - (d3.dy / d3.dx) * begin.x;\n const xi = -yi / (d3.dy / d3.dx);\n pi1 = { x: xi, y: yi };\n pi2 = { x: pi1.x + canvasSize.width, y: pi1.y + canvasSize.height };\n }\n }\n }\n if (pi1 && pi2) {\n drawLine(context, begin, pi1);\n drawLine(context, end, pi2);\n drawn = true;\n }\n }\n if (!drawn) {\n return;\n }\n context.lineWidth = width;\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.strokeStyle = getStyleFromRgb(colorLine, opacity);\n const { shadow } = links;\n if (shadow.enable) {\n const shadowColor = rangeColorToRgb(engine, shadow.color);\n if (shadowColor) {\n context.shadowBlur = shadow.blur;\n context.shadowColor = getStyleFromRgb(shadowColor);\n }\n }\n context.stroke();\n}\nexport function drawLinkTriangle(params) {\n const { context, pos1, pos2, pos3, backgroundMask, colorTriangle, opacityTriangle } = params;\n drawTriangle(context, pos1, pos2, pos3);\n if (backgroundMask.enable) {\n context.globalCompositeOperation = backgroundMask.composite;\n }\n context.fillStyle = getStyleFromRgb(colorTriangle, opacityTriangle);\n context.fill();\n}\nexport function getLinkKey(ids) {\n ids.sort((a, b) => a - b);\n return ids.join(\"_\");\n}\nexport function setLinkFrequency(particles, dictionary) {\n const key = getLinkKey(particles.map(t => t.id));\n let res = dictionary.get(key);\n if (res === undefined) {\n res = getRandom();\n dictionary.set(key, res);\n }\n return res;\n}\n","import { getDistance, getLinkColor, getRandom, getRangeValue, rangeColorToRgb, } from \"@tsparticles/engine\";\nimport { drawLinkLine, drawLinkTriangle, setLinkFrequency } from \"./Utils.js\";\nconst minOpacity = 0, minWidth = 0, minDistance = 0, half = 0.5, maxFrequency = 1;\nexport class LinkInstance {\n constructor(container, engine) {\n this._drawLinkLine = (p1, link) => {\n const p1LinksOptions = p1.options.links;\n if (!p1LinksOptions?.enable) {\n return;\n }\n const container = this._container, options = container.actualOptions, p2 = link.destination, pos1 = p1.getPosition(), pos2 = p2.getPosition();\n let opacity = link.opacity;\n container.canvas.draw(ctx => {\n let colorLine;\n const twinkle = p1.options.twinkle?.lines;\n if (twinkle?.enable) {\n const twinkleFreq = twinkle.frequency, twinkleRgb = rangeColorToRgb(this._engine, twinkle.color), twinkling = getRandom() < twinkleFreq;\n if (twinkling && twinkleRgb) {\n colorLine = twinkleRgb;\n opacity = getRangeValue(twinkle.opacity);\n }\n }\n if (!colorLine) {\n const linkColor = p1LinksOptions.id !== undefined\n ? container.particles.linksColors.get(p1LinksOptions.id)\n : container.particles.linksColor;\n colorLine = getLinkColor(p1, p2, linkColor);\n }\n if (!colorLine) {\n return;\n }\n const width = p1.retina.linksWidth ?? minWidth, maxDistance = p1.retina.linksDistance ?? minDistance, { backgroundMask } = options;\n drawLinkLine({\n context: ctx,\n width,\n begin: pos1,\n end: pos2,\n engine: this._engine,\n maxDistance,\n canvasSize: container.canvas.size,\n links: p1LinksOptions,\n backgroundMask: backgroundMask,\n colorLine,\n opacity,\n });\n });\n };\n this._drawLinkTriangle = (p1, link1, link2) => {\n const linksOptions = p1.options.links;\n if (!linksOptions?.enable) {\n return;\n }\n const triangleOptions = linksOptions.triangles;\n if (!triangleOptions.enable) {\n return;\n }\n const container = this._container, options = container.actualOptions, p2 = link1.destination, p3 = link2.destination, opacityTriangle = triangleOptions.opacity ?? (link1.opacity + link2.opacity) * half;\n if (opacityTriangle <= minOpacity) {\n return;\n }\n container.canvas.draw(ctx => {\n const pos1 = p1.getPosition(), pos2 = p2.getPosition(), pos3 = p3.getPosition(), linksDistance = p1.retina.linksDistance ?? minDistance;\n if (getDistance(pos1, pos2) > linksDistance ||\n getDistance(pos3, pos2) > linksDistance ||\n getDistance(pos3, pos1) > linksDistance) {\n return;\n }\n let colorTriangle = rangeColorToRgb(this._engine, triangleOptions.color);\n if (!colorTriangle) {\n const linkColor = linksOptions.id !== undefined\n ? container.particles.linksColors.get(linksOptions.id)\n : container.particles.linksColor;\n colorTriangle = getLinkColor(p1, p2, linkColor);\n }\n if (!colorTriangle) {\n return;\n }\n drawLinkTriangle({\n context: ctx,\n pos1,\n pos2,\n pos3,\n backgroundMask: options.backgroundMask,\n colorTriangle,\n opacityTriangle,\n });\n });\n };\n this._drawTriangles = (options, p1, link, p1Links) => {\n const p2 = link.destination;\n if (!(options.links?.triangles.enable && p2.options.links?.triangles.enable)) {\n return;\n }\n const vertices = p2.links?.filter(t => {\n const linkFreq = this._getLinkFrequency(p2, t.destination), minCount = 0;\n return (p2.options.links &&\n linkFreq <= p2.options.links.frequency &&\n p1Links.findIndex(l => l.destination === t.destination) >= minCount);\n });\n if (!vertices?.length) {\n return;\n }\n for (const vertex of vertices) {\n const p3 = vertex.destination, triangleFreq = this._getTriangleFrequency(p1, p2, p3);\n if (triangleFreq > options.links.triangles.frequency) {\n continue;\n }\n this._drawLinkTriangle(p1, link, vertex);\n }\n };\n this._getLinkFrequency = (p1, p2) => {\n return setLinkFrequency([p1, p2], this._freqs.links);\n };\n this._getTriangleFrequency = (p1, p2, p3) => {\n return setLinkFrequency([p1, p2, p3], this._freqs.triangles);\n };\n this._container = container;\n this._engine = engine;\n this._freqs = {\n links: new Map(),\n triangles: new Map(),\n };\n }\n drawParticle(context, particle) {\n const { links, options } = particle;\n if (!links?.length) {\n return;\n }\n const p1Links = links.filter(l => options.links &&\n (options.links.frequency >= maxFrequency ||\n this._getLinkFrequency(particle, l.destination) <= options.links.frequency));\n for (const link of p1Links) {\n this._drawTriangles(options, particle, link, p1Links);\n if (link.opacity > minOpacity && (particle.retina.linksWidth ?? minWidth) > minWidth) {\n this._drawLinkLine(particle, link);\n }\n }\n }\n async init() {\n this._freqs.links = new Map();\n this._freqs.triangles = new Map();\n await Promise.resolve();\n }\n particleCreated(particle) {\n particle.links = [];\n if (!particle.options.links) {\n return;\n }\n const ratio = this._container.retina.pixelRatio, { retina } = particle, { distance, width } = particle.options.links;\n retina.linksDistance = distance * ratio;\n retina.linksWidth = width * ratio;\n }\n particleDestroyed(particle) {\n particle.links = [];\n }\n}\n","import { LinkInstance } from \"./LinkInstance.js\";\nexport class LinksPlugin {\n constructor(engine) {\n this.id = \"links\";\n this._engine = engine;\n }\n getPlugin(container) {\n return Promise.resolve(new LinkInstance(container, this._engine));\n }\n loadOptions() {\n }\n needsPlugin() {\n return true;\n }\n}\n","import { LinksPlugin } from \"./LinksPlugin.js\";\nexport async function loadLinksPlugin(engine, refresh = true) {\n const plugin = new LinksPlugin(engine);\n await engine.addPlugin(plugin, refresh);\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { loadLinksInteraction } from \"./interaction.js\";\nimport { loadLinksPlugin } from \"./plugin.js\";\nexport async function loadParticlesLinksInteraction(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await loadLinksInteraction(engine, refresh);\n await loadLinksPlugin(engine, refresh);\n}\nexport * from \"./Options/Classes/Links.js\";\nexport * from \"./Options/Classes/LinksShadow.js\";\nexport * from \"./Options/Classes/LinksTriangle.js\";\nexport * from \"./Options/Interfaces/ILinks.js\";\nexport * from \"./Options/Interfaces/ILinksShadow.js\";\nexport * from \"./Options/Interfaces/ILinksTriangle.js\";\n","import { degToRad } from \"@tsparticles/engine\";\nconst piDeg = 180, origin = { x: 0, y: 0 }, sidesOffset = 2;\nexport function drawPolygon(data, start, side) {\n const { context } = data, sideCount = side.count.numerator * side.count.denominator, decimalSides = side.count.numerator / side.count.denominator, interiorAngleDegrees = (piDeg * (decimalSides - sidesOffset)) / decimalSides, interiorAngle = Math.PI - degToRad(interiorAngleDegrees);\n if (!context) {\n return;\n }\n context.beginPath();\n context.translate(start.x, start.y);\n context.moveTo(origin.x, origin.y);\n for (let i = 0; i < sideCount; i++) {\n context.lineTo(side.length, origin.y);\n context.translate(side.length, origin.y);\n context.rotate(interiorAngle);\n }\n}\n","import { getRangeValue, } from \"@tsparticles/engine\";\nimport { drawPolygon } from \"./Utils.js\";\nconst defaultSides = 5;\nexport class PolygonDrawerBase {\n draw(data) {\n const { particle, radius } = data, start = this.getCenter(particle, radius), side = this.getSidesData(particle, radius);\n drawPolygon(data, start, side);\n }\n getSidesCount(particle) {\n const polygon = particle.shapeData;\n return Math.round(getRangeValue(polygon?.sides ?? defaultSides));\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase.js\";\nconst sidesCenterFactor = 3.5, yFactor = 2.66, sidesFactor = 3;\nexport class PolygonDrawer extends PolygonDrawerBase {\n constructor() {\n super(...arguments);\n this.validTypes = [\"polygon\"];\n }\n getCenter(particle, radius) {\n return {\n x: -radius / (particle.sides / sidesCenterFactor),\n y: -radius / (yFactor / sidesCenterFactor),\n };\n }\n getSidesData(particle, radius) {\n const sides = particle.sides;\n return {\n count: {\n denominator: 1,\n numerator: sides,\n },\n length: (radius * yFactor) / (sides / sidesFactor),\n };\n }\n}\n","import { PolygonDrawerBase } from \"./PolygonDrawerBase.js\";\nconst yFactor = 1.66, sides = 3, double = 2;\nexport class TriangleDrawer extends PolygonDrawerBase {\n constructor() {\n super(...arguments);\n this.validTypes = [\"triangle\"];\n }\n getCenter(particle, radius) {\n return {\n x: -radius,\n y: radius / yFactor,\n };\n }\n getSidesCount() {\n return sides;\n }\n getSidesData(particle, radius) {\n const diameter = radius * double;\n return {\n count: {\n denominator: 2,\n numerator: 3,\n },\n length: diameter,\n };\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { PolygonDrawer } from \"./PolygonDrawer.js\";\nimport { TriangleDrawer } from \"./TriangleDrawer.js\";\nexport async function loadGenericPolygonShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new PolygonDrawer(), refresh);\n}\nexport async function loadTriangleShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new TriangleDrawer(), refresh);\n}\nexport async function loadPolygonShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await loadGenericPolygonShape(engine, refresh);\n await loadTriangleShape(engine, refresh);\n}\n","import { isNull, setRangeValue } from \"@tsparticles/engine\";\nexport class RotateAnimation {\n constructor() {\n this.enable = false;\n this.speed = 0;\n this.decay = 0;\n this.sync = false;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.speed !== undefined) {\n this.speed = setRangeValue(data.speed);\n }\n if (data.decay !== undefined) {\n this.decay = setRangeValue(data.decay);\n }\n if (data.sync !== undefined) {\n this.sync = data.sync;\n }\n }\n}\n","import { RotateDirection, ValueWithRandom, isNull, } from \"@tsparticles/engine\";\nimport { RotateAnimation } from \"./RotateAnimation.js\";\nexport class Rotate extends ValueWithRandom {\n constructor() {\n super();\n this.animation = new RotateAnimation();\n this.direction = RotateDirection.clockwise;\n this.path = false;\n this.value = 0;\n }\n load(data) {\n if (isNull(data)) {\n return;\n }\n super.load(data);\n if (data.direction !== undefined) {\n this.direction = data.direction;\n }\n this.animation.load(data.animation);\n if (data.path !== undefined) {\n this.path = data.path;\n }\n }\n}\n","import { AnimationStatus, DestroyType, RotateDirection, degToRad, getRandom, getRangeValue, updateAnimation, } from \"@tsparticles/engine\";\nimport { Rotate } from \"./Options/Classes/Rotate.js\";\nconst double = 2, doublePI = Math.PI * double, identity = 1, doublePIDeg = 360;\nexport class RotateUpdater {\n constructor(container) {\n this.container = container;\n }\n init(particle) {\n const rotateOptions = particle.options.rotate;\n if (!rotateOptions) {\n return;\n }\n particle.rotate = {\n enable: rotateOptions.animation.enable,\n value: degToRad(getRangeValue(rotateOptions.value)),\n min: 0,\n max: doublePI,\n };\n particle.pathRotation = rotateOptions.path;\n let rotateDirection = rotateOptions.direction;\n if (rotateDirection === RotateDirection.random) {\n const index = Math.floor(getRandom() * double), minIndex = 0;\n rotateDirection = index > minIndex ? RotateDirection.counterClockwise : RotateDirection.clockwise;\n }\n switch (rotateDirection) {\n case RotateDirection.counterClockwise:\n case \"counterClockwise\":\n particle.rotate.status = AnimationStatus.decreasing;\n break;\n case RotateDirection.clockwise:\n particle.rotate.status = AnimationStatus.increasing;\n break;\n }\n const rotateAnimation = rotateOptions.animation;\n if (rotateAnimation.enable) {\n particle.rotate.decay = identity - getRangeValue(rotateAnimation.decay);\n particle.rotate.velocity =\n (getRangeValue(rotateAnimation.speed) / doublePIDeg) * this.container.retina.reduceFactor;\n if (!rotateAnimation.sync) {\n particle.rotate.velocity *= getRandom();\n }\n }\n particle.rotation = particle.rotate.value;\n }\n isEnabled(particle) {\n const rotate = particle.options.rotate;\n if (!rotate) {\n return false;\n }\n return !particle.destroyed && !particle.spawning && (!!rotate.value || rotate.animation.enable || rotate.path);\n }\n loadOptions(options, ...sources) {\n if (!options.rotate) {\n options.rotate = new Rotate();\n }\n for (const source of sources) {\n options.rotate.load(source?.rotate);\n }\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n particle.isRotating = !!particle.rotate;\n if (!particle.rotate) {\n return;\n }\n updateAnimation(particle, particle.rotate, false, DestroyType.none, delta);\n particle.rotation = particle.rotate.value;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { RotateUpdater } from \"./RotateUpdater.js\";\nexport async function loadRotateUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"rotate\", container => {\n return Promise.resolve(new RotateUpdater(container));\n }, refresh);\n}\n","const fixFactorSquared = 2, fixFactor = Math.sqrt(fixFactorSquared), double = 2;\nexport function drawSquare(data) {\n const { context, radius } = data, fixedRadius = radius / fixFactor, fixedDiameter = fixedRadius * double;\n context.rect(-fixedRadius, -fixedRadius, fixedDiameter, fixedDiameter);\n}\n","import { drawSquare } from \"./Utils.js\";\nconst sides = 4;\nexport class SquareDrawer {\n constructor() {\n this.validTypes = [\"edge\", \"square\"];\n }\n draw(data) {\n drawSquare(data);\n }\n getSidesCount() {\n return sides;\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { SquareDrawer } from \"./SquareDrawer.js\";\nexport async function loadSquareShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new SquareDrawer(), refresh);\n}\n","const defaultInset = 2, origin = { x: 0, y: 0 };\nexport function drawStar(data) {\n const { context, particle, radius } = data, sides = particle.sides, inset = particle.starInset ?? defaultInset;\n context.moveTo(origin.x, origin.y - radius);\n for (let i = 0; i < sides; i++) {\n context.rotate(Math.PI / sides);\n context.lineTo(origin.x, origin.y - radius * inset);\n context.rotate(Math.PI / sides);\n context.lineTo(origin.x, origin.y - radius);\n }\n}\n","import { getRangeValue, } from \"@tsparticles/engine\";\nimport { drawStar } from \"./Utils.js\";\nconst defaultInset = 2, defaultSides = 5;\nexport class StarDrawer {\n constructor() {\n this.validTypes = [\"star\"];\n }\n draw(data) {\n drawStar(data);\n }\n getSidesCount(particle) {\n const star = particle.shapeData;\n return Math.round(getRangeValue(star?.sides ?? defaultSides));\n }\n particleInit(container, particle) {\n const star = particle.shapeData;\n particle.starInset = getRangeValue(star?.inset ?? defaultInset);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { StarDrawer } from \"./StarDrawer.js\";\nexport async function loadStarShape(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addShape(new StarDrawer(), refresh);\n}\n","import { getHslAnimationFromHsl, getRangeValue, itemFromSingleOrMultiple, rangeColorToHsl, updateColor, } from \"@tsparticles/engine\";\nconst defaultOpacity = 1;\nexport class StrokeColorUpdater {\n constructor(container, engine) {\n this._container = container;\n this._engine = engine;\n }\n init(particle) {\n const container = this._container, options = particle.options;\n const stroke = itemFromSingleOrMultiple(options.stroke, particle.id, options.reduceDuplicates);\n particle.strokeWidth = getRangeValue(stroke.width) * container.retina.pixelRatio;\n particle.strokeOpacity = getRangeValue(stroke.opacity ?? defaultOpacity);\n particle.strokeAnimation = stroke.color?.animation;\n const strokeHslColor = rangeColorToHsl(this._engine, stroke.color) ?? particle.getFillColor();\n if (strokeHslColor) {\n particle.strokeColor = getHslAnimationFromHsl(strokeHslColor, particle.strokeAnimation, container.retina.reduceFactor);\n }\n }\n isEnabled(particle) {\n const color = particle.strokeAnimation, { strokeColor } = particle;\n return (!particle.destroyed &&\n !particle.spawning &&\n !!color &&\n ((strokeColor?.h.value !== undefined && strokeColor.h.enable) ||\n (strokeColor?.s.value !== undefined && strokeColor.s.enable) ||\n (strokeColor?.l.value !== undefined && strokeColor.l.enable)));\n }\n update(particle, delta) {\n if (!this.isEnabled(particle)) {\n return;\n }\n updateColor(particle.strokeColor, delta);\n }\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { StrokeColorUpdater } from \"./StrokeColorUpdater.js\";\nexport async function loadStrokeColorUpdater(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"strokeColor\", container => {\n return Promise.resolve(new StrokeColorUpdater(container, engine));\n }, refresh);\n}\n","import { assertValidVersion } from \"@tsparticles/engine\";\nimport { loadBasic } from \"@tsparticles/basic\";\nimport { loadEasingQuadPlugin } from \"@tsparticles/plugin-easing-quad\";\nimport { loadEmojiShape } from \"@tsparticles/shape-emoji\";\nimport { loadExternalAttractInteraction } from \"@tsparticles/interaction-external-attract\";\nimport { loadExternalBounceInteraction } from \"@tsparticles/interaction-external-bounce\";\nimport { loadExternalBubbleInteraction } from \"@tsparticles/interaction-external-bubble\";\nimport { loadExternalConnectInteraction } from \"@tsparticles/interaction-external-connect\";\nimport { loadExternalGrabInteraction } from \"@tsparticles/interaction-external-grab\";\nimport { loadExternalPauseInteraction } from \"@tsparticles/interaction-external-pause\";\nimport { loadExternalPushInteraction } from \"@tsparticles/interaction-external-push\";\nimport { loadExternalRemoveInteraction } from \"@tsparticles/interaction-external-remove\";\nimport { loadExternalRepulseInteraction } from \"@tsparticles/interaction-external-repulse\";\nimport { loadExternalSlowInteraction } from \"@tsparticles/interaction-external-slow\";\nimport { loadImageShape } from \"@tsparticles/shape-image\";\nimport { loadLifeUpdater } from \"@tsparticles/updater-life\";\nimport { loadLineShape } from \"@tsparticles/shape-line\";\nimport { loadParallaxMover } from \"@tsparticles/move-parallax\";\nimport { loadParticlesAttractInteraction } from \"@tsparticles/interaction-particles-attract\";\nimport { loadParticlesCollisionsInteraction } from \"@tsparticles/interaction-particles-collisions\";\nimport { loadParticlesLinksInteraction } from \"@tsparticles/interaction-particles-links\";\nimport { loadPolygonShape } from \"@tsparticles/shape-polygon\";\nimport { loadRotateUpdater } from \"@tsparticles/updater-rotate\";\nimport { loadSquareShape } from \"@tsparticles/shape-square\";\nimport { loadStarShape } from \"@tsparticles/shape-star\";\nimport { loadStrokeColorUpdater } from \"@tsparticles/updater-stroke-color\";\nexport async function loadSlim(engine, refresh = true) {\n assertValidVersion(engine, \"3.7.1\");\n await loadParallaxMover(engine, false);\n await loadExternalAttractInteraction(engine, false);\n await loadExternalBounceInteraction(engine, false);\n await loadExternalBubbleInteraction(engine, false);\n await loadExternalConnectInteraction(engine, false);\n await loadExternalGrabInteraction(engine, false);\n await loadExternalPauseInteraction(engine, false);\n await loadExternalPushInteraction(engine, false);\n await loadExternalRemoveInteraction(engine, false);\n await loadExternalRepulseInteraction(engine, false);\n await loadExternalSlowInteraction(engine, false);\n await loadParticlesAttractInteraction(engine, false);\n await loadParticlesCollisionsInteraction(engine, false);\n await loadParticlesLinksInteraction(engine, false);\n await loadEasingQuadPlugin(engine, false);\n await loadEmojiShape(engine, false);\n await loadImageShape(engine, false);\n await loadLineShape(engine, false);\n await loadPolygonShape(engine, false);\n await loadSquareShape(engine, false);\n await loadStarShape(engine, false);\n await loadLifeUpdater(engine, false);\n await loadRotateUpdater(engine, false);\n await loadStrokeColorUpdater(engine, false);\n await loadBasic(engine, refresh);\n}\n","import type { CustomHandler } from '@novely/core';\nimport type { Container, IOptions, RecursivePartial } from '@tsparticles/engine';\n\nimport { tsParticles } from '@tsparticles/engine';\nimport { loadSlim } from '@tsparticles/slim';\n\nlet loaded = false;\n\nconst ID = Symbol();\n\ntype ParticlesOptions = RecursivePartial<IOptions>;\n\nconst withDefault = (options: ParticlesOptions) => {\n\toptions.autoPlay ||= true;\n\toptions.fullScreen ||= { enable: true };\n\n\treturn options;\n};\n\nconst createUniqId = (() => {\n\tlet c = 0;\n\n\treturn () => {\n\t\treturn `np-${c++}`;\n\t};\n})();\n\nconst showParticles = (options: ParticlesOptions): CustomHandler => {\n\tconst handler: CustomHandler = async ({ clear, data, getDomNodes, flags: { goingBack, preview } }) => {\n\t\tif (preview) return;\n\n\t\tif (!loaded) {\n\t\t\t/**\n\t\t\t * Load `tsParticles` in case it's not loaded\n\t\t\t */\n\t\t\tawait loadSlim(tsParticles);\n\t\t\t/**\n\t\t\t * Do not load it later\n\t\t\t */\n\t\t\tloaded = true;\n\t\t}\n\n\t\tconst { element } = getDomNodes(true);\n\n\t\t/**\n\t\t * Remove previous instance\n\t\t */\n\t\tclear(() => {\n\t\t\t/**\n\t\t\t * Get the instance\n\t\t\t */\n\t\t\tconst instance = data().instance as Container;\n\n\t\t\tif (!instance) return;\n\n\t\t\t/**\n\t\t\t * Destroy the instance\n\t\t\t */\n\t\t\tinstance.destroy();\n\n\t\t\t/**\n\t\t\t * Empty the `data`\n\t\t\t */\n\t\t\tdata({});\n\t\t});\n\n\t\tconst optionsEqual = data().options === options;\n\n\t\t/**\n\t\t * Skip re-rendering if:\n\t\t * 1) Options has not changed and instance is present\n\t\t * 2) Options has not changed and we are goingBack\n\t\t */\n\t\tif (optionsEqual && Boolean(data().instance)) return;\n\t\tif (optionsEqual && goingBack) return;\n\n\t\tconst id = createUniqId();\n\n\t\t/**\n\t\t * We can not wait until particles is loaded\n\t\t */\n\t\tconst load = async () => {\n\t\t\tconst instance = await tsParticles.load({\n\t\t\t\tid: id,\n\t\t\t\telement: element,\n\t\t\t\toptions: withDefault(options),\n\t\t\t});\n\n\t\t\telement.style.setProperty('position', 'absolute');\n\t\t\telement.style.setProperty('z-index', '2');\n\n\t\t\tdata({ instance, options });\n\t\t};\n\n\t\t/**\n\t\t * Should be safe because in restore only latest is called, and when playing it is not expected to change frequently\n\t\t */\n\t\tvoid load();\n\t};\n\n\thandler.callOnlyLatest = handler.skipClearOnGoingBack = true;\n\thandler.id = ID;\n\thandler.key = 'particles';\n\n\treturn handler;\n};\n\nconst hideParticles = () => {\n\tconst handler: CustomHandler = ({ data, remove, flags: { preview } }) => {\n\t\tif (preview) return;\n\n\t\t/**\n\t\t * Get the instance\n\t\t */\n\t\tconst instance = data().instance as Container;\n\n\t\t/**\n\t\t * Destroy it\n\t\t */\n\t\tif (instance) instance.destroy();\n\n\t\t/**\n\t\t * Delete the layer\n\t\t */\n\t\tremove();\n\t};\n\n\thandler.callOnlyLatest = true;\n\thandler.id = ID;\n\thandler.key = 'particles';\n\n\treturn handler;\n};\n\nexport { showParticles, hideParticles };\n"],"mappings":"AAAO,IAAMA,GAAqB,YACrBC,GAAiB,cACjBC,GAAe,YACfC,GAAkB,eAClBC,GAAgB,aAChBC,GAAiB,cACjBC,GAAkB,aAClBC,GAAgB,WAChBC,GAAiB,YACjBC,GAAmB,cACnBC,GAAc,SACdC,GAAwB,mBACxBC,EAAc,sBCZpB,IAAIC,GACV,SAAUA,EAAe,CACtBA,EAAc,OAAY,SAC1BA,EAAc,WAAgB,cAC9BA,EAAc,YAAiB,eAC/BA,EAAc,KAAU,OACxBA,EAAc,KAAU,OACxBA,EAAc,MAAW,QACzBA,EAAc,IAAS,MACvBA,EAAc,QAAa,WAC3BA,EAAc,SAAc,YAC5BA,EAAc,QAAa,UAC3BA,EAAc,OAAY,QAC9B,GAAGA,IAAkBA,EAAgB,CAAC,EAAE,ECbjC,SAASC,GAAUC,EAAK,CAC3B,OAAO,OAAOA,GAAQ,SAC1B,CACO,SAASC,GAASD,EAAK,CAC1B,OAAO,OAAOA,GAAQ,QAC1B,CACO,SAASE,GAASF,EAAK,CAC1B,OAAO,OAAOA,GAAQ,QAC1B,CAIO,SAASG,GAASC,EAAK,CAC1B,OAAO,OAAOA,GAAQ,UAAYA,IAAQ,IAC9C,CACO,SAASC,EAAQD,EAAK,CACzB,OAAO,MAAM,QAAQ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,CAAC,CAC3B,GAKU,CACX,EAEA,OAAAI,EAAQ,eAAiBA,EAAQ,qBAAuB,GACxDA,EAAQ,GAAKN,GACbM,EAAQ,IAAM,YAEPA,CACR,EAEMY,GAAgB,IAAM,CAC3B,IAAMZ,EAAyB,CAAC,CAAE,KAAAE,EAAM,OAAAW,EAAQ,MAAO,CAAE,QAAAR,CAAQ,CAAE,IAAM,CACxE,GAAIA,EAAS,OAKb,IAAMI,EAAWP,EAAK,EAAE,SAKpBO,GAAUA,EAAS,QAAQ,EAK/BI,EAAO,CACR,EAEA,OAAAb,EAAQ,eAAiB,GACzBA,EAAQ,GAAKN,GACbM,EAAQ,IAAM,YAEPA,CACR","names":["generatedAttribute","mouseDownEvent","mouseUpEvent","mouseLeaveEvent","mouseOutEvent","mouseMoveEvent","touchStartEvent","touchEndEvent","touchMoveEvent","touchCancelEvent","resizeEvent","visibilityChangeEvent","errorPrefix","MoveDirection","isBoolean","arg","isString","isNumber","isObject","arg","isArray","isNull","origin","squareExp","inverseFactorNumerator","Vector3d","_Vector3d","xOrCoords","y","z","angle","length","isNumber","coords3d","errorPrefix","source","x","v","n","c","v3d","Vector","_Vector","_random","_animationLoop","cb","idx","double","doublePI","getRandom","clamp","_random","animate","fn","_animationLoop","cancelAnimation","handle","clamp","num","min","max","mix","comp1","comp2","weight1","weight2","randomInRange","r","getRangeMax","minOffset","getRangeMin","getRandom","getRangeValue","value","isNumber","setRangeValue","source","getDistances","pointA","pointB","dx","dy","squareExp","getDistance","degToRad","degrees","getParticleDirectionAngle","direction","position","center","empty","half","quarter","threeQuarter","MoveDirection","doublePI","getParticleBaseVelocity","baseVelocity","Vector","collisionVelocity","v1","v2","m1","m2","calcExactPositionOrRandomFromSize","data","getRandom","parseAlpha","input","AnimationMode","AnimationStatus","DestroyType","OutModeDirection","PixelMode","StartValueType","_logger","getLogger","_logger","rectSideBounce","data","res","pSide","pOtherSide","rectSide","rectOtherSide","velocity","factor","half","minVelocity","checkSelector","element","selectors","executeOnSingleOrMultiple","selector","isArray","t","isSsr","hasMatchMedia","safeMatchMedia","query","safeIntersectionObserver","callback","safeMutationObserver","isInArray","value","array","loadFont","font","weight","arrayRandomIndex","getRandom","itemFromArray","index","useIndex","isPointInside","point","size","offset","radius","direction","areBoundsInside","calculateBounds","bounds","inside","OutModeDirection","deepExtend","destination","sources","source","isObject","sourceIsArray","key","sourceDict","destDict","v","isDivModeEnabled","mode","divs","findItemFromSingleOrMultiple","divModeExecute","div","divMode","singleDivModeExecute","circleBounceDataFromParticle","p","Vector","getRangeValue","circleBounce","p1","p2","xVelocityDiff","yVelocityDiff","pos1","pos2","xDist","yDist","getDistances","angle","m1","m2","u1","u2","v1","collisionVelocity","v2","vFinal1","vFinal2","rectBounce","particle","divBounds","pPos","bounceOptions","resH","resV","obj","item","itemFromSingleOrMultiple","initParticleNumericAnimationValue","options","pxRatio","valueRange","animationOptions","getRangeMax","getRangeMin","decayOffset","AnimationMode","AnimationStatus","autoStatus","StartValueType","randomInRange","getPositionOrSize","positionOrSize","canvasSize","PixelMode","_","rest","getPosition","position","checkDestroy","particle","destroyType","value","minValue","maxValue","DestroyType","updateAnimation","data","changeDirection","delta","velocity","decay","AnimationStatus","clamp","assertValidVersion","engine","pluginVersion","AlterType","randomColorValue","midColorValue","stringToRgba","engine","input","manager","rangeColorToRgb","index","useIndex","color","isString","colorToRgb","isArray","itemFromArray","res","getRandomRgbColor","stringToRgb","rangeColorToHsl","engine","color","index","useIndex","rgb","rangeColorToRgb","rgbToHsl","r1","g1","b1","max","min","res","stringToRgb","engine","input","stringToRgba","hslToRgb","hsl","h","s","hNormalized","sNormalized","lNormalized","rgbFactor","triple","grayscaleValue","half","double","channel","temp1","temp2","temp3","temp3Offset","sNormalizedOffset","phaseNumerator","phaseThird","red","green","blue","hslaToRgba","hsla","rgbResult","getRandomRgbColor","min","fixedMin","rgbMax","randomInRange","setRangeValue","getStyleFromRgb","color","opacity","getStyleFromHsl","colorMix","color1","color2","size1","size2","rgb1","rgb2","mix","getLinkColor","p1","p2","linkColor","randomColorValue","midColorValue","sourceColor","destColor","hslColor","getLinkRandomColor","optColor","blink","consent","isString","rangeColorToRgb","getHslFromAnimation","animation","getHslAnimationFromHsl","animationOptions","reduceFactor","resColor","setColorAnimation","colorValue","colorAnimation","defaultVelocity","decayOffset","defaultLoops","defaultTime","getRangeValue","AnimationStatus","getRandom","updateColorValue","data","range","decrease","delta","offset","velocity","decay","max","getRangeMax","getRangeMin","clamp","updateColor","l","ranges","origin","defaultTransform","drawLine","context","begin","end","paintBase","dimension","baseColor","paintImage","image","opacity","clear","drawParticle","data","container","particle","delta","colorStyles","backgroundMask","composite","radius","shadow","transform","pos","defaultAngle","angle","rotateData","rotating","identity","transformData","shadowColor","getStyleFromRgb","minStrokeWidth","strokeWidth","drawData","drawShape","drawShapeAfterDraw","drawEffect","drawer","drawPlugin","plugin","drawParticlePlugin","alterHsl","color","type","value","AlterType","setTransformValue","factor","newFactor","key","newValue","defaultValue","setStyle","canvas","style","important","element","elementStyle","value","Canvas","container","engine","particle","updater","ctx","radius","zOpacity","colorStyles","transform","fill","stroke","updaterTransform","plugin","fColor","sColor","rangeColorToHsl","options","cover","color","coverRgb","rangeColorToRgb","coverColor","getStyleFromRgb","resolve","reject","img","evt","deepExtend","trail","trailFill","factorNumerator","opacity","fillColor","baseColor","paintBase","image","paintImage","observer","originalStyle","callback","radix","zIndex","pxRatio","stdSize","clear","cb","delta","pfColor","psColor","zIndexOptions","zIndexFactorOffset","zIndexFactor","zOpacityFactor","defaultOpacity","strokeOpacity","zStrokeOpacity","getStyleFromHsl","drawParticle","drawParticlePlugin","drawPlugin","obs","safeMutationObserver","records","record","getLogger","background","generatedAttribute","standardSize","retinaSize","currentSize","newSize","oldSize","canvasSize","needsRefresh","InteractivityDetect","double","manageListener","element","event","handler","add","options","addOptions","isBoolean","removeOptions","EventListeners","container","e","mouseInteractivity","mousePos","onClick","executeOnSingleOrMultiple","mode","mediaEvent","defaultThemes","themeName","theme","handleResize","mouseLeaveTmpEvent","handlers","interactivityEl","html","canvasEl","mouseMoveEvent","touchStartEvent","touchMoveEvent","touchEndEvent","mouseUpEvent","mouseDownEvent","touchCancelEvent","detectType","mouseLeaveEvent","InteractivityDetect","mouseOutEvent","visibilityChangeEvent","mediaMatch","safeMatchMedia","resizeEvent","entries","interactivity","mouse","handled","mousePosition","plugin","pos","mouseEvent","clientRect","source","target","sourceRect","targetRect","canvasRect","touchEvent","lengthOffset","lastTouch","defaultCoordinate","pxRatio","evt","touches","touch","EventType","OptionsColor","_OptionsColor","source","data","color","isString","isArray","isNull","Background","OptionsColor","data","isNull","BackgroundMaskCover","data","isNull","OptionsColor","BackgroundMask","BackgroundMaskCover","data","isNull","cover","color","isString","FullScreen","data","isNull","ClickEvent","data","isNull","DivType","DivEvent","DivType","data","isNull","Parallax","data","isNull","HoverEvent","Parallax","data","isNull","ResizeEvent","data","isNull","Events","ClickEvent","DivEvent","HoverEvent","ResizeEvent","data","isNull","onDiv","executeOnSingleOrMultiple","t","tmp","Modes","engine","container","data","isNull","interactors","interactor","Interactivity","engine","container","InteractivityDetect","Events","Modes","data","isNull","detectsOn","defaultPosition","ManualParticle","data","isNull","PixelMode","deepExtend","ResponsiveMode","Responsive","ResponsiveMode","data","isNull","deepExtend","ThemeMode","ThemeDefault","ThemeMode","data","isNull","Theme","ThemeDefault","data","isNull","deepExtend","AnimationOptions","data","isNull","setRangeValue","RangedAnimationOptions","AnimationMode","StartValueType","ColorAnimation","AnimationOptions","data","isNull","setRangeValue","HslAnimation","ColorAnimation","data","isNull","AnimatableColor","_AnimatableColor","OptionsColor","HslAnimation","source","data","color","isString","isArray","isNull","colorAnimation","CollisionMode","CollisionsAbsorb","data","isNull","CollisionsOverlap","data","isNull","ValueWithRandom","data","isNull","setRangeValue","AnimationValueWithRandom","AnimationOptions","animation","RangedAnimationValueWithRandom","RangedAnimationOptions","ParticlesBounceFactor","ValueWithRandom","ParticlesBounce","ParticlesBounceFactor","data","isNull","Collisions","CollisionsAbsorb","ParticlesBounce","CollisionMode","CollisionsOverlap","data","isNull","setRangeValue","Effect","data","isNull","options","effect","item","deepExtend","MoveAngle","data","isNull","setRangeValue","MoveAttract","data","isNull","setRangeValue","rotateX","rotateY","MoveCenter","PixelMode","data","isNull","MoveGravity","data","isNull","setRangeValue","MovePath","ValueWithRandom","data","isNull","deepExtend","MoveTrailFill","data","isNull","OptionsColor","MoveTrail","MoveTrailFill","data","isNull","OutMode","OutModes","OutMode","data","isNull","Spin","data","isNull","setRangeValue","deepExtend","Move","MoveAngle","MoveAttract","MoveCenter","MoveDirection","MoveGravity","MovePath","OutModes","Spin","MoveTrail","data","isNull","isNumber","setRangeValue","outModes","isObject","OpacityAnimation","RangedAnimationOptions","DestroyType","data","isNull","Opacity","RangedAnimationValueWithRandom","OpacityAnimation","data","isNull","animation","ParticlesDensity","data","isNull","width","height","LimitMode","ParticlesNumberLimit","LimitMode","data","isNull","ParticlesNumber","ParticlesDensity","ParticlesNumberLimit","data","isNull","Shadow","OptionsColor","data","isNull","Shape","data","isNull","options","shape","item","deepExtend","SizeAnimation","RangedAnimationOptions","DestroyType","data","isNull","Size","RangedAnimationValueWithRandom","SizeAnimation","data","isNull","animation","Stroke","data","isNull","AnimatableColor","setRangeValue","ZIndex","ValueWithRandom","data","isNull","ParticlesOptions","engine","container","ParticlesBounce","Collisions","AnimatableColor","Effect","Move","ParticlesNumber","Opacity","Shadow","Shape","Size","Stroke","ZIndex","data","isNull","group","item","deepExtend","strokeToLoad","executeOnSingleOrMultiple","t","tmp","updaters","updater","interactors","interactor","loadOptions","options","sourceOptionsArr","sourceOptions","loadParticlesOptions","engine","container","ParticlesOptions","Options","engine","container","mode","theme","ThemeMode","preset","Background","BackgroundMask","FullScreen","Interactivity","loadParticlesOptions","data","isNull","executeOnSingleOrMultiple","setRangeValue","detectRetina","fpsLimit","fullScreen","isBoolean","t","tmp","ManualParticle","deepExtend","interactors","interactor","responsive","optResponsive","Responsive","a","b","existingTheme","optTheme","Theme","width","pxRatio","defaultOptions","responsiveOptions","ResponsiveMode","name","chosenTheme","mediaMatch","safeMatchMedia","clientDarkMode","defaultTheme","InteractorType","InteractionManager","engine","container","delta","interactor","mode","InteractorType","particle","ParticleOutType","defaultRetryCount","double","half","squareExp","randomString","loadEffectData","effect","effectOptions","id","reduceDuplicates","effectData","deepExtend","itemFromSingleOrMultiple","loadShapeData","shape","shapeOptions","shapeData","fixOutMode","data","isInArray","diameter","Particle","engine","container","position","zIndex","tryCount","plugin","pluginPos","Vector3d","canvasSize","exactPosition","calcExactPositionOrRandomFromSize","pos","radius","outModes","fixHorizontal","outMode","OutMode","value","fixVertical","baseVelocity","getParticleBaseVelocity","res","moveOptions","MoveDirection","rad","degToRad","getRangeValue","radOffset","range","randomInRange","setRangeValue","getRandom","collisionsOptions","overlapOptions","retries","errorPrefix","particle","getDistance","color","rollFactor","none","backFactor","backSum","alterHsl","zIndexValue","minZ","clamp","defaultRadius","getPosition","PixelMode","getParticleDirectionAngle","ParticleOutType","Vector","override","pathGenerator","updater","EventType","delta","canvas","getHslFromAnimation","overrideOptions","group","pxRatio","mainOptions","particlesOptions","loadParticlesOptions","effectType","shapeType","overrideEffectType","overrideShapeType","availableEffects","availableShapes","interactivity","Interactivity","pathOptions","initParticleNumericAnimationValue","decayOffset","particles","effectDrawer","shapeDrawer","sideCountFunc","rangeColorToRgb","mover","Point","position","particle","RangeType","squareExp","BaseRange","x","y","type","Circle","_Circle","radius","RangeType","point","getDistance","range","pos1","pos2","distPos","r","circleRange","rSum","dist","Rectangle","rectRange","width","height","_Rectangle","w","h","pos","size2","w2","h2","half","double","subdivideCount","QuadTree","_QuadTree","rectangle","capacity","x","y","width","height","i","fixedIndex","Rectangle","point","sub","range","check","res","p","getDistance","position","radius","Circle","size","qTreeCapacity","squareExp","defaultRemoveQuantity","qTreeRectangle","canvasSize","height","width","posOffset","sizeFactor","Rectangle","Particles","engine","container","particles","options","manualCount","group","numberOptions","densityFactor","optParticlesNumber","minLimit","optParticlesLimit","particlesNumber","particlesCount","t","densityOptions","defaultFactor","canvas","pxRatio","position","overrideOptions","initializer","particle","Particle","canAdd","EventType","e","getLogger","errorPrefix","index","override","zIdx","deleteCount","InteractionManager","QuadTree","p","getPosition","limitMode","limit","currentCount","LimitMode","countToRemove","delta","plugin","condition","mode","handled","particlesOptions","groups","groupOptions","i","j","pathGenerator","nb","mouse","quantity","deleted","zIndex","factor","particlesToDelete","resizeFactor","mover","Point","checkDelete","updater","zArray","b","lengthOffset","defaultRatio","defaultReduceFactor","Retina","container","options","isSsr","ratio","canvas","element","particles","moveOptions","getRangeValue","particle","moveDistance","props","maxDistance","guardCheck","container","defaultFps","initDelta","value","fpsLimit","smooth","loadContainerOptions","engine","sourceOptionsArr","options","Options","loadOptions","Container","id","sourceOptions","entries","entry","timestamp","delta","e","getLogger","errorPrefix","Retina","Canvas","Particles","EventListeners","safeIntersectionObserver","EventType","callback","el","clickOrTouchHandler","pos","radius","pxRatio","posRetina","particles","clickHandler","mouseEvent","touchStartHandler","touched","touchMoved","touchMoveHandler","touchEndHandler","touchEvent","lengthOffset","lastTouch","element","canvasRect","minCoordinate","touchCancelHandler","key","handler","generator","override","remove","effectDrawer","shapeDrawer","mainArr","idx","t","force","refreshTime","frame","animate","type","plugin","res","mode","effects","drawer","shapes","availablePlugins","zLayers","duration","delay","getRangeValue","defaultFpsLimit","minFpsLimit","name","cancelAnimation","needsUpdate","resolve","start","newMaxWidth","EventDispatcher","type","listener","arr","args","handler","length","idx","deleteCount","getItemsFromInitializer","container","map","initializers","force","res","t","getDataFromUrl","data","url","itemFromSingleOrMultiple","response","getLogger","errorPrefix","generatedTrue","generatedFalse","canvasTag","getCanvasFromContainer","domContainer","canvasEl","generatedAttribute","existingCanvases","fullPercent","getDomContainer","id","source","Engine","EventDispatcher","name","config","manager","refresh","key","EventType","easing","effect","drawer","executeOnSingleOrMultiple","type","listener","interactorInitializer","moverInitializer","updaterInitializer","generator","plugin","preset","options","override","validType","args","index","value","items","item","params","getRandom","currentOptions","oldIndex","v","minIndex","newItem","Container","old","one","none","deleteCount","sourceOptions","updaters","updater","callback","init","engine","Engine","ExternalInteractorBase","container","InteractorType","ParticlesInteractorBase","container","InteractorType","RotateDirection","GradientType","EasingType","tsParticles","init","isSsr","half","minVelocity","identity","moveSpeedFactor","minSpinRadius","spinFactor","applyDistance","particle","initialPosition","dx","dy","getDistances","dxFixed","dyFixed","maxDistance","hDistance","vDistance","hasHDistance","hasVDistance","pos","vel","getRandom","move","moveOptions","moveSpeed","maxSpeed","moveDrift","delta","applyPath","gravityOptions","gravityFactor","decay","velocity","zIndexOptions","zVelocityFactor","position","spin","container","updateFunc","RotateDirection","maxCanvasSize","halfMaxSize","particlesOptions","pathOptions","path","clamp","getProximitySpeedFactor","initSpin","options","spinOptions","spinPos","spinCenter","distance","getDistance","spinAcceleration","getRangeValue","diffFactor","defaultSizeFactor","defaultDeltaFactor","BaseMover","particle","options","gravityOptions","getRangeValue","initSpin","delta","particleOptions","moveOptions","container","pxRatio","slowFactor","getProximitySpeedFactor","baseSpeed","moveDrift","maxSize","getRangeMax","sizeFactor","deltaFactor","moveSpeed","maxSpeed","spin","move","applyDistance","loadBaseMover","engine","refresh","assertValidVersion","BaseMover","doublePI","minAngle","origin","drawCircle","data","context","particle","radius","circleRange","sides","maxAngle","minAngle","CircleDrawer","data","drawCircle","container","particle","shapeData","angle","isObject","degToRad","loadCircleShape","engine","refresh","assertValidVersion","CircleDrawer","ColorUpdater","container","engine","particle","hslColor","rangeColorToHsl","getHslAnimationFromHsl","hAnimation","sAnimation","lAnimation","color","delta","updateColor","loadColorUpdater","engine","refresh","assertValidVersion","container","ColorUpdater","RgbIndexes","shorthandHexRegex","hexRegex","hexRadix","defaultAlpha","alphaFactor","HexColorManager","color","input","hexColor","hexFixed","_","r","g","b","a","result","loadHexColorPlugin","engine","refresh","assertValidVersion","HexColorManager","HslIndexes","HslColorManager","color","colorValue","hslColor","hslToRgb","getRangeValue","input","regex","result","minLength","defaultAlpha","radix","hslaToRgba","parseAlpha","loadHslColorPlugin","engine","refresh","assertValidVersion","HslColorManager","OpacityUpdater","container","particle","opacityOptions","pxRatio","initParticleNumericAnimationValue","opacityAnimation","getRangeValue","getRandom","delta","updateAnimation","loadOpacityUpdater","engine","refresh","assertValidVersion","container","OpacityUpdater","minVelocity","boundsMin","bounceHorizontal","data","OutMode","OutModeDirection","velocity","bounced","newVelocity","getRangeValue","minPos","bounceVertical","BounceOutMode","container","OutMode","particle","direction","delta","outMode","handled","plugin","pos","offset","size","bounds","calculateBounds","canvasSize","bounceHorizontal","bounceVertical","minVelocity","DestroyOutMode","container","OutMode","particle","direction","_delta","outMode","ParticleOutType","isPointInside","Vector","dx","dy","getDistances","vx","vy","minVelocity","NoneOutMode","container","OutMode","particle","direction","delta","outMode","OutModeDirection","gravityOptions","canvasSize","pRadius","position","isPointInside","Vector","minVelocity","minDistance","OutOutMode","container","OutMode","particle","direction","delta","outMode","ParticleOutType","vx","vy","circVec","Vector","dx","dy","getDistances","randomInRange","newDx","newDy","isPointInside","warp","canvasSize","newPos","sizeValue","nextBounds","calculateBounds","OutModeDirection","getRandom","checkOutMode","outModes","outMode","OutOfCanvasUpdater","container","particle","getUpdater","delta","direction","updater","OutMode","BounceOutMode","OutOutMode","DestroyOutMode","NoneOutMode","OutModeDirection","loadOutModesUpdater","engine","refresh","assertValidVersion","container","OutOfCanvasUpdater","RgbIndexes","RgbColorManager","color","colorValue","rgbColor","getRangeValue","input","regex","result","radix","parseAlpha","loadRgbColorPlugin","engine","refresh","assertValidVersion","RgbColorManager","minLoops","SizeUpdater","particle","container","sizeOptions","sizeAnimation","getRandom","delta","updateAnimation","loadSizeUpdater","engine","refresh","assertValidVersion","SizeUpdater","loadBasic","engine","refresh","assertValidVersion","loadHexColorPlugin","loadHslColorPlugin","loadRgbColorPlugin","loadBaseMover","loadCircleShape","loadColorUpdater","loadOpacityUpdater","loadOutModesUpdater","loadSizeUpdater","loadEasingQuadPlugin","engine","refresh","assertValidVersion","EasingType","value","drawEmoji","data","image","context","opacity","half","previousAlpha","diameter","radius","defaultFont","noPadding","EmojiDrawer","key","data","image","drawEmoji","container","options","validTypes","t","isInArray","promises","loadFont","shapeOptions","executeOnSingleOrMultiple","shape","particle","_container","shapeData","emoji","itemFromSingleOrMultiple","emojiOptions","font","value","padding","maxSize","getRangeMax","fullSize","canvasSize","canvas","context","loadEmojiShape","engine","refresh","assertValidVersion","EmojiDrawer","minFactor","identity","minRadius","processAttract","engine","container","position","attractRadius","area","queryCb","attractOptions","query","particle","dx","dy","distance","getDistances","velocity","attractFactor","clamp","normVec","Vector","clickAttract","enabledCb","attract","mousePos","Circle","p","hoverAttract","Attract","EasingType","data","isNull","attractMode","Attractor","ExternalInteractorBase","engine","container","mode","options","attract","particle","mouseMoveStatus","mouseMoveEvent","events","hoverEnabled","hoverMode","clickEnabled","clickMode","isInArray","hoverAttract","p","clickAttract","mouse","sources","Attract","source","loadExternalAttractInteraction","engine","refresh","assertValidVersion","container","Attractor","squareExp","half","halfPI","double","toleranceFactor","minRadius","processBounce","container","position","radius","area","enabledCb","query","particle","Circle","circleBounce","circleBounceDataFromParticle","Vector","Rectangle","rectBounce","calculateBounds","singleSelectorBounce","selector","div","bounceCb","item","elem","pxRatio","pos","tolerance","DivType","divBounce","divs","bounceMode","divModeExecute","mouseBounce","mousePos","Bounce","data","isNull","bounceMode","Bouncer","ExternalInteractorBase","container","bounce","options","events","mouseMoveStatus","mouseMoveEvent","hoverEnabled","hoverMode","divs","isInArray","mouseBounce","p","divBounce","particle","mouse","isDivModeEnabled","sources","Bounce","source","loadExternalBounceInteraction","engine","refresh","assertValidVersion","container","Bouncer","BubbleBase","data","isNull","sourceColor","isArray","executeOnSingleOrMultiple","color","OptionsColor","BubbleDiv","BubbleBase","data","isNull","Bubble","BubbleBase","data","isNull","executeOnSingleOrMultiple","div","tmp","BubbleDiv","ProcessBubbleType","calculateBubbleValue","particleValue","modeValue","optionsValue","ratio","value","clamp","bubbleMode","minDistance","defaultClickTime","double","defaultOpacity","ratioOffset","defaultBubbleValue","minRatio","half","defaultRatio","Bubbler","ExternalInteractorBase","container","engine","options","mouseClickPos","bubbleOptions","distance","query","p","bubble","particle","pos","distMouse","getDistance","timeSpent","sizeData","getRangeMax","ProcessBubbleType","opacityData","mousePos","pointDistance","ratio","mouseMoveEvent","mouseLeaveEvent","divBubble","modeColor","bubbleColor","itemFromSingleOrMultiple","rangeColorToHsl","pColor","rgbToHsl","colorMix","modeOpacity","optOpacity","pOpacity","opacity","calculateBubbleValue","modeSize","optSize","pSize","size","data","bubbleParam","bubbleDuration","bubbleDistance","particlesParam","pObjBubble","pObj","type","value","delta","selector","div","selectors","item","elem","pxRatio","repulseRadius","area","DivType","Circle","Rectangle","divs","divMode","mode","force","events","onHover","onClick","hoverEnabled","hoverMode","clickEnabled","clickMode","isInArray","divModeExecute","mouse","onDiv","isDivModeEnabled","sources","Bubble","source","loadExternalBubbleInteraction","engine","refresh","assertValidVersion","container","Bubbler","ConnectLinks","data","isNull","Connect","ConnectLinks","data","isNull","gradientMin","gradientMax","defaultLinksWidth","gradient","context","p1","p2","opacity","gradStop","color1","color2","sourcePos","destPos","midRgb","colorMix","grad","getStyleFromHsl","clamp","getStyleFromRgb","drawConnectLine","width","lineStyle","begin","end","drawLine","container","ctx","options","connectOptions","drawConnection","ls","pos1","pos2","connectMode","minDistance","Connector","ExternalInteractorBase","container","connect","mousePos","connectModeDistance","connectModeRadius","distance","query","p","p1","i","pos1","indexOffset","p2","pos2","distMax","xDiff","yDiff","drawConnection","particle","mouse","events","isInArray","options","sources","Connect","source","loadExternalConnectInteraction","engine","refresh","assertValidVersion","container","Connector","GrabLinks","data","isNull","OptionsColor","Grab","GrabLinks","data","isNull","defaultWidth","drawGrabLine","context","width","begin","end","colorLine","opacity","drawLine","getStyleFromRgb","drawGrab","container","particle","lineColor","mousePos","ctx","beginPos","grabMode","minDistance","minOpacity","Grabber","ExternalInteractorBase","container","engine","grab","options","interactivity","mouseMoveEvent","mousePos","distance","query","p","particle","pos","pointDistance","getDistance","grabLineOptions","lineOpacity","opacityLine","optColor","linksOptions","getLinkRandomColor","colorLine","getLinkColor","drawGrab","mouse","events","isInArray","sources","Grab","source","loadExternalGrabInteraction","engine","refresh","assertValidVersion","container","Grabber","pauseMode","Pauser","ExternalInteractorBase","container","mode","loadExternalPauseInteraction","engine","refresh","assertValidVersion","container","Pauser","Push","data","isNull","t","quantity","setRangeValue","pushMode","minQuantity","Pusher","ExternalInteractorBase","container","mode","options","pushOptions","quantity","getRangeValue","group","itemFromArray","groupOptions","sources","Push","source","loadExternalPushInteraction","engine","refresh","assertValidVersion","container","Pusher","Remove","data","isNull","quantity","setRangeValue","removeMode","Remover","ExternalInteractorBase","container","mode","options","removeNb","getRangeValue","sources","Remove","source","loadExternalRemoveInteraction","engine","refresh","assertValidVersion","container","Remover","RepulseBase","EasingType","data","isNull","RepulseDiv","RepulseBase","data","isNull","Repulse","RepulseBase","data","isNull","executeOnSingleOrMultiple","div","tmp","RepulseDiv","repulseMode","minDistance","repulseRadiusFactor","repulseRadiusPower","squarePower","minRadius","minSpeed","easingOffset","half","Repulser","ExternalInteractorBase","engine","container","repulseOptions","repulse","repulseDistance","repulseRadius","mouseClickPos","range","Circle","query","p","particle","dx","dy","distance","getDistances","d","velocity","force","vect","Vector","mousePos","position","area","divRepulse","easing","speed","factor","maxSpeed","easingFunc","repulseFactor","clamp","normVec","selector","div","item","elem","pxRatio","pos","DivType","Rectangle","divs","divMode","mode","options","repulseOpts","mouseMoveStatus","mouseMoveEvent","events","hover","hoverEnabled","hoverMode","click","clickEnabled","clickMode","isInArray","divModeExecute","mouse","isDivModeEnabled","sources","Repulse","source","loadExternalRepulseInteraction","engine","refresh","assertValidVersion","container","Repulser","Slow","data","isNull","slowMode","minRadius","Slower","ExternalInteractorBase","container","particle","delta","force","slow","mouse","events","isInArray","options","sources","Slow","source","mousePos","radius","slowOptions","particlePos","dist","getDistance","proximityFactor","slowFactor","loadExternalSlowInteraction","engine","refresh","assertValidVersion","container","Slower","stringStart","defaultOpacity","currentColorRegex","replaceColorSvg","imageShape","color","opacity","svgData","colorStyle","getStyleFromHsl","preFillIndex","loadImage","image","resolve","img","getLogger","errorPrefix","downloadSvgImage","response","replaceImageColor","imageData","particle","svgColoredData","imageRes","svg","domUrl","url","errorHandler","img2","InterlaceOffsets","InterlaceSteps","ByteStream","bytes","count","slice","acc","curr","blockString","size","minCount","emptySize","len","increment","offset","blockData","i","noData","DisposalMethod","GIFDataHeaders","origin","defaultFrame","half","initialTime","firstIndex","defaultLoopCount","parseColorTable","byteStream","count","colors","i","parseExtensionBlock","gif","getFrameIndex","getTransparencyIndex","GIFDataHeaders","frame","packedByte","transparencyFlag","transparencyIndex","applicationExtension","parseImageBlock","avgAlpha","progressCallback","localColorTableFlag","interlacedFlag","localColorCount","getColor","index","r","g","b","image","error","minCodeSize","imageData","clearCode","readBits","pos","len","bytePos","bitPos","code","size","dic","pass","InterlaceOffsets","pixelPos","lineIndex","exit","last","item","a","InterlaceSteps","parseBlock","getGIFLoopAmount","extension","decodeGIF","gifURL","res","buffer","ByteStream","globalColorTableFlag","globalColorCount","backgroundColorIndex","backgroundImage","frameIndex","incrementFrameIndex","getframeIndex","increment","newValue","DisposalMethod","drawGif","data","context","radius","particle","delta","offscreenCanvas","offscreenContext","previousImageData","loadGifImage","loadImage","double","defaultAlpha","sides","defaultRatio","ImageDrawer","engine","imageShape","errorPrefix","image","data","context","radius","particle","opacity","element","drawGif","ratio","pos","diameter","container","options","imageData","t","images","color","replaceColor","imageRes","replaceImageColor","fill","close","Preload","data","isNull","ImagePreloaderPlugin","engine","options","source","preloadOptions","item","existing","t","preload","Preload","extLength","addLoadImageToEngine","engine","data","errorPrefix","t","image","imageFunc","loadGifImage","downloadSvgImage","loadImage","loadImageShape","refresh","assertValidVersion","preloader","ImagePreloaderPlugin","ImageDrawer","LifeDelay","ValueWithRandom","data","isNull","LifeDuration","ValueWithRandom","data","isNull","Life","LifeDelay","LifeDuration","data","isNull","noTime","infiniteValue","noLife","minCanvasSize","updateLife","particle","delta","canvasSize","life","justSpawned","widthRange","setRangeValue","heightRange","randomInRange","lifeOptions","getRangeValue","noTime","identity","infiniteValue","LifeUpdater","container","particle","particlesOptions","lifeOptions","getRangeValue","getRandom","options","sources","Life","source","delta","updateLife","loadLifeUpdater","engine","refresh","assertValidVersion","container","LifeUpdater","drawLine","data","context","particle","radius","shapeData","centerY","sides","LineDrawer","data","drawLine","loadLineShape","engine","refresh","assertValidVersion","LineDrawer","half","ParallaxMover","particle","isSsr","container","options","parallaxOptions","parallaxForce","mousePos","canvasSize","canvasCenter","parallaxSmooth","factor","centerDistance","offset","loadParallaxMover","engine","refresh","assertValidVersion","ParallaxMover","attractFactor","identity","Attractor","ParticlesInteractorBase","container","p1","getRangeValue","distance","pos1","query","p2","pos2","dx","dy","getDistances","rotate","ax","ay","p1Factor","p2Factor","particle","loadParticlesAttractInteraction","engine","refresh","assertValidVersion","container","Attractor","half","absorbFactor","minAbsorbFactor","updateAbsorb","p1","r1","p2","r2","delta","pixelRatio","factor","clamp","absorb","fixBounceSpeed","p","getRangeValue","bounce","p1","p2","circleBounce","circleBounceDataFromParticle","destroy","p1","p2","bounce","resolveCollision","p1","p2","delta","pixelRatio","CollisionMode","absorb","bounce","destroy","double","Collider","ParticlesInteractorBase","container","p1","delta","pos1","radius1","query","p2","pos2","radius2","dist","getDistance","distP","resolveCollision","particle","loadParticlesCollisionsInteraction","engine","refresh","assertValidVersion","container","Collider","double","CircleWarp","Circle","x","y","radius","canvasSize","point","width","height","range","rect","circle","newPos","biggerCircle","rectSW","Rectangle","LinksShadow","OptionsColor","data","isNull","LinksTriangle","data","isNull","OptionsColor","Links","OptionsColor","LinksShadow","LinksTriangle","data","isNull","squarePower","opacityOffset","origin","minDistance","getLinkDistance","pos1","pos2","optDistance","canvasSize","warp","dx","dy","distance","getDistances","absDiffs","warpDistances","Linker","ParticlesInteractorBase","container","engine","p1","linksOptions","linkColor","optColor","getLinkRandomColor","linkOpt1","optOpacity","range","CircleWarp","Circle","query","p2","linkOpt2","t","opacityLine","particle","options","sources","Links","source","loadLinksInteraction","engine","refresh","container","Linker","drawTriangle","context","p1","p2","p3","drawLinkLine","params","drawn","begin","end","engine","maxDistance","canvasSize","width","backgroundMask","colorLine","opacity","links","getDistance","drawLine","pi1","pi2","endNE","d1","getDistances","yi","endSW","d2","xi","endSE","d3","getStyleFromRgb","shadow","shadowColor","rangeColorToRgb","drawLinkTriangle","pos1","pos2","pos3","colorTriangle","opacityTriangle","getLinkKey","ids","a","b","setLinkFrequency","particles","dictionary","key","t","res","getRandom","minOpacity","minWidth","minDistance","half","maxFrequency","LinkInstance","container","engine","p1","link","p1LinksOptions","options","p2","pos1","pos2","opacity","ctx","colorLine","twinkle","twinkleFreq","twinkleRgb","rangeColorToRgb","getRandom","getRangeValue","linkColor","getLinkColor","width","maxDistance","backgroundMask","drawLinkLine","link1","link2","linksOptions","triangleOptions","p3","opacityTriangle","pos3","linksDistance","getDistance","colorTriangle","drawLinkTriangle","p1Links","vertices","t","linkFreq","l","vertex","setLinkFrequency","context","particle","links","ratio","retina","distance","LinksPlugin","engine","container","LinkInstance","loadLinksPlugin","engine","refresh","plugin","LinksPlugin","loadParticlesLinksInteraction","engine","refresh","assertValidVersion","loadLinksInteraction","loadLinksPlugin","piDeg","origin","sidesOffset","drawPolygon","data","start","side","context","sideCount","decimalSides","interiorAngleDegrees","interiorAngle","degToRad","i","defaultSides","PolygonDrawerBase","data","particle","radius","start","side","drawPolygon","polygon","getRangeValue","sidesCenterFactor","yFactor","sidesFactor","PolygonDrawer","PolygonDrawerBase","particle","radius","sides","yFactor","sides","double","TriangleDrawer","PolygonDrawerBase","particle","radius","diameter","loadGenericPolygonShape","engine","refresh","assertValidVersion","PolygonDrawer","loadTriangleShape","TriangleDrawer","loadPolygonShape","RotateAnimation","data","isNull","setRangeValue","Rotate","ValueWithRandom","RotateAnimation","RotateDirection","data","isNull","double","doublePI","identity","doublePIDeg","RotateUpdater","container","particle","rotateOptions","degToRad","getRangeValue","rotateDirection","RotateDirection","getRandom","AnimationStatus","rotateAnimation","rotate","options","sources","Rotate","source","delta","updateAnimation","DestroyType","loadRotateUpdater","engine","refresh","assertValidVersion","container","RotateUpdater","fixFactor","double","drawSquare","data","context","radius","fixedRadius","fixedDiameter","sides","SquareDrawer","data","drawSquare","loadSquareShape","engine","refresh","assertValidVersion","SquareDrawer","origin","drawStar","data","context","particle","radius","sides","inset","i","defaultInset","defaultSides","StarDrawer","data","drawStar","particle","star","getRangeValue","container","loadStarShape","engine","refresh","assertValidVersion","StarDrawer","defaultOpacity","StrokeColorUpdater","container","engine","particle","options","stroke","itemFromSingleOrMultiple","getRangeValue","strokeHslColor","rangeColorToHsl","getHslAnimationFromHsl","color","strokeColor","delta","updateColor","loadStrokeColorUpdater","engine","refresh","assertValidVersion","container","StrokeColorUpdater","loadSlim","engine","refresh","assertValidVersion","loadParallaxMover","loadExternalAttractInteraction","loadExternalBounceInteraction","loadExternalBubbleInteraction","loadExternalConnectInteraction","loadExternalGrabInteraction","loadExternalPauseInteraction","loadExternalPushInteraction","loadExternalRemoveInteraction","loadExternalRepulseInteraction","loadExternalSlowInteraction","loadParticlesAttractInteraction","loadParticlesCollisionsInteraction","loadParticlesLinksInteraction","loadEasingQuadPlugin","loadEmojiShape","loadImageShape","loadLineShape","loadPolygonShape","loadSquareShape","loadStarShape","loadLifeUpdater","loadRotateUpdater","loadStrokeColorUpdater","loadBasic","loaded","ID","withDefault","options","createUniqId","c","showParticles","handler","clear","data","getDomNodes","goingBack","preview","loadSlim","tsParticles","element","instance","optionsEqual","id","hideParticles","remove"]}
|