Socket
Socket
Sign inDemoInstall

@tsparticles/fireworks

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tsparticles/fireworks - npm Package Compare versions

Comparing version 3.3.0 to 3.4.0

34

browser/fireworks.js

@@ -1,3 +0,11 @@

import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { DestroyType, EventType, MoveDirection, OutMode, StartValueType, getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
import { loadEmittersShapeSquare } from "@tsparticles/plugin-emitters-shape-square";
import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;

@@ -29,3 +37,3 @@ let initialized = false;

if (initializing) {
return new Promise((resolve) => {
return new Promise(resolve => {
const timeout = 100, interval = setInterval(() => {

@@ -41,3 +49,2 @@ if (!initialized) {

initializing = true;
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadEmittersShapeSquare } = await import("@tsparticles/plugin-emitters-shape-square"), { loadSoundsPlugin } = await import("@tsparticles/plugin-sounds"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadDestroyUpdater } = await import("@tsparticles/updater-destroy"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadTrailEffect } = await import("@tsparticles/effect-trail"), { loadBasic } = await import("@tsparticles/basic");
await loadEmittersPlugin(tsParticles, false);

@@ -73,3 +80,3 @@ await loadEmittersShapeSquare(tsParticles, false);

emitters: {
direction: "top",
direction: MoveDirection.top,
life: {

@@ -136,4 +143,4 @@ count: 0,

sync: false,
startValue: "max",
destroy: "min",
startValue: StartValueType.max,
destroy: DestroyType.min,
},

@@ -162,4 +169,4 @@ },

sync: false,
startValue: "min",
destroy: "none",
startValue: StartValueType.min,
destroy: DestroyType.none,
},

@@ -186,3 +193,3 @@ },

direction: "none",
outModes: "destroy",
outModes: OutMode.destroy,
},

@@ -233,4 +240,4 @@ },

outModes: {
default: "destroy",
top: "none",
default: OutMode.destroy,
top: OutMode.none,
},

@@ -243,3 +250,3 @@ },

{
event: "particleRemoved",
event: EventType.particleRemoved,
filter: explodeSoundCheck,

@@ -262,2 +269,5 @@ audio: [

}
fireworks.init = async () => {
await initPlugins();
};
fireworks.version = tsParticles.version;

@@ -264,0 +274,0 @@ if (!isSsr()) {

@@ -6,2 +6,10 @@ "use strict";

const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");
const updater_destroy_1 = require("@tsparticles/updater-destroy");
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
const updater_life_1 = require("@tsparticles/updater-life");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;

@@ -33,3 +41,3 @@ let initialized = false;

if (initializing) {
return new Promise((resolve) => {
return new Promise(resolve => {
const timeout = 100, interval = setInterval(() => {

@@ -45,11 +53,10 @@ if (!initialized) {

initializing = true;
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadEmittersShapeSquare } = await import("@tsparticles/plugin-emitters-shape-square"), { loadSoundsPlugin } = await import("@tsparticles/plugin-sounds"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadDestroyUpdater } = await import("@tsparticles/updater-destroy"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadTrailEffect } = await import("@tsparticles/effect-trail"), { loadBasic } = await import("@tsparticles/basic");
await loadEmittersPlugin(engine_1.tsParticles, false);
await loadEmittersShapeSquare(engine_1.tsParticles, false);
await loadSoundsPlugin(engine_1.tsParticles, false);
await loadRotateUpdater(engine_1.tsParticles, false);
await loadDestroyUpdater(engine_1.tsParticles, false);
await loadLifeUpdater(engine_1.tsParticles, false);
await loadTrailEffect(engine_1.tsParticles, false);
await loadBasic(engine_1.tsParticles, false);
await (0, plugin_emitters_1.loadEmittersPlugin)(engine_1.tsParticles, false);
await (0, plugin_emitters_shape_square_1.loadEmittersShapeSquare)(engine_1.tsParticles, false);
await (0, plugin_sounds_1.loadSoundsPlugin)(engine_1.tsParticles, false);
await (0, updater_rotate_1.loadRotateUpdater)(engine_1.tsParticles, false);
await (0, updater_destroy_1.loadDestroyUpdater)(engine_1.tsParticles, false);
await (0, updater_life_1.loadLifeUpdater)(engine_1.tsParticles, false);
await (0, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
initializing = false;

@@ -77,3 +84,3 @@ initialized = true;

emitters: {
direction: "top",
direction: engine_1.MoveDirection.top,
life: {

@@ -140,4 +147,4 @@ count: 0,

sync: false,
startValue: "max",
destroy: "min",
startValue: engine_1.StartValueType.max,
destroy: engine_1.DestroyType.min,
},

@@ -166,4 +173,4 @@ },

sync: false,
startValue: "min",
destroy: "none",
startValue: engine_1.StartValueType.min,
destroy: engine_1.DestroyType.none,
},

@@ -190,3 +197,3 @@ },

direction: "none",
outModes: "destroy",
outModes: engine_1.OutMode.destroy,
},

@@ -237,4 +244,4 @@ },

outModes: {
default: "destroy",
top: "none",
default: engine_1.OutMode.destroy,
top: engine_1.OutMode.none,
},

@@ -247,3 +254,3 @@ },

{
event: "particleRemoved",
event: engine_1.EventType.particleRemoved,
filter: explodeSoundCheck,

@@ -267,2 +274,5 @@ audio: [

exports.fireworks = fireworks;
fireworks.init = async () => {
await initPlugins();
};
fireworks.version = engine_1.tsParticles.version;

@@ -269,0 +279,0 @@ if (!(0, engine_1.isSsr)()) {

@@ -1,3 +0,11 @@

import { getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { DestroyType, EventType, MoveDirection, OutMode, StartValueType, getRangeMax, getRangeMin, isNumber, isSsr, isString, setRangeValue, tsParticles, } from "@tsparticles/engine";
import { FireworkOptions } from "./FireworkOptions.js";
import { loadBasic } from "@tsparticles/basic";
import { loadDestroyUpdater } from "@tsparticles/updater-destroy";
import { loadEmittersPlugin } from "@tsparticles/plugin-emitters";
import { loadEmittersShapeSquare } from "@tsparticles/plugin-emitters-shape-square";
import { loadLifeUpdater } from "@tsparticles/updater-life";
import { loadRotateUpdater } from "@tsparticles/updater-rotate";
import { loadSoundsPlugin } from "@tsparticles/plugin-sounds";
import { loadTrailEffect } from "@tsparticles/effect-trail";
const minSplitCount = 2;

@@ -29,3 +37,3 @@ let initialized = false;

if (initializing) {
return new Promise((resolve) => {
return new Promise(resolve => {
const timeout = 100, interval = setInterval(() => {

@@ -41,3 +49,2 @@ if (!initialized) {

initializing = true;
const { loadEmittersPlugin } = await import("@tsparticles/plugin-emitters"), { loadEmittersShapeSquare } = await import("@tsparticles/plugin-emitters-shape-square"), { loadSoundsPlugin } = await import("@tsparticles/plugin-sounds"), { loadRotateUpdater } = await import("@tsparticles/updater-rotate"), { loadDestroyUpdater } = await import("@tsparticles/updater-destroy"), { loadLifeUpdater } = await import("@tsparticles/updater-life"), { loadTrailEffect } = await import("@tsparticles/effect-trail"), { loadBasic } = await import("@tsparticles/basic");
await loadEmittersPlugin(tsParticles, false);

@@ -73,3 +80,3 @@ await loadEmittersShapeSquare(tsParticles, false);

emitters: {
direction: "top",
direction: MoveDirection.top,
life: {

@@ -136,4 +143,4 @@ count: 0,

sync: false,
startValue: "max",
destroy: "min",
startValue: StartValueType.max,
destroy: DestroyType.min,
},

@@ -162,4 +169,4 @@ },

sync: false,
startValue: "min",
destroy: "none",
startValue: StartValueType.min,
destroy: DestroyType.none,
},

@@ -186,3 +193,3 @@ },

direction: "none",
outModes: "destroy",
outModes: OutMode.destroy,
},

@@ -233,4 +240,4 @@ },

outModes: {
default: "destroy",
top: "none",
default: OutMode.destroy,
top: OutMode.none,
},

@@ -243,3 +250,3 @@ },

{
event: "particleRemoved",
event: EventType.particleRemoved,
filter: explodeSoundCheck,

@@ -262,2 +269,5 @@ audio: [

}
fireworks.init = async () => {
await initPlugins();
};
fireworks.version = tsParticles.version;

@@ -264,0 +274,0 @@ if (!isSsr()) {

{
"name": "@tsparticles/fireworks",
"version": "3.3.0",
"version": "3.4.0",
"description": "Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.",

@@ -102,11 +102,11 @@ "homepage": "https://particles.js.org",

"dependencies": {
"@tsparticles/basic": "^3.3.0",
"@tsparticles/effect-trail": "^3.3.0",
"@tsparticles/engine": "^3.3.0",
"@tsparticles/plugin-emitters": "^3.3.0",
"@tsparticles/plugin-emitters-shape-square": "^3.3.0",
"@tsparticles/plugin-sounds": "^3.3.0",
"@tsparticles/updater-destroy": "^3.3.0",
"@tsparticles/updater-life": "^3.3.0",
"@tsparticles/updater-rotate": "^3.3.0"
"@tsparticles/basic": "^3.4.0",
"@tsparticles/effect-trail": "^3.4.0",
"@tsparticles/engine": "^3.4.0",
"@tsparticles/plugin-emitters": "^3.4.0",
"@tsparticles/plugin-emitters-shape-square": "^3.4.0",
"@tsparticles/plugin-sounds": "^3.4.0",
"@tsparticles/updater-destroy": "^3.4.0",
"@tsparticles/updater-life": "^3.4.0",
"@tsparticles/updater-rotate": "^3.4.0"
},

@@ -113,0 +113,0 @@ "publishConfig": {

@@ -1,1 +0,1 @@

/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
/*! tsParticles Fireworks v3.4.0 by Matteo Bruni */

@@ -7,3 +7,3 @@ /*!

* How to use? : Check the GitHub README
* v3.3.0
* v3.4.0
*/

@@ -20,10 +20,10 @@ /*

if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters"));
module.exports = factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail"));
else if(typeof define === 'function' && define.amd)
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/effect-trail", "@tsparticles/updater-life", "@tsparticles/updater-destroy", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/plugin-emitters"], factory);
define(["@tsparticles/engine", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
else {
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/effect-trail"), require("@tsparticles/updater-life"), require("@tsparticles/updater-destroy"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/plugin-emitters")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
var a = typeof exports === 'object' ? factory(require("@tsparticles/engine"), require("@tsparticles/basic"), require("@tsparticles/updater-destroy"), require("@tsparticles/plugin-emitters"), require("@tsparticles/plugin-emitters-shape-square"), require("@tsparticles/updater-life"), require("@tsparticles/updater-rotate"), require("@tsparticles/plugin-sounds"), require("@tsparticles/effect-trail")) : factory(root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"], root["window"]);
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__, __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__) => {
})(this, (__WEBPACK_EXTERNAL_MODULE__tsparticles_engine__, __WEBPACK_EXTERNAL_MODULE__tsparticles_basic__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_destroy__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_emitters_shape_square__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_life__, __WEBPACK_EXTERNAL_MODULE__tsparticles_updater_rotate__, __WEBPACK_EXTERNAL_MODULE__tsparticles_plugin_sounds__, __WEBPACK_EXTERNAL_MODULE__tsparticles_effect_trail__) => {
return /******/ (() => { // webpackBootstrap

@@ -49,3 +49,3 @@ /******/ "use strict";

eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n const {\n loadEmittersPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\", 23)),\n {\n loadEmittersShapeSquare\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\", 23)),\n {\n loadSoundsPlugin\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\", 23)),\n {\n loadRotateUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\", 23)),\n {\n loadDestroyUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\", 23)),\n {\n loadLifeUpdater\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/updater-life */ \"@tsparticles/updater-life\", 23)),\n {\n loadTrailEffect\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\", 23)),\n {\n loadBasic\n } = await Promise.resolve(/*! import() */).then(__webpack_require__.t.bind(__webpack_require__, /*! @tsparticles/basic */ \"@tsparticles/basic\", 23));\n await loadEmittersPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadEmittersShapeSquare(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadSoundsPlugin(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadRotateUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadDestroyUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadLifeUpdater(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadTrailEffect(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await loadBasic(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_1__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: \"top\",\n life: {\n count: 0,\n duration: 0.1,\n delay: 0.1\n },\n rate: {\n delay: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.rate) ? identity / options.rate : {\n min: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(options.rate),\n max: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(options.rate)\n },\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: \"max\",\n destroy: \"min\"\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: \"min\",\n destroy: \"none\"\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: \"destroy\"\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: \"destroy\",\n top: \"none\"\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [{\n event: \"particleRemoved\",\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fireworks: () => (/* binding */ fireworks)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FireworkOptions.js */ \"./dist/browser/FireworkOptions.js\");\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tsparticles/basic */ \"@tsparticles/basic\");\n/* harmony import */ var _tsparticles_basic__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @tsparticles/updater-destroy */ \"@tsparticles/updater-destroy\");\n/* harmony import */ var _tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tsparticles/plugin-emitters */ \"@tsparticles/plugin-emitters\");\n/* harmony import */ var _tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @tsparticles/plugin-emitters-shape-square */ \"@tsparticles/plugin-emitters-shape-square\");\n/* harmony import */ var _tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @tsparticles/updater-life */ \"@tsparticles/updater-life\");\n/* harmony import */ var _tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @tsparticles/updater-rotate */ \"@tsparticles/updater-rotate\");\n/* harmony import */ var _tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @tsparticles/plugin-sounds */ \"@tsparticles/plugin-sounds\");\n/* harmony import */ var _tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @tsparticles/effect-trail */ \"@tsparticles/effect-trail\");\n/* harmony import */ var _tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__);\n\n\n\n\n\n\n\n\n\n\nconst minSplitCount = 2;\nlet initialized = false;\nlet initializing = false;\nconst explodeSoundCheck = args => {\n const data = args.data;\n return data.particle.shape === \"circle\" && !!data.particle.splitCount && data.particle.splitCount < minSplitCount;\n};\nclass FireworksInstance {\n constructor(container) {\n this._container = container;\n }\n pause() {\n this._container.pause();\n }\n play() {\n this._container.play();\n }\n stop() {\n this._container.stop();\n }\n}\nasync function initPlugins() {\n if (initialized) {\n return;\n }\n if (initializing) {\n return new Promise(resolve => {\n const timeout = 100,\n interval = setInterval(() => {\n if (!initialized) {\n return;\n }\n clearInterval(interval);\n resolve();\n }, timeout);\n });\n }\n initializing = true;\n await (0,_tsparticles_plugin_emitters__WEBPACK_IMPORTED_MODULE_3__.loadEmittersPlugin)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_plugin_emitters_shape_square__WEBPACK_IMPORTED_MODULE_4__.loadEmittersShapeSquare)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_plugin_sounds__WEBPACK_IMPORTED_MODULE_7__.loadSoundsPlugin)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_rotate__WEBPACK_IMPORTED_MODULE_6__.loadRotateUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_destroy__WEBPACK_IMPORTED_MODULE_2__.loadDestroyUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_updater_life__WEBPACK_IMPORTED_MODULE_5__.loadLifeUpdater)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_effect_trail__WEBPACK_IMPORTED_MODULE_8__.loadTrailEffect)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n await (0,_tsparticles_basic__WEBPACK_IMPORTED_MODULE_1__.loadBasic)(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles, false);\n initializing = false;\n initialized = true;\n}\nasync function fireworks(idOrOptions, sourceOptions) {\n await initPlugins();\n let id;\n const options = new _FireworkOptions_js__WEBPACK_IMPORTED_MODULE_9__.FireworkOptions();\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isString)(idOrOptions)) {\n id = idOrOptions;\n options.load(sourceOptions);\n } else {\n id = \"fireworks\";\n options.load(idOrOptions);\n }\n const identity = 1,\n particlesOptions = {\n detectRetina: true,\n background: {\n color: options.background\n },\n fpsLimit: 60,\n emitters: {\n direction: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.MoveDirection.top,\n life: {\n count: 0,\n duration: 0.1,\n delay: 0.1\n },\n rate: {\n delay: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNumber)(options.rate) ? identity / options.rate : {\n min: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMin)(options.rate),\n max: identity / (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeMax)(options.rate)\n },\n quantity: 1\n },\n size: {\n width: 100,\n height: 0\n },\n position: {\n y: 100,\n x: 50\n }\n },\n particles: {\n number: {\n value: 0\n },\n color: {\n value: \"#fff\"\n },\n destroy: {\n mode: \"split\",\n bounds: {\n top: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.minHeight)\n },\n split: {\n sizeOffset: false,\n count: 1,\n factor: {\n value: 0.333333\n },\n rate: {\n value: options.splitCount\n },\n colorOffset: {\n s: options.saturation,\n l: options.brightness\n },\n particles: {\n color: {\n value: options.colors\n },\n number: {\n value: 0\n },\n opacity: {\n value: {\n min: 0.1,\n max: 1\n },\n animation: {\n enable: true,\n speed: 1,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.max,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.min\n }\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 5,\n max: 10\n }\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: {\n min: 1,\n max: 2\n },\n animation: {\n enable: true,\n speed: 5,\n count: 1,\n sync: false,\n startValue: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.StartValueType.min,\n destroy: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.DestroyType.none\n }\n },\n life: {\n count: 1,\n duration: {\n value: {\n min: 0.25,\n max: 0.5\n }\n }\n },\n move: {\n decay: {\n min: 0.05,\n max: 0.1\n },\n enable: true,\n gravity: {\n enable: true,\n inverse: false,\n acceleration: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.gravity)\n },\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(options.speed),\n direction: \"none\",\n outModes: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy\n }\n }\n }\n },\n life: {\n count: 1\n },\n effect: {\n type: \"trail\",\n options: {\n trail: {\n length: {\n min: 10,\n max: 30\n },\n minWidth: 1,\n maxWidth: 1\n }\n }\n },\n shape: {\n type: \"circle\"\n },\n size: {\n value: 1\n },\n opacity: {\n value: 0.5\n },\n rotate: {\n path: true\n },\n move: {\n enable: true,\n gravity: {\n acceleration: 15,\n enable: true,\n inverse: true,\n maxSpeed: 100\n },\n speed: {\n min: 10,\n max: 20\n },\n outModes: {\n default: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.destroy,\n top: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OutMode.none\n }\n }\n },\n sounds: {\n enable: options.sounds,\n events: [{\n event: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.EventType.particleRemoved,\n filter: explodeSoundCheck,\n audio: [\"https://particles.js.org/audio/explosion0.mp3\", \"https://particles.js.org/audio/explosion1.mp3\", \"https://particles.js.org/audio/explosion2.mp3\"]\n }],\n volume: 50\n }\n };\n const container = await _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.load({\n id,\n options: particlesOptions\n });\n if (!container) {\n return;\n }\n return new FireworksInstance(container);\n}\nfireworks.init = async () => {\n await initPlugins();\n};\nfireworks.version = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.tsParticles.version;\nif (!(0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isSsr)()) {\n window.fireworks = fireworks;\n}\n\n//# sourceURL=webpack://@tsparticles/fireworks/./dist/browser/fireworks.js?");

@@ -193,32 +193,2 @@ /***/ }),

/******/
/******/ /* webpack/runtime/create fake namespace object */
/******/ (() => {
/******/ var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
/******/ var leafPrototypes;
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 16: return value when it's Promise-like
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = this(value);
/******/ if(mode & 8) return value;
/******/ if(typeof value === 'object' && value) {
/******/ if((mode & 4) && value.__esModule) return value;
/******/ if((mode & 16) && typeof value.then === 'function') return value;
/******/ }
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ var def = {};
/******/ leafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];
/******/ for(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {
/******/ Object.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));
/******/ }
/******/ def['default'] = () => (value);
/******/ __webpack_require__.d(ns, def);
/******/ return ns;
/******/ };
/******/ })();
/******/
/******/ /* webpack/runtime/define property getters */

@@ -225,0 +195,0 @@ /******/ (() => {

/*! For license information please see tsparticles.fireworks.min.js.LICENSE.txt */
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/effect-trail"),require("@tsparticles/updater-life"),require("@tsparticles/updater-destroy"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/plugin-emitters"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/effect-trail","@tsparticles/updater-life","@tsparticles/updater-destroy","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/plugin-emitters-shape-square","@tsparticles/plugin-emitters"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/effect-trail"),require("@tsparticles/updater-life"),require("@tsparticles/updater-destroy"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/plugin-emitters")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var r in i)("object"==typeof exports?exports:e)[r]=i[r]}}(this,((e,t,i,r,s,a,o,n,l)=>(()=>{var p,u,c={145:e=>{e.exports=t},637:e=>{e.exports=i},303:t=>{t.exports=e},526:e=>{e.exports=l},140:e=>{e.exports=n},933:e=>{e.exports=o},173:e=>{e.exports=s},75:e=>{e.exports=r},668:e=>{e.exports=a}},d={};function f(e){var t=d[e];if(void 0!==t)return t.exports;var i=d[e]={exports:{}};return c[e](i,i.exports,f),i.exports}u=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);f.r(i);var r={};p=p||[null,u({}),u([]),u(u)];for(var s=2&t&&e;"object"==typeof s&&!~p.indexOf(s);s=u(s))Object.getOwnPropertyNames(s).forEach((t=>r[t]=()=>e[t]));return r.default=()=>e,f.d(i,r),i},f.d=(e,t)=>{for(var i in t)f.o(t,i)&&!f.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var m={};return(()=>{f.r(m),f.d(m,{fireworks:()=>o});var e=f(303);class t{constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(t){t&&(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=(0,e.setRangeValue)(t.brightness)),void 0!==t.gravity&&(this.gravity=(0,e.setRangeValue)(t.gravity)),void 0!==t.minHeight&&(this.minHeight=(0,e.setRangeValue)(t.minHeight)),void 0!==t.rate&&(this.rate=(0,e.setRangeValue)(t.rate)),void 0!==t.saturation&&(this.saturation=(0,e.setRangeValue)(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.splitCount&&(this.splitCount=(0,e.setRangeValue)(t.splitCount)))}}let i=!1,r=!1;const s=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class a{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function o(o,n){let l;await async function(){if(i)return;if(r)return new Promise((e=>{const t=setInterval((()=>{i&&(clearInterval(t),e())}),100)}));r=!0;const{loadEmittersPlugin:t}=await Promise.resolve().then(f.t.bind(f,526,23)),{loadEmittersShapeSquare:s}=await Promise.resolve().then(f.t.bind(f,140,23)),{loadSoundsPlugin:a}=await Promise.resolve().then(f.t.bind(f,933,23)),{loadRotateUpdater:o}=await Promise.resolve().then(f.t.bind(f,668,23)),{loadDestroyUpdater:n}=await Promise.resolve().then(f.t.bind(f,173,23)),{loadLifeUpdater:l}=await Promise.resolve().then(f.t.bind(f,75,23)),{loadTrailEffect:p}=await Promise.resolve().then(f.t.bind(f,637,23)),{loadBasic:u}=await Promise.resolve().then(f.t.bind(f,145,23));await t(e.tsParticles,!1),await s(e.tsParticles,!1),await a(e.tsParticles,!1),await o(e.tsParticles,!1),await n(e.tsParticles,!1),await l(e.tsParticles,!1),await p(e.tsParticles,!1),await u(e.tsParticles,!1),r=!1,i=!0}();const p=new t;(0,e.isString)(o)?(l=o,p.load(n)):(l="fireworks",p.load(o));const u={detectRetina:!0,background:{color:p.background},fpsLimit:60,emitters:{direction:"top",life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(p.rate)?1/p.rate:{min:1/(0,e.getRangeMin)(p.rate),max:1/(0,e.getRangeMax)(p.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:"#fff"},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(p.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:p.splitCount},colorOffset:{s:p.saturation,l:p.brightness},particles:{color:{value:p.colors},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:1,sync:!1,startValue:"max",destroy:"min"}},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:"min",destroy:"none"}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(p.gravity)},speed:(0,e.setRangeValue)(p.speed),direction:"none",outModes:"destroy"}}}},life:{count:1},effect:{type:"trail",options:{trail:{length:{min:10,max:30},minWidth:1,maxWidth:1}}},shape:{type:"circle"},size:{value:1},opacity:{value:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:"destroy",top:"none"}}},sounds:{enable:p.sounds,events:[{event:"particleRemoved",filter:s,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},c=await e.tsParticles.load({id:l,options:u});if(c)return new a(c)}o.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=o)})(),m})()));
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine","@tsparticles/basic","@tsparticles/updater-destroy","@tsparticles/plugin-emitters","@tsparticles/plugin-emitters-shape-square","@tsparticles/updater-life","@tsparticles/updater-rotate","@tsparticles/plugin-sounds","@tsparticles/effect-trail"],t);else{var i="object"==typeof exports?t(require("@tsparticles/engine"),require("@tsparticles/basic"),require("@tsparticles/updater-destroy"),require("@tsparticles/plugin-emitters"),require("@tsparticles/plugin-emitters-shape-square"),require("@tsparticles/updater-life"),require("@tsparticles/updater-rotate"),require("@tsparticles/plugin-sounds"),require("@tsparticles/effect-trail")):t(e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window,e.window);for(var s in i)("object"==typeof exports?exports:e)[s]=i[s]}}(this,((e,t,i,s,a,r,o,n,l)=>(()=>{var p={145:e=>{e.exports=t},637:e=>{e.exports=l},303:t=>{t.exports=e},526:e=>{e.exports=s},140:e=>{e.exports=a},933:e=>{e.exports=n},173:e=>{e.exports=i},75:e=>{e.exports=r},668:e=>{e.exports=o}},u={};function c(e){var t=u[e];if(void 0!==t)return t.exports;var i=u[e]={exports:{}};return p[e](i,i.exports,c),i.exports}c.d=(e,t)=>{for(var i in t)c.o(t,i)&&!c.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var d={};return(()=>{c.r(d),c.d(d,{fireworks:()=>h});var e=c(303);class t{constructor(){this.background="none",this.brightness={min:-30,max:30},this.colors=["#ff595e","#ffca3a","#8ac926","#1982c4","#6a4c93"],this.gravity=5,this.minHeight={min:10,max:30},this.rate=10,this.saturation={min:-30,max:30},this.sounds=!0,this.speed={min:5,max:15},this.splitCount={min:75,max:150}}load(t){t&&(void 0!==t.background&&(this.background=t.background),void 0!==t.colors&&((0,e.isArray)(t.colors)?this.colors=[...t.colors]:this.colors=t.colors),void 0!==t.brightness&&(this.brightness=(0,e.setRangeValue)(t.brightness)),void 0!==t.gravity&&(this.gravity=(0,e.setRangeValue)(t.gravity)),void 0!==t.minHeight&&(this.minHeight=(0,e.setRangeValue)(t.minHeight)),void 0!==t.rate&&(this.rate=(0,e.setRangeValue)(t.rate)),void 0!==t.saturation&&(this.saturation=(0,e.setRangeValue)(t.saturation)),void 0!==t.sounds&&(this.sounds=t.sounds),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.splitCount&&(this.splitCount=(0,e.setRangeValue)(t.splitCount)))}}var i=c(145),s=c(173),a=c(526),r=c(140),o=c(75),n=c(668),l=c(933),p=c(637);let u=!1,m=!1;const f=e=>{const t=e.data;return"circle"===t.particle.shape&&!!t.particle.splitCount&&t.particle.splitCount<2};class g{constructor(e){this._container=e}pause(){this._container.pause()}play(){this._container.play()}stop(){this._container.stop()}}async function y(){if(!u){if(m)return new Promise((e=>{const t=setInterval((()=>{u&&(clearInterval(t),e())}),100)}));m=!0,await(0,a.loadEmittersPlugin)(e.tsParticles,!1),await(0,r.loadEmittersShapeSquare)(e.tsParticles,!1),await(0,l.loadSoundsPlugin)(e.tsParticles,!1),await(0,n.loadRotateUpdater)(e.tsParticles,!1),await(0,s.loadDestroyUpdater)(e.tsParticles,!1),await(0,o.loadLifeUpdater)(e.tsParticles,!1),await(0,p.loadTrailEffect)(e.tsParticles,!1),await(0,i.loadBasic)(e.tsParticles,!1),m=!1,u=!0}}async function h(i,s){let a;await y();const r=new t;(0,e.isString)(i)?(a=i,r.load(s)):(a="fireworks",r.load(i));const o={detectRetina:!0,background:{color:r.background},fpsLimit:60,emitters:{direction:e.MoveDirection.top,life:{count:0,duration:.1,delay:.1},rate:{delay:(0,e.isNumber)(r.rate)?1/r.rate:{min:1/(0,e.getRangeMin)(r.rate),max:1/(0,e.getRangeMax)(r.rate)},quantity:1},size:{width:100,height:0},position:{y:100,x:50}},particles:{number:{value:0},color:{value:"#fff"},destroy:{mode:"split",bounds:{top:(0,e.setRangeValue)(r.minHeight)},split:{sizeOffset:!1,count:1,factor:{value:.333333},rate:{value:r.splitCount},colorOffset:{s:r.saturation,l:r.brightness},particles:{color:{value:r.colors},number:{value:0},opacity:{value:{min:.1,max:1},animation:{enable:!0,speed:1,sync:!1,startValue:e.StartValueType.max,destroy:e.DestroyType.min}},effect:{type:"trail",options:{trail:{length:{min:5,max:10}}}},shape:{type:"circle"},size:{value:{min:1,max:2},animation:{enable:!0,speed:5,count:1,sync:!1,startValue:e.StartValueType.min,destroy:e.DestroyType.none}},life:{count:1,duration:{value:{min:.25,max:.5}}},move:{decay:{min:.05,max:.1},enable:!0,gravity:{enable:!0,inverse:!1,acceleration:(0,e.setRangeValue)(r.gravity)},speed:(0,e.setRangeValue)(r.speed),direction:"none",outModes:e.OutMode.destroy}}}},life:{count:1},effect:{type:"trail",options:{trail:{length:{min:10,max:30},minWidth:1,maxWidth:1}}},shape:{type:"circle"},size:{value:1},opacity:{value:.5},rotate:{path:!0},move:{enable:!0,gravity:{acceleration:15,enable:!0,inverse:!0,maxSpeed:100},speed:{min:10,max:20},outModes:{default:e.OutMode.destroy,top:e.OutMode.none}}},sounds:{enable:r.sounds,events:[{event:e.EventType.particleRemoved,filter:f,audio:["https://particles.js.org/audio/explosion0.mp3","https://particles.js.org/audio/explosion1.mp3","https://particles.js.org/audio/explosion2.mp3"]}],volume:50}},n=await e.tsParticles.load({id:a,options:o});if(n)return new g(n)}h.init=async()=>{await y()},h.version=e.tsParticles.version,(0,e.isSsr)()||(window.fireworks=h)})(),d})()));

@@ -1,1 +0,1 @@

/*! tsParticles Fireworks v3.3.0 by Matteo Bruni */
/*! tsParticles Fireworks v3.4.0 by Matteo Bruni */
import { type Container, type RecursivePartial } from "@tsparticles/engine";
import type { IFireworkOptions } from "./IFireworkOptions.js";
type FireworksFunc = ((idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>) & {
version: string;
};
declare global {
interface Window {
fireworks: ((idOrOptions: string | RecursivePartial<IFireworkOptions>, sourceOptions?: RecursivePartial<IFireworkOptions>) => Promise<FireworksInstance | undefined>) & {
fireworks: FireworksFunc & {
init: () => Promise<void>;
version: string;

@@ -20,3 +24,4 @@ };

export declare namespace fireworks {
var init: () => Promise<void>;
var version: string;
}

@@ -1,24 +0,1 @@

var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
(function (factory) {

@@ -30,7 +7,6 @@ if (typeof module === "object" && typeof module.exports === "object") {

else if (typeof define === "function" && define.amd) {
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js"], factory);
define(["require", "exports", "@tsparticles/engine", "./FireworkOptions.js", "@tsparticles/basic", "@tsparticles/updater-destroy", "@tsparticles/plugin-emitters", "@tsparticles/plugin-emitters-shape-square", "@tsparticles/updater-life", "@tsparticles/updater-rotate", "@tsparticles/plugin-sounds", "@tsparticles/effect-trail"], factory);
}
})(function (require, exports) {
"use strict";
var __syncRequire = typeof module === "object" && typeof module.exports === "object";
Object.defineProperty(exports, "__esModule", { value: true });

@@ -40,2 +16,10 @@ exports.fireworks = void 0;

const FireworkOptions_js_1 = require("./FireworkOptions.js");
const basic_1 = require("@tsparticles/basic");
const updater_destroy_1 = require("@tsparticles/updater-destroy");
const plugin_emitters_1 = require("@tsparticles/plugin-emitters");
const plugin_emitters_shape_square_1 = require("@tsparticles/plugin-emitters-shape-square");
const updater_life_1 = require("@tsparticles/updater-life");
const updater_rotate_1 = require("@tsparticles/updater-rotate");
const plugin_sounds_1 = require("@tsparticles/plugin-sounds");
const effect_trail_1 = require("@tsparticles/effect-trail");
const minSplitCount = 2;

@@ -67,3 +51,3 @@ let initialized = false;

if (initializing) {
return new Promise((resolve) => {
return new Promise(resolve => {
const timeout = 100, interval = setInterval(() => {

@@ -79,11 +63,10 @@ if (!initialized) {

initializing = true;
const { loadEmittersPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters"))) : new Promise((resolve_1, reject_1) => { require(["@tsparticles/plugin-emitters"], resolve_1, reject_1); }).then(__importStar)), { loadEmittersShapeSquare } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-emitters-shape-square"))) : new Promise((resolve_2, reject_2) => { require(["@tsparticles/plugin-emitters-shape-square"], resolve_2, reject_2); }).then(__importStar)), { loadSoundsPlugin } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/plugin-sounds"))) : new Promise((resolve_3, reject_3) => { require(["@tsparticles/plugin-sounds"], resolve_3, reject_3); }).then(__importStar)), { loadRotateUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-rotate"))) : new Promise((resolve_4, reject_4) => { require(["@tsparticles/updater-rotate"], resolve_4, reject_4); }).then(__importStar)), { loadDestroyUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-destroy"))) : new Promise((resolve_5, reject_5) => { require(["@tsparticles/updater-destroy"], resolve_5, reject_5); }).then(__importStar)), { loadLifeUpdater } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/updater-life"))) : new Promise((resolve_6, reject_6) => { require(["@tsparticles/updater-life"], resolve_6, reject_6); }).then(__importStar)), { loadTrailEffect } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/effect-trail"))) : new Promise((resolve_7, reject_7) => { require(["@tsparticles/effect-trail"], resolve_7, reject_7); }).then(__importStar)), { loadBasic } = await (__syncRequire ? Promise.resolve().then(() => __importStar(require("@tsparticles/basic"))) : new Promise((resolve_8, reject_8) => { require(["@tsparticles/basic"], resolve_8, reject_8); }).then(__importStar));
await loadEmittersPlugin(engine_1.tsParticles, false);
await loadEmittersShapeSquare(engine_1.tsParticles, false);
await loadSoundsPlugin(engine_1.tsParticles, false);
await loadRotateUpdater(engine_1.tsParticles, false);
await loadDestroyUpdater(engine_1.tsParticles, false);
await loadLifeUpdater(engine_1.tsParticles, false);
await loadTrailEffect(engine_1.tsParticles, false);
await loadBasic(engine_1.tsParticles, false);
await (0, plugin_emitters_1.loadEmittersPlugin)(engine_1.tsParticles, false);
await (0, plugin_emitters_shape_square_1.loadEmittersShapeSquare)(engine_1.tsParticles, false);
await (0, plugin_sounds_1.loadSoundsPlugin)(engine_1.tsParticles, false);
await (0, updater_rotate_1.loadRotateUpdater)(engine_1.tsParticles, false);
await (0, updater_destroy_1.loadDestroyUpdater)(engine_1.tsParticles, false);
await (0, updater_life_1.loadLifeUpdater)(engine_1.tsParticles, false);
await (0, effect_trail_1.loadTrailEffect)(engine_1.tsParticles, false);
await (0, basic_1.loadBasic)(engine_1.tsParticles, false);
initializing = false;

@@ -111,3 +94,3 @@ initialized = true;

emitters: {
direction: "top",
direction: engine_1.MoveDirection.top,
life: {

@@ -174,4 +157,4 @@ count: 0,

sync: false,
startValue: "max",
destroy: "min",
startValue: engine_1.StartValueType.max,
destroy: engine_1.DestroyType.min,
},

@@ -200,4 +183,4 @@ },

sync: false,
startValue: "min",
destroy: "none",
startValue: engine_1.StartValueType.min,
destroy: engine_1.DestroyType.none,
},

@@ -224,3 +207,3 @@ },

direction: "none",
outModes: "destroy",
outModes: engine_1.OutMode.destroy,
},

@@ -271,4 +254,4 @@ },

outModes: {
default: "destroy",
top: "none",
default: engine_1.OutMode.destroy,
top: engine_1.OutMode.none,
},

@@ -281,3 +264,3 @@ },

{
event: "particleRemoved",
event: engine_1.EventType.particleRemoved,
filter: explodeSoundCheck,

@@ -301,2 +284,5 @@ audio: [

exports.fireworks = fireworks;
fireworks.init = async () => {
await initPlugins();
};
fireworks.version = engine_1.tsParticles.version;

@@ -303,0 +289,0 @@ if (!(0, engine_1.isSsr)()) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc