tsparticles 1.37.1 → 1.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tsparticles.js CHANGED
@@ -3,10 +3,97 @@
3
3
  var a = factory();
4
4
  for (var i in a) (typeof exports === "object" ? exports : root)[i] = a[i];
5
5
  }
6
- })(this, (function() {
6
+ })(window, (function() {
7
7
  return function() {
8
8
  "use strict";
9
- var __webpack_require__ = {};
9
+ var __webpack_modules__ = {};
10
+ var __webpack_module_cache__ = {};
11
+ function __webpack_require__(moduleId) {
12
+ var cachedModule = __webpack_module_cache__[moduleId];
13
+ if (cachedModule !== undefined) {
14
+ return cachedModule.exports;
15
+ }
16
+ var module = __webpack_module_cache__[moduleId] = {
17
+ exports: {}
18
+ };
19
+ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
20
+ return module.exports;
21
+ }
22
+ __webpack_require__.m = __webpack_modules__;
23
+ !function() {
24
+ var deferred = [];
25
+ __webpack_require__.O = function(result, chunkIds, fn, priority) {
26
+ if (chunkIds) {
27
+ priority = priority || 0;
28
+ for (var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];
29
+ deferred[i] = [ chunkIds, fn, priority ];
30
+ return;
31
+ }
32
+ var notFulfilled = Infinity;
33
+ for (var i = 0; i < deferred.length; i++) {
34
+ var chunkIds = deferred[i][0];
35
+ var fn = deferred[i][1];
36
+ var priority = deferred[i][2];
37
+ var fulfilled = true;
38
+ for (var j = 0; j < chunkIds.length; j++) {
39
+ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((function(key) {
40
+ return __webpack_require__.O[key](chunkIds[j]);
41
+ }))) {
42
+ chunkIds.splice(j--, 1);
43
+ } else {
44
+ fulfilled = false;
45
+ if (priority < notFulfilled) notFulfilled = priority;
46
+ }
47
+ }
48
+ if (fulfilled) {
49
+ deferred.splice(i--, 1);
50
+ var r = fn();
51
+ if (r !== undefined) result = r;
52
+ }
53
+ }
54
+ return result;
55
+ };
56
+ }();
57
+ !function() {
58
+ __webpack_require__.F = {};
59
+ __webpack_require__.E = function(chunkId) {
60
+ Object.keys(__webpack_require__.F).map((function(key) {
61
+ __webpack_require__.F[key](chunkId);
62
+ }));
63
+ };
64
+ }();
65
+ !function() {
66
+ var getProto = Object.getPrototypeOf ? function(obj) {
67
+ return Object.getPrototypeOf(obj);
68
+ } : function(obj) {
69
+ return obj.__proto__;
70
+ };
71
+ var leafPrototypes;
72
+ __webpack_require__.t = function(value, mode) {
73
+ if (mode & 1) value = this(value);
74
+ if (mode & 8) return value;
75
+ if (typeof value === "object" && value) {
76
+ if (mode & 4 && value.__esModule) return value;
77
+ if (mode & 16 && typeof value.then === "function") return value;
78
+ }
79
+ var ns = Object.create(null);
80
+ __webpack_require__.r(ns);
81
+ var def = {};
82
+ leafPrototypes = leafPrototypes || [ null, getProto({}), getProto([]), getProto(getProto) ];
83
+ for (var current = mode & 2 && value; typeof current == "object" && !~leafPrototypes.indexOf(current); current = getProto(current)) {
84
+ Object.getOwnPropertyNames(current).forEach((function(key) {
85
+ def[key] = function() {
86
+ return value[key];
87
+ };
88
+ }));
89
+ }
90
+ def["default"] = function() {
91
+ return value;
92
+ };
93
+ __webpack_require__.d(ns, def);
94
+ return ns;
95
+ };
96
+ }();
10
97
  !function() {
11
98
  __webpack_require__.d = function(exports, definition) {
12
99
  for (var key in definition) {
@@ -19,11 +106,86 @@
19
106
  }
20
107
  };
21
108
  }();
109
+ !function() {
110
+ __webpack_require__.f = {};
111
+ __webpack_require__.e = function(chunkId) {
112
+ return Promise.all(Object.keys(__webpack_require__.f).reduce((function(promises, key) {
113
+ __webpack_require__.f[key](chunkId, promises);
114
+ return promises;
115
+ }), []));
116
+ };
117
+ }();
118
+ !function() {
119
+ __webpack_require__.u = function(chunkId) {
120
+ return "" + "tsparticles.pathseg" + ".js";
121
+ };
122
+ }();
123
+ !function() {
124
+ __webpack_require__.g = function() {
125
+ if (typeof globalThis === "object") return globalThis;
126
+ try {
127
+ return this || new Function("return this")();
128
+ } catch (e) {
129
+ if (typeof window === "object") return window;
130
+ }
131
+ }();
132
+ }();
22
133
  !function() {
23
134
  __webpack_require__.o = function(obj, prop) {
24
135
  return Object.prototype.hasOwnProperty.call(obj, prop);
25
136
  };
26
137
  }();
138
+ !function() {
139
+ var inProgress = {};
140
+ var dataWebpackPrefix = "tsparticles:";
141
+ __webpack_require__.l = function(url, done, key, chunkId) {
142
+ if (inProgress[url]) {
143
+ inProgress[url].push(done);
144
+ return;
145
+ }
146
+ var script, needAttach;
147
+ if (key !== undefined) {
148
+ var scripts = document.getElementsByTagName("script");
149
+ for (var i = 0; i < scripts.length; i++) {
150
+ var s = scripts[i];
151
+ if (s.getAttribute("src") == url || s.getAttribute("data-webpack") == dataWebpackPrefix + key) {
152
+ script = s;
153
+ break;
154
+ }
155
+ }
156
+ }
157
+ if (!script) {
158
+ needAttach = true;
159
+ script = document.createElement("script");
160
+ script.charset = "utf-8";
161
+ script.timeout = 120;
162
+ if (__webpack_require__.nc) {
163
+ script.setAttribute("nonce", __webpack_require__.nc);
164
+ }
165
+ script.setAttribute("data-webpack", dataWebpackPrefix + key);
166
+ script.src = url;
167
+ }
168
+ inProgress[url] = [ done ];
169
+ var onScriptComplete = function(prev, event) {
170
+ script.onerror = script.onload = null;
171
+ clearTimeout(timeout);
172
+ var doneFns = inProgress[url];
173
+ delete inProgress[url];
174
+ script.parentNode && script.parentNode.removeChild(script);
175
+ doneFns && doneFns.forEach((function(fn) {
176
+ return fn(event);
177
+ }));
178
+ if (prev) return prev(event);
179
+ };
180
+ var timeout = setTimeout(onScriptComplete.bind(null, undefined, {
181
+ type: "timeout",
182
+ target: script
183
+ }), 12e4);
184
+ script.onerror = onScriptComplete.bind(null, script.onerror);
185
+ script.onload = onScriptComplete.bind(null, script.onload);
186
+ needAttach && document.head.appendChild(script);
187
+ };
188
+ }();
27
189
  !function() {
28
190
  __webpack_require__.r = function(exports) {
29
191
  if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
@@ -36,6 +198,109 @@
36
198
  });
37
199
  };
38
200
  }();
201
+ !function() {
202
+ var scriptUrl;
203
+ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
204
+ var document = __webpack_require__.g.document;
205
+ if (!scriptUrl && document) {
206
+ if (document.currentScript) scriptUrl = document.currentScript.src;
207
+ if (!scriptUrl) {
208
+ var scripts = document.getElementsByTagName("script");
209
+ if (scripts.length) scriptUrl = scripts[scripts.length - 1].src;
210
+ }
211
+ }
212
+ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
213
+ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
214
+ __webpack_require__.p = scriptUrl;
215
+ }();
216
+ !function() {
217
+ var installedChunks = {
218
+ 649: 0,
219
+ 155: 0
220
+ };
221
+ __webpack_require__.f.j = function(chunkId, promises) {
222
+ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
223
+ if (installedChunkData !== 0) {
224
+ if (installedChunkData) {
225
+ promises.push(installedChunkData[2]);
226
+ } else {
227
+ if (true) {
228
+ var promise = new Promise((function(resolve, reject) {
229
+ installedChunkData = installedChunks[chunkId] = [ resolve, reject ];
230
+ }));
231
+ promises.push(installedChunkData[2] = promise);
232
+ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
233
+ var error = new Error;
234
+ var loadingEnded = function(event) {
235
+ if (__webpack_require__.o(installedChunks, chunkId)) {
236
+ installedChunkData = installedChunks[chunkId];
237
+ if (installedChunkData !== 0) installedChunks[chunkId] = undefined;
238
+ if (installedChunkData) {
239
+ var errorType = event && (event.type === "load" ? "missing" : event.type);
240
+ var realSrc = event && event.target && event.target.src;
241
+ error.message = "Loading chunk " + chunkId + " failed.\n(" + errorType + ": " + realSrc + ")";
242
+ error.name = "ChunkLoadError";
243
+ error.type = errorType;
244
+ error.request = realSrc;
245
+ installedChunkData[1](error);
246
+ }
247
+ }
248
+ };
249
+ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
250
+ } else installedChunks[chunkId] = 0;
251
+ }
252
+ }
253
+ };
254
+ __webpack_require__.F.j = function(chunkId) {
255
+ if ((!__webpack_require__.o(installedChunks, chunkId) || installedChunks[chunkId] === undefined) && true) {
256
+ installedChunks[chunkId] = null;
257
+ var link = document.createElement("link");
258
+ if (__webpack_require__.nc) {
259
+ link.setAttribute("nonce", __webpack_require__.nc);
260
+ }
261
+ link.rel = "prefetch";
262
+ link.as = "script";
263
+ link.href = __webpack_require__.p + __webpack_require__.u(chunkId);
264
+ document.head.appendChild(link);
265
+ }
266
+ };
267
+ __webpack_require__.O.j = function(chunkId) {
268
+ return installedChunks[chunkId] === 0;
269
+ };
270
+ var webpackJsonpCallback = function(parentChunkLoadingFunction, data) {
271
+ var chunkIds = data[0];
272
+ var moreModules = data[1];
273
+ var runtime = data[2];
274
+ var moduleId, chunkId, i = 0;
275
+ if (chunkIds.some((function(id) {
276
+ return installedChunks[id] !== 0;
277
+ }))) {
278
+ for (moduleId in moreModules) {
279
+ if (__webpack_require__.o(moreModules, moduleId)) {
280
+ __webpack_require__.m[moduleId] = moreModules[moduleId];
281
+ }
282
+ }
283
+ if (runtime) var result = runtime(__webpack_require__);
284
+ }
285
+ if (parentChunkLoadingFunction) parentChunkLoadingFunction(data);
286
+ for (;i < chunkIds.length; i++) {
287
+ chunkId = chunkIds[i];
288
+ if (__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
289
+ installedChunks[chunkId][0]();
290
+ }
291
+ installedChunks[chunkIds[i]] = 0;
292
+ }
293
+ return __webpack_require__.O(result);
294
+ };
295
+ var chunkLoadingGlobal = window["webpackChunktsparticles"] = window["webpackChunktsparticles"] || [];
296
+ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
297
+ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
298
+ }();
299
+ !function() {
300
+ __webpack_require__.O(0, [ 649 ], (function() {
301
+ __webpack_require__.E(917);
302
+ }), 5);
303
+ }();
39
304
  var __webpack_exports__ = {};
40
305
  __webpack_require__.r(__webpack_exports__);
41
306
  __webpack_require__.d(__webpack_exports__, {
@@ -6326,6 +6591,7 @@
6326
6591
  this.zLayers = 100;
6327
6592
  this.pageHidden = false;
6328
6593
  this._sourceOptions = sourceOptions;
6594
+ this._initialSourceOptions = sourceOptions;
6329
6595
  this.retina = new Retina(this);
6330
6596
  this.canvas = new Canvas(this);
6331
6597
  this.particles = new Particles(this);
@@ -6625,6 +6891,7 @@
6625
6891
  this.drawers.set(type, drawer);
6626
6892
  }
6627
6893
  }
6894
+ this._options.load(this._initialSourceOptions);
6628
6895
  this._options.load(this._sourceOptions);
6629
6896
  this.actualOptions = new Options;
6630
6897
  this.actualOptions.load(this._options);
@@ -10816,11 +11083,7 @@
10816
11083
  }
10817
11084
  async function loadPolygonMaskPlugin(tsParticles) {
10818
11085
  if (!isSsr() && !window.SVGPathSeg) {
10819
- await Promise.resolve().then((function() {
10820
- var e = new Error("Module is not available (weak dependency)");
10821
- e.code = "MODULE_NOT_FOUND";
10822
- throw e;
10823
- }));
11086
+ await __webpack_require__.e(917).then(__webpack_require__.t.bind(__webpack_require__, 167, 23));
10824
11087
  }
10825
11088
  const plugin = new PolygonMask_plugin_Plugin;
10826
11089
  await tsParticles.addPlugin(plugin);
@@ -10899,6 +11162,7 @@
10899
11162
  tsParticles.init();
10900
11163
  const {particlesJS: particlesJS, pJSDom: pJSDom} = initPjs(tsParticles);
10901
11164
  loadFull(tsParticles);
11165
+ __webpack_exports__ = __webpack_require__.O(__webpack_exports__);
10902
11166
  return __webpack_exports__;
10903
11167
  }();
10904
11168
  }));