tsparticles 1.39.3 → 1.40.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.
Files changed (168) hide show
  1. package/Core/Container.d.ts +3 -1
  2. package/Core/Container.js +27 -12
  3. package/Core/Loader.d.ts +12 -9
  4. package/Core/Loader.js +35 -19
  5. package/Core/Particle.d.ts +3 -1
  6. package/Core/Particle.js +17 -2
  7. package/Core/Particles.d.ts +3 -1
  8. package/Core/Particles.js +20 -5
  9. package/Core/Utils/InteractionManager.d.ts +3 -1
  10. package/Core/Utils/InteractionManager.js +17 -3
  11. package/Core/Utils/Plugins.d.ts +29 -15
  12. package/Core/Utils/Plugins.js +58 -46
  13. package/Options/Classes/Options.d.ts +2 -1
  14. package/Options/Classes/Options.js +13 -6
  15. package/Plugins/Emitters/EmitterInstance.d.ts +6 -3
  16. package/Plugins/Emitters/EmitterInstance.js +46 -16
  17. package/Plugins/Emitters/Emitters.d.ts +3 -1
  18. package/Plugins/Emitters/Emitters.js +17 -2
  19. package/Plugins/Emitters/{EmittersMain.d.ts → EmittersEngine.d.ts} +3 -1
  20. package/Plugins/Emitters/{EmittersMain.js → EmittersEngine.js} +0 -0
  21. package/Plugins/Emitters/IEmitterShape.d.ts +2 -2
  22. package/Plugins/Emitters/Options/Classes/Emitter.d.ts +1 -0
  23. package/Plugins/Emitters/Options/Classes/Emitter.js +1 -0
  24. package/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +1 -0
  25. package/Plugins/Emitters/ShapeManager.d.ts +6 -3
  26. package/Plugins/Emitters/ShapeManager.js +16 -4
  27. package/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +2 -2
  28. package/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -2
  29. package/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +2 -2
  30. package/Plugins/Emitters/Shapes/Square/SquareShape.js +4 -4
  31. package/Plugins/Emitters/index.d.ts +3 -3
  32. package/Plugins/Emitters/index.js +25 -6
  33. package/README.md +1 -1
  34. package/browser/Core/Container.d.ts +4 -1
  35. package/browser/Core/Container.js +29 -13
  36. package/browser/Core/Loader.d.ts +12 -9
  37. package/browser/Core/Loader.js +35 -19
  38. package/browser/Core/Particle.d.ts +3 -1
  39. package/browser/Core/Particle.js +18 -3
  40. package/browser/Core/Particles.d.ts +3 -1
  41. package/browser/Core/Particles.js +21 -6
  42. package/browser/Core/Utils/InteractionManager.d.ts +3 -1
  43. package/browser/Core/Utils/InteractionManager.js +17 -3
  44. package/browser/Core/Utils/Plugins.d.ts +29 -15
  45. package/browser/Core/Utils/Plugins.js +58 -46
  46. package/browser/Options/Classes/Options.d.ts +2 -1
  47. package/browser/Options/Classes/Options.js +13 -6
  48. package/browser/Plugins/Emitters/EmitterInstance.d.ts +6 -3
  49. package/browser/Plugins/Emitters/EmitterInstance.js +46 -16
  50. package/browser/Plugins/Emitters/Emitters.d.ts +3 -1
  51. package/browser/Plugins/Emitters/Emitters.js +17 -2
  52. package/{esm/Plugins/Emitters/EmittersMain.d.ts → browser/Plugins/Emitters/EmittersEngine.d.ts} +3 -1
  53. package/browser/Plugins/Emitters/{EmittersMain.js → EmittersEngine.js} +0 -0
  54. package/browser/Plugins/Emitters/IEmitterShape.d.ts +2 -2
  55. package/browser/Plugins/Emitters/Options/Classes/Emitter.d.ts +1 -0
  56. package/browser/Plugins/Emitters/Options/Classes/Emitter.js +1 -0
  57. package/browser/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +4 -0
  58. package/browser/Plugins/Emitters/ShapeManager.d.ts +6 -3
  59. package/browser/Plugins/Emitters/ShapeManager.js +16 -4
  60. package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +2 -2
  61. package/browser/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -2
  62. package/browser/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +2 -2
  63. package/browser/Plugins/Emitters/Shapes/Square/SquareShape.js +4 -4
  64. package/browser/Plugins/Emitters/index.d.ts +3 -3
  65. package/browser/Plugins/Emitters/index.js +25 -6
  66. package/browser/engine.d.ts +5 -1
  67. package/browser/engine.js +22 -17
  68. package/engine.d.ts +3 -0
  69. package/engine.js +20 -16
  70. package/esm/Core/Container.d.ts +3 -1
  71. package/esm/Core/Container.js +28 -13
  72. package/esm/Core/Loader.d.ts +12 -9
  73. package/esm/Core/Loader.js +35 -19
  74. package/esm/Core/Particle.d.ts +3 -1
  75. package/esm/Core/Particle.js +18 -3
  76. package/esm/Core/Particles.d.ts +3 -1
  77. package/esm/Core/Particles.js +21 -6
  78. package/esm/Core/Utils/InteractionManager.d.ts +3 -1
  79. package/esm/Core/Utils/InteractionManager.js +17 -3
  80. package/esm/Core/Utils/Plugins.d.ts +29 -15
  81. package/esm/Core/Utils/Plugins.js +58 -46
  82. package/esm/Options/Classes/Options.d.ts +2 -1
  83. package/esm/Options/Classes/Options.js +13 -6
  84. package/esm/Plugins/Emitters/EmitterInstance.d.ts +6 -3
  85. package/esm/Plugins/Emitters/EmitterInstance.js +46 -16
  86. package/esm/Plugins/Emitters/Emitters.d.ts +3 -1
  87. package/esm/Plugins/Emitters/Emitters.js +17 -2
  88. package/{browser/Plugins/Emitters/EmittersMain.d.ts → esm/Plugins/Emitters/EmittersEngine.d.ts} +3 -1
  89. package/esm/Plugins/Emitters/{EmittersMain.js → EmittersEngine.js} +0 -0
  90. package/esm/Plugins/Emitters/IEmitterShape.d.ts +2 -2
  91. package/esm/Plugins/Emitters/Options/Classes/Emitter.d.ts +1 -0
  92. package/esm/Plugins/Emitters/Options/Classes/Emitter.js +1 -0
  93. package/esm/Plugins/Emitters/Options/Interfaces/IEmitter.d.ts +1 -0
  94. package/esm/Plugins/Emitters/ShapeManager.d.ts +6 -3
  95. package/esm/Plugins/Emitters/ShapeManager.js +16 -4
  96. package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.d.ts +2 -2
  97. package/esm/Plugins/Emitters/Shapes/Circle/CircleShape.js +2 -2
  98. package/esm/Plugins/Emitters/Shapes/Square/SquareShape.d.ts +2 -2
  99. package/esm/Plugins/Emitters/Shapes/Square/SquareShape.js +4 -4
  100. package/esm/Plugins/Emitters/index.d.ts +3 -3
  101. package/esm/Plugins/Emitters/index.js +25 -6
  102. package/esm/engine.d.ts +3 -0
  103. package/esm/engine.js +20 -16
  104. package/package.json +1 -1
  105. package/report.html +2 -2
  106. package/report.slim.html +2 -2
  107. package/tsparticles.engine.js +221 -114
  108. package/tsparticles.engine.min.js +2 -2
  109. package/tsparticles.interaction.external.attract.js +199 -96
  110. package/tsparticles.interaction.external.attract.min.js +2 -2
  111. package/tsparticles.interaction.external.bounce.js +199 -96
  112. package/tsparticles.interaction.external.bounce.min.js +2 -2
  113. package/tsparticles.interaction.external.bubble.js +199 -96
  114. package/tsparticles.interaction.external.bubble.min.js +2 -2
  115. package/tsparticles.interaction.external.connect.js +199 -96
  116. package/tsparticles.interaction.external.connect.min.js +2 -2
  117. package/tsparticles.interaction.external.grab.js +199 -96
  118. package/tsparticles.interaction.external.grab.min.js +2 -2
  119. package/tsparticles.interaction.external.repulse.js +199 -96
  120. package/tsparticles.interaction.external.repulse.min.js +2 -2
  121. package/tsparticles.interaction.external.trail.js +199 -96
  122. package/tsparticles.interaction.external.trail.min.js +2 -2
  123. package/tsparticles.interaction.particles.attract.js +199 -96
  124. package/tsparticles.interaction.particles.attract.min.js +2 -2
  125. package/tsparticles.interaction.particles.collisions.js +199 -96
  126. package/tsparticles.interaction.particles.collisions.min.js +2 -2
  127. package/tsparticles.interaction.particles.links.js +199 -96
  128. package/tsparticles.interaction.particles.links.min.js +2 -2
  129. package/tsparticles.js +341 -152
  130. package/tsparticles.min.js +2 -2
  131. package/tsparticles.pathseg.min.js +1 -1
  132. package/tsparticles.plugins.absorbers.js +199 -96
  133. package/tsparticles.plugins.absorbers.min.js +2 -2
  134. package/tsparticles.plugins.emitters.js +324 -139
  135. package/tsparticles.plugins.emitters.min.js +2 -2
  136. package/tsparticles.plugins.polygonMask.js +199 -96
  137. package/tsparticles.plugins.polygonMask.min.js +2 -2
  138. package/tsparticles.shape.circle.min.js +1 -1
  139. package/tsparticles.shape.image.js +202 -99
  140. package/tsparticles.shape.image.min.js +2 -2
  141. package/tsparticles.shape.line.min.js +1 -1
  142. package/tsparticles.shape.polygon.min.js +1 -1
  143. package/tsparticles.shape.square.min.js +1 -1
  144. package/tsparticles.shape.star.min.js +1 -1
  145. package/tsparticles.shape.text.js +199 -96
  146. package/tsparticles.shape.text.min.js +2 -2
  147. package/tsparticles.slim.js +221 -114
  148. package/tsparticles.slim.min.js +2 -2
  149. package/tsparticles.updater.angle.js +199 -96
  150. package/tsparticles.updater.angle.min.js +2 -2
  151. package/tsparticles.updater.color.js +199 -96
  152. package/tsparticles.updater.color.min.js +2 -2
  153. package/tsparticles.updater.life.js +199 -96
  154. package/tsparticles.updater.life.min.js +2 -2
  155. package/tsparticles.updater.opacity.js +199 -96
  156. package/tsparticles.updater.opacity.min.js +2 -2
  157. package/tsparticles.updater.outModes.js +199 -96
  158. package/tsparticles.updater.outModes.min.js +2 -2
  159. package/tsparticles.updater.roll.js +199 -96
  160. package/tsparticles.updater.roll.min.js +2 -2
  161. package/tsparticles.updater.size.js +199 -96
  162. package/tsparticles.updater.size.min.js +2 -2
  163. package/tsparticles.updater.strokeColor.js +199 -96
  164. package/tsparticles.updater.strokeColor.min.js +2 -2
  165. package/tsparticles.updater.tilt.js +199 -96
  166. package/tsparticles.updater.tilt.min.js +2 -2
  167. package/tsparticles.updater.wobble.js +199 -96
  168. package/tsparticles.updater.wobble.min.js +2 -2
@@ -506,15 +506,30 @@
506
506
  }
507
507
  }
508
508
  }
509
+ var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
510
+ if (kind === "m") throw new TypeError("Private method is not writable");
511
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
512
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
513
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
514
+ value;
515
+ };
516
+ var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
517
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
518
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
519
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
520
+ };
521
+ var _InteractionManager_engine;
509
522
  class InteractionManager_InteractionManager {
510
- constructor(container) {
523
+ constructor(engine, container) {
511
524
  this.container = container;
525
+ _InteractionManager_engine.set(this, void 0);
526
+ __classPrivateFieldSet(this, _InteractionManager_engine, engine, "f");
512
527
  this.externalInteractors = [];
513
528
  this.particleInteractors = [];
514
529
  this.init();
515
530
  }
516
531
  init() {
517
- const interactors = Plugins.getInteractors(this.container, true);
532
+ const interactors = __classPrivateFieldGet(this, _InteractionManager_engine, "f").plugins.getInteractors(this.container, true);
518
533
  this.externalInteractors = [];
519
534
  this.particleInteractors = [];
520
535
  for (const interactor of interactors) {
@@ -547,6 +562,7 @@
547
562
  }
548
563
  }
549
564
  }
565
+ _InteractionManager_engine = new WeakMap;
550
566
  function applyDistance(particle) {
551
567
  const initialPosition = particle.initialPosition;
552
568
  const {dx: dx, dy: dy} = getDistances(initialPosition, particle.position);
@@ -720,26 +736,38 @@
720
736
  return proximityFactor / slowFactor;
721
737
  }
722
738
  }
723
- const plugins = null && [];
724
- const interactorsInitializers = new Map;
725
- const updatersInitializers = new Map;
726
- const interactors = new Map;
727
- const updaters = new Map;
728
- const presets = new Map;
729
- const drawers = new Map;
730
- const pathGenerators = new Map;
731
- class Plugins_Plugins {
732
- static getPlugin(plugin) {
733
- return plugins.find((t => t.id === plugin));
739
+ var Plugins_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
740
+ if (kind === "m") throw new TypeError("Private method is not writable");
741
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
742
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
743
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
744
+ value;
745
+ };
746
+ var _Plugins_engine;
747
+ class Plugins {
748
+ constructor(engine) {
749
+ _Plugins_engine.set(this, void 0);
750
+ Plugins_classPrivateFieldSet(this, _Plugins_engine, engine, "f");
751
+ this.plugins = [];
752
+ this.interactorsInitializers = new Map;
753
+ this.updatersInitializers = new Map;
754
+ this.interactors = new Map;
755
+ this.updaters = new Map;
756
+ this.presets = new Map;
757
+ this.drawers = new Map;
758
+ this.pathGenerators = new Map;
734
759
  }
735
- static addPlugin(plugin) {
736
- if (!Plugins_Plugins.getPlugin(plugin.id)) {
737
- plugins.push(plugin);
760
+ getPlugin(plugin) {
761
+ return this.plugins.find((t => t.id === plugin));
762
+ }
763
+ addPlugin(plugin) {
764
+ if (!this.getPlugin(plugin.id)) {
765
+ this.plugins.push(plugin);
738
766
  }
739
767
  }
740
- static getAvailablePlugins(container) {
768
+ getAvailablePlugins(container) {
741
769
  const res = new Map;
742
- for (const plugin of plugins) {
770
+ for (const plugin of this.plugins) {
743
771
  if (!plugin.needsPlugin(container.actualOptions)) {
744
772
  continue;
745
773
  }
@@ -747,61 +775,62 @@
747
775
  }
748
776
  return res;
749
777
  }
750
- static loadOptions(options, sourceOptions) {
751
- for (const plugin of plugins) {
778
+ loadOptions(options, sourceOptions) {
779
+ for (const plugin of this.plugins) {
752
780
  plugin.loadOptions(options, sourceOptions);
753
781
  }
754
782
  }
755
- static getPreset(preset) {
756
- return presets.get(preset);
783
+ getPreset(preset) {
784
+ return this.presets.get(preset);
757
785
  }
758
- static addPreset(presetKey, options, override = false) {
759
- if (override || !Plugins_Plugins.getPreset(presetKey)) {
760
- presets.set(presetKey, options);
786
+ addPreset(presetKey, options, override = false) {
787
+ if (override || !this.getPreset(presetKey)) {
788
+ this.presets.set(presetKey, options);
761
789
  }
762
790
  }
763
- static addShapeDrawer(type, drawer) {
764
- if (!Plugins_Plugins.getShapeDrawer(type)) {
765
- drawers.set(type, drawer);
791
+ addShapeDrawer(type, drawer) {
792
+ if (!this.getShapeDrawer(type)) {
793
+ this.drawers.set(type, drawer);
766
794
  }
767
795
  }
768
- static getShapeDrawer(type) {
769
- return drawers.get(type);
796
+ getShapeDrawer(type) {
797
+ return this.drawers.get(type);
770
798
  }
771
- static getSupportedShapes() {
772
- return drawers.keys();
799
+ getSupportedShapes() {
800
+ return this.drawers.keys();
773
801
  }
774
- static getPathGenerator(type) {
775
- return pathGenerators.get(type);
802
+ getPathGenerator(type) {
803
+ return this.pathGenerators.get(type);
776
804
  }
777
- static addPathGenerator(type, pathGenerator) {
778
- if (!Plugins_Plugins.getPathGenerator(type)) {
779
- pathGenerators.set(type, pathGenerator);
805
+ addPathGenerator(type, pathGenerator) {
806
+ if (!this.getPathGenerator(type)) {
807
+ this.pathGenerators.set(type, pathGenerator);
780
808
  }
781
809
  }
782
- static getInteractors(container, force = false) {
783
- let res = interactors.get(container);
810
+ getInteractors(container, force = false) {
811
+ let res = this.interactors.get(container);
784
812
  if (!res || force) {
785
- res = [ ...interactorsInitializers.values() ].map((t => t(container)));
786
- interactors.set(container, res);
813
+ res = [ ...this.interactorsInitializers.values() ].map((t => t(container)));
814
+ this.interactors.set(container, res);
787
815
  }
788
816
  return res;
789
817
  }
790
- static addInteractor(name, initInteractor) {
791
- interactorsInitializers.set(name, initInteractor);
818
+ addInteractor(name, initInteractor) {
819
+ this.interactorsInitializers.set(name, initInteractor);
792
820
  }
793
- static getUpdaters(container, force = false) {
794
- let res = updaters.get(container);
821
+ getUpdaters(container, force = false) {
822
+ let res = this.updaters.get(container);
795
823
  if (!res || force) {
796
- res = [ ...updatersInitializers.values() ].map((t => t(container)));
797
- updaters.set(container, res);
824
+ res = [ ...this.updatersInitializers.values() ].map((t => t(container)));
825
+ this.updaters.set(container, res);
798
826
  }
799
827
  return res;
800
828
  }
801
- static addParticleUpdater(name, initUpdater) {
802
- updatersInitializers.set(name, initUpdater);
829
+ addParticleUpdater(name, initUpdater) {
830
+ this.updatersInitializers.set(name, initUpdater);
803
831
  }
804
832
  }
833
+ _Plugins_engine = new WeakMap;
805
834
  class QuadTree_QuadTree {
806
835
  constructor(rectangle, capacity) {
807
836
  this.rectangle = rectangle;
@@ -2328,15 +2357,24 @@
2328
2357
  }
2329
2358
  }
2330
2359
  }
2331
- var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
2360
+ var Options_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
2361
+ if (kind === "m") throw new TypeError("Private method is not writable");
2362
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2363
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2364
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
2365
+ value;
2366
+ };
2367
+ var Options_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
2332
2368
  if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2333
2369
  if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2334
2370
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2335
2371
  };
2336
- var _Options_instances, _Options_findDefaultTheme;
2372
+ var _Options_instances, _Options_engine, _Options_findDefaultTheme;
2337
2373
  class Options_Options {
2338
- constructor() {
2374
+ constructor(engine) {
2339
2375
  _Options_instances.add(this);
2376
+ _Options_engine.set(this, void 0);
2377
+ Options_classPrivateFieldSet(this, _Options_engine, engine, "f");
2340
2378
  this.autoPlay = true;
2341
2379
  this.background = new Background;
2342
2380
  this.backgroundMask = new BackgroundMask;
@@ -2429,7 +2467,7 @@
2429
2467
  this.motion.load(data.motion);
2430
2468
  this.particles.load(data.particles);
2431
2469
  this.style = deepExtend(this.style, data.style);
2432
- Plugins.loadOptions(this, data);
2470
+ Options_classPrivateFieldGet(this, _Options_engine, "f").plugins.loadOptions(this, data);
2433
2471
  if (data.responsive !== undefined) {
2434
2472
  for (const responsive of data.responsive) {
2435
2473
  const optResponsive = new Responsive;
@@ -2445,8 +2483,8 @@
2445
2483
  this.themes.push(optTheme);
2446
2484
  }
2447
2485
  }
2448
- this.defaultDarkTheme = (_d = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
2449
- this.defaultLightTheme = (_e = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
2486
+ this.defaultDarkTheme = (_d = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "dark")) === null || _d === void 0 ? void 0 : _d.name;
2487
+ this.defaultLightTheme = (_e = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, "light")) === null || _e === void 0 ? void 0 : _e.name;
2450
2488
  }
2451
2489
  setTheme(name) {
2452
2490
  if (name) {
@@ -2455,7 +2493,7 @@
2455
2493
  this.load(chosenTheme.options);
2456
2494
  }
2457
2495
  } else {
2458
- const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = __classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, clientDarkMode ? "dark" : "light");
2496
+ const mediaMatch = typeof matchMedia !== "undefined" && matchMedia("(prefers-color-scheme: dark)"), clientDarkMode = mediaMatch && mediaMatch.matches, defaultTheme = Options_classPrivateFieldGet(this, _Options_instances, "m", _Options_findDefaultTheme).call(this, clientDarkMode ? "dark" : "light");
2459
2497
  if (defaultTheme) {
2460
2498
  this.load(defaultTheme.options);
2461
2499
  }
@@ -2468,13 +2506,26 @@
2468
2506
  return responsiveOptions === null || responsiveOptions === void 0 ? void 0 : responsiveOptions.maxWidth;
2469
2507
  }
2470
2508
  importPreset(preset) {
2471
- this.load(Plugins.getPreset(preset));
2509
+ this.load(Options_classPrivateFieldGet(this, _Options_engine, "f").plugins.getPreset(preset));
2472
2510
  }
2473
2511
  }
2474
- _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
2512
+ _Options_engine = new WeakMap, _Options_instances = new WeakSet, _Options_findDefaultTheme = function _Options_findDefaultTheme(mode) {
2475
2513
  var _a;
2476
2514
  return (_a = this.themes.find((theme => theme.default.value && theme.default.mode === mode))) !== null && _a !== void 0 ? _a : this.themes.find((theme => theme.default.value && theme.default.mode === "any"));
2477
2515
  };
2516
+ var Particle_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
2517
+ if (kind === "m") throw new TypeError("Private method is not writable");
2518
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2519
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2520
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
2521
+ value;
2522
+ };
2523
+ var Particle_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
2524
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2525
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2526
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2527
+ };
2528
+ var _Particle_engine;
2478
2529
  const fixOutMode = data => {
2479
2530
  if (isInArray(data.outMode, data.checkModes) || isInArray(data.outMode, data.checkModes)) {
2480
2531
  if (data.coord > data.maxCoord - data.radius * 2) {
@@ -2485,11 +2536,13 @@
2485
2536
  }
2486
2537
  };
2487
2538
  class Particle_Particle {
2488
- constructor(id, container, position, overrideOptions, group) {
2539
+ constructor(engine, id, container, position, overrideOptions, group) {
2489
2540
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2490
2541
  this.id = id;
2491
2542
  this.container = container;
2492
2543
  this.group = group;
2544
+ _Particle_engine.set(this, void 0);
2545
+ Particle_classPrivateFieldSet(this, _Particle_engine, engine, "f");
2493
2546
  this.fill = true;
2494
2547
  this.close = true;
2495
2548
  this.lastPathTime = 0;
@@ -2583,7 +2636,7 @@
2583
2636
  this.sides = 24;
2584
2637
  let drawer = container.drawers.get(this.shape);
2585
2638
  if (!drawer) {
2586
- drawer = Plugins.getShapeDrawer(this.shape);
2639
+ drawer = Particle_classPrivateFieldGet(this, _Particle_engine, "f").plugins.getShapeDrawer(this.shape);
2587
2640
  if (drawer) {
2588
2641
  container.drawers.set(this.shape, drawer);
2589
2642
  }
@@ -2823,9 +2876,25 @@
2823
2876
  return life;
2824
2877
  }
2825
2878
  }
2879
+ _Particle_engine = new WeakMap;
2880
+ var Particles_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
2881
+ if (kind === "m") throw new TypeError("Private method is not writable");
2882
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
2883
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
2884
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
2885
+ value;
2886
+ };
2887
+ var Particles_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
2888
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
2889
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
2890
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
2891
+ };
2892
+ var _Particles_engine;
2826
2893
  class Particles_Particles {
2827
- constructor(container) {
2894
+ constructor(engine, container) {
2828
2895
  this.container = container;
2896
+ _Particles_engine.set(this, void 0);
2897
+ Particles_classPrivateFieldSet(this, _Particles_engine, engine, "f");
2829
2898
  this.nextId = 0;
2830
2899
  this.array = [];
2831
2900
  this.zArray = [];
@@ -2837,11 +2906,11 @@
2837
2906
  links: new Map,
2838
2907
  triangles: new Map
2839
2908
  };
2840
- this.interactionManager = new InteractionManager(container);
2909
+ this.interactionManager = new InteractionManager(Particles_classPrivateFieldGet(this, _Particles_engine, "f"), container);
2841
2910
  const canvasSize = this.container.canvas.size;
2842
2911
  this.linksColors = new Map;
2843
2912
  this.quadTree = new QuadTree(new Rectangle(-canvasSize.width / 4, -canvasSize.height / 4, canvasSize.width * 3 / 2, canvasSize.height * 3 / 2), 4);
2844
- this.updaters = Plugins.getUpdaters(container, true);
2913
+ this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
2845
2914
  }
2846
2915
  get count() {
2847
2916
  return this.array.length;
@@ -2855,7 +2924,7 @@
2855
2924
  this.freqs.links = new Map;
2856
2925
  this.freqs.triangles = new Map;
2857
2926
  let handled = false;
2858
- this.updaters = Plugins.getUpdaters(container, true);
2927
+ this.updaters = Particles_classPrivateFieldGet(this, _Particles_engine, "f").plugins.getUpdaters(container, true);
2859
2928
  this.interactionManager.init();
2860
2929
  for (const [, plugin] of container.plugins) {
2861
2930
  if (plugin.particlesInitialization !== undefined) {
@@ -3102,7 +3171,7 @@
3102
3171
  }
3103
3172
  pushParticle(position, overrideOptions, group, initializer) {
3104
3173
  try {
3105
- const particle = new Particle(this.nextId, this.container, position, overrideOptions, group);
3174
+ const particle = new Particle(Particles_classPrivateFieldGet(this, _Particles_engine, "f"), this.nextId, this.container, position, overrideOptions, group);
3106
3175
  let canAdd = true;
3107
3176
  if (initializer) {
3108
3177
  canAdd = initializer(particle);
@@ -3120,6 +3189,7 @@
3120
3189
  }
3121
3190
  }
3122
3191
  }
3192
+ _Particles_engine = new WeakMap;
3123
3193
  class Retina_Retina {
3124
3194
  constructor(container) {
3125
3195
  this.container = container;
@@ -3207,9 +3277,24 @@
3207
3277
  }
3208
3278
  }
3209
3279
  }
3280
+ var Container_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
3281
+ if (kind === "m") throw new TypeError("Private method is not writable");
3282
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
3283
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
3284
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
3285
+ value;
3286
+ };
3287
+ var Container_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
3288
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3289
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
3290
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
3291
+ };
3292
+ var _Container_engine;
3210
3293
  class Container_Container {
3211
- constructor(id, sourceOptions, ...presets) {
3294
+ constructor(engine, id, sourceOptions, ...presets) {
3212
3295
  this.id = id;
3296
+ _Container_engine.set(this, void 0);
3297
+ Container_classPrivateFieldSet(this, _Container_engine, engine, "f");
3213
3298
  this.fpsLimit = 120;
3214
3299
  this.duration = 0;
3215
3300
  this.lifeTime = 0;
@@ -3224,7 +3309,7 @@
3224
3309
  this._initialSourceOptions = sourceOptions;
3225
3310
  this.retina = new Retina(this);
3226
3311
  this.canvas = new Canvas(this);
3227
- this.particles = new Particles(this);
3312
+ this.particles = new Particles(Container_classPrivateFieldGet(this, _Container_engine, "f"), this);
3228
3313
  this.drawer = new FrameManager(this);
3229
3314
  this.presets = presets;
3230
3315
  this.pathGenerator = {
@@ -3253,8 +3338,8 @@
3253
3338
  this.plugins = new Map;
3254
3339
  this.drawers = new Map;
3255
3340
  this.density = 1;
3256
- this._options = new Options;
3257
- this.actualOptions = new Options;
3341
+ this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
3342
+ this.actualOptions = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
3258
3343
  this.eventListeners = new EventListeners(this);
3259
3344
  if (typeof IntersectionObserver !== "undefined" && IntersectionObserver) {
3260
3345
  this.intersectionObserver = new IntersectionObserver((entries => this.intersectionManager(entries)));
@@ -3369,7 +3454,7 @@
3369
3454
  return this.start();
3370
3455
  }
3371
3456
  reset() {
3372
- this._options = new Options;
3457
+ this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
3373
3458
  return this.refresh();
3374
3459
  }
3375
3460
  stop() {
@@ -3510,20 +3595,20 @@
3510
3595
  return false;
3511
3596
  }
3512
3597
  async init() {
3513
- this._options = new Options;
3598
+ this._options = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
3514
3599
  for (const preset of this.presets) {
3515
- this._options.load(Plugins.getPreset(preset));
3600
+ this._options.load(Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getPreset(preset));
3516
3601
  }
3517
- const shapes = Plugins.getSupportedShapes();
3602
+ const shapes = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getSupportedShapes();
3518
3603
  for (const type of shapes) {
3519
- const drawer = Plugins.getShapeDrawer(type);
3604
+ const drawer = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getShapeDrawer(type);
3520
3605
  if (drawer) {
3521
3606
  this.drawers.set(type, drawer);
3522
3607
  }
3523
3608
  }
3524
3609
  this._options.load(this._initialSourceOptions);
3525
3610
  this._options.load(this._sourceOptions);
3526
- this.actualOptions = new Options;
3611
+ this.actualOptions = new Options(Container_classPrivateFieldGet(this, _Container_engine, "f"));
3527
3612
  this.actualOptions.load(this._options);
3528
3613
  this.retina.init();
3529
3614
  this.canvas.init();
@@ -3534,7 +3619,7 @@
3534
3619
  this.duration = getRangeValue(this.actualOptions.duration);
3535
3620
  this.lifeTime = 0;
3536
3621
  this.fpsLimit = this.actualOptions.fpsLimit > 0 ? this.actualOptions.fpsLimit : 120;
3537
- const availablePlugins = Plugins.getAvailablePlugins(this);
3622
+ const availablePlugins = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getAvailablePlugins(this);
3538
3623
  for (const [id, plugin] of availablePlugins) {
3539
3624
  this.plugins.set(id, plugin);
3540
3625
  }
@@ -3552,7 +3637,7 @@
3552
3637
  }
3553
3638
  const pathOptions = this.actualOptions.particles.move.path;
3554
3639
  if (pathOptions.generator) {
3555
- const customGenerator = Plugins.getPathGenerator(pathOptions.generator);
3640
+ const customGenerator = Container_classPrivateFieldGet(this, _Container_engine, "f").plugins.getPathGenerator(pathOptions.generator);
3556
3641
  if (customGenerator) {
3557
3642
  if (customGenerator.init) {
3558
3643
  this.pathGenerator.init = customGenerator.init;
@@ -3589,24 +3674,41 @@
3589
3674
  }
3590
3675
  }
3591
3676
  }
3592
- const tsParticlesDom = null && [];
3677
+ _Container_engine = new WeakMap;
3678
+ var Loader_classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function(receiver, state, value, kind, f) {
3679
+ if (kind === "m") throw new TypeError("Private method is not writable");
3680
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
3681
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
3682
+ return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value),
3683
+ value;
3684
+ };
3685
+ var Loader_classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function(receiver, state, kind, f) {
3686
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3687
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
3688
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
3689
+ };
3690
+ var _Loader_engine;
3593
3691
  function fetchError(statusCode) {
3594
3692
  console.error(`Error tsParticles - fetch status: ${statusCode}`);
3595
3693
  console.error("Error tsParticles - File config not found");
3596
3694
  }
3597
3695
  class Loader {
3598
- static dom() {
3599
- return tsParticlesDom;
3696
+ constructor(engine) {
3697
+ _Loader_engine.set(this, void 0);
3698
+ Loader_classPrivateFieldSet(this, _Loader_engine, engine, "f");
3699
+ }
3700
+ dom() {
3701
+ return Loader_classPrivateFieldGet(this, _Loader_engine, "f").domArray;
3600
3702
  }
3601
- static domItem(index) {
3602
- const dom = Loader.dom();
3703
+ domItem(index) {
3704
+ const dom = this.dom();
3603
3705
  const item = dom[index];
3604
3706
  if (item && !item.destroyed) {
3605
3707
  return item;
3606
3708
  }
3607
3709
  dom.splice(index, 1);
3608
3710
  }
3609
- static async loadOptions(params) {
3711
+ async loadOptions(params) {
3610
3712
  var _a, _b, _c;
3611
3713
  const tagId = (_a = params.tagId) !== null && _a !== void 0 ? _a : `tsparticles${Math.floor(Math.random() * 1e4)}`;
3612
3714
  const {options: options, index: index} = params;
@@ -3617,10 +3719,10 @@
3617
3719
  (_c = document.querySelector("body")) === null || _c === void 0 ? void 0 : _c.append(domContainer);
3618
3720
  }
3619
3721
  const currentOptions = options instanceof Array ? itemFromArray(options, index) : options;
3620
- const dom = Loader.dom();
3722
+ const dom = this.dom();
3621
3723
  const oldIndex = dom.findIndex((v => v.id === tagId));
3622
3724
  if (oldIndex >= 0) {
3623
- const old = Loader.domItem(oldIndex);
3725
+ const old = this.domItem(oldIndex);
3624
3726
  if (old && !old.destroyed) {
3625
3727
  old.destroy();
3626
3728
  dom.splice(oldIndex, 1);
@@ -3643,7 +3745,7 @@
3643
3745
  domContainer.appendChild(canvasEl);
3644
3746
  }
3645
3747
  }
3646
- const newItem = new Container(tagId, currentOptions);
3748
+ const newItem = new Container(Loader_classPrivateFieldGet(this, _Loader_engine, "f"), tagId, currentOptions);
3647
3749
  if (oldIndex >= 0) {
3648
3750
  dom.splice(oldIndex, 0, newItem);
3649
3751
  } else {
@@ -3653,7 +3755,7 @@
3653
3755
  await newItem.start();
3654
3756
  return newItem;
3655
3757
  }
3656
- static async loadRemoteOptions(params) {
3758
+ async loadRemoteOptions(params) {
3657
3759
  const {url: jsonUrl, index: index} = params;
3658
3760
  const url = jsonUrl instanceof Array ? itemFromArray(jsonUrl, index) : jsonUrl;
3659
3761
  if (!url) {
@@ -3665,14 +3767,14 @@
3665
3767
  return;
3666
3768
  }
3667
3769
  const data = await response.json();
3668
- return await Loader.loadOptions({
3770
+ return this.loadOptions({
3669
3771
  tagId: params.tagId,
3670
3772
  element: params.element,
3671
3773
  index: index,
3672
3774
  options: data
3673
3775
  });
3674
3776
  }
3675
- static load(tagId, options, index) {
3777
+ load(tagId, options, index) {
3676
3778
  const params = {
3677
3779
  index: index
3678
3780
  };
@@ -3688,7 +3790,7 @@
3688
3790
  }
3689
3791
  return this.loadOptions(params);
3690
3792
  }
3691
- static async set(id, domContainer, options, index) {
3793
+ async set(id, domContainer, options, index) {
3692
3794
  const params = {
3693
3795
  index: index
3694
3796
  };
@@ -3709,7 +3811,7 @@
3709
3811
  }
3710
3812
  return this.loadOptions(params);
3711
3813
  }
3712
- static async loadJSON(tagId, jsonUrl, index) {
3814
+ async loadJSON(tagId, jsonUrl, index) {
3713
3815
  let url, id;
3714
3816
  if (typeof jsonUrl === "number" || jsonUrl === undefined) {
3715
3817
  url = tagId;
@@ -3717,13 +3819,13 @@
3717
3819
  id = tagId;
3718
3820
  url = jsonUrl;
3719
3821
  }
3720
- return await Loader.loadRemoteOptions({
3822
+ return this.loadRemoteOptions({
3721
3823
  tagId: id,
3722
3824
  url: url,
3723
3825
  index: index
3724
3826
  });
3725
3827
  }
3726
- static async setJSON(id, domContainer, jsonUrl, index) {
3828
+ async setJSON(id, domContainer, jsonUrl, index) {
3727
3829
  let url, newId, newIndex, element;
3728
3830
  if (id instanceof HTMLElement) {
3729
3831
  element = id;
@@ -3735,15 +3837,15 @@
3735
3837
  url = jsonUrl;
3736
3838
  newIndex = index;
3737
3839
  }
3738
- return await Loader.loadRemoteOptions({
3840
+ return this.loadRemoteOptions({
3739
3841
  tagId: newId,
3740
3842
  url: url,
3741
3843
  index: newIndex,
3742
3844
  element: element
3743
3845
  });
3744
3846
  }
3745
- static setOnClickHandler(callback) {
3746
- const dom = Loader.dom();
3847
+ setOnClickHandler(callback) {
3848
+ const dom = this.dom();
3747
3849
  if (dom.length === 0) {
3748
3850
  throw new Error("Can only set click handlers after calling tsParticles.load() or tsParticles.loadJSON()");
3749
3851
  }
@@ -3752,6 +3854,7 @@
3752
3854
  }
3753
3855
  }
3754
3856
  }
3857
+ _Loader_engine = new WeakMap;
3755
3858
  function NumberUtils_clamp(num, min, max) {
3756
3859
  return Math.min(Math.max(num, min), max);
3757
3860
  }
@@ -1,2 +1,2 @@
1
- /*! tsParticles v1.39.3 by Matteo Bruni */
2
- !function(o,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t=e();for(var n in t)("object"==typeof exports?exports:o)[n]=t[n]}}(window,(function(){return function(){"use strict";var o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},r:function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{loadStrokeColorUpdater:function(){return m}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new Map,new Map,new Map,new Map,new Map,new Map,new Map;new WeakSet;function n(o){const e=l(o);let t=r(o);return e===t&&(t=0),Math.random()*(e-t)+t}function r(o){return"number"==typeof o?o:o.min}function l(o){return"number"==typeof o?o:o.max}function a(o,e){if(o===e||void 0===e&&"number"==typeof o)return o;const t=r(o),n=l(o);return void 0!==e?{min:Math.min(t,e),max:Math.max(n,e)}:a(t,n)}function s(o,e,t=!0){return o[void 0!==e&&t?e%o.length:function(o){return Math.floor(Math.random()*o.length)}(o)]}function i(o,e,t){let n=t;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?o+6*(e-o)*n:n<.5?e:n<2/3?o+(e-o)*(2/3-n)*6:o}function u(o){if(o.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(o.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=c(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(o.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=f(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,t=o.replace(e,((o,e,t,n,r)=>e+e+t+t+n+n+(void 0!==r?r+r:""))),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);return n?{a:void 0!==n[4]?parseInt(n[4],16)/255:1,b:parseInt(n[3],16),g:parseInt(n[2],16),r:parseInt(n[1],16)}:void 0}}function d(o,e,n=!0){var r,l,a;if(void 0===o)return;const i="string"==typeof o?{value:o}:o;let v;if("string"==typeof i.value)v=i.value===t.randomColorValue?h():function(o){return u(o)}(i.value);else if(i.value instanceof Array){v=d({value:s(i.value,e,n)})}else{const o=i.value,e=null!==(r=o.rgb)&&void 0!==r?r:i.value;if(void 0!==e.r)v=e;else{const e=null!==(l=o.hsl)&&void 0!==l?l:i.value;if(void 0!==e.h&&void 0!==e.l)v=c(e);else{const e=null!==(a=o.hsv)&&void 0!==a?a:i.value;void 0!==e.h&&void 0!==e.v&&(v=f(e))}}}return v}function v(o,e,t=!0){const n=d(o,e,t);return void 0!==n?function(o){const e=o.r/255,t=o.g/255,n=o.b/255,r=Math.max(e,t,n),l=Math.min(e,t,n),a={h:0,l:(r+l)/2,s:0};r!=l&&(a.s=a.l<.5?(r-l)/(r+l):(r-l)/(2-r-l),a.h=e===r?(t-n)/(r-l):a.h=t===r?2+(n-e)/(r-l):4+(e-t)/(r-l));a.l*=100,a.s*=100,a.h*=60,a.h<0&&(a.h+=360);return a}(n):void 0}function c(o){const e={b:0,g:0,r:0},t={h:o.h/360,l:o.l/100,s:o.s/100};if(0===t.s)e.b=t.l,e.g=t.l,e.r=t.l;else{const o=t.l<.5?t.l*(1+t.s):t.l+t.s-t.l*t.s,n=2*t.l-o;e.r=i(n,o,t.h+1/3),e.g=i(n,o,t.h),e.b=i(n,o,t.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function f(o){const e={b:0,g:0,r:0},t=o.h/60,n=o.s/100,r=o.v/100,l=r*n,a=l*(1-Math.abs(t%2-1));let s;if(t>=0&&t<=1?s={r:l,g:a,b:0}:t>1&&t<=2?s={r:a,g:l,b:0}:t>2&&t<=3?s={r:0,g:l,b:a}:t>3&&t<=4?s={r:0,g:a,b:l}:t>4&&t<=5?s={r:a,g:0,b:l}:t>5&&t<=6&&(s={r:l,g:0,b:a}),s){const o=r-l;e.r=Math.floor(255*(s.r+o)),e.g=Math.floor(255*(s.g+o)),e.b=Math.floor(255*(s.b+o))}return e}function h(o){const e=null!=o?o:0;return{b:Math.floor(n(a(e,256))),g:Math.floor(n(a(e,256))),r:Math.floor(n(a(e,256)))}}function p(o,e,t){if(o.enable=e.enable,o.enable){if(o.velocity=e.speed/100*t,e.sync)return;o.status=0,o.velocity*=Math.random(),o.value&&(o.value*=Math.random())}else o.velocity=0}function b(o,e,t,r,l){var a;const s=e;if(!s||!s.enable)return;const i=n(t.offset),u=(null!==(a=e.velocity)&&void 0!==a?a:0)*o.factor+3.6*i;l&&0!==s.status?(s.value-=u,s.value<0&&(s.status=0,s.value+=s.value)):(s.value+=u,l&&s.value>r&&(s.status=1,s.value-=s.value%r)),s.value>r&&(s.value%=r)}class g{constructor(o){this.container=o}init(o){var e,t;const n=this.container;o.stroke=o.options.stroke instanceof Array?s(o.options.stroke,o.id,o.options.reduceDuplicates):o.options.stroke,o.strokeWidth=o.stroke.width*n.retina.pixelRatio;const r=null!==(e=v(o.stroke.color))&&void 0!==e?e:o.getFillColor();r&&(o.strokeColor=function(o,e,t){const n={h:{enable:!1,value:o.h},s:{enable:!1,value:o.s},l:{enable:!1,value:o.l}};return e&&(p(n.h,e.h,t),p(n.s,e.s,t),p(n.l,e.l,t)),n}(r,null===(t=o.stroke.color)||void 0===t?void 0:t.animation,n.retina.reduceFactor))}isEnabled(o){var e,t,n,r;const l=null===(e=o.stroke)||void 0===e?void 0:e.color;return!o.destroyed&&!o.spawning&&!!l&&(void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.h.value)&&l.animation.h.enable||void 0!==(null===(n=o.strokeColor)||void 0===n?void 0:n.s.value)&&l.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&l.animation.l.enable)}update(o,e){this.isEnabled(o)&&function(o,e){var t,n,r,l,a,s,i,u,d,v;if(!(null===(t=o.stroke)||void 0===t?void 0:t.color))return;const c=o.stroke.color.animation,f=null!==(r=null===(n=o.strokeColor)||void 0===n?void 0:n.h)&&void 0!==r?r:null===(l=o.color)||void 0===l?void 0:l.h;f&&b(e,f,c.h,360,!1);const h=null!==(s=null===(a=o.strokeColor)||void 0===a?void 0:a.s)&&void 0!==s?s:null===(i=o.color)||void 0===i?void 0:i.s;h&&b(e,h,c.s,100,!0);const p=null!==(d=null===(u=o.strokeColor)||void 0===u?void 0:u.l)&&void 0!==d?d:null===(v=o.color)||void 0===v?void 0:v.l;p&&b(e,p,c.l,100,!0)}(o,e)}}async function m(o){await o.addParticleUpdater("strokeColor",(o=>new g(o)))}return e}()}));
1
+ /*! tsParticles v1.40.0 by Matteo Bruni */
2
+ !function(o,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t=e();for(var n in t)("object"==typeof exports?exports:o)[n]=t[n]}}(window,(function(){return function(){"use strict";var o={d:function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},r:function(o){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})}},e={};o.r(e),o.d(e,{loadStrokeColorUpdater:function(){return m}});class t{}t.generatedAttribute="generated",t.randomColorValue="random",t.midColorValue="mid",t.touchEndEvent="touchend",t.mouseDownEvent="mousedown",t.mouseUpEvent="mouseup",t.mouseMoveEvent="mousemove",t.touchStartEvent="touchstart",t.touchMoveEvent="touchmove",t.mouseLeaveEvent="mouseleave",t.mouseOutEvent="mouseout",t.touchCancelEvent="touchcancel",t.resizeEvent="resize",t.visibilityChangeEvent="visibilitychange",t.noPolygonDataLoaded="No polygon data loaded.",t.noPolygonFound="No polygon found, you need to specify SVG url in config.";new WeakMap;new WeakMap;new WeakMap,new WeakSet;new WeakMap;new WeakMap;new WeakMap;function n(o){const e=a(o);let t=r(o);return e===t&&(t=0),Math.random()*(e-t)+t}function r(o){return"number"==typeof o?o:o.min}function a(o){return"number"==typeof o?o:o.max}function l(o,e){if(o===e||void 0===e&&"number"==typeof o)return o;const t=r(o),n=a(o);return void 0!==e?{min:Math.min(t,e),max:Math.max(n,e)}:l(t,n)}function s(o,e,t=!0){return o[void 0!==e&&t?e%o.length:function(o){return Math.floor(Math.random()*o.length)}(o)]}function i(o,e,t){let n=t;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?o+6*(e-o)*n:n<.5?e:n<2/3?o+(e-o)*(2/3-n)*6:o}function u(o){if(o.startsWith("rgb")){const e=/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?{a:e.length>4?parseFloat(e[5]):1,b:parseInt(e[3],10),g:parseInt(e[2],10),r:parseInt(e[1],10)}:void 0}if(o.startsWith("hsl")){const e=/hsla?\(\s*(\d+)\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=c(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),l:parseInt(e[3],10),s:parseInt(e[2],10)}):void 0}if(o.startsWith("hsv")){const e=/hsva?\(\s*(\d+)°\s*,\s*(\d+)%\s*,\s*(\d+)%\s*(,\s*([\d.]+)\s*)?\)/i.exec(o);return e?function(o){const e=f(o);return{a:o.a,b:e.b,g:e.g,r:e.r}}({a:e.length>4?parseFloat(e[5]):1,h:parseInt(e[1],10),s:parseInt(e[2],10),v:parseInt(e[3],10)}):void 0}{const e=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,t=o.replace(e,((o,e,t,n,r)=>e+e+t+t+n+n+(void 0!==r?r+r:""))),n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i.exec(t);return n?{a:void 0!==n[4]?parseInt(n[4],16)/255:1,b:parseInt(n[3],16),g:parseInt(n[2],16),r:parseInt(n[1],16)}:void 0}}function d(o,e,n=!0){var r,a,l;if(void 0===o)return;const i="string"==typeof o?{value:o}:o;let v;if("string"==typeof i.value)v=i.value===t.randomColorValue?h():function(o){return u(o)}(i.value);else if(i.value instanceof Array){v=d({value:s(i.value,e,n)})}else{const o=i.value,e=null!==(r=o.rgb)&&void 0!==r?r:i.value;if(void 0!==e.r)v=e;else{const e=null!==(a=o.hsl)&&void 0!==a?a:i.value;if(void 0!==e.h&&void 0!==e.l)v=c(e);else{const e=null!==(l=o.hsv)&&void 0!==l?l:i.value;void 0!==e.h&&void 0!==e.v&&(v=f(e))}}}return v}function v(o,e,t=!0){const n=d(o,e,t);return void 0!==n?function(o){const e=o.r/255,t=o.g/255,n=o.b/255,r=Math.max(e,t,n),a=Math.min(e,t,n),l={h:0,l:(r+a)/2,s:0};r!=a&&(l.s=l.l<.5?(r-a)/(r+a):(r-a)/(2-r-a),l.h=e===r?(t-n)/(r-a):l.h=t===r?2+(n-e)/(r-a):4+(e-t)/(r-a));l.l*=100,l.s*=100,l.h*=60,l.h<0&&(l.h+=360);return l}(n):void 0}function c(o){const e={b:0,g:0,r:0},t={h:o.h/360,l:o.l/100,s:o.s/100};if(0===t.s)e.b=t.l,e.g=t.l,e.r=t.l;else{const o=t.l<.5?t.l*(1+t.s):t.l+t.s-t.l*t.s,n=2*t.l-o;e.r=i(n,o,t.h+1/3),e.g=i(n,o,t.h),e.b=i(n,o,t.h-1/3)}return e.r=Math.floor(255*e.r),e.g=Math.floor(255*e.g),e.b=Math.floor(255*e.b),e}function f(o){const e={b:0,g:0,r:0},t=o.h/60,n=o.s/100,r=o.v/100,a=r*n,l=a*(1-Math.abs(t%2-1));let s;if(t>=0&&t<=1?s={r:a,g:l,b:0}:t>1&&t<=2?s={r:l,g:a,b:0}:t>2&&t<=3?s={r:0,g:a,b:l}:t>3&&t<=4?s={r:0,g:l,b:a}:t>4&&t<=5?s={r:l,g:0,b:a}:t>5&&t<=6&&(s={r:a,g:0,b:l}),s){const o=r-a;e.r=Math.floor(255*(s.r+o)),e.g=Math.floor(255*(s.g+o)),e.b=Math.floor(255*(s.b+o))}return e}function h(o){const e=null!=o?o:0;return{b:Math.floor(n(l(e,256))),g:Math.floor(n(l(e,256))),r:Math.floor(n(l(e,256)))}}function p(o,e,t){if(o.enable=e.enable,o.enable){if(o.velocity=e.speed/100*t,e.sync)return;o.status=0,o.velocity*=Math.random(),o.value&&(o.value*=Math.random())}else o.velocity=0}function b(o,e,t,r,a){var l;const s=e;if(!s||!s.enable)return;const i=n(t.offset),u=(null!==(l=e.velocity)&&void 0!==l?l:0)*o.factor+3.6*i;a&&0!==s.status?(s.value-=u,s.value<0&&(s.status=0,s.value+=s.value)):(s.value+=u,a&&s.value>r&&(s.status=1,s.value-=s.value%r)),s.value>r&&(s.value%=r)}new WeakMap;class g{constructor(o){this.container=o}init(o){var e,t;const n=this.container;o.stroke=o.options.stroke instanceof Array?s(o.options.stroke,o.id,o.options.reduceDuplicates):o.options.stroke,o.strokeWidth=o.stroke.width*n.retina.pixelRatio;const r=null!==(e=v(o.stroke.color))&&void 0!==e?e:o.getFillColor();r&&(o.strokeColor=function(o,e,t){const n={h:{enable:!1,value:o.h},s:{enable:!1,value:o.s},l:{enable:!1,value:o.l}};return e&&(p(n.h,e.h,t),p(n.s,e.s,t),p(n.l,e.l,t)),n}(r,null===(t=o.stroke.color)||void 0===t?void 0:t.animation,n.retina.reduceFactor))}isEnabled(o){var e,t,n,r;const a=null===(e=o.stroke)||void 0===e?void 0:e.color;return!o.destroyed&&!o.spawning&&!!a&&(void 0!==(null===(t=o.strokeColor)||void 0===t?void 0:t.h.value)&&a.animation.h.enable||void 0!==(null===(n=o.strokeColor)||void 0===n?void 0:n.s.value)&&a.animation.s.enable||void 0!==(null===(r=o.strokeColor)||void 0===r?void 0:r.l.value)&&a.animation.l.enable)}update(o,e){this.isEnabled(o)&&function(o,e){var t,n,r,a,l,s,i,u,d,v;if(!(null===(t=o.stroke)||void 0===t?void 0:t.color))return;const c=o.stroke.color.animation,f=null!==(r=null===(n=o.strokeColor)||void 0===n?void 0:n.h)&&void 0!==r?r:null===(a=o.color)||void 0===a?void 0:a.h;f&&b(e,f,c.h,360,!1);const h=null!==(s=null===(l=o.strokeColor)||void 0===l?void 0:l.s)&&void 0!==s?s:null===(i=o.color)||void 0===i?void 0:i.s;h&&b(e,h,c.s,100,!0);const p=null!==(d=null===(u=o.strokeColor)||void 0===u?void 0:u.l)&&void 0!==d?d:null===(v=o.color)||void 0===v?void 0:v.l;p&&b(e,p,c.l,100,!0)}(o,e)}}async function m(o){await o.addParticleUpdater("strokeColor",(o=>new g(o)))}return e}()}));